刚才又出现了,查询到一直在更新中的语句是: update body_1 set status=2 where order_id=12346546 这条语句调用的地方,只有唯一一个不带事务的方法,order_id是另外一个表的主键,但是没有做实际的外键关联.事务中的方法的执行顺序是 update order_1 set status_x=1,status_y=2 where order_id = 12346546 update body_1 set status=3 where order_id=12346546 update xxx set xxx1=1111 update yyy set xxx2=1111 update zzz set xxx3=1111 大概就是这样的结构,触发顺序是:事务先执行,然后锁表的那个update也顺利瞬间完成了执行,然后到了第二条订单,事务执行顺利完成,然后到锁表的update就锁住了,就是这样的 求高手分析!
show innodb status;[SQL] show innodb status; [Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'innodb status' at line 1
mysql5.5之后 show engine innodb status\G
show engine innodb status\G [SQL] show engine innodb status\G[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\G' at line 1show engine innodb status [SQL] show engine innodb statusAffected rows: 0 Time: 1.110mstype name status InnoDB
是where条件下的字段吗?
update body_1 set status=2
where order_id=12346546
这条语句调用的地方,只有唯一一个不带事务的方法,order_id是另外一个表的主键,但是没有做实际的外键关联.事务中的方法的执行顺序是
update order_1 set status_x=1,status_y=2
where order_id = 12346546
update body_1 set status=3
where order_id=12346546
update xxx set xxx1=1111
update yyy set xxx2=1111
update zzz set xxx3=1111
大概就是这样的结构,触发顺序是:事务先执行,然后锁表的那个update也顺利瞬间完成了执行,然后到了第二条订单,事务执行顺利完成,然后到锁表的update就锁住了,就是这样的
求高手分析!
show innodb status;[SQL] show innodb status;
[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'innodb status' at line 1
show engine innodb status\G
[SQL] show engine innodb status\G[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\G' at line 1show engine innodb status
[SQL] show engine innodb statusAffected rows: 0
Time: 1.110mstype name status
InnoDB
show engine innodb status;