diff --git a/tests/fullstack-test2/ddl/alter_pk.test b/tests/fullstack-test2/ddl/alter_pk.test index 5859e21cf46..26adce20913 100644 --- a/tests/fullstack-test2/ddl/alter_pk.test +++ b/tests/fullstack-test2/ddl/alter_pk.test @@ -46,16 +46,16 @@ mysql> alter table test.t drop primary key; # issue 5859, case 1 mysql> drop table if exists test.t_case; -## create table with `source` is nullable -## insert some data and left `source` to be empty -mysql> create table test.t_case (`case_no` varchar(32) not null,`source` varchar(20) default null,`p` varchar(12) DEFAULT NULL,primary key (`case_no`)); +## create table with source is nullable +## insert some data and left source to be empty +mysql> create table test.t_case (case_no varchar(32) not null,source varchar(20) default null,p varchar(12) DEFAULT NULL,primary key (case_no)); mysql> insert into test.t_case(case_no) values ("1"), ("2"), ("3"), ("4"); -## drop the primary key, fill the `source` to be non-empty +## drop the primary key, fill the source to be non-empty ## add new primary key with case_no and source mysql> alter table test.t_case drop primary key; -mysql> update test.t_case set `source` = '' where `source` is NULL; -mysql> alter table test.t_case add primary key (`case_no`, `source`); +mysql> update test.t_case set source = '' where source is NULL; +mysql> alter table test.t_case add primary key (case_no, source); ## send the snapshot data to tiflash mysql> alter table test.t_case set tiflash replica 1; @@ -73,14 +73,14 @@ mysql> select case_no,p,source from test.t_case; # issue 5859, case 2 mysql> drop table if exists test.t_case; -## create table with `case_no` -mysql> create table test.t_case (`case_no` varchar(32) not null,`p` varchar(12) DEFAULT NULL,primary key (`case_no`)); +## create table with case_no +mysql> create table test.t_case (case_no varchar(32) not null,p varchar(12) DEFAULT NULL,primary key (case_no)); mysql> insert into test.t_case(case_no) values ("1"), ("2"), ("3"), ("4"); -mysql> alter table test.t_case add column `source` varchar(20) not null; +mysql> alter table test.t_case add column source varchar(20) not null; ## drop the primary key, add new primary key with case_no and source mysql> alter table test.t_case drop primary key; -mysql> alter table test.t_case add primary key (`case_no`, `source`); +mysql> alter table test.t_case add primary key (case_no, source); ## send the snapshot data to tiflash mysql> alter table test.t_case set tiflash replica 1;