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

Online DDL/VReplication: AUTO_INCREMENT support and tests #8223

Merged

Conversation

shlomi-noach
Copy link
Contributor

Description

In this PR we enable the auto_increment suite of tests for Online DDL/VReplication.

For these tests to now pass, these code changes were needed:

  • Analyze ALTER statement and determine whether AUTO_INCREMENT is specified
  • Analyze source table and determine if AUTO_INCREMENT is applicable
  • If applicable and if no user override, copy AUTO_INCREMENT value to target table
  • set NO_AUTO_VALUE_ON_ZERO in VPlayer's sql_mode

Related Issue(s)

Checklist

  • Tests were added or are not required
  • Documentation was added or is not required

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
Copy link
Contributor Author

Tests that were added:

Jun 01 08:37:38     --- PASS: TestSchemaChange/autoinc-copy-deletes (11.16s)
Jun 01 08:37:38     --- PASS: TestSchemaChange/autoinc-copy-deletes-user-defined (9.14s)
Jun 01 08:37:38     --- PASS: TestSchemaChange/autoinc-copy-simple (10.13s)
Jun 01 08:37:38     --- PASS: TestSchemaChange/autoinc-zero-value (10.12s)

Copy link
Member

@GuptaManan100 GuptaManan100 left a comment

Choose a reason for hiding this comment

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

LGTM 🪐

@shlomi-noach shlomi-noach merged commit e520c4a into vitessio:main Jun 2, 2021
@shlomi-noach shlomi-noach deleted the online-ddl-vrepl-auto-increment branch June 2, 2021 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Build/CI Component: Query Serving Type: CI/Build Type: Enhancement Logical improvement (somewhere between a bug and feature)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants