When current database is not set in MySQL connection
mysql> SELECT DATABASE();
+------------+
| DATABASE() |
+------------+
| NULL |
+------------+
and trying to create table like:
CREATE TABLE dbname.table_name (id int primary key not null);
it creates table in MySQL but not in ClickHouse, and when rows added in newly created table it causes error
File "db_replicator.py", line 453, in handle_insert_event
mysql_table_structure = self.state.tables_structure[event.table_name][0]
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
KeyError: 'table_name'