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

DDL using explicit keyspaceID syntax #8001

Closed
rafael opened this issue Apr 29, 2021 · 0 comments · Fixed by #8013
Closed

DDL using explicit keyspaceID syntax #8001

rafael opened this issue Apr 29, 2021 · 0 comments · Fixed by #8013

Comments

@rafael
Copy link
Member

rafael commented Apr 29, 2021

Overview of the Issue

DDL statements should respect target shard/kid that has been specified by the user in the mysql session.

Reproduction Steps

  1. Create a keyspace with multiple shards and no vschema.
  2. Try to perform an ALTER targeting specific kid:
use keyspace[kid]
alter statement ...
  1. This alter is not respecting the target and it will try to apply it to all shards on this keyspace. Because there is no vschema, you will get an error like this:
 Keyspace does not have exactly one shard

Expected behavior

  • This worked prior to 9.0. It is a weird use case, but at Slack we rely on this behavior.
  • Given that the target is being explicit about kid/shard that the DDL should be run, Vitess shouldn't error and apply the DDL.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants