Commit fecde96a authored by unknown's avatar unknown

WL# 3031

Added --replace-result to avoid hard-coding of port

parent 6206af42
......@@ -35,7 +35,7 @@ create server 'server_one' foreign data wrapper 'mysql' options
DATABASE 'first_db',
USER 'root',
PASSWORD '',
PORT 9308,
PORT SLAVE_PORT,
SOCKET '',
OWNER 'root');
drop server if exists 'server_two';
......@@ -44,7 +44,7 @@ create server 'server_two' foreign data wrapper 'mysql' options
DATABASE 'second_db',
USER 'root',
PASSWORD '',
PORT 9308,
PORT SLAVE_PORT,
SOCKET '',
OWNER 'root');
select * from mysql.servers;
......@@ -60,7 +60,7 @@ CREATE TABLE federated.old (
`name` varchar(64) NOT NULL default ''
)
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');
SELECT * FROM federated.old;
id name
......@@ -73,7 +73,7 @@ CREATE TABLE federated.old2 (
`name` varchar(64) NOT NULL default ''
)
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');
DROP TABLE IF EXISTS federated.t1;
Warnings:
......
......@@ -26,6 +26,7 @@ CREATE TABLE second_db.t1 (
connection master;
drop server if exists 'server_one';
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval create server 'server_one' foreign data wrapper 'mysql' options
(HOST '127.0.0.1',
DATABASE 'first_db',
......@@ -36,6 +37,7 @@ eval create server 'server_one' foreign data wrapper 'mysql' options
OWNER 'root');
drop server if exists 'server_two';
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval create server 'server_two' foreign data wrapper 'mysql' options
(HOST '127.0.0.1',
DATABASE 'second_db',
......@@ -48,6 +50,7 @@ eval create server 'server_two' foreign data wrapper 'mysql' options
select * from mysql.servers;
DROP TABLE IF EXISTS federated.old;
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval CREATE TABLE federated.old (
`id` int(20) NOT NULL,
`name` varchar(64) NOT NULL default ''
......@@ -60,6 +63,7 @@ INSERT INTO federated.old (id, name) values (1, 'federated.old url');
SELECT * FROM federated.old;
DROP TABLE IF EXISTS federated.old2;
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval CREATE TABLE federated.old2 (
`id` int(20) NOT NULL,
`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