Skip to content

Exception: unknown mysql type "index" #109

@lufi78

Description

@lufi78

with maridb after executing this query:

ALTER TABLE calendarobjects DROP INDEX IDX_E14F332CE00F2F13, ADD UNIQUE INDEX cal_participant (participant);

... I get this error:

ERROR] unhandled exception
Traceback (most recent call last):
File "mysql_ch_replicator/mysql_ch_replicator/db_replicator.py", line 191, in run
self.run_realtime_replication()
File "mysql_ch_replicator/mysql_ch_replicator/db_replicator.py", line 392, in run_realtime_replication
self.handle_event(event)
File "mysql_ch_replicator/mysql_ch_replicator/db_replicator.py", line 414, in handle_event
event_handlersevent.event_type
File "mysql_ch_replicator/mysql_ch_replicator/db_replicator.py", line 494, in handle_query_event
self.handle_alter_query(query, event.db_name)
File "mysql_ch_replicator/mysql_ch_replicator/db_replicator.py", line 505, in handle_alter_query
self.converter.convert_alter_query(query, db_name)
File "mysql_ch_replicator/mysql_ch_replicator/converter.py", line 453, in convert_alter_query
self.__convert_alter_table_add_column(db_name, table_name, tokens)
File "mysql_ch_replicator/mysql_ch_replicator/converter.py", line 493, in __convert_alter_table_add_column
column_type_ch = self.convert_field_type(column_type_mysql, column_type_mysql_parameters)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "mysql_ch_replicator/mysql_ch_replicator/converter.py", line 291, in convert_field_type
clickhouse_type = self.convert_type(mysql_type, mysql_parameters)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "mysql_ch_replicator/mysql_ch_replicator/converter.py", line 285, in convert_type
raise Exception(f'unknown mysql type "{mysql_type}"')
Exception: unknown mysql type "index"

is it because of the single-lin DROP, ADD?

thanks for fixing!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions