Skip to content

Commit 017e48e

Browse files
committed
Fix bug
1 parent 727c19f commit 017e48e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

mysql_ch_replicator/converter.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ def _tokenize_alter_query(cls, sql_line):
554554
# The first token is always the column name.
555555
column_name = tokens[0]
556556

557-
# Now merge tokens after the column name that belong to the type.
557+
# Now "merge" tokens after the column name that belong to the type.
558558
# (For many types the type is written as a single token already –
559559
# e.g. "VARCHAR(254)" or "NUMERIC(5, 2)", but for types like
560560
# "DOUBLE PRECISION" or "INT UNSIGNED" the .split() would produce two tokens.)
@@ -872,7 +872,7 @@ def parse_mysql_table_structure(self, create_statement, required_table_name=None
872872
field_type = definition[0]
873873
field_parameters = (
874874
' '.join(definition[1:]) if len(definition) > 1 else ''
875-
)
875+
)
876876
else:
877877
definition = line.split(' ')
878878
field_name = strip_sql_name(definition[0])
@@ -917,10 +917,6 @@ def parse_mysql_table_structure(self, create_statement, required_table_name=None
917917
field_parameters = (
918918
' '.join(definition[1:]) if len(definition) > 1 else ''
919919
)
920-
field_type = definition[0]
921-
field_parameters = ''
922-
if len(definition) > 1:
923-
field_parameters = ' '.join(definition[1:])
924920

925921
additional_data = None
926922
if 'set(' in field_type.lower():

0 commit comments

Comments
 (0)