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

fix(migration): Catch DatabaseError to avoid migration crash with MySQL 8.0 #21679

Merged
merged 1 commit into from
Oct 4, 2022

Conversation

qlands
Copy link
Contributor

@qlands qlands commented Oct 3, 2022

Fix #20685 by also catching DatabaseError exception.

The former code only caught OperationalError but with SQLAlchemy==1.3.24 + mysql-connector-python==8.0.30 the exception is DatabaseError. Added DatabaseError to avoid the migration crash.

Has associated issue: 20685

@qlands qlands requested a review from a team as a code owner October 3, 2022 12:34
@qlands qlands changed the title Catch DatabaseError to avoid migration crash in revision b92d69a6643c with MySQL 8.0 fix(migration-revision-b92d69a6643c): Catch DatabaseError to avoid migration crash in revision b92d69a6643c with MySQL 8.0 Oct 3, 2022
Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

Thanks for the fix @qlands !

@villebro villebro changed the title fix(migration-revision-b92d69a6643c): Catch DatabaseError to avoid migration crash in revision b92d69a6643c with MySQL 8.0 fix(migration): Catch DatabaseError to avoid migration crash with MySQL 8.0 Oct 4, 2022
@villebro villebro merged commit 5da20f4 into apache:master Oct 4, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Database error when migrating from 1.4.2 to 1.5.1 under MySQL 8
3 participants