strange behavior with MySQL empty SET

Issue #3283 resolved
yoch created an issue

Hi all,

I want to use the MySQL SET type with sqlalchemy, but in case we have an empty set in database, sqlalchemy return an set with one element (the empty string).

Thank you

Comments (4)

  1. Mike Bayer repo owner
    • The :class:.mysql.SET type has been overhauled to no longer assume that the empty string, or a set with a single empty string value, is in fact a set with a single empty string; instead, this is by default treated as the empty set. In order to handle persistence of a :class:.mysql.SET that actually wants to include the blank value '' as a legitimate value, a new bitwise operational mode is added which is enabled by the :paramref:.mysql.SET.retrieve_as_bitwise flag, which will persist and retrieve values unambiguously using their bitflag positioning. Storage and retrieval of unicode values for driver configurations that aren't converting unicode natively is also repaired. fixes #3283

    → <<cset 93742b3d5c16>>

  2. Log in to comment