@@ -80,7 +80,7 @@ func TestEncode(t *testing.T) {
80
80
c1 := & model.ColumnInfo {ID : 1 , Name : model .NewCIStr ("c1" ), State : model .StatePublic , Offset : 0 , FieldType : * types .NewFieldType (mysql .TypeTiny )}
81
81
cols := []* model.ColumnInfo {c1 }
82
82
tblInfo := & model.TableInfo {ID : 1 , Columns : cols , PKIsHandle : false , State : model .StatePublic }
83
- tbl , err := tables .TableFromMeta (lkv .NewPanickingAllocators (tblInfo .SepAutoInc (), 0 ), tblInfo )
83
+ tbl , err := tables .TableFromMeta (lkv .NewPanickingAllocators (tblInfo .SepAutoInc ()), tblInfo )
84
84
require .NoError (t , err )
85
85
86
86
logger := log.Logger {Logger : zap .NewNop ()}
@@ -163,7 +163,7 @@ func TestDecode(t *testing.T) {
163
163
c1 := & model.ColumnInfo {ID : 1 , Name : model .NewCIStr ("c1" ), State : model .StatePublic , Offset : 0 , FieldType : * types .NewFieldType (mysql .TypeTiny )}
164
164
cols := []* model.ColumnInfo {c1 }
165
165
tblInfo := & model.TableInfo {ID : 1 , Columns : cols , PKIsHandle : false , State : model .StatePublic }
166
- tbl , err := tables .TableFromMeta (lkv .NewPanickingAllocators (tblInfo .SepAutoInc (), 0 ), tblInfo )
166
+ tbl , err := tables .TableFromMeta (lkv .NewPanickingAllocators (tblInfo .SepAutoInc ()), tblInfo )
167
167
require .NoError (t , err )
168
168
decoder , err := lkv .NewTableKVDecoder (tbl , "`test`.`c1`" , & encode.SessionOptions {
169
169
SQLMode : mysql .ModeStrictAllTables ,
@@ -217,7 +217,7 @@ func TestDecodeIndex(t *testing.T) {
217
217
State : model .StatePublic ,
218
218
PKIsHandle : false ,
219
219
}
220
- tbl , err := tables .TableFromMeta (lkv .NewPanickingAllocators (tblInfo .SepAutoInc (), 0 ), tblInfo )
220
+ tbl , err := tables .TableFromMeta (lkv .NewPanickingAllocators (tblInfo .SepAutoInc ()), tblInfo )
221
221
if err != nil {
222
222
fmt .Printf ("error: %v" , err .Error ())
223
223
}
@@ -262,7 +262,7 @@ func TestEncodeRowFormatV2(t *testing.T) {
262
262
c1 := & model.ColumnInfo {ID : 1 , Name : model .NewCIStr ("c1" ), State : model .StatePublic , Offset : 0 , FieldType : * types .NewFieldType (mysql .TypeTiny )}
263
263
cols := []* model.ColumnInfo {c1 }
264
264
tblInfo := & model.TableInfo {ID : 1 , Columns : cols , PKIsHandle : false , State : model .StatePublic }
265
- tbl , err := tables .TableFromMeta (lkv .NewPanickingAllocators (tblInfo .SepAutoInc (), 0 ), tblInfo )
265
+ tbl , err := tables .TableFromMeta (lkv .NewPanickingAllocators (tblInfo .SepAutoInc ()), tblInfo )
266
266
require .NoError (t , err )
267
267
268
268
rows := []types.Datum {
@@ -313,7 +313,7 @@ func TestEncodeTimestamp(t *testing.T) {
313
313
}
314
314
cols := []* model.ColumnInfo {c1 }
315
315
tblInfo := & model.TableInfo {ID : 1 , Columns : cols , PKIsHandle : false , State : model .StatePublic }
316
- tbl , err := tables .TableFromMeta (lkv .NewPanickingAllocators (tblInfo .SepAutoInc (), 0 ), tblInfo )
316
+ tbl , err := tables .TableFromMeta (lkv .NewPanickingAllocators (tblInfo .SepAutoInc ()), tblInfo )
317
317
require .NoError (t , err )
318
318
319
319
encoder , err := lkv .NewTableKVEncoder (& encode.EncodingConfig {
@@ -342,7 +342,7 @@ func TestEncodeTimestamp(t *testing.T) {
342
342
343
343
func TestEncodeDoubleAutoIncrement (t * testing.T ) {
344
344
tblInfo := mockTableInfo (t , "create table t (id double not null auto_increment, unique key `u_id` (`id`));" )
345
- tbl , err := tables .TableFromMeta (lkv .NewPanickingAllocators (tblInfo .SepAutoInc (), 0 ), tblInfo )
345
+ tbl , err := tables .TableFromMeta (lkv .NewPanickingAllocators (tblInfo .SepAutoInc ()), tblInfo )
346
346
require .NoError (t , err )
347
347
348
348
encoder , err := lkv .NewTableKVEncoder (& encode.EncodingConfig {
@@ -406,7 +406,7 @@ func TestEncodeMissingAutoValue(t *testing.T) {
406
406
},
407
407
} {
408
408
tblInfo := mockTableInfo (t , testTblInfo .CreateStmt )
409
- tbl , err := tables .TableFromMeta (lkv .NewPanickingAllocators (tblInfo .SepAutoInc (), 0 ), tblInfo )
409
+ tbl , err := tables .TableFromMeta (lkv .NewPanickingAllocators (tblInfo .SepAutoInc ()), tblInfo )
410
410
require .NoError (t , err )
411
411
412
412
encoder , err := lkv .NewTableKVEncoder (& encode.EncodingConfig {
@@ -458,7 +458,7 @@ func TestEncodeMissingAutoValue(t *testing.T) {
458
458
459
459
func TestEncodeExpressionColumn (t * testing.T ) {
460
460
tblInfo := mockTableInfo (t , "create table t (id varchar(40) not null DEFAULT uuid(), unique key `u_id` (`id`));" )
461
- tbl , err := tables .TableFromMeta (lkv .NewPanickingAllocators (tblInfo .SepAutoInc (), 0 ), tblInfo )
461
+ tbl , err := tables .TableFromMeta (lkv .NewPanickingAllocators (tblInfo .SepAutoInc ()), tblInfo )
462
462
require .NoError (t , err )
463
463
464
464
encoder , err := lkv .NewTableKVEncoder (& encode.EncodingConfig {
@@ -503,7 +503,7 @@ func mockTableInfo(t *testing.T, createSQL string) *model.TableInfo {
503
503
504
504
func TestDefaultAutoRandoms (t * testing.T ) {
505
505
tblInfo := mockTableInfo (t , "create table t (id bigint unsigned NOT NULL auto_random primary key clustered, a varchar(100));" )
506
- tbl , err := tables .TableFromMeta (lkv .NewPanickingAllocators (tblInfo .SepAutoInc (), 0 ), tblInfo )
506
+ tbl , err := tables .TableFromMeta (lkv .NewPanickingAllocators (tblInfo .SepAutoInc ()), tblInfo )
507
507
require .NoError (t , err )
508
508
encoder , err := lkv .NewTableKVEncoder (& encode.EncodingConfig {
509
509
Table : tbl ,
@@ -541,7 +541,7 @@ func TestDefaultAutoRandoms(t *testing.T) {
541
541
542
542
func TestShardRowId (t * testing.T ) {
543
543
tblInfo := mockTableInfo (t , "create table t (s varchar(16)) shard_row_id_bits = 3;" )
544
- tbl , err := tables .TableFromMeta (lkv .NewPanickingAllocators (tblInfo .SepAutoInc (), 0 ), tblInfo )
544
+ tbl , err := tables .TableFromMeta (lkv .NewPanickingAllocators (tblInfo .SepAutoInc ()), tblInfo )
545
545
require .NoError (t , err )
546
546
encoder , err := lkv .NewTableKVEncoder (& encode.EncodingConfig {
547
547
Table : tbl ,
@@ -703,7 +703,7 @@ func SetUpTest(b *testing.B) *benchSQL2KVSuite {
703
703
tableInfo .State = model .StatePublic
704
704
705
705
// Construct the corresponding KV encoder.
706
- tbl , err := tables .TableFromMeta (lkv .NewPanickingAllocators (tableInfo .SepAutoInc (), 0 ), tableInfo )
706
+ tbl , err := tables .TableFromMeta (lkv .NewPanickingAllocators (tableInfo .SepAutoInc ()), tableInfo )
707
707
require .NoError (b , err )
708
708
encoder , err := lkv .NewTableKVEncoder (& encode.EncodingConfig {
709
709
Table : tbl ,
0 commit comments