Commits

Mike Bayer  committed 320bc48

- 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.

  • Participants
  • Parent commits b5b84ae
  • Branches rel_0_8

Comments (0)

Files changed (2)

File doc/build/changelog/changelog_08.rst

         :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
+
         The "asdecimal" flag used with the :class:`.Float` type will now
         work with Firebird dialects; previously the decimal conversion was
         not occurring.

File lib/sqlalchemy/dialects/firebird/base.py

                         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)])