summaryrefslogtreecommitdiff
path: root/mysql-test/suite/federated/federatedx_create_handlers.result
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2020-03-07 01:14:41 +0300
committerSergei Petrunia <psergey@askmonty.org>2020-03-07 01:14:41 +0300
commitcbbe4971b6b26a5017a7da5ebfd89e3aee9f4387 (patch)
tree1a9ae35e2ac48a9771daaaa5889f2a34a4b7e1ff /mysql-test/suite/federated/federatedx_create_handlers.result
parent23685378bafa38a74957e8f07e2d56b57e90fa53 (diff)
downloadmariadb-git-cbbe4971b6b26a5017a7da5ebfd89e3aee9f4387.tar.gz
MDEV-21887: federatedx crashes on SELECT ... INTO query in select_handler code
- Don't try to push down SELECTs that have a side effect - In case the storage engine did support pushdown of SELECT with an INTO clause, write the rows we've got from it into select->join->result, and not thd->protocol. This way, SELECT ... INTO ... FROM smart_engine_table will put the result into where instructed, and NOT send it to the client.
Diffstat (limited to 'mysql-test/suite/federated/federatedx_create_handlers.result')
-rw-r--r--mysql-test/suite/federated/federatedx_create_handlers.result22
1 files changed, 21 insertions, 1 deletions
diff --git a/mysql-test/suite/federated/federatedx_create_handlers.result b/mysql-test/suite/federated/federatedx_create_handlers.result
index 7d42a9bbd87..90a5234a02f 100644
--- a/mysql-test/suite/federated/federatedx_create_handlers.result
+++ b/mysql-test/suite/federated/federatedx_create_handlers.result
@@ -301,7 +301,27 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 7
1 PRIMARY <derived2> ref key0 key0 18 federated.t3.name 2
2 PUSHED DERIVED NULL NULL NULL NULL NULL NULL NULL NULL
-DROP TABLE federated.t1, federated.t2, federated.t3;
+#
+# MDEV-21887: federatedx crashes on SELECT ... INTO query in select_handler code
+#
+CREATE TABLE federated.t4 (
+id int(20) NOT NULL,
+name varchar(16) NOT NULL default ''
+) engine=myisam;
+insert into federated.t4 select * from federated.t1;
+select * from federated.t4;
+id name
+1 zzz
+3 xxx
+4 xxx
+5 yyy
+7 yyy
+select name into @var from federated.t1 where id=3 limit 1 ;
+select @var;
+@var
+xxx
+select name into outfile 'tmp.txt' from federated.t1;
+DROP TABLE federated.t1, federated.t2, federated.t3, federated.t4;
connection slave;
DROP TABLE federated.t1, federated.t2;
connection default;