From 545df6b39ee56cab401d2639fe2beb4556d9055e Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 27 Dec 2013 13:20:58 -0500 Subject: [PATCH] - 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. --- doc/build/changelog/changelog_08.rst | 8 ++++++++ lib/sqlalchemy/dialects/firebird/base.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) 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)]) -- 2.47.3