Lock one or more tables.
LOCK TABLES tbl_name READ [, tbl_name READ] ...
tbl_nameis the name of a table in a MemSQL database.
- Make all other MemSQL connections block when they try to write to tables locked for read.
- The current connection can read these tables but not write to them.
LOCK TABLESwill first unlock any table and database already locked by the same connection before locking.
- This command must be run on the master aggregator or a child aggregator node (see Node Requirements for MemSQL Commands ).
memsql> LOCK TABLES mytbl READ; Query OK, 0 rows affected (0.00 sec)