summaryrefslogtreecommitdiff
path: root/mysql-test/suite/sphinx/union-5539.test
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-02-25 16:04:35 +0100
committerSergei Golubchik <sergii@pisem.net>2014-02-25 16:04:35 +0100
commit0b9a0a3517ca2b75655f3af5c372cf333d3d5fe2 (patch)
tree5c67457ff8abbb89b203a7f55cda776b738c385b /mysql-test/suite/sphinx/union-5539.test
parent6324c36bd703a0f55dcd49dd721af262f73cf7aa (diff)
parentff2e82f4a175b7b023cd167b2fa6e6fcd1bd192e (diff)
downloadmariadb-git-0b9a0a3517ca2b75655f3af5c372cf333d3d5fe2.tar.gz
5.5 merge
Diffstat (limited to 'mysql-test/suite/sphinx/union-5539.test')
-rw-r--r--mysql-test/suite/sphinx/union-5539.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/suite/sphinx/union-5539.test b/mysql-test/suite/sphinx/union-5539.test
new file mode 100644
index 00000000000..ec73be1ab3e
--- /dev/null
+++ b/mysql-test/suite/sphinx/union-5539.test
@@ -0,0 +1,16 @@
+#
+# MDEV-5539 Empty results in UNION with Sphinx engine
+#
+--replace_result $SPHINXSEARCH_PORT PORT
+eval create table ts (id bigint unsigned not null, w int not null, query varchar(255) not null, index(query)) engine=sphinx connection="sphinx://127.0.0.1:$SPHINXSEARCH_PORT/*";
+let $q1=SELECT * FROM ts si WHERE si.query=';mode=extended2;limit=1000000;maxmatches=500';
+let $q2=SELECT * FROM ts si WHERE si.query='@* 123nothingtofind123;mode=extended2;limit=1000000;maxmatches=500';
+########################
+# BUG BUG BUG !!!
+# Note, the result below is incorrect! It should be updated when
+# MDEV-5539 is fixed upstream!!!
+########################
+eval SELECT a.* FROM ($q1) AS a UNION SELECT b.* FROM ($q2) AS b;
+eval SELECT a.* FROM ($q2) AS a UNION SELECT b.* FROM ($q1) AS b;
+drop table ts;
+