mirror of
https://github.com/MariaDB/server.git
synced 2025-11-02 02:53:04 +03:00
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
30 lines
1.5 KiB
Plaintext
30 lines
1.5 KiB
Plaintext
|
|
--replace_result $SPHINXSEARCH_PORT SPHINXSEARCH_PORT
|
|
eval create table ts ( id bigint unsigned not null, w int not null, q varchar(255) not null, index(q) ) engine=sphinx connection="sphinx://127.0.0.1:$SPHINXSEARCH_PORT/*";
|
|
select * from ts where q='test';
|
|
drop table ts;
|
|
|
|
--replace_result $SPHINXSEARCH_PORT SPHINXSEARCH_PORT
|
|
eval create table ts ( id bigint unsigned not null, w int not null, q varchar(255) not null, index(q) ) engine=sphinx connection="sphinx://127.0.0.1:$SPHINXSEARCH_PORT/*";
|
|
select * from ts where q='test;filter=gid,1;mode=extended';
|
|
select * from ts where q='test|one;mode=extended';
|
|
select * from ts where q='test;offset=1;limit=1';
|
|
--replace_result $SPHINXSEARCH_PORT SPHINXSEARCH_PORT
|
|
eval alter table ts connection="sphinx://127.0.0.1:$SPHINXSEARCH_PORT/test1";
|
|
select id, w from ts where q='one';
|
|
drop table ts;
|
|
|
|
--replace_result $SPHINXSEARCH_PORT SPHINXSEARCH_PORT
|
|
eval create table ts ( id bigint unsigned not null, w int not null, q varchar(255) not null, gid int not null, _sph_count int not null, index(q) ) engine=sphinx connection="sphinx://127.0.0.1:$SPHINXSEARCH_PORT/test1";
|
|
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_%";
|