我在当前的复制设置中已经超过一年,并且突然在昨晚11:30我开始接收复制1062错误,这些错误在INSERT ON DUPLICATE查询时失败。但奇怪的是,当我在奴隶上手动运行查询时,它们执行完全没问题。
更奇怪的是,在另一个奴隶身上,我根本没有收到这些错误。查询运行正常。
以下是一个示例查询:
insert into articles.activity set
member_name = "Google",
member_id = 0,
section = "Article",
activity = "Reading <a href=\"https://www.example.com/news/article/\" target=\"_blank\">Example Article</a>.",
location = "Articles",
ip_address = "xx.xxx.xx.xx",
referer = "",
a_time = NOW()
ON DUPLICATE KEY UPDATE
member_name = "Google",
member_id = 0,
section = "Article",
activity = "Reading <a href=\"https://www.example.com/news/article/\" target=\"_blank\">Example Article</a>.",
location = "Articles",
ip_address = "xx.xxx.xx.xx",
referer = "",
a_time = NOW()
这是表格:
+-------------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+------------------+------+-----+---------+----------------+
| aid | int(11) | NO | PRI | NULL | auto_increment |
| member_name | varchar(150) | NO | | NULL | |
| member_id | int(10) unsigned | NO | | NULL | |
| section | varchar(150) | NO | | NULL | |
| activity | varchar(300) | NO | | NULL | |
| ip_address | varchar(19) | NO | UNI | NULL | |
| referer | varchar(250) | NO | | NULL | |
| location | varchar(250) | NO | | NULL | |
| a_time | datetime | NO | MUL | NULL | |
+-------------+------------------+------+-----+---------+----------------+
任何人都可以解释突然导致这种情况发生的原因以及为什么查询在复制中失败,但是当我在奴隶上手动执行它们时会工作吗?