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

Adding ddl_strategy session variable #7042

Merged

Conversation

shlomi-noach
Copy link
Contributor

Context: #6782 (comment)
Additional contexts: #6926, #6689

This PR adds a new session variable ddl_strategy. Right now this variable is unused; it just exists and it is readable and writable.

The objective is to later be able to:

SET SESSION ddl_strategy='gh-ost';
ALTER TABLE my_table ADD COLUMN i INT;

and have that ALTER TABLE run as online DDL.

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>
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 changed the title Online ddl session variable Adding ddl_strategy session variable Nov 15, 2020
case DDLStrategyNormal:
return DDLStrategyNormal, nil
default:
return DDLStrategyNormal, fmt.Errorf("Unknown online DDL strategy: '%v'", strategy)
Copy link
Member

Choose a reason for hiding this comment

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

nit: either return value or error

Copy link
Member

Choose a reason for hiding this comment

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

in this case DDLStrategyNormal is equilavent to returning empty string, so this may be ok.

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.

3 participants