]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- Fixed bug in Firebird index reflection where the columns within the
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 27 Dec 2013 18:20:58 +0000 (13:20 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 27 Dec 2013 18:42:28 +0000 (13:42 -0500)
index were not sorted correctly; they are now sorted
in order of RDB$FIELD_POSITION.

doc/build/changelog/changelog_08.rst
lib/sqlalchemy/dialects/firebird/base.py

index 85716444ba565e16be5d26c425f5ad9bb59e75f2..bd9a44532c9fc452be883158ac637a95abf71673 100644 (file)
 .. 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
index d3401b6d1f1704dbb961e54d5231c859dadb79fb..734ae8e7b6f295a72008e836744978badc3d93de 100644 (file)
@@ -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)])