Skip to content

Parser & query executor: support formalized ShowMigrations statement#12676

Closed
shlomi-noach wants to merge 5 commits intovitessio:mainfrom
planetscale:formalize-show-vitess-migrations
Closed

Parser & query executor: support formalized ShowMigrations statement#12676
shlomi-noach wants to merge 5 commits intovitessio:mainfrom
planetscale:formalize-show-vitess-migrations

Conversation

@shlomi-noach
Copy link
Contributor

Description

Up till now, a SHOW VITESS_MIGRATIONS ... statement was executed using ShowBasic. vtgate constructed a SELECT * query which was then sent to tablets.

As of this PR, we introduce a formal ShowMigrations statement. This new statement is supported by both vtgate and QueryExecutor, and sent to the underlying OnlineDDL executor, which then converts it to a SQL statement.

However, since this change affects both vtgate and vttablet, we also keep backwards compatibility. vtgate first attempts to send a ShowMigrations statement, but if it gets an INVALID_ARGUMENT from vttablet, then it falls back to plain SQL.

This is expected to be merged in v17.

In v18, we can remove the boilerplate code that supports backwards compatibility.

Related Issue(s)

Checklist

  • "Backport to:" labels have been added if this change should be back-ported
  • Tests were added or are not required
  • Did the new or modified tests pass consistently locally and on the CI
  • Documentation was added or is not required

Deployment Notes

Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
@shlomi-noach shlomi-noach added Type: Enhancement Logical improvement (somewhere between a bug and feature) Component: Query Serving Component: Online DDL Online DDL (vitess/native/gh-ost/pt-osc) labels Mar 21, 2023
@shlomi-noach shlomi-noach marked this pull request as draft March 21, 2023 15:46
@shlomi-noach
Copy link
Contributor Author

This work will be simplified. Will probably close this PR and open a new, simpler one.

Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
…es a ShowMigrationsPlan based on ShowBasic, in preparation for ShowBasic statement coming up in next releases

Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
@shlomi-noach shlomi-noach deleted the formalize-show-vitess-migrations branch March 22, 2023 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Online DDL Online DDL (vitess/native/gh-ost/pt-osc) Component: Query Serving Type: Enhancement Logical improvement (somewhere between a bug and feature)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant