Skip to content

Commit 04a7bd3

Browse files
hkwibaloo
authored andcommitted
fix column order
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.
1 parent 444f486 commit 04a7bd3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pymysqlreplication/binlogstream.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,7 @@ def __get_table_information(self, schema, table):
538538
information_schema.columns
539539
WHERE
540540
table_schema = %s AND table_name = %s
541+
ORDER BY ORDINAL_POSITION
541542
""", (schema, table))
542543

543544
return cur.fetchall()

0 commit comments

Comments
 (0)