From: Mike Bayer Date: Fri, 27 Dec 2013 18:20:58 +0000 (-0500) Subject: - Fixed bug in Firebird index reflection where the columns within the X-Git-Tag: rel_0_9_0~11^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=545df6b39ee56cab401d2639fe2beb4556d9055e;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - Fixed bug in Firebird index reflection where the columns within the index were not sorted correctly; they are now sorted in order of RDB$FIELD_POSITION. --- diff --git a/doc/build/changelog/changelog_08.rst b/doc/build/changelog/changelog_08.rst index 5dd7ca9274..9f2479c2e8 100644 --- a/doc/build/changelog/changelog_08.rst +++ b/doc/build/changelog/changelog_08.rst @@ -11,6 +11,14 @@ .. changelog:: :version: 0.8.5 + .. change:: + :tags: bug, firebird + :versions: 0.9.0b2 + + Fixed bug in Firebird index reflection where the columns within the + index were not sorted correctly; they are now sorted + in order of RDB$FIELD_POSITION. + .. change:: :tags: bug, firebird :versions: 0.9.0b2 diff --git a/lib/sqlalchemy/dialects/firebird/base.py b/lib/sqlalchemy/dialects/firebird/base.py index dcaa68f4e7..e6eb276613 100644 --- a/lib/sqlalchemy/dialects/firebird/base.py +++ b/lib/sqlalchemy/dialects/firebird/base.py @@ -700,7 +700,7 @@ class FBDialect(default.DefaultDialect): ic.rdb$index_name WHERE ix.rdb$relation_name=? AND ix.rdb$foreign_key IS NULL AND rdb$relation_constraints.rdb$constraint_type IS NULL - ORDER BY index_name, field_name + ORDER BY index_name, ic.rdb$field_position """ c = connection.execute(qry, [self.denormalize_name(table_name)])