LOCK TABLES tb1 READ, tb2 WRITE;
这样LOCK后,tb1变只读表,tb2变可写表而且只能由LOCK这个表的线程可以写tb2表,其它线程不能写,只能读(select)UNLOCK TABLES
解锁