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

     1  set global enable_privilege_cache = off;
     2  create account a1 ADMIN_NAME 'admin1' IDENTIFIED BY 'test123';
     3  create account a2 ADMIN_NAME 'admin2' IDENTIFIED BY 'test456';
     4  create database sub1;
     5  create table sub1.t1 (a int,b int);
     6  insert into sub1.t1 values (1, 1), (2, 2), (3, 3);
     7  create publication pub1 database sub1;
     8  create publication pub3 database sub1;
     9  show publications;
    10  publication    database    create_time    update_time    sub_account    comments
    11  pub3    sub1    2024-04-11 17:49:55    null    *    
    12  pub1    sub1    2024-04-11 17:49:55    null    *    
    13  show publications like 'pub%';
    14  publication    database    create_time    update_time    sub_account    comments
    15  pub1    sub1    2024-04-11 17:49:55    null    *    
    16  pub3    sub1    2024-04-11 17:49:55    null    *    
    17  show publications like '%1';
    18  publication    database    create_time    update_time    sub_account    comments
    19  pub1    sub1    2024-04-11 17:49:55    null    *    
    20  create database sub2;
    21  create table sub2.t1 (a float);
    22  create publication pub2 database sub2 account a1;
    23  show publications;
    24  publication    database    create_time    update_time    sub_account    comments
    25  pub2    sub2    2024-04-11 17:49:55    null    a1    
    26  pub3    sub1    2024-04-11 17:49:55    null    *    
    27  pub1    sub1    2024-04-11 17:49:55    null    *    
    28  show publications like 'pub%';
    29  publication    database    create_time    update_time    sub_account    comments
    30  pub1    sub1    2024-04-11 17:49:55    null    *    
    31  pub2    sub2    2024-04-11 17:49:55    null    a1    
    32  pub3    sub1    2024-04-11 17:49:55    null    *    
    33  show publications like '%1';
    34  publication    database    create_time    update_time    sub_account    comments
    35  pub1    sub1    2024-04-11 17:49:55    null    *    
    36  show subscriptions;
    37  pub_name    pub_account    pub_database    pub_time    sub_name    sub_time
    38  show subscriptions all;
    39  pub_name    pub_account    pub_database    pub_time    sub_name    sub_time
    40  pub1    sys    sub1    2024-04-11 17:49:55    null    null
    41  pub3    sys    sub1    2024-04-11 17:49:55    null    null
    42  pub2    sys    sub2    2024-04-11 17:49:55    null    null
    43  show subscriptions all like '%1';
    44  pub_name    pub_account    pub_database    pub_time    sub_name    sub_time
    45  pub1    sys    sub1    2024-04-11 17:49:55    null    null
    46  create database syssub1 from sys publication pub1;
    47  show subscriptions;
    48  pub_name    pub_account    pub_database    pub_time    sub_name    sub_time
    49  pub1    sys    sub1    2024-04-11 17:49:55    syssub1    2024-04-11 17:49:55
    50  show subscriptions all;
    51  pub_name    pub_account    pub_database    pub_time    sub_name    sub_time
    52  pub1    sys    sub1    2024-04-11 17:49:55    syssub1    2024-04-11 17:49:55
    53  pub3    sys    sub1    2024-04-11 17:49:55    null    null
    54  pub2    sys    sub2    2024-04-11 17:49:55    null    null
    55  use syssub1;
    56  show tables;
    57  Tables_in_syssub1
    58  t1
    59  show subscriptions all;
    60  pub_name    pub_account    pub_database    pub_time    sub_name    sub_time
    61  pub1    sys    sub1    2024-04-11 17:49:55    syssub1    2024-04-11 17:49:55
    62  pub3    sys    sub1    2024-04-11 17:49:55    null    null
    63  pub2    sys    sub2    2024-04-11 17:49:55    null    null
    64  show table status;
    65  Name    Engine    Row_format    Rows    Avg_row_length    Data_length    Max_data_length    Index_length    Data_free    Auto_increment    Create_time    Update_time    Check_time    Collation    Checksum    Create_options    Comment    Role_id    Role_name
    66  t1    Tae    Dynamic    3    0    120    0    0    NULL    0    2024-04-11 17:49:55    NULL    NULL    utf-8    NULL            0    moadmin
    67  show table status like 't1';
    68  Name    Engine    Row_format    Rows    Avg_row_length    Data_length    Max_data_length    Index_length    Data_free    Auto_increment    Create_time    Update_time    Check_time    Collation    Checksum    Create_options    Comment    Role_id    Role_name
    69  t1    Tae    Dynamic    3    0    120    0    0    NULL    0    2024-04-11 17:49:55    NULL    NULL    utf-8    NULL            0    moadmin
    70  desc t1;
    71  Field    Type    Null    Key    Default    Extra    Comment
    72  a    INT(32)    YES        null        
    73  b    INT(32)    YES        null        
    74  show create table t1;
    75  Table    Create Table
    76  t1    CREATE TABLE `t1` (\n`a` INT DEFAULT NULL,\n`b` INT DEFAULT NULL\n)
    77  select * from t1;
    78  a    b
    79  1    1
    80  2    2
    81  3    3
    82  show subscriptions all;
    83  pub_name    pub_account    pub_database    pub_time    sub_name    sub_time
    84  pub1    sys    sub1    2024-04-11 17:49:55    null    null
    85  pub3    sys    sub1    2024-04-11 17:49:55    null    null
    86  alter publication pub2 account all;
    87  show publications;
    88  publication    database    create_time    update_time    sub_account    comments
    89  pub2    sub2    2024-04-11 17:49:55    2024-04-11 17:49:55    *    
    90  pub3    sub1    2024-04-11 17:49:55    null    *    
    91  pub1    sub1    2024-04-11 17:49:55    null    *    
    92  show subscriptions all;
    93  pub_name    pub_account    pub_database    pub_time    sub_name    sub_time
    94  pub1    sys    sub1    2024-04-11 17:49:55    null    null
    95  pub3    sys    sub1    2024-04-11 17:49:55    null    null
    96  pub2    sys    sub2    2024-04-11 17:49:55    null    null
    97  alter publication pub1 database sub2;
    98  show publications;
    99  publication    database    create_time    update_time    sub_account    comments
   100  pub1    sub2    2024-04-11 17:49:55    2024-04-11 17:49:55    *    
   101  pub2    sub2    2024-04-11 17:49:55    2024-04-11 17:49:55    *    
   102  pub3    sub1    2024-04-11 17:49:55    null    *    
   103  show subscriptions;
   104  pub_name    pub_account    pub_database    pub_time    sub_name    sub_time
   105  pub1    sys    sub2    2024-04-11 17:49:55    syssub1    2024-04-11 17:49:55
   106  use syssub1;
   107  show tables;
   108  Tables_in_syssub1
   109  t1
   110  select * from t1;
   111  a
   112  drop database syssub1;
   113  drop publication pub1;
   114  drop publication pub2;
   115  drop publication pub3;
   116  drop database sub1;
   117  drop database sub2;
   118  drop account a1;
   119  drop account a2;