Skip to content

feat(mysql): add ability to set or unset the CLIENT_IGNORE_SPACE flag - #4461

Open
ianks wants to merge 1 commit into
transact-rs:mainfrom
ianks:mysql-ignore-space
Open

ianks wants to merge 1 commit into
transact-rs:mainfrom
ianks:mysql-ignore-space

Conversation

@ianks

@ianks ianks commented Oct 14, 2026

Copy link
Copy Markdown

Does your PR solve an issue?

fixes #4460

Same shape as #4334, but for CLIENT_IGNORE_SPACE. This adds MySqlConnectOptions::ignore_space(bool), and only sets the capability when it's enabled. I went ahead and put this up alongside the issue since it's small, happy to rework it if you'd rather go a different direction.

The test checks that the server reflects the flag in the session's sql_mode, and that COUNT (*) parses with the default and fails with ignore_space(false). It fails without the change to MySqlStream::with_socket.

Is this a breaking change?

No. The default is true, which is the current behavior.

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.

Allow unsetting CLIENT_IGNORE_SPACE on MySQL connections

1 participant