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

     1  create table ct_01(a int primary key,b varchar(25));
     2  insert into ct_01 values(1,'bell'),(2,'app'),(1,'com');
     3  Duplicate entry '\d' for key 'a'
     4  insert into ct_01 values(1,'bell'),(2,'app');
     5  begin;
     6  insert into ct_01 values(3,'oppo'),(3,'zow');
     7  Duplicate entry '3' for key 'a'
     8  use conflict_transaction;
     9  start transaction ;
    10  insert into ct_01 values(2,'yooo');
    11  Duplicate entry '\d' for key 'a'
    12  commit;
    13  commit;
    14  select * from ct_01;
    15  a    b
    16  1    bell
    17  2    app
    18  create table ct_02(a int primary key,b varchar(25));
    19  insert into ct_02 values(1,'bell'),(2,'app'),(3,'com');
    20  start transaction ;
    21  update ct_02 set a=5 where b='app';
    22  begin;
    23  update ct_02 set a=5 where b='bell';
    24  Duplicate entry '\d' for key 'a'
    25  commit;
    26  commit;
    27  begin;
    28  update ct_02 set a=3 where b='bell';
    29  Duplicate entry '\d' for key 'a'
    30  commit;
    31  select * from ct_02;
    32  a    b
    33  1    bell
    34  3    com
    35  5    app
    36  create table ct_03(a int primary key,b varchar(25));
    37  insert into ct_03 values(1,'bell'),(2,'app'),(3,'com');
    38  begin;
    39  delete from ct_03 where a=1;
    40  select * from ct_03;
    41  a    b
    42  2    app
    43  3    com
    44  begin;
    45  update ct_03 set b='urea' where a=1;
    46  select * from ct_03;
    47  a    b
    48  2    app
    49  3    com
    50  commit;
    51  commit;
    52  select * from ct_03;
    53  a    b
    54  2    app
    55  3    com
    56  create table ct_04_temp(a int,b varchar(25));
    57  insert into ct_04_temp values (1,'bell'),(2,'app'),(1,'com');
    58  create table ct_04(a int primary key,b varchar(25));
    59  begin;
    60  insert into ct_04 select * from ct_04_temp;
    61  Duplicate entry '\d' for key 'a'
    62  commit;
    63  select * from ct_04;
    64  a    b
    65  create table ct_05(a int,b varchar(25) primary key);
    66  begin;
    67  load data infile '$resources/load_data/ct_file.csv' into table ct_05 fields terminated by ',';
    68  Duplicate entry 'apple' for key 'b'
    69  commit;
    70  select * from ct_05;
    71  a    b
    72  create table ct_06(a bigint,b varchar(25),c int, d varchar(25),primary key(a),unique index c(c),key b(b),key d(d));
    73  start transaction ;
    74  insert into ct_06 select 5678,'high',487,'comment test';
    75  insert into ct_06 select 5679,'lower',487,'define';
    76  Duplicate entry '487' for key '__mo_index_idx_col'
    77  insert into ct_06 values (897,'number',908,'run tools'),(898,'string',908,'ffff'),(899,'string',918,'while'),(900,'string',948,'word file'),(901,'string',902,'oooo'),(902,'string',87,'dddd'),(903,'string',87,'eeee');
    78  Duplicate entry '908' for key '__mo_index_idx_col'
    79  select * from ct_06;
    80  a    b    c    d
    81  5678    high    487    comment test
    82  commit;
    83  select * from ct_06;
    84  a    b    c    d
    85  5678    high    487    comment test
    86  begin;
    87  insert into ct_06 values (500,'number1',908,'ooooffff');
    88  start transaction ;
    89  insert into ct_06 values (501,'number2',908,'zzzztttt');
    90  Duplicate entry '908' for key '__mo_index_idx_col'
    91  commit;
    92  select * from ct_06;
    93  a    b    c    d
    94  500    number1    908    ooooffff
    95  5678    high    487    comment test
    96  commit;
    97  select * from ct_06;
    98  a    b    c    d
    99  500    number1    908    ooooffff
   100  5678    high    487    comment test
   101  create table ct_07(a int,b varchar(25),c date, d double,primary key(a,c));
   102  insert into ct_07 values (1,'901','2011-09-29',0.01),(2,'187','2011-09-29',1.31),(3,'90','2111-02-09',10.01);
   103  begin;
   104  insert into ct_07 values (3,'90','2111-02-09',10.01);
   105  Duplicate entry '(3,2111-02-09)' for key '__mo_cpkey_col'
   106  insert into ct_07 values (4,'11','2011-09-29',7.00),(2,'567','2011-09-29',1.31),(4,'90','2011-09-29',89.3);
   107  (Duplicate entry) '\((\d+),(\d{4}-\d{2}-\d{2})\)' (for key '__mo_cpkey_col')
   108  select * from ct_07;
   109  a    b    c    d
   110  1    901    2011-09-29    0.01
   111  2    187    2011-09-29    1.31
   112  3    90    2111-02-09    10.01
   113  commit;
   114  select * from ct_07;
   115  a    b    c    d
   116  1    901    2011-09-29    0.01
   117  2    187    2011-09-29    1.31
   118  3    90    2111-02-09    10.01