FLUSH, LOCK TABLES, KILL and LOAD DATA
Statements that are accepted and do nothing (FLUSH, LOCK TABLES), and statements that are refused (KILL, LOAD DATA).
Syntax#
FLUSH flush_option [, flush_option] ... -- everything up to the end of the statement is read
LOCK TABLES ... | LOCK INSTANCE FOR BACKUP
UNLOCK TABLES | UNLOCK INSTANCE
KILL [CONNECTION | QUERY] processlist_id
LOAD DATA [LOCAL] INFILE 'file' INTO TABLE tbl_name ...Remarks#
FLUSH: accepted for any option (PRIVILEGES,TABLES,LOGS,STATUS, ...). It needs theRELOADprivilege (error 1227 without). There is nothing to flush; every account change is seen at once. Answer: OK.LOCK TABLES,UNLOCK TABLES,LOCK INSTANCE FOR BACKUP,UNLOCK INSTANCE: the whole statement is read and ignored; they lock nothing (see transactions).LOCKandUNLOCKcommit an open transaction (implicit commit).KILL: not supported, error 1235 ("this statement").LOAD DATA,LOAD XML,LOAD INDEX: not supported, error 1235. To load data useINSERT(multi-rowVALUESis fast),INSERT ... SELECT, or amysqldumpfile: the stockmysqldumpexports from and loads into Raft DB with its default options (D64; a 15 MB dump of 130 tables and 74,878 rows loads in 49 s on Raft DB).- The client programs' own commands (
DELIMITER,SOURCE,\G) belong to the client and never reach the server.
Examples#
FLUSH PRIVILEGES;
LOCK TABLES t WRITE;
UNLOCK TABLES;