when mysql 8.4 replica db(zabbix) from mysql 5.7, conflict occur
CHANNEL_NAME:
WORKER_ID: 1
THREAD_ID: NULL
SERVICE_STATE: OFF
LAST_ERROR_NUMBER: 1064
LAST_ERROR_MESSAGE: Worker 1 failed executing transaction 'ANONYMOUS' at source log mysql-bin.000066, end_log_pos 538732621; Error 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'function,parameter) values (649770,808112,390091,'last','0'),(649771,808114,3900' at line 1' on query. Default database: 'zabbix'. Query: 'insert into functions (functionid,itemid,triggerid,function,parameter) values (649770,808112,390091,'last','0'),(649771,808114,390092,'last','0'),(649772,808113,390092,'last','0'),(649773,808114,390093,'last','0')'
FUNCTION(R) reserved words in 8.0.1
mysql 8.4:
mysql> insert into functions (functionid,itemid,triggerid,function,parameter) values (100000,808112,390091,’last’,’0′);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘function,parameter) values (100000,808112,390091,’last’,’0′)’ at line 1
mysql> insert into functions (functionid,itemid,triggerid,function
,parameter) values (100000,808112,390091,’last’,’0′);
Query OK, 1 row affected (0.00 sec)
mysql 5.7:
mysql> insert into functions (functionid,itemid,triggerid,function,parameter) values (100000,808112,390091,’last’,’0′);
Query OK, 1 row affected (0.00 sec)
may i shield the reserved words or alias the reserved word to use it
Is there a best way to deal with the problem ?
Feng Deng is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1