diff options
author | Michael Widenius <monty@askmonty.org> | 2012-03-07 17:38:47 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2012-03-07 17:38:47 +0200 |
commit | aba6d06c34201c672f083298650d96da666cb173 (patch) | |
tree | d27752de833bb2c26c18a148c6855dfbbdad7711 /mysql-test | |
parent | 18c51eee3557ecc61d69778adb6c78c0fae4d496 (diff) | |
download | mariadb-git-aba6d06c34201c672f083298650d96da666cb173.tar.gz |
Upgraded sphinx to version 2.0.4
Fixed memory leaks and compiler warnings in ha_sphinx.cc
Added HA_MUST_USE_TABLE_CONDITION_PUSHDOWN so that an engine can force index condition to be used
mysql-test/suite/sphinx/sphinx.result:
Added testing of pushdown conditions and sphinx status variables.
mysql-test/suite/sphinx/sphinx.test:
Added testing of pushdown conditions and sphinx status variables.
mysql-test/suite/sphinx/suite.pm:
Print version number if sphinx version is too old.
sql/handler.h:
Added HA_MUST_USE_TABLE_CONDITION_PUSHDOWN so that an engine can force index condition to be used
sql/sql_base.cc:
Added 'thd' argument to check_unused() to be able to set 'entry->in_use' if we call handler->extra().
This was needed as sphinx (and possible other storage engines) assumes that 'in_use' is set if handler functions are called.
sql/sql_select.cc:
Test if handler is forcing pushdown condition to be used.
storage/sphinx/ha_sphinx.cc:
Updated to version 2.0.4
Fixed memory leaks and compiler warnings.
storage/sphinx/ha_sphinx.h:
Updated to version 2.0.4
storage/sphinx/snippets_udf.cc:
Updated to version 2.0.4
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/suite/sphinx/sphinx.result | 20 | ||||
-rw-r--r-- | mysql-test/suite/sphinx/sphinx.test | 6 | ||||
-rw-r--r-- | mysql-test/suite/sphinx/suite.pm | 4 |
3 files changed, 28 insertions, 2 deletions
diff --git a/mysql-test/suite/sphinx/sphinx.result b/mysql-test/suite/sphinx/sphinx.result index 46fefc6f8ae..50f1f513e31 100644 --- a/mysql-test/suite/sphinx/sphinx.result +++ b/mysql-test/suite/sphinx/sphinx.result @@ -36,4 +36,24 @@ select * from ts where q=';groupby=attr:gid'; id w q gid _sph_count 3 1 ;groupby=attr:gid 2 2 1 1 ;groupby=attr:gid 1 2 +explain select * from ts where q=';groupby=attr:gid'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE ts ref q q 257 const 3 Using where with pushed condition +SET @save_optimizer_switch=@@optimizer_switch; +SET optimizer_switch='index_condition_pushdown=off'; +explain select * from ts where q=';groupby=attr:gid'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE ts ref q q 257 const 3 Using where with pushed condition +SET optimizer_switch=@save_optimizer_switch; drop table ts; +show status like "sphinx_%"; +Variable_name Value +sphinx_error_commits 0 +sphinx_error_group_commits 0 +sphinx_error_snapshot_file +sphinx_error_snapshot_position 0 +sphinx_time 0 +sphinx_total 2 +sphinx_total_found 2 +sphinx_word_count 0 +sphinx_words diff --git a/mysql-test/suite/sphinx/sphinx.test b/mysql-test/suite/sphinx/sphinx.test index f6d2c7ac709..bc5daec8fe5 100644 --- a/mysql-test/suite/sphinx/sphinx.test +++ b/mysql-test/suite/sphinx/sphinx.test @@ -19,5 +19,11 @@ eval create table ts ( id bigint unsigned not null, w int not null, q varchar(25 select * from ts; select * from ts where q=''; select * from ts where q=';groupby=attr:gid'; +explain select * from ts where q=';groupby=attr:gid'; +SET @save_optimizer_switch=@@optimizer_switch; +SET optimizer_switch='index_condition_pushdown=off'; +explain select * from ts where q=';groupby=attr:gid'; +SET optimizer_switch=@save_optimizer_switch; drop table ts; +show status like "sphinx_%"; diff --git a/mysql-test/suite/sphinx/suite.pm b/mysql-test/suite/sphinx/suite.pm index e708b12faea..fd93f0755fa 100644 --- a/mysql-test/suite/sphinx/suite.pm +++ b/mysql-test/suite/sphinx/suite.pm @@ -34,11 +34,11 @@ return "No SphinxSE" unless $ENV{HA_SPHINX_SO} or if ($ver eq "0000.0000.0000") { $ver = sprintf "%04d.%04d", (/([0-9]+)\.([0-9]+)-(alpha|beta|gamma|RC)/); - return "Sphinx 0.9.9 or later is needed" unless $ver ge '0001.0010'; + return "Sphinx 0.9.9 or later is needed (found $ver) " unless $ver ge '0001.0010'; } else { - return "Sphinx 0.9.9 or later is needed" unless $ver ge '0000.0009.0009'; + return "Sphinx 0.9.9 or later is needed (found $ver) " unless $ver ge '0000.0009.0009'; } } |