"PRAGMA read_uncommitted" is called to determine
current isolation mode at connect time and
default to SERIALIZABLE; this to support SQLite
versions pre-3.3.0 that did not have this
feature. [ticket:2173]
and are redundant: reflecttable(), create(),
drop(), text(), engine.func
+- sqlite
+ - Accept None from cursor.fetchone() when
+ "PRAGMA read_uncommitted" is called to determine
+ current isolation mode at connect time and
+ default to SERIALIZABLE; this to support SQLite
+ versions pre-3.3.0 that did not have this
+ feature. [ticket:2173]
+
- mysql
- Unit tests pass 100% on MySQL installed
on windows.
def get_isolation_level(self, connection):
cursor = connection.cursor()
cursor.execute('PRAGMA read_uncommitted')
- value = cursor.fetchone()[0]
+ res = cursor.fetchone()
+ if res:
+ value = res[0]
+ else:
+ # http://www.sqlite.org/changes.html#version_3_3_3
+ # "Optional READ UNCOMMITTED isolation (instead of the
+ # default isolation level of SERIALIZABLE) and
+ # table level locking when database connections
+ # share a common cache.""
+ # pre-SQLite 3.3.0 default to 0
+ value = 0
cursor.close()
if value == 0:
return "SERIALIZABLE"