Re: [sqlalchemy] Re: isolation level not supported on MySQL 3.23
On Tue, Sep 18, 2012 at 1:33 PM, Ids idsvandermo...@gmail.com wrote: and of course sqlalchemy 0.5.1 did work. So something in sqlalchemy 0.7.8 broke... I just hit this error myself when using the latest SQLAlchemy (both 0.7.9 and latest 'default' from hg) against MySQL 3.23.58. Adding the server_version_info check (for version 4.0.3) made the problem go away. Cheers, Simon -- You received this message because you are subscribed to the Google Groups sqlalchemy group. 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.
Re: [sqlalchemy] Re: isolation level not supported on MySQL 3.23
On Mon, Oct 22, 2012 at 3:29 PM, Simon King si...@simonking.org.uk wrote: On Tue, Sep 18, 2012 at 1:33 PM, Ids idsvandermo...@gmail.com wrote: and of course sqlalchemy 0.5.1 did work. So something in sqlalchemy 0.7.8 broke... I just hit this error myself when using the latest SQLAlchemy (both 0.7.9 and latest 'default' from hg) against MySQL 3.23.58. Adding the server_version_info check (for version 4.0.3) made the problem go away. Cheers, Simon FYI Ids, the last SA release that didn't include this check was 0.7.5, so if you are intent on using a release version, you could use that. Simon -- You received this message because you are subscribed to the Google Groups sqlalchemy group. 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.
[sqlalchemy] Re: isolation level not supported on MySQL 3.23
Mmm. The traceback I got last (TypeError), only occurs on a client platform (redhat 8.0) using mysql 3.23 client software. When run on a platform with MySQL 5.0 (suse 10.1) software you're solution by raising the NotImplemented exception works. redhat 8.0 + mysql 3.23 client + python-mysql 1.2.2 + sqlalchemy 0.7.8 + mysql server 3.23.31 (on other host) fails suse 10.1 + mysql 5.0 client + python-mysql 1.2.2 + sqlalchemy 0.7.8 + mysql server 3.23.54 (on other host) works Thanks -- 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/-/RXAaI5QEo48J. 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.
[sqlalchemy] Re: isolation level not supported on MySQL 3.23
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.
Re: [sqlalchemy] Re: isolation level not supported on MySQL 3.23
OK, that is good information there, I'll see if i can get the notimplemented to not break like that. On Sep 17, 2012, at 11:17 AM, Ids wrote: 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. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. 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.
Re: [sqlalchemy] Re: isolation level not supported on MySQL 3.23
OK, this is actually a different issue. I wonder if i can get a 3.23 version running on a VM somewhere. On Sep 17, 2012, at 11:17 AM, Ids wrote: 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. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. 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.