Skip to content

Commit 9f64e01

Browse files
committed
Escape column names used in MySQL select statements
1 parent fa90455 commit 9f64e01

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clickhouse_mysql/tablemigrator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@ def get_columns(self,db,full_table_name):
231231
if self.column_skip.__contains__(_field):
232232
logging.debug("skip column %s",_field)
233233
continue
234-
fields.append(_field)
234+
fields.append('`{}`'.format(_field))
235+
235236
return fields
236237

237238
if __name__ == '__main__':

0 commit comments

Comments
 (0)