]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
hardcode now(), current_timstamp() into the MySQL regex
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 5 Jun 2025 12:58:49 +0000 (08:58 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 5 Jun 2025 16:41:19 +0000 (12:41 -0400)
commit8e9f789f1aa0309005e8b7725643b32802e7d214
treedcb5fa5fb4fd21788c84e49f7a73a1c5572d919d
parent742a3a6f9b320514e51e8f882143665a8edf31b9
hardcode now(), current_timstamp() into the MySQL regex

Fixed yet another regression caused by by the DEFAULT rendering changes in
2.0.40 :ticket:`12425`, similar to :ticket:`12488`, this time where using a
CURRENT_TIMESTAMP function with a fractional seconds portion inside a
textual default value would also fail to be recognized as a
non-parenthesized server default.

There's no way to do this other than start hardcoding a list
of MySQL functions that demand that parenthesis are not added around
them, I can think of no other heuristic that will work here.
Suggestions welcome

Fixes: #12648
Change-Id: I75d274b56306089929b369ecfb23604e9d6fa9dd
doc/build/changelog/unreleased_20/12648.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mysql/base.py
test/dialect/mysql/test_compiler.py
test/dialect/mysql/test_query.py