summaryrefslogtreecommitdiff
path: root/mysql-test/t/federated.test
diff options
context:
space:
mode:
authorunknown <acurtis/antony@xiphis.org/ltamd64.xiphis.org>2007-07-25 12:23:24 -0700
committerunknown <acurtis/antony@xiphis.org/ltamd64.xiphis.org>2007-07-25 12:23:24 -0700
commitb42247bca84d7ae76e0d46420ee03fc8e31b3de2 (patch)
tree1ba2d28910b0cce7eed891bf91a78246be5a652c /mysql-test/t/federated.test
parent5415dcc337cb348f35bc17299a2ca07ac60316f8 (diff)
downloadmariadb-git-b42247bca84d7ae76e0d46420ee03fc8e31b3de2.tar.gz
Bug#25679
"Federated Denial of Service" Federated storage engine used to attempt to open connections within the ::create() and ::open() methods which are invoked while LOCK_open mutex is being held by mysqld. As a result, no other client sessions can open tables while Federated is attempting to open a connection. Long DNS lookup times would stall mysqld's operation and a rogue connection string which connects to a remote server which simply stalls during handshake can stall mysqld for a much longer period of time. This patch moves the opening of the connection much later, when the federated actually issues queries, by which time the LOCK_open mutex is no longer being held. mysql-test/r/federated.result: change of test/results due to patch for bug25679 mysql-test/t/federated.test: change of test/results due to patch for bug25679 sql/ha_federated.cc: bug25679 remove function check_foreign_fata_source() ha_federated::open() no longer opens the federated connection. ha_federated::create() no longer opens and tests connection. ha_federated::real_connect() opens connection and tests presence of table. ha_federated::real_query() sends query, calling real_connect() if neccessary. sql/ha_federated.h: bug25679 new methods real_query() and real_connect()
Diffstat (limited to 'mysql-test/t/federated.test')
-rw-r--r--mysql-test/t/federated.test9
1 files changed, 6 insertions, 3 deletions
diff --git a/mysql-test/t/federated.test b/mysql-test/t/federated.test
index bedb6b36d61..a3750cb572d 100644
--- a/mysql-test/t/federated.test
+++ b/mysql-test/t/federated.test
@@ -30,25 +30,28 @@ CREATE TABLE federated.t1 (
# test non-existant table
--replace_result $SLAVE_MYPORT SLAVE_PORT
---error 1434
eval CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default ''
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t3';
+--error 1431
+SELECT * FROM federated.t1;
+DROP TABLE federated.t1;
# test bad user/password
--replace_result $SLAVE_MYPORT SLAVE_PORT
---error 1429
eval CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default ''
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
CONNECTION='mysql://user:pass@127.0.0.1:$SLAVE_MYPORT/federated/t1';
+--error 1429
+SELECT * FROM federated.t1;
+DROP TABLE federated.t1;
-DROP TABLE IF EXISTS federated.t1;
# # correct connection, same named tables
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval CREATE TABLE federated.t1 (