diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-12-17 19:27:01 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-12-17 19:27:01 -0500 |
| commit | 1b774516a89d9acd615c7c40eb0c16d8befc6014 (patch) | |
| tree | 7199eeb1d794d767c55033bb7879dc68c3d3ead4 /lib/sqlalchemy/dialects/sqlite | |
| parent | ba964522e15da9062f5ed11e8bf55a0b5fb54693 (diff) | |
| download | sqlalchemy-1b774516a89d9acd615c7c40eb0c16d8befc6014.tar.gz | |
this innocuous change allows sqlite to work with pypy. sadly, pypy is twice as slow
even if i run the same test script four or five times to prime the jit.
Diffstat (limited to 'lib/sqlalchemy/dialects/sqlite')
| -rw-r--r-- | lib/sqlalchemy/dialects/sqlite/base.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/dialects/sqlite/base.py b/lib/sqlalchemy/dialects/sqlite/base.py index a74ea0c3c..707bc1630 100644 --- a/lib/sqlalchemy/dialects/sqlite/base.py +++ b/lib/sqlalchemy/dialects/sqlite/base.py @@ -439,10 +439,10 @@ class SQLiteDialect(default.DefaultDialect): qtable = quote(table_name) cursor = _pragma_cursor(connection.execute("%stable_info(%s)" % (pragma, qtable))) row = cursor.fetchone() - + # consume remaining rows, to work around # http://www.sqlite.org/cvstrac/tktview?tn=1884 - while cursor.fetchone() is not None: + while not cursor.closed and cursor.fetchone() is not None: pass return (row is not None) |
