[摘要]row 那么这三个值中的任何一个对于你来说都是复制安全的。由于现在mysql已经推荐把二进制的格式设置成row,所以在binlog_format不是statement的情况下最好是innodb_au...
row 那么这三个值中的任何一个对于你来说都是复制安全的。
由于现在mysql已经推荐把二进制的格式设置成row,所以在binlog_format不是statement的情况下最好是innodb_autoinc_lock_mode=2 这样可能知道更好的性能。
最后以一个关于auto_increment 的例子来结束
例子:不要没事去更新一个auto_increment 列的值
第一步:重现一下场景
create table t(x int auto_increment not null primary key);
insert into t(x) values(0),(null),(3);
select * from t;
+---+
关键词:案例详细说明innodb_autoinc_lock_mode办法