diff options
Diffstat (limited to 'mysql-test/suite/federated')
-rw-r--r-- | mysql-test/suite/federated/combinations | 8 | ||||
-rw-r--r-- | mysql-test/suite/federated/federated.inc | 1 | ||||
-rw-r--r-- | mysql-test/suite/federated/federated_partition.test | 1 | ||||
-rw-r--r-- | mysql-test/suite/federated/federated_server.result | 2 | ||||
-rw-r--r-- | mysql-test/suite/federated/federated_server.test | 2 | ||||
-rw-r--r-- | mysql-test/suite/federated/federated_transactions.test | 1 | ||||
-rw-r--r-- | mysql-test/suite/federated/federatedx.result (renamed from mysql-test/suite/federated/federated.result) | 0 | ||||
-rw-r--r-- | mysql-test/suite/federated/federatedx.test (renamed from mysql-test/suite/federated/federated.test) | 1 | ||||
-rw-r--r-- | mysql-test/suite/federated/have_federated_db.inc | 6 | ||||
-rw-r--r-- | mysql-test/suite/federated/have_federatedx.inc | 5 | ||||
-rw-r--r-- | mysql-test/suite/federated/have_federatedx.opt (renamed from mysql-test/suite/federated/suite.opt) | 1 | ||||
-rw-r--r-- | mysql-test/suite/federated/suite.pm | 20 |
12 files changed, 38 insertions, 10 deletions
diff --git a/mysql-test/suite/federated/combinations b/mysql-test/suite/federated/combinations new file mode 100644 index 00000000000..18fd5f0d721 --- /dev/null +++ b/mysql-test/suite/federated/combinations @@ -0,0 +1,8 @@ +[old] +--federated +--plugin-load=$HA_FEDERATED_SO + +[X] +--federated +--plugin-load=$HA_FEDERATEDX_SO + diff --git a/mysql-test/suite/federated/federated.inc b/mysql-test/suite/federated/federated.inc index ad640dcbb61..17410846604 100644 --- a/mysql-test/suite/federated/federated.inc +++ b/mysql-test/suite/federated/federated.inc @@ -1,5 +1,4 @@ --source include/not_embedded.inc ---source have_federated_db.inc connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,); connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,); diff --git a/mysql-test/suite/federated/federated_partition.test b/mysql-test/suite/federated/federated_partition.test index 6f093bfb63d..13f26ecd756 100644 --- a/mysql-test/suite/federated/federated_partition.test +++ b/mysql-test/suite/federated/federated_partition.test @@ -1,6 +1,7 @@ # # Tests for partitioned FEDERATED # +source have_federatedx.inc; source include/have_partition.inc; source include/have_innodb.inc; source federated.inc; diff --git a/mysql-test/suite/federated/federated_server.result b/mysql-test/suite/federated/federated_server.result index ad9dfd7ee38..e2a5d60302b 100644 --- a/mysql-test/suite/federated/federated_server.result +++ b/mysql-test/suite/federated/federated_server.result @@ -213,7 +213,7 @@ id name alter server s1 options (database 'db_bogus'); flush tables; select * from federated.t1; -ERROR 42000: Received error: 1044 : Access denied for user 'test_fed'@'localhost' to database 'db_bogus' +Got one of the listed errors 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 diff --git a/mysql-test/suite/federated/federated_server.test b/mysql-test/suite/federated/federated_server.test index 315aaa807a7..9f7f833a401 100644 --- a/mysql-test/suite/federated/federated_server.test +++ b/mysql-test/suite/federated/federated_server.test @@ -239,7 +239,7 @@ alter server s1 options (database 'db_bogus'); connection master; flush tables; ---error ER_DBACCESS_DENIED_ERROR +--error ER_DBACCESS_DENIED_ERROR,ER_CONNECT_TO_FOREIGN_DATA_SOURCE select * from federated.t1; connection conn_select; diff --git a/mysql-test/suite/federated/federated_transactions.test b/mysql-test/suite/federated/federated_transactions.test index cd08d310273..637df45a52a 100644 --- a/mysql-test/suite/federated/federated_transactions.test +++ b/mysql-test/suite/federated/federated_transactions.test @@ -1,3 +1,4 @@ +source have_federatedx.inc; source include/have_innodb.inc; source federated.inc; diff --git a/mysql-test/suite/federated/federated.result b/mysql-test/suite/federated/federatedx.result index 2ece1a32b4f..2ece1a32b4f 100644 --- a/mysql-test/suite/federated/federated.result +++ b/mysql-test/suite/federated/federatedx.result diff --git a/mysql-test/suite/federated/federated.test b/mysql-test/suite/federated/federatedx.test index 7789070adc3..cabcf0cea1b 100644 --- a/mysql-test/suite/federated/federated.test +++ b/mysql-test/suite/federated/federatedx.test @@ -7,6 +7,7 @@ # should work with embedded server after mysqltest is fixed --source include/not_embedded.inc --source federated.inc +--source have_federatedx.inc connection default; diff --git a/mysql-test/suite/federated/have_federated_db.inc b/mysql-test/suite/federated/have_federated_db.inc deleted file mode 100644 index 81f49aaa48e..00000000000 --- a/mysql-test/suite/federated/have_federated_db.inc +++ /dev/null @@ -1,6 +0,0 @@ -if (!`SELECT count(*) FROM information_schema.engines WHERE - (support = 'YES' OR support = 'DEFAULT') AND - engine = 'federated'`) -{ - skip Need federated engine; -} diff --git a/mysql-test/suite/federated/have_federatedx.inc b/mysql-test/suite/federated/have_federatedx.inc new file mode 100644 index 00000000000..56ce31f5b2f --- /dev/null +++ b/mysql-test/suite/federated/have_federatedx.inc @@ -0,0 +1,5 @@ +if (!`SELECT count(*) FROM information_schema.plugins WHERE + plugin_name = 'federated' AND plugin_status = 'active' AND + plugin_description LIKE '%FederatedX%'`){ + skip Need FederatedX engine; +} diff --git a/mysql-test/suite/federated/suite.opt b/mysql-test/suite/federated/have_federatedx.opt index 2cce1887441..22f40b6d3d7 100644 --- a/mysql-test/suite/federated/suite.opt +++ b/mysql-test/suite/federated/have_federatedx.opt @@ -1,2 +1 @@ ---federated --plugin-load=$HA_FEDERATEDX_SO diff --git a/mysql-test/suite/federated/suite.pm b/mysql-test/suite/federated/suite.pm new file mode 100644 index 00000000000..06458b97adc --- /dev/null +++ b/mysql-test/suite/federated/suite.pm @@ -0,0 +1,20 @@ +package My::Suite::Federated; + +@ISA = qw(My::Suite); + +############# initialization ###################### +my @combinations; + +push @combinations, 'old' + if $ENV{HA_FEDERATED_SO} and not $::mysqld_variables{'federated'}; +push @combinations, 'X' + if $ENV{HA_FEDERATEDX_SO} or $::mysqld_variables{'federated'}; + +return "Neither Federated nor FederatedX are available" unless @combinations; + +$ENV{FEDERATED_COMBINATIONS}=join ':', @combinations + unless $ENV{FEDERATED_COMBINATIONS}; + +############# return an object ###################### +bless { }; + |