Need some help? Ask here.
ASK A QUESTION.

Thanks for taking the time to reach out to us! We take support and feedback extremely seriously and will get back to you as soon as possible.

SUBMIT
QUESTION.

Lock and Unlock SyntaxΒΆ

MemSQL supports the following LOCK and UNLOCK syntax:

LOCK TABLES tbl_name READ [, tbl_name READ] ...

Make all other MemSQL connections block when they try to write to tables locked for read. Only the current connection can write into these tables. LOCK TABLES will first unlock any table and database already locked by the same connection before locking.

UNLOCK TABLES

Unlock all table and database locks held by current connection. Locks held by current connection are automatically released when the current MemSQL connection is terminated.

FLUSH TABLES WITH READ LOCK

Lock all tables in the current database and make all other MemSQL connections block when they try to CREATE, ALTER or DROP tables. Statement will also wait until all write transactions in the current database are flushed to disk.

Previous topic

Data Types

Next topic

Account Management