Skip to content

[int] Replace mysql escape_string with alternatives#8645

Open
sfayer wants to merge 1 commit into
DIRACGrid:integrationfrom
sfayer:sql_escstr
Open

[int] Replace mysql escape_string with alternatives#8645
sfayer wants to merge 1 commit into
DIRACGrid:integrationfrom
sfayer:sql_escstr

Conversation

@sfayer

@sfayer sfayer commented Jun 26, 2026

Copy link
Copy Markdown
Member

Hi,

This patch replaces the two calls to mysql-client's escape_string with suitable alternatives for DIRACGrid/DIRACOS2#190 .

I've run the integration tests successfully against the current DIRACOS2 version and one including mysqlclient-2.2.8 as well.

The only change of behaviour here is that the old __escapeString function in DIRAC MySQL would use double-quotes around the string, the new version uses single quotes. I've not found any case where this causes a problem.

Regards,
Simon

BEGINRELEASENOTES
*Core
FIX: Replace escape_string with alternatives
ENDRELEASENOTES

@sfayer sfayer requested review from atsareg and fstagni as code owners June 26, 2026 14:28
@fstagni

fstagni commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

This would need to be backported, right? If we remove the mysql-client version pinning from DIRACOS2, then v8 and v9 would need to be compatible.

@sfayer

sfayer commented Jun 29, 2026

Copy link
Copy Markdown
Member Author

Yep, it would need backporting for those reasons. If you're happy with it, I can make the backport branches/PRs.

Regards,
Simon

@fstagni

fstagni commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Yes please. I will merge them all together.

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.

2 participants