-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sql: fix DDL after write error message #58182
sql: fix DDL after write error message #58182
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @jayshrivastava and @lucy-zhang)
pkg/sql/opt/exec/execbuilder/relational.go, line 161 at r1 (raw file):
"if the first write statement occurs before the first schema change statement in a transaction, "+ "then no schema change statements may follow the write statement"),
What do you think of the first schema change statement in a transaction must precede all writes
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r1.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @jayshrivastava)
pkg/sql/opt/exec/execbuilder/relational.go, line 161 at r1 (raw file):
Previously, lucy-zhang (Lucy Zhang) wrote…
"if the first write statement occurs before the first schema change statement in a transaction, "+ "then no schema change statements may follow the write statement"),
What do you think of
the first schema change statement in a transaction must precede all writes
?
Or any writes
Previously, the error message said "schema change statement cannot follow a statement that has written in the same transaction". This message is incorrect because DDLs after writes are allowed if the first schema change in a txn occurs before the first write. This change updates the error message to reflect the latter. Release note: None
36662fd
to
da4b129
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @lucy-zhang)
pkg/sql/opt/exec/execbuilder/relational.go, line 161 at r1 (raw file):
Previously, lucy-zhang (Lucy Zhang) wrote…
Or
any writes
Makes sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Reviewed 2 of 2 files at r2.
Reviewable status: complete! 0 of 0 LGTMs obtained
bors r=lucy-zhang |
Build succeeded: |
Previously, the error message said "schema change statement
cannot follow a statement that has written in the same
transaction". This message is incorrect because DDLs after
writes are allowed if the first schema change in a txn occurs
before the first write. This change updates the error message
to reflect the latter.
Release note: None