Skip to content
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: allow unrelated statements after schema changes in txns #15297

Closed
maddyblue opened this issue Apr 24, 2017 · 0 comments
Closed

sql: allow unrelated statements after schema changes in txns #15297

maddyblue opened this issue Apr 24, 2017 · 0 comments
Assignees
Milestone

Comments

@maddyblue
Copy link
Contributor

Recently I made a webapp from scratch and started work by finding a common Go SQL migrator. This migrator (https://github.com/rubenv/sql-migrate) issues an INSERT into its tracking table after executing the schema changes, all in the same transaction. This triggers the error in #15283. We should allow this kind of behavior as long as the INSERT (or rather, the statement after the schema change) doesn't depend on the schema change, since other migrators may have similar behavior.

@maddyblue maddyblue added this to the 1.1 milestone Apr 24, 2017
vivekmenezes added a commit to vivekmenezes/cockroach that referenced this issue Apr 29, 2017
the test also includes an insert into an auxiliary table in the
same transaction as a way to record the schema change transaction.

fixes cockroachdb#15297
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants