Skip to content

[int] Fix MySQL logging for statements containing wildcard#8620

Closed
sfayer wants to merge 1 commit into
DIRACGrid:integrationfrom
sfayer:fix_mysqlwildlog
Closed

[int] Fix MySQL logging for statements containing wildcard#8620
sfayer wants to merge 1 commit into
DIRACGrid:integrationfrom
sfayer:fix_mysqlwildlog

Conversation

@sfayer

@sfayer sfayer commented Jun 16, 2026

Copy link
Copy Markdown
Member

It appears my SQL log fix-up was too simple: It didn't handle the case where a mysql "%" wildcard was in the expression properly... This patch converts it to the proper MySQL function. This is quite a lot more expensive as it involves using the cursor (i.e. probably a round-trip to the mysql server), I've added a gate so it only does that if the log message is actually going to be used so we don't slow down production running.

BEGINRELEASENOTES
*Core
FIX: Fix MySQL logging for statements containing wildcard
ENDRELEASENOTES

@sfayer sfayer requested review from atsareg and fstagni as code owners June 16, 2026 09:50
@sfayer

sfayer commented Jun 25, 2026

Copy link
Copy Markdown
Member Author

I've looked through the mysqldb library code and mogrify isn't that special: % characters still need to be double escaped... I'll replace this pull request with a much simpler one and stick with the existing log set-up.

@sfayer sfayer closed this Jun 25, 2026
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.

1 participant