摘要:
WITH RECURSIVE cte AS ( SELECT a.* FROM tblname a WHERE ifnull( a.user_account, '' ) != ifnull( a.user_referrer_code, '' ) AND a.user_account = 'test' 阅读全文
摘要:
方法/步骤1登录mysql,查看锁记录等待时间:SHOW VARIABLES LIKE 'innodb_lock_wait_timeout';等待时间是50秒,2把表中id=1的数据加锁,另一个事务对记录修改:SELECT * FROM chengshi WHERE id=1 FOR UPDATE; 阅读全文