github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/pessimistic_transaction/ww_conflict.result (about)

     1  drop table if exists dis_table_02;
     2  create table dis_table_02(a int not null auto_increment,b varchar(25) not null,c datetime,primary key(a),key bstr (b),key cdate (c) );
     3  insert into dis_table_02(b,c) values ('aaaa','2020-09-08');
     4  insert into dis_table_02(b,c) values ('aaaa','2020-09-08');
     5  begin;
     6  update dis_table_02 set b='tittttt' where a>1;
     7  use ww_conflict;
     8  begin;
     9  update dis_table_02 set b='dpqweoe' where a>1;
    10  commit;
    11  start transaction;
    12  drop table if exists dis_table_02;
    13  drop table if exists dis_table_02;
    14  create table dis_table_02(a int not null auto_increment,b varchar(25) not null,c datetime,primary key(a),key bstr (b),key cdate (c) );
    15  insert into dis_table_02(b,c) values ('aaaa','2020-09-08');
    16  insert into dis_table_02(b,c) values ('aaaa','2020-09-08');
    17  begin;
    18  alter table dis_table_02 rename column a to newA;
    19  use ww_conflict;
    20  begin;
    21  update dis_table_02 set b='dpqweoe' where a>1;
    22  invalid input: column 'dis_table_02.a' does not exist
    23  update dis_table_02 set b='dpqweoe' where newA>1;
    24  commit;
    25  select * from dis_table_02;
    26  newa    b    c
    27  1    aaaa    2020-09-08 00:00:00
    28  2    dpqweoe    2020-09-08 00:00:00
    29  select * from dis_table_02;
    30  newa    b    c
    31  1    aaaa    2020-09-08 00:00:00
    32  2    dpqweoe    2020-09-08 00:00:00
    33  drop table dis_table_02;
    34  drop table if exists dis_table_02;
    35  create table dis_table_02(a int not null default 10,b varchar(25) not null,c datetime);
    36  insert into dis_table_02(b,c) values ('aaaa','2020-09-08');
    37  insert into dis_table_02(b,c) values ('bbbb','2020-09-08');
    38  begin;
    39  alter table dis_table_02 add constraint primary key (b);
    40  use ww_conflict;
    41  begin;
    42  update dis_table_02 set b='dpqweoe' where a>1;
    43  Duplicate entry 'dpqweoe' for key 'b'
    44  commit;
    45  select * from dis_table_02;
    46  a    b    c
    47  10    aaaa    2020-09-08 00:00:00
    48  10    bbbb    2020-09-08 00:00:00
    49  select * from dis_table_02;
    50  a    b    c
    51  10    aaaa    2020-09-08 00:00:00
    52  10    bbbb    2020-09-08 00:00:00
    53  drop table dis_table_02;
    54  drop table if exists dis_table_02;
    55  create table dis_table_02(a int not null default 10,b varchar(25) not null,c datetime,primary key (b));
    56  insert into dis_table_02(b,c) values ('aaaa','2020-09-08');
    57  insert into dis_table_02(b,c) values ('bbbb','2020-09-08');
    58  begin;
    59  alter table dis_table_02 drop primary key;
    60  use ww_conflict;
    61  begin;
    62  insert into dis_table_02 values(10, 'aaaa', '1998-09-12');
    63  commit;
    64  select * from dis_table_02;
    65  a    b    c
    66  10    aaaa    2020-09-08 00:00:00
    67  10    bbbb    2020-09-08 00:00:00
    68  10    aaaa    1998-09-12 00:00:00
    69  select * from dis_table_02;
    70  a    b    c
    71  10    aaaa    2020-09-08 00:00:00
    72  10    bbbb    2020-09-08 00:00:00
    73  10    aaaa    1998-09-12 00:00:00
    74  drop table dis_table_02;