From b1e6a42648fa8f41a0cdf8799243572a3bfbded3 Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Thu, 16 Apr 2020 15:30:29 +0800 Subject: [PATCH] reference/configuration: add tidb_row_format_version (#2290) --- .../configuration/tidb-server/tidb-specific-variables.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/reference/configuration/tidb-server/tidb-specific-variables.md b/reference/configuration/tidb-server/tidb-specific-variables.md index c90610d894276..8bbcea319c083 100644 --- a/reference/configuration/tidb-server/tidb-specific-variables.md +++ b/reference/configuration/tidb-server/tidb-specific-variables.md @@ -351,6 +351,14 @@ Usage of statements: - `CREATE TABLE`: `CREATE TABLE t (c int) SHARD_ROW_ID_BITS = 4;` - `ALTER TABLE`: `ALTER TABLE t SHARD_ROW_ID_BITS = 4;` +### tidb_row_format_version + +- Scope: GLOBAL +- Default value: `2` +- Controls the format version of the newly saved data in the table. In TiDB v4.0, the [new storage row format](https://github.com/pingcap/tidb/blob/master/docs/design/2018-07-19-row-format.md) version `2` is used by default to save new data. +- If you upgrade from a TiDB version earlier than 4.0.0 to 4.0.0, the format version is not changed, and TiDB continues to use the old format of version `1` to write data to the table, which means that **only newly created clusters use the new data format by default**. +- Note that modifying this variable does not affect the old data that has been saved, but applies the corresponding version format only to the newly written data after modifying this variable. + ## tidb_slow_log_threshold - Scope: SESSION