START TRANSACTION;
中止5秒...select * from account where userid=1 for update;commit;------------------------
MSSQL实现方案:
WAITFOR DELAY '00:05';MYSQLe 有没有类似的功能呢?
中止5秒...select * from account where userid=1 for update;commit;------------------------
MSSQL实现方案:
WAITFOR DELAY '00:05';MYSQLe 有没有类似的功能呢?
select * from account where userid=1 for update;
commit;
select * from account where userid=1 for update;
commit;
begin;
sleep(5);
select * from account where userid=1 for update;
commit;
出错了。。
我的版本是 6.0.7-alpha-community MySQL Community Server (GPL)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 'sleep(5)' at line 1
select * from account where userid=1 for update;
end if;