INSERT INTO db_bogus.t1 VALUES ('2','this is bogus');
INSERT INTO db_bogus.t1 VALUES ('2','this is bogus');
create user test_fed@localhost identified by 'foo';
grant all on db_legitimate.* to test_fed@localhost;
create server 's1' foreign data wrapper 'mysql' options
create server 's1' foreign data wrapper 'mysql' options
(HOST '127.0.0.1',
(HOST '127.0.0.1',
DATABASE 'db_legitimate',
DATABASE 'db_legitimate',
...
@@ -211,15 +213,14 @@ id name
...
@@ -211,15 +213,14 @@ id name
alter server s1 options (database 'db_bogus');
alter server s1 options (database 'db_bogus');
flush tables;
flush tables;
select * from federated.t1;
select * from federated.t1;
id name
ERROR HY000: There was a problem processing the query on the foreign data source. Data source error: : 1044 : Access denied for user 'test_fed'@'localhost' to databa
2 this is bogus
drop server if exists 's1';
drop server if exists 's1';
ERROR 42000: Access denied; you need the SUPER privilege for this operation
ERROR 42000: Access denied; you need the SUPER privilege for this operation
create server 's1' foreign data wrapper 'mysql' options
create server 's1' foreign data wrapper 'mysql' options
(HOST '127.0.0.1',
(HOST '127.0.0.1',
DATABASE 'db_legitimate',
DATABASE 'db_legitimate',
USER 'root',
USER 'test_fed',
PASSWORD '',
PASSWORD 'foo',
PORT SLAVE_PORT,
PORT SLAVE_PORT,
SOCKET '',
SOCKET '',
OWNER 'root');
OWNER 'root');
...
@@ -228,8 +229,8 @@ drop server 's1';
...
@@ -228,8 +229,8 @@ drop server 's1';
create server 's1' foreign data wrapper 'mysql' options
create server 's1' foreign data wrapper 'mysql' options