diff options
Diffstat (limited to 'mysql-test/suite/federated/federated_server.result')
-rw-r--r-- | mysql-test/suite/federated/federated_server.result | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/suite/federated/federated_server.result b/mysql-test/suite/federated/federated_server.result index 2f04f1443ba..45616839b89 100644 --- a/mysql-test/suite/federated/federated_server.result +++ b/mysql-test/suite/federated/federated_server.result @@ -1,5 +1,10 @@ +connect master,127.0.0.1,root,,test,$MASTER_MYPORT,; +connect slave,127.0.0.1,root,,test,$SLAVE_MYPORT,; +connection master; CREATE DATABASE federated; +connection slave; CREATE DATABASE federated; +connection slave; create database first_db; create database second_db; use first_db; @@ -36,6 +41,7 @@ CREATE TABLE second_db.t2 ( `name` varchar(64) NOT NULL default '' ) DEFAULT CHARSET=latin1; +connection master; drop server if exists 'server_one'; create server 'server_one' foreign data wrapper 'mysql' options (HOST '127.0.0.1', @@ -156,6 +162,7 @@ drop server 'server_one'; drop server 'server_two'; select * from mysql.servers order by db; Server_name Host Db Username Password Port Socket Wrapper Owner +connection slave; drop table first_db.t1; drop table second_db.t1; drop database first_db; @@ -175,8 +182,10 @@ CREATE TABLE db_bogus.t1 ( ) ; INSERT INTO db_bogus.t1 VALUES ('2','this is bogus'); +connection slave; create user test_fed@localhost identified by 'foo'; grant all on db_legitimate.* to test_fed@localhost; +connection master; create server 's1' foreign data wrapper 'mysql' options (HOST '127.0.0.1', DATABASE 'db_legitimate', @@ -198,22 +207,32 @@ CREATE TABLE federated.t1 ( select * from federated.t1; id name 1 this is legitimate +connect conn_select,127.0.0.1,guest_select,,federated,$MASTER_MYPORT; +connect conn_usage,127.0.0.1,guest_usage,,,$MASTER_MYPORT; +connect conn_super,127.0.0.1,guest_super,,,$MASTER_MYPORT; +connection conn_select; alter server s1 options (database 'db_bogus'); ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation +connection master; flush tables; select * from federated.t1; id name 1 this is legitimate +connection conn_usage; alter server s1 options (database 'db_bogus'); ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation +connection master; flush tables; select * from federated.t1; id name 1 this is legitimate +connection conn_super; alter server s1 options (database 'db_bogus'); +connection master; flush tables; select * from federated.t1; Got one of the listed errors +connection conn_select; drop server if exists 's1'; ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation create server 's1' foreign data wrapper 'mysql' options @@ -225,6 +244,7 @@ PORT SLAVE_PORT, SOCKET '', OWNER 'root'); ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation +connection conn_super; drop server 's1'; create server 's1' foreign data wrapper 'mysql' options (HOST '127.0.0.1', @@ -234,13 +254,19 @@ PASSWORD 'foo', PORT SLAVE_PORT, SOCKET '', OWNER 'root'); +connection master; flush tables; select * from federated.t1; id name 1 this is legitimate +connection slave; drop user test_fed@localhost; drop database db_legitimate; drop database db_bogus; +disconnect conn_select; +disconnect conn_usage; +disconnect conn_super; +connection master; drop user guest_super@localhost; drop user guest_usage@localhost; drop user guest_select@localhost; @@ -255,6 +281,8 @@ alter server 's1' options password '', socket '', owner '', port 3306); drop server 's1'; # End of 5.1 tests +connect other,localhost,root,,; +connection master; use test; create table t1(a int); insert into t1 values (1); @@ -274,13 +302,18 @@ SET v = v + 1; END WHILE; select a into @a from t1; # Just reset warnings END// +connection other; use test; call p1(); +connection master; call p1(); +connection other; drop procedure p1; drop table t1; drop server if exists s; +connection master; DROP TABLE IF EXISTS federated.t1; DROP DATABASE IF EXISTS federated; +connection slave; DROP TABLE IF EXISTS federated.t1; DROP DATABASE IF EXISTS federated; |