-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Query executor: preparing for SHOW VITESS_MIGRATIONS via ShowBasic
#12688
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
Changes from all commits
6c09953
ec5e871
a654711
bf8c073
703c532
c4be8e2
d0c46ac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -135,7 +135,10 @@ func analyzeInsert(ins *sqlparser.Insert, tables map[string]*schema.Table) (plan | |
| func analyzeShow(show *sqlparser.Show, dbName string) (plan *Plan, err error) { | ||
| switch showInternal := show.Internal.(type) { | ||
| case *sqlparser.ShowBasic: | ||
| if showInternal.Command == sqlparser.Table { | ||
| switch showInternal.Command { | ||
| case sqlparser.VitessMigrations: | ||
| return &Plan{PlanID: PlanShowMigrations, FullStmt: show}, nil | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i chose to return a
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The benefit of doing it at plan time is that it is cached. So, at execution, it does not need to create the select query and parse it.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Caching is a good point. I feel like it's wrong to construct this query in |
||
| case sqlparser.Table: | ||
| // rewrite WHERE clause if it exists | ||
| // `where Tables_in_Keyspace` => `where Tables_in_DbName` | ||
| if showInternal.Filter != nil { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.