Skip to content

Commit

Permalink
fix column order
Browse files Browse the repository at this point in the history
From mysql docs https://dev.mysql.com/doc/refman/5.6/en/columns-table.html,

> ORDINAL_POSITION is necessary because you might want to say ORDER BY ORDINAL_POSITION.
> Unlike SHOW, SELECT does not have automatic ordering.
  • Loading branch information
hkwi authored and baloo committed Jul 5, 2018
1 parent 444f486 commit 04a7bd3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pymysqlreplication/binlogstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@ def __get_table_information(self, schema, table):
information_schema.columns
WHERE
table_schema = %s AND table_name = %s
ORDER BY ORDINAL_POSITION
""", (schema, table))

return cur.fetchall()
Expand Down

0 comments on commit 04a7bd3

Please sign in to comment.