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

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

Merged

Conversation

kalfonso
Copy link
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
@@ -25,6 +25,7 @@ import (
"net/http/httptest"
"reflect"
"sort"
"square/up/statsdaemon/assert"
Copy link
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
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 <[email protected]>
@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