mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
BUG#34788 - malformed federated connection url is not handled
correctly - crashes server ! Creating federated table with connect string containing empty (zero-length) host name and port is evaluated as 0 (port is incorrect, omitted or 0) crashes server. This happens because federated calls strcmp() with NULL pointer. Fixed by avoiding strcmp() call if hostname is set to NULL. mysql-test/r/federated.result: A test case for BUG#34788. mysql-test/t/federated.test: A test case for BUG#34788. sql/ha_federated.cc: Fixed that parse_url() may call strcmp() with NULL pointer.
This commit is contained in:
parent
7343db297a
commit
8030bdfc16
3 changed files with 17 additions and 1 deletions
|
|
@ -1738,4 +1738,11 @@ DROP TABLE t1;
|
|||
connection slave;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# BUG#34788 - malformed federated connection url is not handled correctly -
|
||||
# crashes server !
|
||||
#
|
||||
CREATE TABLE t1 (a INT) ENGINE=federated CONNECTION='mysql://@:://';
|
||||
DROP TABLE t1;
|
||||
|
||||
source include/federated_cleanup.inc;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue