]> 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 16:16:51 +0000 (11:16 -0500)
commite81bc1f098ea40cf38ec4e4007c11c7f3ffc9712
tree55f5d0663d3239182fc01605c2c144bb54657127
parent0cc8a08262f6b92746a280387282d55beb24fa9d
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
doc/build/changelog/unreleased_13/5800.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mysql/base.py
test/dialect/mysql/test_compiler.py