Skip to content

[int] Catch ValueError when formatting SQL statement logs#8642

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

[int] Catch ValueError when formatting SQL statement logs#8642
sfayer wants to merge 1 commit into
DIRACGrid:integrationfrom
sfayer:fix_mysqlog_simpler

Conversation

@sfayer

@sfayer sfayer commented Jun 25, 2026

Copy link
Copy Markdown
Member

Hi,

This is my simpler fix to avoid needing mogrify in the mysql library: If there is an unescaped formatting character in the SQL statement, the logging will throw ValueError. By catching it here, it'll raise a proper ProgrammingError from the mysql library instead, which will hopefully make it clearer that something is wrong.

Regards,
Simon

BEGINRELEASENOTES
*Core
FIX: Catch ValueError when formatting SQL statement logs
ENDRELEASENOTES

@sfayer sfayer requested review from atsareg and fstagni as code owners June 25, 2026 16:40
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