summaryrefslogtreecommitdiff
path: root/mysql-test/suite/federated/assisted_discovery.test
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2021-01-10 21:51:36 +0100
committerSergei Golubchik <serg@mariadb.org>2021-01-12 10:25:04 +0100
commit3ffd5f28f04a34aadabb1966b861e6bc89f7fc73 (patch)
tree01a15495cd5f93f539f7c7319d52e16d9a5dbe21 /mysql-test/suite/federated/assisted_discovery.test
parent0ee086838d4b4497599d4e0822343269b682f913 (diff)
downloadmariadb-git-3ffd5f28f04a34aadabb1966b861e6bc89f7fc73.tar.gz
MDEV-17227 Server crash in TABLE_SHARE::init_from_sql_statement_string upon table discovery with non-existent database
* failed init_from_binary_frm_image can clear share->db_plugin, don't use it on the error path * cleanup the test a bit
Diffstat (limited to 'mysql-test/suite/federated/assisted_discovery.test')
-rw-r--r--mysql-test/suite/federated/assisted_discovery.test21
1 files changed, 12 insertions, 9 deletions
diff --git a/mysql-test/suite/federated/assisted_discovery.test b/mysql-test/suite/federated/assisted_discovery.test
index fa83a2a8e19..bd32878f811 100644
--- a/mysql-test/suite/federated/assisted_discovery.test
+++ b/mysql-test/suite/federated/assisted_discovery.test
@@ -13,9 +13,7 @@ CREATE TABLE t1 (
connection master;
---replace_result $SLAVE_MYPORT SLAVE_PORT
-eval CREATE TABLE t1 ENGINE=FEDERATED
- CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/test/t1';
+evalp CREATE TABLE t1 ENGINE=FEDERATED CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/test/t1';
--replace_result $SLAVE_MYPORT SLAVE_PORT
SHOW CREATE TABLE t1;
@@ -30,9 +28,9 @@ connection slave;
SELECT * FROM t1;
DROP TABLE t1;
-#
-#
-#
+--echo #
+--echo # MDEV-11311 Create federated table does not work as expected
+--echo #
create table t1 (
a bigint(20) not null auto_increment,
b bigint(20) not null,
@@ -44,9 +42,7 @@ create table t1 (
show create table t1;
connection master;
---replace_result $SLAVE_MYPORT SLAVE_PORT
-eval create table t1 engine=federated
- connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/test/t1';
+evalp create table t1 engine=federated connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/test/t1';
--replace_result $SLAVE_MYPORT SLAVE_PORT
show create table t1;
drop table t1;
@@ -54,5 +50,12 @@ drop table t1;
connection slave;
drop table t1;
+--echo #
+--echo # MDEV-17227 Server crash in TABLE_SHARE::init_from_sql_statement_string upon table discovery with non-existent database
+--echo #
+connection master;
+--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE
+evalp create table t1 engine=federated connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/test/t1';
+
source include/federated_cleanup.inc;