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

     1  drop table if exists atomic_table_1;
     2  drop table if exists atomic_table_2;
     3  drop table if exists atomic_table_3;
     4  drop table if exists atomic_view_1;
     5  drop table if exists atomic_view_2;
     6  drop table if exists t_code_rule_2;
     7  create table atomic_table_2(a bigint ,b varchar(200),c double);
     8  begin;
     9  create table atomic_table_1(a bigint not null,b varchar(200),c double,primary key(a,b));
    10  insert into atomic_table_1 select 1,"gooooooge",8092.9;
    11  insert into atomic_table_1 select 2,"caaaaaate",92.09;
    12  commit;
    13  select * from atomic_table_1;
    14  a    b    c
    15  1    gooooooge    8092.9
    16  2    caaaaaate    92.09
    17  start transaction ;
    18  insert into atomic_table_2 select * from atomic_table_1;
    19  select * from atomic_table_2;
    20  a    b    c
    21  1    gooooooge    8092.9
    22  2    caaaaaate    92.09
    23  rollback ;
    24  select * from atomic_table_2;
    25  a    b    c
    26  begin;
    27  insert into atomic_table_2 select * from atomic_table_1;
    28  commit;
    29  select * from atomic_table_2;
    30  a    b    c
    31  1    gooooooge    8092.9
    32  2    caaaaaate    92.09
    33  begin;
    34  create view atomic_view_1 as select * from atomic_table_1;
    35  insert into atomic_table_1 select 10,"eeeeee",20.3;
    36  commit;
    37  select * from atomic_view_1;
    38  a    b    c
    39  1    gooooooge    8092.9
    40  2    caaaaaate    92.09
    41  10    eeeeee    20.3
    42  start transaction ;
    43  insert into atomic_table_1 select 10,"eeeeee",20.3;
    44  insert into atomic_table_1 select 11,"ffff",2.3;
    45  commit;
    46  Duplicate entry '3b150a460165656565656500' for key '__mo_cpkey_col'
    47  select * from atomic_table_1;
    48  a    b    c
    49  1    gooooooge    8092.9
    50  2    caaaaaate    92.09
    51  10    eeeeee    20.3
    52  select * from atomic_view_1;
    53  a    b    c
    54  1    gooooooge    8092.9
    55  2    caaaaaate    92.09
    56  10    eeeeee    20.3
    57  begin;
    58  create view atomic_view_2 as select * from atomic_table_2;
    59  rollback ;
    60  select * from atomic_view_2;
    61  SQL parser error: table "atomic_view_2" does not exist
    62  show create table atomic_view_2;
    63  no such table atomicity_1.atomic_view_2
    64  begin;
    65  drop view atomic_view_2;
    66  invalid view 'atomicity_1.atomic_view_2'
    67  commit ;
    68  drop view atomic_view_2;
    69  invalid view 'atomicity_1.atomic_view_2'
    70  create table atomic_table_3a(col1 tinyint,col2 smallint,col3 int,clo4 bigint,col5 tinyint unsigned,col6 smallint unsigned,col7 int unsigned,col8 bigint unsigned,col9 float,col10 double,col11 varchar(255),col12 Date,col13 DateTime,col14 timestamp,col15 bool,col16 decimal(5,2),col17 text,col18 varchar(255),col19 varchar(255),col20 text,primary key(col1))partition by hash(col1)partitions 4;
    71  begin;
    72  [unknown result because it is related to issue#5941]
    73  load data infile '$resources/external_table_file/pt_table_data.csv' into table  atomic_table_3a fields terminated by ',';
    74  [unknown result because it is related to issue#5941]
    75  select col1,col2 from atomic_table_3a;
    76  [unknown result because it is related to issue#5941]
    77  update atomic_table_3a set col1=400;
    78  [unknown result because it is related to issue#5941]
    79  rollback;
    80  [unknown result because it is related to issue#5941]
    81  select col1 from atomic_table_3a;
    82  [unknown result because it is related to issue#5941]
    83  start transaction ;
    84  [unknown result because it is related to issue#5941]
    85  load data infile '$resources/external_table_file/pt_table_data.csv' into table  atomic_table_3a fields terminated by ',';
    86  [unknown result because it is related to issue#5941]
    87  select count(*) from atomic_table_3a;
    88  [unknown result because it is related to issue#5941]
    89  update atomic_table_3a set col1=100;
    90  [unknown result because it is related to issue#5941]
    91  commit;
    92  [unknown result because it is related to issue#5941]
    93  select col1 from atomic_table_3a;
    94  [unknown result because it is related to issue#5941]
    95  create table atomic_table_3(col1 tinyint,col2 smallint,col3 int,clo4 bigint,col5 tinyint unsigned,col6 smallint unsigned,col7 int unsigned,col8 bigint unsigned,col9 float,col10 double,col11 varchar(255),col12 Date,col13 DateTime,col14 timestamp,col15 bool,col16 decimal(5,2),col17 text,col18 varchar(255),col19 varchar(255),col20 text,primary key(col1))partition by hash(col1)partitions 4;
    96  load data infile '$resources/external_table_file/pt_table_data.csv' into table  atomic_table_3 fields terminated by ',';
    97  start transaction ;
    98  update  atomic_table_3 set col2=20;
    99  select  col1,col2 from atomic_table_3;
   100  col1    col2
   101  -62    20
   102  91    20
   103  33    20
   104  121    20
   105  40    20
   106  -8    20
   107  -75    20
   108  21    20
   109  -93    20
   110  110    20
   111  122    20
   112  show create table atomic_table_3;
   113  Table    Create Table
   114  atomic_table_3    CREATE TABLE `atomic_table_3` (\n`col1` TINYINT NOT NULL,\n`col2` SMALLINT DEFAULT NULL,\n`col3` INT DEFAULT NULL,\n`clo4` BIGINT DEFAULT NULL,\n`col5` TINYINT UNSIGNED DEFAULT NULL,\n`col6` SMALLINT UNSIGNED DEFAULT NULL,\n`col7` INT UNSIGNED DEFAULT NULL,\n`col8` BIGINT UNSIGNED DEFAULT NULL,\n`col9` FLOAT DEFAULT NULL,\n`col10` DOUBLE DEFAULT NULL,\n`col11` VARCHAR(255) DEFAULT NULL,\n`col12` DATE DEFAULT NULL,\n`col13` DATETIME DEFAULT NULL,\n`col14` TIMESTAMP DEFAULT NULL,\n`col15` BOOL DEFAULT NULL,\n`col16` DECIMAL(5,2) DEFAULT NULL,\n`col17` TEXT DEFAULT NULL,\n`col18` VARCHAR(255) DEFAULT NULL,\n`col19` VARCHAR(255) DEFAULT NULL,\n`col20` TEXT DEFAULT NULL,\nPRIMARY KEY (`col1`)\n) partition by hash (col1) partitions 4
   115  rollback ;
   116  select  col1,col2 from atomic_table_3;
   117  col1    col2
   118  -62    5807
   119  91    19514
   120  33    4300
   121  121    -22564
   122  40    30792
   123  -8    -30001
   124  -75    11896
   125  21    775
   126  -93    -18596
   127  110    -23777
   128  122    19053
   129  begin;
   130  create external table atomic_ex_table(num_col1 tinyint,num_col2 smallint,num_col3 int,num_col4 bigint,num_col5 tinyint unsigned,num_col6 smallint unsigned,num_col7 int unsigned,num_col8 bigint unsigned ,num_col9 float(5,3),num_col10 double(6,5),num_col11 decimal(38,19)) infile{"filepath"='$resources/external_table_file/ex_table_number.csv'} fields terminated by ',' enclosed by '\"' lines terminated by '\n';
   131  select num_col1  from  atomic_ex_table;
   132  num_col1
   133  60
   134  -128
   135  127
   136  null
   137  rollback ;
   138  select num_col1  from  atomic_ex_table;
   139  SQL parser error: table "atomic_ex_table" does not exist
   140  show create table atomic_ex_table;
   141  no such table atomicity_1.atomic_ex_table
   142  desc atomic_ex_table;
   143  no such table atomicity_1.atomic_ex_table
   144  create TEMPORARY TABLE atomic_temp(a int);
   145  begin;
   146  insert into atomic_temp values (5);
   147  rollback ;
   148  select * from atomic_temp;
   149  a
   150  drop table atomic_temp;
   151  start transaction ;
   152  create TEMPORARY TABLE atomic_temp(a int);
   153  insert into atomic_temp values (5);
   154  select * from atomic_temp;
   155  a
   156  5
   157  rollback ;
   158  select * from atomic_temp;
   159  SQL parser error: table "atomic_temp" does not exist
   160  show create table atomic_temp;
   161  no such table atomicity_1.atomic_temp
   162  start transaction ;
   163  create TEMPORARY TABLE atomic_temp(a int);
   164  insert into atomic_temp values (5);
   165  commit ;
   166  select * from atomic_temp;
   167  a
   168  5
   169  CREATE TABLE `t_code_rule` (
   170  `code_id` bigint(20) NOT NULL AUTO_INCREMENT,
   171  `code_no` varchar(50) NOT NULL,
   172  `org_no` varchar(50) NOT NULL,
   173  `org_name` varchar(50) NOT NULL,
   174  `code_type` int(11) NOT NULL DEFAULT '0',
   175  PRIMARY KEY (`code_id`),
   176  UNIQUE KEY `code_type` (`code_type`),
   177  KEY `code_no` (`code_no`),
   178  KEY `org_no` (`org_no`)
   179  );
   180  start transaction ;
   181  insert into t_code_rule values (18373453,'aaaaaa','fffff','ccccc',10);
   182  insert into t_code_rule values (18373453,'aaaaaa','fffff','ccccc',20);
   183  Duplicate entry '18373453' for key 'code_id'
   184  commit ;
   185  select * from t_code_rule;
   186  code_id    code_no    org_no    org_name    code_type
   187  begin;
   188  insert into t_code_rule values (18373453,'aaaaaa','fffff','ccccc',5);
   189  delete from t_code_rule where code_id=18373453;
   190  select * from t_code_rule;
   191  code_id    code_no    org_no    org_name    code_type
   192  rollback ;
   193  select * from t_code_rule;
   194  code_id    code_no    org_no    org_name    code_type
   195  insert into t_code_rule values (18373453,'aaaaaa','fffff','ccccc',5);
   196  begin ;
   197  delete from t_code_rule where code_id=18373453;
   198  commit ;
   199  begin;
   200  insert into t_code_rule(code_no,org_no,org_name,code_type) values ('',null,'ccccc',5);
   201  constraint violation: Column 'org_no' cannot be null
   202  commit ;
   203  select * from t_code_rule;
   204  code_id    code_no    org_no    org_name    code_type
   205  insert into t_code_rule values (18373453,'aaaaaa','fffff','ccccc',5);
   206  Duplicate entry '5' for key 'code_type'
   207  begin;
   208  update t_code_rule set org_name=NULL where code_id=18373453;
   209  constraint violation: Column 'org_name' cannot be null
   210  commit ;
   211  select * from t_code_rule;
   212  code_id    code_no    org_no    org_name    code_type
   213  18373453    aaaaaa    fffff    ccccc    5
   214  begin ;
   215  create account aname admin_name 'admin' identified by '111';
   216  internal error: administrative command is unsupported in transactions
   217  create role role1,role2;
   218  internal error: administrative command is unsupported in transactions
   219  grant role1 to role2;
   220  internal error: administrative command is unsupported in transactions
   221  grant create table ,drop table on database * to role1;
   222  internal error: administrative command is unsupported in transactions
   223  truncate table  t_code_rule;
   224  drop table t_code_rule;
   225  drop database atomic_1;
   226  Can't drop database 'atomic_1'; database doesn't exist
   227  drop role role1,role2;
   228  internal error: administrative command is unsupported in transactions
   229  commit;