mirror of
https://github.com/MariaDB/server.git
synced 2025-08-31 22:22:30 +03:00
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.
This commit is contained in:

parent
3f06084e7f
commit
fbcd70a494
@@ -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 (
|
||||
|
Reference in New Issue
Block a user