summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-12-27 13:20:58 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2013-12-27 13:42:28 -0500
commit320bc4861ccd390a0e3871231542620ab33dfa21 (patch)
tree1e03ea0f77b22917ff2ec25f603b08a69d802b1b
parentb5b84ae20d186fc82fcba453626fe33cce5ef96b (diff)
downloadsqlalchemy-320bc4861ccd390a0e3871231542620ab33dfa21.tar.gz
- 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.
-rw-r--r--doc/build/changelog/changelog_08.rst8
-rw-r--r--lib/sqlalchemy/dialects/firebird/base.py2
2 files changed, 9 insertions, 1 deletions
diff --git a/doc/build/changelog/changelog_08.rst b/doc/build/changelog/changelog_08.rst
index 85716444b..bd9a44532 100644
--- a/doc/build/changelog/changelog_08.rst
+++ b/doc/build/changelog/changelog_08.rst
@@ -15,6 +15,14 @@
: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.
diff --git a/lib/sqlalchemy/dialects/firebird/base.py b/lib/sqlalchemy/dialects/firebird/base.py
index d3401b6d1..734ae8e7b 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)])