Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reference/configuration: add tidb_row_format_version #2605

Merged
merged 3 commits into from
Apr 8, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions reference/configuration/tidb-server/tidb-specific-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,18 @@ set @@global.tidb_distsql_scan_concurrency = 10;
- `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

作用域:GLOBAL

默认值:2

控制新保存数据的表数据格式版本。TiDB v4.0 中默认使用版本号为 2 的[新表数据格式](https://github.com/pingcap/tidb/blob/master/docs/design/2018-07-19-row-format.md)保存新数据。

但如果从 4.0.0 之前的版本升级到 4.0.0, 不会改变表数据格式版本, TiDB 会继续使用版本为 1 的旧格式写入,即**只有新创建的集群才会默认使用新表数据格式**。
lysu marked this conversation as resolved.
Show resolved Hide resolved

需要注意的是修改该变量不会对已保存的老数据产生影响,只会对修改变量后的新写入数据使用对应版本格式保存。

### tidb_slow_log_threshold

作用域:SESSION
Expand Down