From fc12922b8ab6ef782e53924e29b3d20fba27ea44 Mon Sep 17 00:00:00 2001 From: TomShawn <1135243111@qq.com> Date: Wed, 15 Apr 2020 19:45:17 +0800 Subject: [PATCH 1/2] reference/configuration: add tidb_row_format_version --- .../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..6e288dc36885a 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 stored 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 store 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 stored, but applies the corresponding version format only to the newly written data after modifying this variable. + ## tidb_slow_log_threshold - Scope: SESSION From 16336d8fb2d756340e1384bd76643fbca3138bde Mon Sep 17 00:00:00 2001 From: TomShawn <1135243111@qq.com> Date: Wed, 15 Apr 2020 19:46:10 +0800 Subject: [PATCH 2/2] Update tidb-specific-variables.md --- .../configuration/tidb-server/tidb-specific-variables.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/configuration/tidb-server/tidb-specific-variables.md b/reference/configuration/tidb-server/tidb-specific-variables.md index 6e288dc36885a..8bbcea319c083 100644 --- a/reference/configuration/tidb-server/tidb-specific-variables.md +++ b/reference/configuration/tidb-server/tidb-specific-variables.md @@ -355,9 +355,9 @@ Usage of statements: - Scope: GLOBAL - Default value: `2` -- Controls the format version of the newly stored 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 store new data. +- 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 stored, but applies the corresponding version format only to the newly written data after modifying this variable. +- 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