WL# 3031

Added --replace-result to avoid hard-coding of port
parent b892f9ad
...@@ -35,7 +35,7 @@ create server 'server_one' foreign data wrapper 'mysql' options ...@@ -35,7 +35,7 @@ create server 'server_one' foreign data wrapper 'mysql' options
DATABASE 'first_db', DATABASE 'first_db',
USER 'root', USER 'root',
PASSWORD '', PASSWORD '',
PORT 9308, PORT SLAVE_PORT,
SOCKET '', SOCKET '',
OWNER 'root'); OWNER 'root');
drop server if exists 'server_two'; drop server if exists 'server_two';
...@@ -44,7 +44,7 @@ create server 'server_two' foreign data wrapper 'mysql' options ...@@ -44,7 +44,7 @@ create server 'server_two' foreign data wrapper 'mysql' options
DATABASE 'second_db', DATABASE 'second_db',
USER 'root', USER 'root',
PASSWORD '', PASSWORD '',
PORT 9308, PORT SLAVE_PORT,
SOCKET '', SOCKET '',
OWNER 'root'); OWNER 'root');
select * from mysql.servers; select * from mysql.servers;
...@@ -60,7 +60,7 @@ CREATE TABLE federated.old ( ...@@ -60,7 +60,7 @@ CREATE TABLE federated.old (
`name` varchar(64) NOT NULL default '' `name` varchar(64) NOT NULL default ''
) )
ENGINE="FEDERATED" DEFAULT CHARSET=latin1 ENGINE="FEDERATED" DEFAULT CHARSET=latin1
CONNECTION='mysql://root@127.0.0.1:9308/first_db/t1'; CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/first_db/t1';
INSERT INTO federated.old (id, name) values (1, 'federated.old url'); INSERT INTO federated.old (id, name) values (1, 'federated.old url');
SELECT * FROM federated.old; SELECT * FROM federated.old;
id name id name
...@@ -73,7 +73,7 @@ CREATE TABLE federated.old2 ( ...@@ -73,7 +73,7 @@ CREATE TABLE federated.old2 (
`name` varchar(64) NOT NULL default '' `name` varchar(64) NOT NULL default ''
) )
ENGINE="FEDERATED" DEFAULT CHARSET=latin1 ENGINE="FEDERATED" DEFAULT CHARSET=latin1
CONNECTION='mysql://root@127.0.0.1:9308/second_db/t1'; CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/second_db/t1';
INSERT INTO federated.old2 (id, name) values (1, 'federated.old2 url'); INSERT INTO federated.old2 (id, name) values (1, 'federated.old2 url');
DROP TABLE IF EXISTS federated.t1; DROP TABLE IF EXISTS federated.t1;
Warnings: Warnings:
......
...@@ -26,6 +26,7 @@ CREATE TABLE second_db.t1 ( ...@@ -26,6 +26,7 @@ CREATE TABLE second_db.t1 (
connection master; connection master;
drop server if exists 'server_one'; drop server if exists 'server_one';
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval create server 'server_one' foreign data wrapper 'mysql' options eval create server 'server_one' foreign data wrapper 'mysql' options
(HOST '127.0.0.1', (HOST '127.0.0.1',
DATABASE 'first_db', DATABASE 'first_db',
...@@ -36,6 +37,7 @@ eval create server 'server_one' foreign data wrapper 'mysql' options ...@@ -36,6 +37,7 @@ eval create server 'server_one' foreign data wrapper 'mysql' options
OWNER 'root'); OWNER 'root');
drop server if exists 'server_two'; drop server if exists 'server_two';
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval create server 'server_two' foreign data wrapper 'mysql' options eval create server 'server_two' foreign data wrapper 'mysql' options
(HOST '127.0.0.1', (HOST '127.0.0.1',
DATABASE 'second_db', DATABASE 'second_db',
...@@ -48,6 +50,7 @@ eval create server 'server_two' foreign data wrapper 'mysql' options ...@@ -48,6 +50,7 @@ eval create server 'server_two' foreign data wrapper 'mysql' options
select * from mysql.servers; select * from mysql.servers;
DROP TABLE IF EXISTS federated.old; DROP TABLE IF EXISTS federated.old;
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval CREATE TABLE federated.old ( eval CREATE TABLE federated.old (
`id` int(20) NOT NULL, `id` int(20) NOT NULL,
`name` varchar(64) NOT NULL default '' `name` varchar(64) NOT NULL default ''
...@@ -60,6 +63,7 @@ INSERT INTO federated.old (id, name) values (1, 'federated.old url'); ...@@ -60,6 +63,7 @@ INSERT INTO federated.old (id, name) values (1, 'federated.old url');
SELECT * FROM federated.old; SELECT * FROM federated.old;
DROP TABLE IF EXISTS federated.old2; DROP TABLE IF EXISTS federated.old2;
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval CREATE TABLE federated.old2 ( eval CREATE TABLE federated.old2 (
`id` int(20) NOT NULL, `id` int(20) NOT NULL,
`name` varchar(64) NOT NULL default '' `name` varchar(64) NOT NULL default ''
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment