mirror of
https://github.com/sqlalchemy/sqlalchemy.git
synced 2026-06-08 08:36:48 -04:00
a missing cursor.close() here caused a *huge* amount of weird locking issues with pypy,
what is strange is how it only occurred in some very specific places under very particular conditions, perhaps it has to do with whether or not this cursor gets gc'ed or not.
This commit is contained in:
@@ -263,14 +263,17 @@ class DefaultDialect(interfaces.Dialect):
|
||||
cast_to = util.text_type
|
||||
|
||||
cursor = connection.connection.cursor()
|
||||
cursor.execute(
|
||||
cast_to(
|
||||
expression.select([
|
||||
expression.literal_column("'x'").label("some_label")
|
||||
]).compile(dialect=self)
|
||||
try:
|
||||
cursor.execute(
|
||||
cast_to(
|
||||
expression.select([
|
||||
expression.literal_column("'x'").label("some_label")
|
||||
]).compile(dialect=self)
|
||||
)
|
||||
)
|
||||
)
|
||||
return isinstance(cursor.description[0][0], util.text_type)
|
||||
return isinstance(cursor.description[0][0], util.text_type)
|
||||
finally:
|
||||
cursor.close()
|
||||
|
||||
def type_descriptor(self, typeobj):
|
||||
"""Provide a database-specific :class:`.TypeEngine` object, given
|
||||
|
||||
Reference in New Issue
Block a user