1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-6275 spider_same_server_link not enforced (#1330)

This commit is contained in:
Kentoku SHIBA
2019-06-12 19:30:50 +09:00
committed by GitHub
parent 2fd82471ab
commit 8e3a4be45c
9 changed files with 164 additions and 2 deletions

View File

@@ -0,0 +1,11 @@
--connection master_1
set global spider_same_server_link= @old_global_spider_same_server_link;
set session spider_same_server_link= @old_session_spider_same_server_link;
--let $MASTER_1_COMMENT_2_1= $MASTER_1_COMMENT_2_1_BACKUP
--disable_warnings
--disable_query_log
--disable_result_log
--source ../t/test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings

View File

@@ -0,0 +1,15 @@
--disable_warnings
--disable_query_log
--disable_result_log
--source ../t/test_init.inc
--enable_result_log
--enable_query_log
--enable_warnings
--let $MASTER_1_COMMENT_2_1_BACKUP= $MASTER_1_COMMENT_2_1
let $MASTER_1_COMMENT_2_1=
COMMENT='table "tbl_b", host "127.0.0.1", port "$MASTER_1_MYPORT", user "root"';
--connection master_1
set @old_global_spider_same_server_link= @@global.spider_same_server_link;
set @old_session_spider_same_server_link= @@session.spider_same_server_link;
set global spider_same_server_link= 0;
set session spider_same_server_link= 0;

View File

@@ -0,0 +1,42 @@
for master_1
for child2
for child3
connection master_1;
set @old_global_spider_same_server_link= @@global.spider_same_server_link;
set @old_session_spider_same_server_link= @@session.spider_same_server_link;
set global spider_same_server_link= 0;
set session spider_same_server_link= 0;
this test is for MDEV-6268
drop and create databases
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
create table
connection master_1;
CREATE TABLE tbl_a (
pkey int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
CREATE TABLE tbl_b (
pkey int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE2 MASTER_1_CHARSET MASTER_1_COMMENT_2_1
select test 1
connection master_1;
INSERT INTO tbl_a VALUES(1);
deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection master_1;
set global spider_same_server_link= @old_global_spider_same_server_link;
set session spider_same_server_link= @old_session_spider_same_server_link;
for master_1
for child2
for child3
end of test

View File

@@ -0,0 +1,2 @@
!include include/default_mysqld.cnf
!include ../my_1_1.cnf

View File

@@ -0,0 +1,55 @@
--source ../include/same_server_link_init.inc
--echo
--echo this test is for MDEV-6268
--echo
--echo drop and create databases
--connection master_1
--disable_warnings
CREATE DATABASE auto_test_local;
USE auto_test_local;
--enable_warnings
--echo
--echo create table
--connection master_1
--disable_query_log
echo CREATE TABLE tbl_a (
pkey int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1;
eval CREATE TABLE tbl_a (
pkey int NOT NULL,
PRIMARY KEY (pkey)
) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1;
echo CREATE TABLE tbl_b (
pkey int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE2 MASTER_1_CHARSET MASTER_1_COMMENT_2_1;
eval CREATE TABLE tbl_b (
pkey int NOT NULL,
PRIMARY KEY (pkey)
) $MASTER_1_ENGINE2 $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1;
--enable_query_log
--echo
--echo select test 1
--connection master_1
--disable_result_log
--error 12720
INSERT INTO tbl_a VALUES(1);
--enable_result_log
--echo
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
--enable_warnings
--source ../include/same_server_link_deinit.inc
--echo
--echo end of test