sqlsmith: add DELETE FROM ... USING and UPDATE ... FROM support#98914
sqlsmith: add DELETE FROM ... USING and UPDATE ... FROM support#98914craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
bf1aa42 to
584202d
Compare
yuzefovich
left a comment
There was a problem hiding this comment.
I used cmd/smith to see how the new statements look (thanks Michael for that addition!), and they looked reasonable. Should I also actually run something (a command or a unit test) so that generated queries are executed against some DB, or is it ok to just let the nightly tests do that for us?
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @mgartner and @michae2)
michae2
left a comment
There was a problem hiding this comment.
If you really want to run against a DB you could do something like:
# first shell
cockroach demo movr
# second shell
smith -url 'postgresql://demo:demo60607@127.0.0.1:26257/movr?options=...'
But it's fine with me if we want to let the nightly tests try this out.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @mgartner)
mgartner
left a comment
There was a problem hiding this comment.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status:complete! 2 of 0 LGTMs obtained (waiting on @yuzefovich)
This commit makes it so that the sqlsmith can now generate statements of the form `DELETE FROM ... USING` and `UPDATE ... FROM`. We toss a coin every time before deciding to add another table (meaning in 50% cases these forms are not used, in 25% we have 1 extra table, etc). It also adjusts the generation of the RETURNING clause for DELETE and UPDATE to be able to pick from any of the table sources. Release note: None
584202d to
c3304de
Compare
|
TFTRs! I'll let nightly run tell us if anything is wrong (and will also backport to 23.1 but after a few days of baking on master). bors r+ |
|
Build failed (retrying...): |
|
Build failed (retrying...): |
|
Build succeeded: |
|
This seems to have found one bug on master, but otherwise didn't destabilize the tests, so I think it's worth backporting to 23.1. |
|
blathers backport 23.1 |
This commit makes it so that the sqlsmith can now generate statements of the form
DELETE FROM ... USINGandUPDATE ... FROM. We toss a coin every time before deciding to add another table (meaning in 50% cases these forms are not used, in 25% we have 1 extra table, etc). It also adjusts the generation of the RETURNING clause for DELETE and UPDATE to be able to pick from any of the table sources.Fixes: #98910.
Release note: None