SET MySQL data type should convert to Python's built-in set

Bug #510096 reported by Geert JM Vanderkelen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Connector/Python
Fix Released
Low
Geert JM Vanderkelen

Bug Description

Right now a SET MySQL data type is returned as Python list. To keep compatibility with other drivers it would be better to return it as a set instead.

    c.execute("""CREATE TABLE myconnpy_sets (
        id int unsigned auto_increment key,
        c1 SET('foo','bar','foobar')
    )""")

    c.execute("INSERT INTO myconnpy_sets (c1) VALUES ('foo')")

returns:

[(1L, ['foo'])]

should be:

[(1L, set(['foo']))]

Tags: compat

Related branches

Revision history for this message
Geert JM Vanderkelen (geertjmvdk) wrote :

revno: 183
committer: Geert Vanderkelen <email address hidden>
branch nick: myconnpy-Alchemy
timestamp: Wed 2010-01-20 14:37:04 +0100
message:
  Change in convesion of SET data type to Python set

  * MySQL SET data type is now converted to a Python set built-in type.
  * Updated test cases to reflect change.

Changed in myconnpy:
status: In Progress → Fix Committed
Changed in myconnpy:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.