1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

10.0-base merge

This commit is contained in:
Sergei Golubchik
2014-02-26 15:28:07 +01:00
1449 changed files with 6135 additions and 2203 deletions

View File

@@ -60,6 +60,7 @@ sub searchd_start {
my ($sphinx, $test) = @_; # My::Config::Group, My::Test
return unless $exe_sphinx_indexer and $exe_sphinx_searchd;
return if $sphinx->{proc}; # Already started
# First we must run the indexer to create the data.
my $sphinx_data_dir= "$::opt_vardir/" . $sphinx->name();

View File

@@ -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:PORT/*";
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;

View File

@@ -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;