Issues

Issue #3124 resolved

Infinite loop when using create_all() on an Enum(metadata=...) in SQLite

eevee
created an issue

Reported here, but seen someone else experience it too: http://stackoverflow.com/q/24720380/17875

My diagnosis from figuring it out with the someone else on IRC:

18:43 <!eevee> somehow calling self._on_metadata_create within the metadata's create event is adding itself as an event listener again
18:44 <!eevee> because, i think, it re-creates a dialect-specific enum with the same args...
18:44 <!eevee> looks pretty clearly like a bug wow
18:44 <@Zhorken> it specifically hangs with SQLite
18:44 <@Zhorken> or at least, not with Postgres
18:45 <!eevee> ah, postgres has a real enum type; sqlite doesn't so it gets a fallback

Comments (6)

  1. Mike Bayer repo owner
    • Fixed bug in :class:.Enum and other :class:.SchemaType subclasses where direct association of the type with a :class:.MetaData would lead to a hang when events (like create events) were emitted on the :class:.MetaData. fixes #3124

    → <<cset 071a18309858>>

  2. Mike Bayer repo owner
    • Fixed bug in :class:.Enum and other :class:.SchemaType subclasses where direct association of the type with a :class:.MetaData would lead to a hang when events (like create events) were emitted on the :class:.MetaData. fixes #3124

    Conflicts: test/sql/test_types.py

    → <<cset bd610650703f>>

  3. Mike Bayer repo owner
    • Fixed bug in :class:.Enum and other :class:.SchemaType subclasses where direct association of the type with a :class:.MetaData would lead to a hang when events (like create events) were emitted on the :class:.MetaData. fixes #3124

    Conflicts: lib/sqlalchemy/sql/sqltypes.py test/sql/test_types.py

    → <<cset 53b72c35f4e2>>

  4. Log in to comment