Skip to content

Execute "ALTER VSCHEMA" statements without specifying keyspace in the…#5141

Merged
sougou merged 1 commit intovitessio:masterfrom
kalfonso:kalfonso.190828-later-vschema-keyspace
Aug 30, 2019
Merged

Execute "ALTER VSCHEMA" statements without specifying keyspace in the…#5141
sougou merged 1 commit intovitessio:masterfrom
kalfonso:kalfonso.190828-later-vschema-keyspace

Conversation

@kalfonso
Copy link
Copy Markdown
Contributor

@kalfonso kalfonso commented Aug 28, 2019

Execute "ALTER VSCHEMA" statements without specifying keyspace in the target connection.

If the keyspace is not present in the target string, it will be derived in this case from the vindex and table qualifiers in the vschema sql statements. This is already done by func (e *Executor) handleVSchemaDDL(...)

This PR enhanced "ALTER VSCHEMA CREATE VINDEX" and "ALTER VSCHEMA DROP VINDEX" to qualify the vindex name with the keyspace and provide this information to the AST.

@kalfonso kalfonso requested a review from sougou as a code owner August 28, 2019 06:01
@kalfonso kalfonso force-pushed the kalfonso.190828-later-vschema-keyspace branch 2 times, most recently from 072b2af to b49782b Compare August 28, 2019 06:11
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Import needs fixing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, fixed!

@kalfonso kalfonso force-pushed the kalfonso.190828-later-vschema-keyspace branch from b49782b to ac091cd Compare August 30, 2019 00:18
… target connection.

If the keyspace is not present in the target string, it will be derived in this case from the vindex and table qualifiers in the vschema sql statements

Signed-off-by: Karel Alfonso Sague <kalfonso@squareup.com>
@sougou sougou merged commit 74ae4e2 into vitessio:master Aug 30, 2019
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

Successfully merging this pull request may close these issues.

2 participants