@@ -167,8 +167,13 @@ func TestColumnBasic(t *testing.T) {
167
167
tk .MustExec (fmt .Sprintf ("insert into t1 values(%d, %d, %d)" , i , 10 * i , 100 * i ))
168
168
}
169
169
170
+ << << << < HEAD:ddl / column_test .go
170
171
ctx := testNewContext (store )
171
172
err := sessiontxn .NewTxn (context .Background (), ctx )
173
+ == == == =
174
+ ctx := testNewContext (t , store )
175
+ txn , err := newTxn (ctx )
176
+ >> >> >> > 0 bf3e019002 (* : Update client - go and verify all read ts (#58054 )):pkg / ddl / column_test .go
172
177
require .NoError (t , err )
173
178
174
179
var tableID int64
@@ -214,7 +219,13 @@ func TestColumnBasic(t *testing.T) {
214
219
215
220
h , err := tbl .AddRecord (ctx , types .MakeDatums (11 , 12 , 13 , 14 ))
216
221
require .NoError (t , err )
222
+ << << << < HEAD:ddl / column_test .go
217
223
err = sessiontxn .NewTxn (context .Background (), ctx )
224
+ == == == =
225
+ err = txn .Commit (context .Background ())
226
+ require .NoError (t , err )
227
+ _ , err = newTxn (ctx )
228
+ >> >> >> > 0 bf3e019002 (* : Update client - go and verify all read ts (#58054 )):pkg / ddl / column_test .go
218
229
require .NoError (t , err )
219
230
values , err := tables .RowWithCols (tbl , ctx , h , tbl .Cols ())
220
231
require .NoError (t , err )
@@ -385,7 +396,13 @@ func checkDeleteOnlyColumn(t *testing.T, ctx sessionctx.Context, tableID int64,
385
396
newRow := types .MakeDatums (int64 (11 ), int64 (22 ), int64 (33 ))
386
397
newHandle , err := tbl .AddRecord (ctx , newRow )
387
398
require .NoError (t , err )
399
+ << << << < HEAD:ddl / column_test .go
388
400
err = sessiontxn .NewTxn (context .Background (), ctx )
401
+ == == == =
402
+ err = txn .Commit (context .Background ())
403
+ require .NoError (t , err )
404
+ txn , err = newTxn (ctx )
405
+ >> >> >> > 0 bf3e019002 (* : Update client - go and verify all read ts (#58054 )):pkg / ddl / column_test .go
389
406
require .NoError (t , err )
390
407
391
408
rows := [][]types.Datum {row , newRow }
@@ -407,7 +424,13 @@ func checkDeleteOnlyColumn(t *testing.T, ctx sessionctx.Context, tableID int64,
407
424
408
425
err = tbl .RemoveRecord (ctx , newHandle , newRow )
409
426
require .NoError (t , err )
427
+ << << << < HEAD:ddl / column_test .go
410
428
err = sessiontxn .NewTxn (context .Background (), ctx )
429
+ == == == =
430
+ err = txn .Commit (context .Background ())
431
+ require .NoError (t , err )
432
+ txn , err = newTxn (ctx )
433
+ >> >> >> > 0 bf3e019002 (* : Update client - go and verify all read ts (#58054 )):pkg / ddl / column_test .go
411
434
require .NoError (t , err )
412
435
i = 0
413
436
err = tables .IterRecords (tbl , ctx , tbl .Cols (), func (_ kv.Handle , data []types.Datum , cols []* table.Column ) (bool , error ) {
@@ -447,7 +470,13 @@ func checkWriteOnlyColumn(t *testing.T, ctx sessionctx.Context, tableID int64, h
447
470
newRow := types .MakeDatums (int64 (11 ), int64 (22 ), int64 (33 ))
448
471
newHandle , err := tbl .AddRecord (ctx , newRow )
449
472
require .NoError (t , err )
473
+ << << << < HEAD:ddl / column_test .go
450
474
err = sessiontxn .NewTxn (context .Background (), ctx )
475
+ == == == =
476
+ err = txn .Commit (context .Background ())
477
+ require .NoError (t , err )
478
+ txn , err = newTxn (ctx )
479
+ >> >> >> > 0 bf3e019002 (* : Update client - go and verify all read ts (#58054 )):pkg / ddl / column_test .go
451
480
require .NoError (t , err )
452
481
453
482
rows := [][]types.Datum {row , newRow }
@@ -469,7 +498,14 @@ func checkWriteOnlyColumn(t *testing.T, ctx sessionctx.Context, tableID int64, h
469
498
470
499
err = tbl .RemoveRecord (ctx , newHandle , newRow )
471
500
require .NoError (t , err )
501
+ << << << < HEAD:ddl / column_test .go
472
502
err = sessiontxn .NewTxn (context .Background (), ctx )
503
+ == == == =
504
+
505
+ err = txn .Commit (context .Background ())
506
+ require .NoError (t , err )
507
+ txn , err = newTxn (ctx )
508
+ >> >> >> > 0 bf3e019002 (* : Update client - go and verify all read ts (#58054 )):pkg / ddl / column_test .go
473
509
require .NoError (t , err )
474
510
475
511
i = 0
@@ -507,7 +543,13 @@ func checkReorganizationColumn(t *testing.T, ctx sessionctx.Context, tableID int
507
543
newRow := types .MakeDatums (int64 (11 ), int64 (22 ), int64 (33 ))
508
544
newHandle , err := tbl .AddRecord (ctx , newRow )
509
545
require .NoError (t , err )
546
+ << << << < HEAD:ddl / column_test .go
510
547
err = sessiontxn .NewTxn (context .Background (), ctx )
548
+ == == == =
549
+ err = txn .Commit (context .Background ())
550
+ require .NoError (t , err )
551
+ txn , err = newTxn (ctx )
552
+ >> >> >> > 0 bf3e019002 (* : Update client - go and verify all read ts (#58054 )):pkg / ddl / column_test .go
511
553
require .NoError (t , err )
512
554
513
555
rows := [][]types.Datum {row , newRow }
@@ -530,7 +572,13 @@ func checkReorganizationColumn(t *testing.T, ctx sessionctx.Context, tableID int
530
572
531
573
err = tbl .RemoveRecord (ctx , newHandle , newRow )
532
574
require .NoError (t , err )
575
+ << << << < HEAD:ddl / column_test .go
533
576
err = sessiontxn .NewTxn (context .Background (), ctx )
577
+ == == == =
578
+ err = txn .Commit (context .Background ())
579
+ require .NoError (t , err )
580
+ txn , err = newTxn (ctx )
581
+ >> >> >> > 0 bf3e019002 (* : Update client - go and verify all read ts (#58054 )):pkg / ddl / column_test .go
534
582
require .NoError (t , err )
535
583
536
584
i = 0
@@ -573,7 +621,13 @@ func checkPublicColumn(t *testing.T, ctx sessionctx.Context, tableID int64, newC
573
621
}
574
622
handle , err := tbl .AddRecord (ctx , newRow )
575
623
require .NoError (t , err )
624
+ << << << < HEAD:ddl / column_test .go
576
625
err = sessiontxn .NewTxn (context .Background (), ctx )
626
+ == == == =
627
+ err = txn .Commit (context .Background ())
628
+ require .NoError (t , err )
629
+ txn , err = newTxn (ctx )
630
+ >> >> >> > 0 bf3e019002 (* : Update client - go and verify all read ts (#58054 )):pkg / ddl / column_test .go
577
631
require .NoError (t , err )
578
632
579
633
rows := [][]types.Datum {updatedRow , newRow }
@@ -593,8 +647,14 @@ func checkPublicColumn(t *testing.T, ctx sessionctx.Context, tableID int64, newC
593
647
594
648
err = tbl .RemoveRecord (ctx , handle , newRow )
595
649
require .NoError (t , err )
650
+ err = txn .Commit (context .Background ())
651
+ require .NoError (t , err )
596
652
653
+ << << << < HEAD:ddl / column_test .go
597
654
err = sessiontxn .NewTxn (context .Background (), ctx )
655
+ == == == =
656
+ txn , err = newTxn (ctx )
657
+ >> >> >> > 0 bf3e019002 (* : Update client - go and verify all read ts (#58054 )):pkg / ddl / column_test .go
598
658
require .NoError (t , err )
599
659
600
660
i = 0
@@ -610,8 +670,13 @@ func checkPublicColumn(t *testing.T, ctx sessionctx.Context, tableID int64, newC
610
670
require .NoError (t , err )
611
671
}
612
672
673
+ << << << < HEAD:ddl / column_test .go
613
674
func checkAddColumn (t * testing.T , state model.SchemaState , tableID int64 , handle kv.Handle , newCol * table.Column , oldRow []types.Datum , columnValue interface {}, dom * domain.Domain , store kv.Storage , columnCnt int ) {
614
675
ctx := testNewContext (store )
676
+ == == == =
677
+ func checkAddColumn (t * testing .T , state model .SchemaState , tableID int64 , handle kv .Handle , newCol * table .Column , oldRow []types.Datum , columnValue any , dom * domain.Domain , store kv .Storage , columnCnt int ) {
678
+ ctx := testNewContext (t , store )
679
+ >> >> >> > 0 bf3e019002 (* : Update client - go and verify all read ts (#58054 )):pkg / ddl / column_test.go
615
680
switch state {
616
681
case model .StateNone :
617
682
checkNoneColumn (t , ctx , tableID , handle , newCol , columnValue , dom )
@@ -655,8 +720,13 @@ func TestAddColumn(t *testing.T) {
655
720
tableID = int64 (tableIDi )
656
721
tbl := testGetTable (t , dom , tableID )
657
722
723
+ << << << < HEAD:ddl / column_test .go
658
724
ctx := testNewContext (store )
659
725
err := sessiontxn .NewTxn (context .Background (), ctx )
726
+ == == == =
727
+ ctx := testNewContext (t , store )
728
+ txn , err := newTxn (ctx )
729
+ >> >> >> > 0 bf3e019002 (* : Update client - go and verify all read ts (#58054 )):pkg / ddl / column_test .go
660
730
require .NoError (t , err )
661
731
oldRow := types .MakeDatums (int64 (1 ), int64 (2 ), int64 (3 ))
662
732
handle , err := tbl .AddRecord (ctx , oldRow )
@@ -728,8 +798,13 @@ func TestAddColumns(t *testing.T) {
728
798
tableID = int64 (tableIDi )
729
799
tbl := testGetTable (t , dom , tableID )
730
800
801
+ << << << < HEAD:ddl / column_test .go
731
802
ctx := testNewContext (store )
732
803
err := sessiontxn .NewTxn (context .Background (), ctx )
804
+ == == == =
805
+ ctx := testNewContext (t , store )
806
+ txn , err := newTxn (ctx )
807
+ >> >> >> > 0 bf3e019002 (* : Update client - go and verify all read ts (#58054 )):pkg / ddl / column_test .go
733
808
require .NoError (t , err )
734
809
oldRow := types .MakeDatums (int64 (1 ), int64 (2 ), int64 (3 ))
735
810
handle , err := tbl .AddRecord (ctx , oldRow )
@@ -791,7 +866,7 @@ func TestDropColumnInColumnTest(t *testing.T) {
791
866
tableID = int64 (tableIDi )
792
867
tbl := testGetTable (t , dom , tableID )
793
868
794
- ctx := testNewContext (store )
869
+ ctx := testNewContext (t , store )
795
870
colName := "c4"
796
871
defaultColValue := int64 (4 )
797
872
row := types .MakeDatums (int64 (1 ), int64 (2 ), int64 (3 ))
@@ -852,8 +927,13 @@ func TestDropColumns(t *testing.T) {
852
927
tableID = int64 (tableIDi )
853
928
tbl := testGetTable (t , dom , tableID )
854
929
930
+ << << << < HEAD:ddl / column_test .go
855
931
ctx := testNewContext (store )
856
932
err := sessiontxn .NewTxn (context .Background (), ctx )
933
+ == == == =
934
+ ctx := testNewContext (t , store )
935
+ txn , err := newTxn (ctx )
936
+ >> >> >> > 0 bf3e019002 (* : Update client - go and verify all read ts (#58054 )):pkg / ddl / column_test .go
857
937
require .NoError (t , err )
858
938
859
939
colNames := []string {"c3" , "c4" }
0 commit comments