mysql锁表连接不起作用

时间:2018-03-28 03:12:25

标签: mysql locking

可以工作

$this->db->query('LOCK TABLE user READ');
$this->db->query('select * from user');
$this->db->query('UNLOCK TABLES');

它不能正常工作

$this->db->query('LOCK TABLE company READ');
$this->db->query('select * from user as a join company as b on a.id=b.id where a.id = 1');
$this->db->query('UNLOCK TABLES');

问题出在哪里?

0 个答案:

没有答案