diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-06-07 15:35:13 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-06-07 15:35:13 +0200 |
commit | d0ce9cb83205e87127ca67522d1dac90d98f323e (patch) | |
tree | 495c84267bdfead8b5d9340fe8ccb4dfd2919f89 /mysql-test/suite | |
parent | 742899e59d4d1c4ec8d32c140fe7ac4b134757e4 (diff) | |
download | mariadb-git-d0ce9cb83205e87127ca67522d1dac90d98f323e.tar.gz |
MDEV-4468 Assertion `error != 0' fails or timeout occurs on select from a FEDERATED table which points at a non-existent table
Federated uses SHOW TABLE STATUS LIKE for ::info().
For nonexisting remote table it doesn't fail, but returns an empty result set.
We need to fake the error in the handler.
Diffstat (limited to 'mysql-test/suite')
-rw-r--r-- | mysql-test/suite/federated/federated.result | 6 | ||||
-rw-r--r-- | mysql-test/suite/federated/federated.test | 12 |
2 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/suite/federated/federated.result b/mysql-test/suite/federated/federated.result index 6dcd6b1721b..8f5ae341080 100644 --- a/mysql-test/suite/federated/federated.result +++ b/mysql-test/suite/federated/federated.result @@ -7,6 +7,12 @@ Level Code Message Error 1 server name: 'non_existing' doesn't exist! Error 1 Can't create/write to file 'non_existing' (Errcode: 14) Error 1005 Can't create table 'test.t1' (errno: 1) +create table t1 (a int); +create table fed (a int) engine=Federated CONNECTION='mysql://root@127.0.0.1:MASTER_PORT/test/t1'; +drop table t1; +select * from fed; +Got one of the listed errors +drop table fed; DROP TABLE IF EXISTS federated.t1; DROP DATABASE IF EXISTS federated; DROP TABLE IF EXISTS federated.t1; diff --git a/mysql-test/suite/federated/federated.test b/mysql-test/suite/federated/federated.test index 88d20817996..cb14dc2a239 100644 --- a/mysql-test/suite/federated/federated.test +++ b/mysql-test/suite/federated/federated.test @@ -8,5 +8,17 @@ connection master; CREATE TABLE t1 (a INT) ENGINE=FEDERATED CONNECTION='non_existing'; SHOW WARNINGS; +# +# MDEV-4468 Assertion `error != 0' fails or timeout occurs on select from a FEDERATED table which points at a non-existent table +# + +create table t1 (a int); +--replace_result $MASTER_MYPORT MASTER_PORT +eval create table fed (a int) engine=Federated CONNECTION='mysql://root@127.0.0.1:$MASTER_MYPORT/test/t1'; +drop table t1; +--error 1146,1431 +select * from fed; +drop table fed; + source include/federated_cleanup.inc; |