1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
| {
"id": 47, // table id
"name": {
"O": "sbtest1", // 原始输入展示
"L": "sbtest1" // 程序强转小写展示
},
"charset": "utf8mb4",
"collate": "utf8mb4_bin",
"cols": [
{
"id": 1, // 列 id
"name": { // 列名
"O": "k",
"L": "k"
},
"offset": 0, // 以下为 列关键特性
"origin_default": null,
"origin_default_bit": null,
"default": null,
"default_bit": null,
"default_is_expr": false,
"generated_expr_string": "",
"generated_stored": false,
"dependences": null,
"type": {
"Tp": 3,
"Flag": 515,
"Flen": 11,
"Decimal": 0,
"Charset": "binary",
"Collate": "binary",
"Elems": null
},
"state": 5,
"comment": "",
"hidden": false,
"version": 2
},
],
"index_info": [ // index 信息
{
"id": 1,
"idx_name": {
"O": "k_1",
"L": "k_1"
},
"tbl_name": {
"O": "",
"L": ""
},
"idx_cols": [
{
"name": {
"O": "k",
"L": "k"
},
"offset": 1,
"length": -1
}
],
"state": 5,
"comment": "",
"index_type": 1,
"is_unique": false,
"is_primary": false,
"is_invisible": false,
"is_global": false
}
], // 以下为 tidb 在 table 级别的特性
"constraint_info": null, // 4.0 的新字符集架构
"fk_info": null, // 盲猜 foreign key
"state": 5,
"pk_is_handle": true, // int 类型的 PK == true
"is_common_handle": false, // varchar 类型的 PK 或者联合主键 == true
// 表未设置主键时 pk_is_handle & is_common_handle 均为 false
"comment": "",
"auto_inc_id": 0, // AUTO_INCREMENT 功能
"auto_id_cache": 0, // AUTO_ID_CACHE 自增 ID 缓存功能
"auto_rand_id": 0, // AUTO_RANDOM 功能
"max_col_id": 4,
"max_idx_id": 1,
"max_cst_id": 0,
"update_timestamp": 418539877049565193,
"ShardRowIDBits": 0, // SHARD_ROW_ID_BITS 功能
"max_shard_row_id_bits": 0,
"auto_random_bits": 0, // 与 shard row id bits 结合使用
"pre_split_regions": 0, // pre split 预打散 table region 功能
"partition": null, // 是否为分区表
"compression": "", // 该表是否启用 「COMPRESSION [=] {'ZLIB'|'LZ4'|'NONE'}」 属性
"view": null, // 视图功能
"sequence": null, // sequence 功能
"Lock": null, // 盲猜 table lock,无证实
"version": 3,
"tiflash_replica": null // tiflash 列存副本
}
|