Skip to content

Commit 728167d

Browse files
authored
Merge pull request #164 from sfdumi/master
Escape column names used in MySQL select statements
2 parents fa90455 + 9f64e01 commit 728167d

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)