-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
469f099
commit 44a4d5e
Showing
4 changed files
with
160 additions
and
149 deletions.
There are no files selected for viewing
64 changes: 64 additions & 0 deletions
64
test/distributed/cases/publication_subscription/pub_sub.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
drop account if exists test_tenant_1; | ||
create account test_tenant_1 admin_name 'test_account' identified by '111'; | ||
drop database if exists republication01; | ||
create database republication01; | ||
use republication01; | ||
create publication publication01 database republication01 account test_tenant_1 comment 'republish'; | ||
create table repub01(col1 int); | ||
insert into repub01 values (1); | ||
drop database if exists resub01; | ||
create database resub01 from sys publication publication01; | ||
show subscriptions all; | ||
pub_name pub_account pub_database pub_time sub_name sub_time | ||
publication01 sys republication01 2024-05-09 13:58:08 resub01 2024-05-09 13:58:08 | ||
drop database if exists database03; | ||
create database database03; | ||
use database03; | ||
create table table01 (col1 int); | ||
insert into table01 values (1); | ||
insert into table01 select * from table01; | ||
alter publication publication01 database database03; | ||
show publications; | ||
publication database create_time update_time sub_account comments | ||
publication01 database03 2024-05-09 13:58:08 2024-05-09 13:58:08 test_tenant_1 republish | ||
use resub01; | ||
show tables; | ||
Tables_in_resub01 | ||
table01 | ||
select * from table01; | ||
col1 | ||
1 | ||
1 | ||
show columns from table01; | ||
Field Type Null Key Default Extra Comment | ||
col1 INT(32) YES null | ||
desc table01; | ||
Field Type Null Key Default Extra Comment | ||
col1 INT(32) YES null | ||
show table status; | ||
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 | ||
table01 Tae Dynamic 2 0 72 0 0 NULL 0 2024-05-09 13:58:08 NULL NULL utf-8 NULL 0 moadmin | ||
alter publication publication01 database republication01; | ||
show publications; | ||
publication database create_time update_time sub_account comments | ||
publication01 republication01 2024-05-09 13:58:08 2024-05-09 13:58:08 test_tenant_1 republish | ||
show subscriptions all; | ||
pub_name pub_account pub_database pub_time sub_name sub_time | ||
publication01 sys republication01 2024-05-09 13:58:08 resub01 2024-05-09 13:58:08 | ||
use resub01; | ||
show tables; | ||
Tables_in_resub01 | ||
repub01 | ||
show columns from repub01; | ||
Field Type Null Key Default Extra Comment | ||
col1 INT(32) YES null | ||
desc repub01; | ||
Field Type Null Key Default Extra Comment | ||
col1 INT(32) YES null | ||
select * from repub01; | ||
col1 | ||
1 | ||
drop publication publication01; | ||
drop database database03; | ||
drop database republication01; | ||
drop account test_tenant_1; |
55 changes: 55 additions & 0 deletions
55
test/distributed/cases/publication_subscription/pub_sub.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
drop account if exists test_tenant_1; | ||
create account test_tenant_1 admin_name 'test_account' identified by '111'; | ||
|
||
drop database if exists republication01; | ||
create database republication01; | ||
use republication01; | ||
create publication publication01 database republication01 account test_tenant_1 comment 'republish'; | ||
create table repub01(col1 int); | ||
insert into repub01 values (1); | ||
|
||
-- @session:id=1&user=test_tenant_1:test_account&password=111 | ||
drop database if exists resub01; | ||
create database resub01 from sys publication publication01; | ||
-- @ignore:3,5 | ||
show subscriptions all; | ||
-- @session | ||
|
||
drop database if exists database03; | ||
create database database03; | ||
use database03; | ||
create table table01 (col1 int); | ||
insert into table01 values (1); | ||
insert into table01 select * from table01; | ||
alter publication publication01 database database03; | ||
-- @ignore:2,3 | ||
show publications; | ||
|
||
-- @session:id=2&user=test_tenant_1:test_account&password=111 | ||
use resub01; | ||
show tables; | ||
select * from table01; | ||
show columns from table01; | ||
desc table01; | ||
-- @ignore:10,11,12 | ||
show table status; | ||
-- @session | ||
|
||
alter publication publication01 database republication01; | ||
-- @ignore:2,3 | ||
show publications; | ||
|
||
-- @session:id=3&user=test_tenant_1:test_account&password=111 | ||
-- @ignore:3,5 | ||
show subscriptions all; | ||
use resub01; | ||
show tables; | ||
show columns from repub01; | ||
desc repub01; | ||
select * from repub01; | ||
-- @session | ||
|
||
drop publication publication01; | ||
drop database database03; | ||
drop database republication01; | ||
drop account test_tenant_1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.