diff --git a/go/test/endtoend/vreplication/config_test.go b/go/test/endtoend/vreplication/config_test.go index 62f20f36e80..ad688a17b1e 100644 --- a/go/test/endtoend/vreplication/config_test.go +++ b/go/test/endtoend/vreplication/config_test.go @@ -40,7 +40,7 @@ var ( // All standard user tables should have a primary key and at least one secondary key. initialProductSchema = ` create table product(pid int, description varbinary(128), date1 datetime not null default '0000-00-00 00:00:00', date2 datetime not null default '2021-00-01 00:00:00', primary key(pid), key(date1,date2)) CHARSET=utf8mb4; -create table customer(cid int, name varchar(128) collate utf8mb4_bin, meta json default null, typ enum('individual','soho','enterprise'), sport set('football','cricket','baseball'), +create table customer(cid int auto_increment, name varchar(128) collate utf8mb4_bin, meta json default null, typ enum('individual','soho','enterprise'), sport set('football','cricket','baseball'), ts timestamp not null default current_timestamp, bits bit(2) default b'11', date1 datetime not null default '0000-00-00 00:00:00', date2 datetime not null default '2021-00-01 00:00:00', dec80 decimal(8,0), blb blob, primary key(cid,typ), key(name)) CHARSET=utf8mb4; create table customer_seq(id int, next_id bigint, cache bigint, primary key(id)) comment 'vitess_sequence'; diff --git a/go/test/endtoend/vreplication/resharding_workflows_v2_test.go b/go/test/endtoend/vreplication/resharding_workflows_v2_test.go index 0f3f85a9472..a8076ded2fa 100644 --- a/go/test/endtoend/vreplication/resharding_workflows_v2_test.go +++ b/go/test/endtoend/vreplication/resharding_workflows_v2_test.go @@ -605,6 +605,14 @@ func testMoveTablesV2Workflow(t *testing.T) { testVSchemaForSequenceAfterMoveTables(t) + // Confirm that the auto_increment clause on customer.cid was removed. + cs, err := vtgateConn.ExecuteFetch("show create table customer", 1, false) + require.NoError(t, err) + require.Len(t, cs.Rows, 1) + require.Len(t, cs.Rows[0], 2) // Table and "Create Table" + csddl := strings.ToLower(cs.Rows[0][1].ToString()) + require.False(t, strings.Contains(csddl, "auto_increment"), "customer table still has auto_increment clause: %s", csddl) + createMoveTablesWorkflow(t, "Lead,Lead-1") output, err = vc.VtctldClient.ExecuteCommandWithOutput(listAllArgs...) require.NoError(t, err)