@@ -470,29 +470,6 @@ func TestMixedCases(t *testing.T) {
470
470
// final check count on the lookup vindex table.
471
471
utils .AssertMatches (t , mcmp .VtConn , "select count(*) from lkp_mixed_idx" , "[[INT64(12)]]" )
472
472
}
473
- << << << < HEAD
474
- == == == =
475
-
476
- // TestInsertAlias test the alias feature in insert statement.
477
- func TestInsertAlias (t * testing.T ) {
478
- mcmp , closer := start (t )
479
- defer closer ()
480
-
481
- // initial record
482
- mcmp .Exec ("insert into user_tbl(id, region_id, name) values (1, 1,'foo'),(2, 2,'bar'),(3, 3,'baz'),(4, 4,'buzz')" )
483
-
484
- qr := mcmp .Exec ("insert into user_tbl(id, region_id, name) values (2, 2, 'foo') as new on duplicate key update name = new.name" )
485
- assert .EqualValues (t , 2 , qr .RowsAffected )
486
-
487
- // this validates the record.
488
- mcmp .Exec ("select id, region_id, name from user_tbl order by id" )
489
-
490
- qr = mcmp .Exec ("insert into user_tbl(id, region_id, name) values (3, 3, 'foo') as new(m, n, p) on duplicate key update name = p" )
491
- assert .EqualValues (t , 2 , qr .RowsAffected )
492
-
493
- // this validates the record.
494
- mcmp .Exec ("select id, region_id, name from user_tbl order by id" )
495
- }
496
473
497
474
// TestInsertJson tests that selected json values are encoded correctly.
498
475
func TestInsertJson (t * testing.T ) {
@@ -516,4 +493,3 @@ func TestInsertJson(t *testing.T) {
516
493
utils .AssertMatches (t , mcmp .VtConn , `select * from uks.j_utbl order by id` ,
517
494
`[[INT64(1) JSON("{}")] [INT64(2) JSON("{\"a\": 1, \"b\": 2}")] [INT64(3) JSON("{\"k\": \"a\"}")] [INT64(4) JSON("{\"date\": 1629849600, \"keywordSourceId\": 930701976723823, \"keywordSourceVersionId\": 210825230433}")]]` )
518
495
}
519
- >> >> >> > e89f684b09 (JSON Encoding : Use Type_RAW for marshalling json (#16637 ))
0 commit comments