Skip to content

Allow empty SQL mode in MySQL database URLs - #2326

Open
IlyaKhalafi wants to merge 3 commits into
tortoise:developfrom
IlyaKhalafi:fix/empty-url-parameters
Open

IlyaKhalafi wants to merge 3 commits into
tortoise:developfrom
IlyaKhalafi:fix/empty-url-parameters

Conversation

@IlyaKhalafi

Copy link
Copy Markdown
Contributor

Description

This PR fixes sql_mode= being ignored in MySQL database URLs. With this, an empty mode clears the default through both aiomysql and asyncmy.

Motivation and Context

Fixes #1311.

How Has This Been Tested?

make check, the full SQLite suite with 2,010 tests passing, and 101 focused tests with each driver. Real connections against MariaDB 10.11.14 also cover empty, default and explicit modes, transactions and reopening connections.

Checklist

  • My code follows the code style of this project.
  • I have added the changelog accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed in the environments listed above.

@codspeed

codspeed Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

1 warning

⚠️ 21 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 24 untouched benchmarks


Comparing IlyaKhalafi:fix/empty-url-parameters (f40eb1b) with develop (abc91d7)

Open in CodSpeed

@IlyaKhalafi
IlyaKhalafi force-pushed the fix/empty-url-parameters branch from 27c0499 to f40eb1b Compare October 23, 2026 16:36

This branch has not been deployed

No deployments
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.

Unable to set empty sql_mode for MySQL

1 participant