-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Don't use CREATE TABLE AS SELECT ... with mySQL #19999
Don't use CREATE TABLE AS SELECT ... with mySQL #19999
Conversation
The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease. |
Can you define "doesn't play nicely with"? Cos in my testing it did work (but I didn't test mysql beyond one or two rows. Duh, read the full error message Ash. |
Ah, This doesn't play nicely when replication is turned on. |
I am amazed at MySQLs ability to find new ways to make me sad. |
Very, very, very much so. I expressed my feelings on MySQL today at the talk I gave at Data Science Summit a bit after I found out that about half of the audience used it, unfortunately. I hope that brings more people to Postgres. |
) (cherry picked from commit 4996501)
Closes: #19988
Splitting this
CREATE TABLE AS SELECT
query into two queries (CREATE TABLE LIKE ..
followed byINSERT INTO
) because the former doesn't play nicely with MySQL.This PR is inherently difficult to test/validate, but I ran the proposed queries against the metadata database in our development environment (where we first ran into this issue) and was able to replicate the issue and verify the fix:
Tomorrow I can create a patched image with these changes and validate the fix in our development environment.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.