我得到了以下警告,运行简单的声明,我很好奇为什么我得到它:
UPDATE `Table1`
SET `City`='Miami',
`ExpDate`='201227',
`User`='JDoe',
`UpdDate`='2015-02-17 16:11:25'
WHERE `id` = 61`
以下是Table1
结构:
CREATE TABLE `Table1` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`User` varchar(10) COLLATE utf8_bin DEFAULT NULL,
`City` varchar(25) COLLATE utf8_bin DEFAULT NULL,
`ExpDate` varchar(10) COLLATE utf8_bin DEFAULT NULL,
`UpdDate` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `Unique_Index` (`User`,`City`),
UNIQUE KEY `id` (`id`),
KEY `ALT1_IDX_Table1` (`User`,`City`)
) ENGINE=InnoDB AUTO_INCREMENT=64 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
日志完全错误:
2015-02-17 16:10:08 1548 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Statement: UPDATE
表1
SET
{市{1}} {EXPDATE {1}}用户='Miami',
{UpdDate {1}} ID为='201227',
答案 0 :(得分:1)
最后,错误显示了这里的错误。
Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column
该错误不在表本身中,错误在触发器或过程中,当此表更新时触发。