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

relational.write - SQL statements are executed individually instead of in bulk for MySQL #373

Closed
spicy-sauce opened this issue Sep 18, 2024 · 1 comment
Assignees
Labels
block bug Something isn't working

Comments

@spicy-sauce
Copy link
Member

No description provided.

@spicy-sauce spicy-sauce added bug Something isn't working block labels Sep 18, 2024
@spicy-sauce spicy-sauce self-assigned this Sep 18, 2024
@spicy-sauce
Copy link
Member Author

Seems related to pymysql driver.
For upserts, moving this to the execute command solves the issue:

        # Disable the new MySQL 8.0.17+ default behavior of requiring an alias for ON DUPLICATE KEY UPDATE
        # This behavior is not supported by pymysql driver
         if self.engine.driver == "pymysql":
           self.engine.dialect._requires_alias_for_on_duplicate_key = False

But it appears that the deletes are also executed one by one.
Replacing pymysql with mysql-connector-python seems to solve the problem.

@spicy-sauce spicy-sauce changed the title relational.write - SQL statements execute individually instead of in bulk for MySQL relational.write - SQL statements are executed individually instead of in bulk for MySQL Sep 19, 2024
spicy-sauce added a commit that referenced this issue Sep 19, 2024
… of in bulk for MySQL #373 (#375)

* set dialect._requires_alias_for_on_duplicate_key for pymysql's engine dialect

* update json schemas

* formatting

* docstring

---------

Co-authored-by: github-actions <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
block bug Something isn't working
Projects
None yet
1 participant