]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Add check for blank string coming from MySQL's enum
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 28 Oct 2016 18:13:31 +0000 (14:13 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 28 Oct 2016 18:17:40 +0000 (14:17 -0400)
commitdd4e09d38729c2479af19da082a07f0c44f7026c
tree49aa2cef401d89ca448778aaad1a7922cc000891
parent60b68ff4ee15ad1be42031f90156072cdfe1f1d0
Add check for blank string coming from MySQL's enum

MySQL's native ENUM type supports any non-valid value being sent, and
in response will return a blank string.  A hardcoded rule to check for
"is returning the blank string" has been added to the  MySQL
implementation for ENUM so that this blank string is returned to the
application rather than being rejected as a non-valid value.  Note that
if your MySQL enum is linking values to objects, you still get the
blank string back.

Change-Id: I61f85c20293a48b0c11a31f2a19f6756c206bd20
Fixes: #3841
doc/build/changelog/changelog_11.rst
lib/sqlalchemy/dialects/mysql/enumerated.py
test/dialect/mysql/test_types.py