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

     1  set global enable_privilege_cache = off;
     2  create database db1;
     3  create publication pubname1 database db1 account test_tenant_1 comment 'publish db1 database';
     4  create publication pubname2 database db1 account test_tenant_1 comment 'publish db1 database';
     5  set global syspublications = "pubname1,pubname2";
     6  create account test_tenant_2 admin_name 'test_account' identified by '111';
     7  -- @session:id=1&user=test_tenant_2:test_account&password=111
     8  show subscriptions;
     9  show databases;
    10  -- @session
    11  set global syspublications = default;
    12  drop account test_tenant_2;
    13  drop publication pubname1;
    14  drop publication pubname2;
    15  drop database db1;
    16  
    17  set global enable_privilege_cache = on;
    18  
    19  
    20  create account `0b6d35cc_11ab_4da5_a5c5_c4cc09917c11` admin_name 'admin' identified by '111';
    21  create account `62915dd9_d454_4b02_be16_0741d94b62cc` admin_name 'admin' identified by '111';
    22  -- @session:id=3&user=0b6d35cc_11ab_4da5_a5c5_c4cc09917c11:admin&password=111
    23  create database test;
    24  use test;
    25  create table tt(a int);
    26  insert into tt values(1);
    27  create publication mo_test_pub database test account `62915dd9_d454_4b02_be16_0741d94b62cc`;
    28  -- @session
    29  -- @session:id=5&user=62915dd9_d454_4b02_be16_0741d94b62cc:admin&password=111
    30  create database mo_test_sub from `0b6d35cc_11ab_4da5_a5c5_c4cc09917c11` publication mo_test_pub;
    31  -- @ignore:3,5
    32  show subscriptions;
    33  -- @session
    34  -- @session:id=7&user=0b6d35cc_11ab_4da5_a5c5_c4cc09917c11:admin&password=111
    35  drop publication mo_test_pub;
    36  -- @session
    37  drop account `0b6d35cc_11ab_4da5_a5c5_c4cc09917c11`;
    38  drop account `62915dd9_d454_4b02_be16_0741d94b62cc`;