Hi everyone,
I have master slave model on mysql, I run alter statement on master. The alter statement works on master but slave gives error that it cannot convert data from enum to long. I don’t know why there is that error. Below is the schema of the table and my alter statement.
schema table:
CREATE TABLE `async_add_partition` (
`impala_tbl_name` varchar(250) COLLATE utf8mb4_unicode_ci NOT NULL,
`partition_value` varchar(250) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'data_date_key = 20230206, action_hour = 19',
`partition_key` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'data_date_key, action_hour',
`status` enum('NEW','DONE','REJECT','TABLE_NOT_FOUND') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'NEW',
`error_log` longtext COLLATE utf8mb4_unicode_ci COMMENT 'error log query',
`created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`impala_tbl_name`,`partition_value`),
KEY `status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
alter statement
ALTER TABLE bigdata.async_add_partition ADD trino_status ENUM('NEW','DONE','REJECT') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'NEW' NOT NULL COMMENT 'Trang thai cache cua trino' AFTER `status`;
show slave status
Column 4 of table 'bigdata.async_add_partition' cannot be converted from type 'enum' to type 'longtext'