Re: [Sqlalchemy-tickets] [sqlalchemy] #2771: Full Unicode support on MySQL
Brought to you by:
zzzeek
|
From: sqlalchemy <mi...@zz...> - 2013-07-03 15:30:33
|
#2771: Full Unicode support on MySQL
-----------------------------------+------------------------------------
Reporter: kondi | Owner: zzzeek
Type: defect | Status: closed
Priority: medium | Milestone:
Component: mysql | Severity: no triage selected yet
Resolution: worksforme | Keywords:
Progress State: completed/closed |
-----------------------------------+------------------------------------
Changes (by zzzeek):
* status: new => closed
* component: cextensions => mysql
* resolution: => worksforme
* status_field: awaiting triage => completed/closed
Comment:
without further [http://www.sqlalchemy.org/participate.html#bugs detail]
given, this issue would appear to have nothing to do with SQLAlchemy - the
"charset" parameter are straight pass-thrus to the database API and the
database itself, SQLAlchemy has no awareness of a "!LookupError" and by
default defers all unicode behaviors to the DBAPI and database itself in
the case of MySQL. A stack trace would help to reveal the source of this
issue.
sample test passes without issue:
{{{
#!python
from sqlalchemy import *
e = create_engine("mysql://scott:tiger@localhost/test", echo=True)
m = MetaData()
t = Table('t', m, Column('data', String(50)), mysql_engine='InnoDB',
mysql_charset='utf8mb4')
m.create_all(e)
e.execute(t.insert(), data="hello world")
}}}
output:
{{{
CREATE TABLE t (
data VARCHAR(50)
)ENGINE=InnoDB CHARSET=utf8mb4
2013-07-03 11:28:18,033 INFO sqlalchemy.engine.base.Engine ()
2013-07-03 11:28:18,049 INFO sqlalchemy.engine.base.Engine COMMIT
2013-07-03 11:28:18,049 INFO sqlalchemy.engine.base.Engine INSERT INTO t
(data) VALUES (%s)
2013-07-03 11:28:18,049 INFO sqlalchemy.engine.base.Engine ('hello
world',)
2013-07-03 11:28:18,051 INFO sqlalchemy.engine.base.Engine COMMIT
}}}
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2771#comment:1>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|