github.com/matrixorigin/matrixone@v0.7.0/test/distributed/cases/tenant/clustertable2.result (about)

     1  drop database if exists db1;
     2  create database db1;
     3  create table db1.b(b int);
     4  insert into db1.b values (0),(1),(2),(3);
     5  drop account if exists account_test;
     6  create account account_test admin_name = 'root' identified by '111' open comment 'account_test';
     7  use mo_catalog;
     8  drop table if exists a;
     9  create cluster table a(a int);
    10  insert into a accounts(sys,account_test) values(0),(1),(2),(3);
    11  select a from a;
    12  a
    13  0
    14  1
    15  2
    16  3
    17  0
    18  1
    19  2
    20  3
    21  use mo_catalog;
    22  select * from a;
    23  a
    24  0
    25  1
    26  2
    27  3
    28  delete from a;
    29  use mo_catalog;
    30  select * from a;
    31  a
    32  insert into a accounts(sys,account_test) select b from db1.b;
    33  select a from a;
    34  a
    35  0
    36  1
    37  2
    38  3
    39  0
    40  1
    41  2
    42  3
    43  use mo_catalog;
    44  select * from a;
    45  a
    46  0
    47  1
    48  2
    49  3
    50  delete from a;
    51  load data infile '$resources/load_data/cluster_table1.csv' into table a accounts(sys,account_test) (a);
    52  select a from a;
    53  a
    54  0
    55  0
    56  0
    57  0
    58  0
    59  0
    60  0
    61  0
    62  use mo_catalog;
    63  select * from a;
    64  a
    65  0
    66  0
    67  0
    68  0
    69  delete from a;
    70  insert into a(account_id) values (0),(1),(2),(3);
    71  invalid input: do not specify the attribute account_id for the cluster table
    72  insert into a(account_id) select b from db1.b;
    73  invalid input: do not specify the attribute account_id for the cluster table
    74  load data infile '$resources/load_data/cluster_table1.csv' into table a (account_id);
    75  invalid input: do not specify the attribute account_id for the cluster table
    76  use mo_catalog;
    77  select * from a;
    78  a
    79  delete from a;
    80  truncate table a;
    81  use mo_catalog;
    82  delete from a;
    83  internal error: only the sys account can insert/update/delete the cluster table
    84  drop table a;
    85  internal error: do not have privilege to execute the statement
    86  truncate table a;
    87  internal error: only the sys account can truncate the cluster table
    88  drop account if exists account_test;
    89  select a from a;
    90  a
    91  drop table if exists a;
    92  drop account if exists account_test;
    93  drop database if exists db1;