github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/publication_subscription/pub_sub_improvment.result (about) 1 drop database if exists database01; 2 drop database if exists test02; 3 drop database if exists test03; 4 drop database if exists procedure_test; 5 drop account if exists test_tenant_1; 6 create account test_tenant_1 admin_name 'test_account' identified by '111'; 7 show databases; 8 Database 9 information_schema 10 mo_catalog 11 mo_debug 12 mo_task 13 mysql 14 pub_sub_improvment 15 system 16 system_metrics 17 create database database01; 18 use database01; 19 create table table01(col1 int, col2 decimal); 20 insert into table01 values (1, 2); 21 insert into table01 values (234, 2413242); 22 select * from table01; 23 col1 col2 24 1 2 25 234 2413242 26 create publication publication01 database database01 account test_tenant_1 comment 'publish database to account01'; 27 show publications; 28 publication database create_time update_time sub_account comments 29 publication01 database01 2024-05-09 16:47:46 null test_tenant_1 publish database to account01 30 create database sub_database01 from sys publication publication01; 31 show databases; 32 Database 33 information_schema 34 mo_catalog 35 mysql 36 sub_database01 37 system 38 system_metrics 39 use sub_database01; 40 show tables; 41 Tables_in_sub_database01 42 table01 43 select * from table01; 44 col1 col2 45 1 2 46 234 2413242 47 truncate table table01; 48 internal error: can not truncate table 'table01' which is published by other account 49 delete from table01 where col1 = 1; 50 internal error: cannot insert/update/delete from public table 51 update table01 set col1 = 100 where col2 = 2413242; 52 internal error: cannot insert/update/delete from public table 53 show table status; 54 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 55 table01 Tae Dynamic 2 0 104 0 0 NULL 0 2024-05-09 16:47:45 NULL NULL utf-8 NULL 0 moadmin 56 drop table table01; 57 internal error: can not drop subscription table table01 58 show subscriptions; 59 pub_name pub_account pub_database pub_time sub_name sub_time 60 publication01 sys database01 2024-05-09 16:47:46 sub_database01 2024-05-09 16:47:46 61 drop publication publication01; 62 drop database database01; 63 drop database if exists database01; 64 create database database01; 65 use database01; 66 create table t1(a int, b int); 67 insert into t1 values (1, 1), (2, 2), (3, 3); 68 create publication publication01 database database01; 69 show publications; 70 publication database create_time update_time sub_account comments 71 publication01 database01 2024-05-09 16:47:46 null * 72 drop account if exists test_tenant_1; 73 drop account if exists test_tenant_2; 74 create account test_tenant_1 admin_name 'test_account' identified by '111'; 75 create account test_tenant_2 admin_name 'test_account' identified by '111'; 76 drop database if exists sub_database01; 77 create database sub_database01 from sys publication publication01; 78 show subscriptions; 79 pub_name pub_account pub_database pub_time sub_name sub_time 80 publication01 sys database01 2024-05-09 16:47:46 sub_database01 2024-05-09 16:47:48 81 use sub_database01; 82 show tables; 83 Tables_in_sub_database01 84 t1 85 select * from t1; 86 a b 87 1 1 88 2 2 89 3 3 90 drop table if exists t2; 91 create table t2(col1 int primary key ); 92 insert into t2 values (1),(2),(3); 93 use sub_database01; 94 show tables; 95 Tables_in_sub_database01 96 t1 97 t2 98 select * from t2; 99 col1 100 1 101 2 102 3 103 drop database if exists sub_database01; 104 create database sub_database01 from sys publication publication01; 105 show subscriptions; 106 pub_name pub_account pub_database pub_time sub_name sub_time 107 publication01 sys database01 2024-05-09 16:47:46 sub_database01 2024-05-09 16:47:48 108 use sub_database01; 109 show tables; 110 Tables_in_sub_database01 111 t1 112 t2 113 select * from t1; 114 a b 115 1 1 116 2 2 117 3 3 118 select * from t2; 119 col1 120 1 121 2 122 3 123 drop publication publication01; 124 drop database if exists database02; 125 create database database02; 126 use database02; 127 create table table03(col1 char, col2 varchar(100)); 128 insert into table03 values ('1', 'database'); 129 insert into table03 values ('a', 'data warehouse'); 130 create publication publication02 database database02; 131 show publications; 132 publication database create_time update_time sub_account comments 133 publication02 database02 2024-05-09 16:47:49 null * 134 drop database if exists sub_database02; 135 create database sub_database02 from sys publication publication02; 136 show subscriptions all; 137 pub_name pub_account pub_database pub_time sub_name sub_time 138 publication02 sys database02 2024-05-09 16:47:49 sub_database02 2024-05-09 16:47:49 139 use sub_database02; 140 show tables; 141 Tables_in_sub_database02 142 table03 143 select * from table03; 144 col1 col2 145 1 database 146 a data warehouse 147 drop database if exists sub_database02; 148 create database sub_database02 from sys publication publication02; 149 show subscriptions all; 150 pub_name pub_account pub_database pub_time sub_name sub_time 151 publication02 sys database02 2024-05-09 16:47:49 sub_database02 2024-05-09 16:47:49 152 use sub_database02; 153 show tables; 154 Tables_in_sub_database02 155 table03 156 select * from table03; 157 col1 col2 158 1 database 159 a data warehouse 160 show table status; 161 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 162 table03 Tae Dynamic 2 0 160 0 0 NULL 0 2024-05-09 16:47:49 NULL NULL utf-8 NULL 0 moadmin 163 drop publication publication02; 164 drop database if exists database03; 165 create database database03; 166 use database03; 167 drop table if exists table01; 168 create table table01(col1 int); 169 insert into table01 values (-1),(1),(2); 170 create publication publication03 database database03 account test_tenant_1; 171 show publications; 172 publication database create_time update_time sub_account comments 173 publication03 database03 2024-05-09 16:47:49 null test_tenant_1 174 drop database if exists sub_database03; 175 create database sub_database03 from sys publication publication03; 176 show subscriptions all; 177 pub_name pub_account pub_database pub_time sub_name sub_time 178 publication03 sys database03 2024-05-09 16:47:49 sub_database03 2024-05-09 16:47:49 179 use sub_database03; 180 show tables; 181 Tables_in_sub_database03 182 table01 183 select * from table01; 184 col1 185 -1 186 1 187 2 188 desc table01; 189 Field Type Null Key Default Extra Comment 190 col1 INT(32) YES null 191 show table status; 192 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 193 table01 Tae Dynamic 3 0 108 0 0 NULL 0 2024-05-09 16:47:49 NULL NULL utf-8 NULL 0 moadmin 194 show subscriptions all; 195 pub_name pub_account pub_database pub_time sub_name sub_time 196 alter publication publication03 account all; 197 show publications; 198 publication database create_time update_time sub_account comments 199 publication03 database03 2024-05-09 16:47:49 2024-05-09 16:47:49 * 200 show subscriptions all; 201 pub_name pub_account pub_database pub_time sub_name sub_time 202 publication03 sys database03 2024-05-09 16:47:49 null null 203 create database sub_database03 from sys publication publication03; 204 use sub_database03; 205 show tables; 206 Tables_in_sub_database03 207 table01 208 show columns from table01; 209 Field Type Null Key Default Extra Comment 210 col1 INT(32) YES null 211 desc table01; 212 Field Type Null Key Default Extra Comment 213 col1 INT(32) YES null 214 select * from table01; 215 col1 216 -1 217 1 218 2 219 drop publication publication03; 220 show publications; 221 publication database create_time update_time sub_account comments 222 use sub_database01; 223 internal error: there is no publication publication01 224 drop database sub_database01; 225 drop database sub_database02; 226 drop database sub_database03; 227 drop database sub_database01; 228 Can't drop database 'sub_database01'; database doesn't exist 229 drop database sub_database02; 230 Can't drop database 'sub_database02'; database doesn't exist 231 drop database database01; 232 drop database database02; 233 drop database database03; 234 drop account test_tenant_1; 235 drop account test_tenant_2;