summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-02-14 10:39:25 +0100
committerSergei Golubchik <sergii@pisem.net>2014-02-14 10:39:25 +0100
commit8a26d19088be2b821d820d89b97cc26c0fbeb65f (patch)
tree9c6a53b0a67dbd18ace4ff283be5b442beb84c8d /mysql-test
parent12253abadb1b2993469dbfad59b1043ecc974983 (diff)
downloadmariadb-git-8a26d19088be2b821d820d89b97cc26c0fbeb65f.tar.gz
record incorrect result for MDEV-5539 Empty results in UNION with Sphinx engine
(just to have the test in the tree when we merge the upstream fix)
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/suite/sphinx/union-5539.result10
-rw-r--r--mysql-test/suite/sphinx/union-5539.test15
2 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/suite/sphinx/union-5539.result b/mysql-test/suite/sphinx/union-5539.result
new file mode 100644
index 00000000000..7e0e7bb27ec
--- /dev/null
+++ b/mysql-test/suite/sphinx/union-5539.result
@@ -0,0 +1,10 @@
+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:16002/*";
+SELECT a.* FROM (SELECT * FROM ts si WHERE si.query=';mode=extended2;limit=1000000;maxmatches=500') AS a UNION SELECT b.* FROM (SELECT * FROM ts si WHERE si.query='@* 123nothingtofind123;mode=extended2;limit=1000000;maxmatches=500') AS b;
+id w query
+SELECT a.* FROM (SELECT * FROM ts si WHERE si.query='@* 123nothingtofind123;mode=extended2;limit=1000000;maxmatches=500') AS a UNION SELECT b.* FROM (SELECT * FROM ts si WHERE si.query=';mode=extended2;limit=1000000;maxmatches=500') AS b;
+id w query
+1 1 ;mode=extended2;limit=1000000;maxmatches=500
+2 1 ;mode=extended2;limit=1000000;maxmatches=500
+3 1 ;mode=extended2;limit=1000000;maxmatches=500
+4 1 ;mode=extended2;limit=1000000;maxmatches=500
+drop table ts;
diff --git a/mysql-test/suite/sphinx/union-5539.test b/mysql-test/suite/sphinx/union-5539.test
new file mode 100644
index 00000000000..61e70ba1c66
--- /dev/null
+++ b/mysql-test/suite/sphinx/union-5539.test
@@ -0,0 +1,15 @@
+#
+# MDEV-5539 Empty results in UNION with Sphinx engine
+#
+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;
+