We are using MySQL 3.23.31 on that machine :-) 
It seems tx_isolation was added ad 4.0.3 (according to 
http://dev.mysql.com/doc/refman/4.1/en/server-system-variables.html#sysvar_tx_isolation).
 
But if I add 
if self.server_version_info < (4, 0, 3):
  raise NotImplementedError()

I get another traceback:
Traceback (most recent call last):
  File "./t.py", line 9, in ?
    con=engine.connect()
  File 
"/opt/python-2.4/lib/python2.4/site-packages/sqlalchemy/engine/base.py", 
line 2472, in connect
    return self._connection_cls(self, **kwargs)
  File 
"/opt/python-2.4/lib/python2.4/site-packages/sqlalchemy/engine/base.py", 
line 878, in __init__
    self.__connection = connection or engine.raw_connection()
  File 
"/opt/python-2.4/lib/python2.4/site-packages/sqlalchemy/engine/base.py", 
line 2558, in raw_connection
    return self.pool.unique_connection()
  File "/opt/python-2.4/lib/python2.4/site-packages/sqlalchemy/pool.py", 
line 183, in unique_connection
    return _ConnectionFairy(self).checkout()
  File "/opt/python-2.4/lib/python2.4/site-packages/sqlalchemy/pool.py", 
line 387, in __init__
    rec = self._connection_record = pool._do_get()
  File "/opt/python-2.4/lib/python2.4/site-packages/sqlalchemy/pool.py", 
line 741, in _do_get
    con = self._create_connection()
  File "/opt/python-2.4/lib/python2.4/site-packages/sqlalchemy/pool.py", 
line 188, in _create_connection
    return _ConnectionRecord(self)
  File "/opt/python-2.4/lib/python2.4/site-packages/sqlalchemy/pool.py", 
line 273, in __init__
    pool.dispatch.first_connect.exec_once(self.connection, self)
  File "/opt/python-2.4/lib/python2.4/site-packages/sqlalchemy/event.py", 
line 282, in exec_once
    self(*args, **kw)
  File "/opt/python-2.4/lib/python2.4/site-packages/sqlalchemy/event.py", 
line 291, in __call__
    fn(*args, **kw)
  File 
"/opt/python-2.4/lib/python2.4/site-packages/sqlalchemy/engine/strategies.py", 
line 167, in first_connect
    dialect.initialize(c)
  File 
"/opt/python-2.4/lib/python2.4/site-packages/sqlalchemy/dialects/mysql/base.py",
 
line 2005, in initialize
    self._detect_ansiquotes(connection)
  File 
"/opt/python-2.4/lib/python2.4/site-packages/sqlalchemy/dialects/mysql/base.py",
 
line 2246, in _detect_ansiquotes
    mode = row[1] or ''
  File 
"/opt/python-2.4/lib/python2.4/site-packages/sqlalchemy/dialects/mysql/base.py",
 
line 2737, in __getitem__
    item = self.rowproxy[index]
TypeError: unsubscriptable object

My test script is pretty simple.
...
url='%(driver)s://%(user)s:%(passwd)s@%(host)s/%(db)s' % cfg
engine=create_engine(url)
con=engine.connect()
con.close()

Thanks

Op maandag 17 september 2012 13:21:02 UTC+2 schreef Ids het volgende:
>
> We were using SQLAlchemy 0.5.1 and wanted to upgrade to 0.7.8 but ran into 
> the following problem.
> When trying to create an engine, the mysql dialect tries to determine the 
> current isolation level by issuing the SELECT @@tx_isolation; SQL statement 
> (from dialects/mysql/base.py get_isolation_level()). However, this 
> statement is not supported on MySQL 3.23 and therefore SQLAlchemy 0.7.8 
> doesn't seem to work anymore.
>
> We worked around this by not using SQLAlchemy anymore for our antique 
> MySQL 3.23 db, but this means you could also delete 3.23 from the supported 
> database list. As a solution you could maybe add a try/except clause around 
> it with a version check just like you do in do_commit() in 
> dialects/mysql/base.py
>
> Best regards,
> Ids
>

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sqlalchemy/-/YfpYDdO8XCwJ.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to