]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
narrow the check for double-paren exprs in mysql create_index
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 26 Dec 2020 16:16:51 +0000 (11:16 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 26 Dec 2020 21:00:52 +0000 (16:00 -0500)
commit2aa511267fcb1c6e955f9fa715f78eba34f6e2d0
treeedf3947fbd3d5696abb329460233a53a0b06e7c6
parent94ac28e2b975e6be82cc961dde1ccecee547a159
narrow the check for double-paren exprs in mysql create_index

Fixed regression from SQLAlchemy 1.3.20 caused by the fix for
:ticket:`5462` which adds double-parenthesis for MySQL functional
expressions in indexes, as is required by the backend, this inadvertently
extended to include arbitrary :func:`_sql.text` expressions as well as
Alembic's internal textual component,  which are required by Alembic for
arbitrary index expressions which don't imply double parenthesis.  The
check has been narrowed to include only binary/ unary/functional
expressions directly.

Fixes: #5800
Change-Id: I40f83c6f9dd04b984d0c86eba632a588570709a1
(cherry picked from commit e81bc1f098ea40cf38ec4e4007c11c7f3ffc9712)
doc/build/changelog/unreleased_13/5800.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mysql/base.py
test/dialect/mysql/test_compiler.py