File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1413,6 +1413,7 @@ const (
14131413 TableOptionCollate
14141414 TableOptionAutoIdCache
14151415 TableOptionAutoIncrement
1416+ TableOptionAutoRandomBase
14161417 TableOptionComment
14171418 TableOptionAvgRowLength
14181419 TableOptionCheckSum
@@ -1497,6 +1498,10 @@ func (n *TableOption) Restore(ctx *RestoreCtx) error {
14971498 ctx .WriteKeyWord ("AUTO_ID_CACHE " )
14981499 ctx .WritePlain ("= " )
14991500 ctx .WritePlainf ("%d" , n .UintValue )
1501+ case TableOptionAutoRandomBase :
1502+ ctx .WriteKeyWord ("AUTO_RANDOM_BASE " )
1503+ ctx .WritePlain ("= " )
1504+ ctx .WritePlainf ("%d" , n .UintValue )
15001505 case TableOptionComment :
15011506 ctx .WriteKeyWord ("COMMENT " )
15021507 ctx .WritePlain ("= " )
Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ var tokenMap = map[string]int{
153153 "AUTO_ID_CACHE" : autoIdCache ,
154154 "AUTO_INCREMENT" : autoIncrement ,
155155 "AUTO_RANDOM" : autoRandom ,
156+ "AUTO_RANDOM_BASE" : autoRandomBase ,
156157 "AVG" : avg ,
157158 "AVG_ROW_LENGTH" : avgRowLength ,
158159 "BEGIN" : begin ,
Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ const (
6464 ActionAddPrimaryKey ActionType = 32
6565 ActionDropPrimaryKey ActionType = 33
6666 ActionModifyTableAutoIdCache ActionType = 34
67+ ActionRebaseAutoRandomBase ActionType = 35
6768)
6869
6970const (
@@ -107,6 +108,7 @@ var actionMap = map[ActionType]string{
107108 ActionSetTiFlashReplica : "set tiflash replica" ,
108109 ActionUpdateTiFlashReplicaStatus : "update tiflash replica status" ,
109110 ActionModifyTableAutoIdCache : "modify auto id cache" ,
111+ ActionRebaseAutoRandomBase : "rebase auto_random ID" ,
110112}
111113
112114// String return current ddl action in string
Original file line number Diff line number Diff line change @@ -217,6 +217,7 @@ type TableInfo struct {
217217 Comment string `json:"comment"`
218218 AutoIncID int64 `json:"auto_inc_id"`
219219 AutoIdCache int64 `json:"auto_id_cache"`
220+ AutoRandID int64 `json:"auto_rand_id"`
220221 MaxColumnID int64 `json:"max_col_id"`
221222 MaxIndexID int64 `json:"max_idx_id"`
222223 // UpdateTS is used to record the timestamp of updating the table's schema information.
You can’t perform that action at this time.
0 commit comments