-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Search before asking
- I searched in the issues and found nothing similar.
Flink version
1.16.0
Flink CDC version
2.3.0
Database and its version
mysql 5.7
Minimal reproduce step
CREATE TABLE feed_topic_links (
index int(10) unsigned NOT NULL AUTO_INCREMENT ,
topic_id int(10) unsigned NOT NULL COMMENT 'Topic ID',
feed_id int(10) unsigned NOT NULL COMMENT 'Feed ID',
PRIMARY KEY (index),
KEY feed_topic_links_topic_id_index (topic_id),
KEY feed_topic_links_feed_id_index (feed_id)
) ENGINE=InnoDB AUTO_INCREMENT=17028 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
When the primary key of a table is a MySQL keyword, it will cause an SQL exception. My solution is to add backticks (`) around the keyword. Please help me translate this into English and optimize the statement.
When the primary key of a table coincides with a MySQL keyword, it triggers an SQL exception. To resolve this issue, simply place backticks (`) around the keyword.
What did you expect to see?
select * from xxx whre `index` >=100 and not(`index` = 100)
What did you see instead?
Anything else?
No response
Are you willing to submit a PR?
I'm willing to submit a PR!