isolation_level not implemented for MySQL dialect
Issue #2394
resolved
The create_engine function accepts an isolation_level argument for Postgresql and SQLite dialects, but not for MySQL.
Comments (4)
-
reporter -
repo owner - changed milestone to 0.7.6
looks very nice, will see if I can get this on for 0.7.6. Testing should be enabled with this patch:
diff -r 5e467f5105d6c66d0e38f24fc60bc023f4142ed6 test/engine/test_transaction.py --- a/test/engine/test_transaction.py Wed Feb 01 12:09:47 2012 -0500 +++ b/test/engine/test_transaction.py Fri Feb 03 10:09:21 2012 -0500 @@ -1156,6 +1156,8 @@ return 'READ UNCOMMITTED' elif testing.against('postgresql'): return 'SERIALIZABLE' + elif testing.against('mysql'): + return "SERIALIZABLE" else: assert False, "non default isolation level not known" diff -r 5e467f5105d6c66d0e38f24fc60bc023f4142ed6 test/lib/requires.py --- a/test/lib/requires.py Wed Feb 01 12:09:47 2012 -0500 +++ b/test/lib/requires.py Fri Feb 03 10:09:21 2012 -0500 @@ -107,7 +107,7 @@ def isolation_level(fn): return _chain_decorators_on( fn, - only_on(('postgresql', 'sqlite'), "DBAPI has no isolation level support"), + only_on(('postgresql', 'sqlite', 'mysql'), "DBAPI has no isolation level support"), fails_on('postgresql+pypostgresql', 'pypostgresql bombs on multiple isolation level calls') )
-
repo owner - changed status to resolved
-
repo owner - removed milestone
Removing milestone: 0.7.6 (automated comment)
- Log in to comment
The MySQL command executed would be:
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
(the "SESSION" is optional, but I think it's what we always want for this).