TiDBTiDB Docs Dash 2024

Jan 9 - Jan 12 (UTC)
Join us to improve docs and win a prize!
Sign InTry Free

FLUSH TABLES

This statement is included for compatibility with MySQL. It has no effective usage in TiDB.

Synopsis

FlushStmt
FLUSHNoWriteToBinLogAliasOptFlushOption
NoWriteToBinLogAliasOpt
NO_WRITE_TO_BINLOGLOCAL
FlushOption
PRIVILEGESSTATUSTIDBPLUGINSPluginNameListHOSTSLogTypeOptLOGSTableOrTablesTableNameListOptWithReadLockOpt
LogTypeOpt
BINARYENGINEERRORGENERALSLOW
TableOrTables
TABLETABLES
TableNameListOpt
TableNameList
WithReadLockOpt
WITHREADLOCK

Examples

mysql> FLUSH TABLES; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH TABLES WITH READ LOCK; ERROR 1105 (HY000): FLUSH TABLES WITH READ LOCK is not supported. Please use @@tidb_snapshot

MySQL compatibility

  • TiDB does not have a concept of table cache as in MySQL. Thus, FLUSH TABLES is parsed but ignored in TiDB for compatibility.
  • The statement FLUSH TABLES WITH READ LOCK produces an error, as TiDB does not currently support locking tables. It is recommended to use Historical reads for this purpose instead.

See also

Was this page helpful?

Download PDFRequest docs changesAsk questions on Discord
Playground
New
One-stop & interactive experience of TiDB's capabilities WITHOUT registration.
Products
TiDB
TiDB Dedicated
TiDB Serverless
Pricing
Get Demo
Get Started
© 2024 PingCAP. All Rights Reserved.
Privacy Policy.