死锁产生的原因
索引使用不正确,
行级锁
dba手动误操作 lock后忘了unlock
正确的索引,
小事务
Error Code: 1786. Statement violates GTID consistency: CREATE TABLE ... SELECT.
方案1:设置全局参数,禁用GTID
方案2:分成2个语句,
create table xxxx like yyy;
insert into xxxx select *from yyy where id < 15000;
@@@build beautiful things, share happiness@@@