This site is here for historical purposes only. Do not add or edit tasks here!
Add the Sphinx storage engine to the MariaDB tree
Andrew Aksyonoff from Sphinx is helping to integrate the SphinxSE plugin into
the MariaDB tree.
It is a plugin, so it can be added to the tree just by including the
The Sphinx plugin is already of some maturity, having been used with MySQL for
To get testing in the mysql-test-run framework, some extensions are needed.
To use the Sphinx storage engine, the external Sphinx search daemon needs to
be running with some data directory containing indexed data. It also needs to
be allocated a port.
This is the indended approach:
1. Testing will use an external Sphinx setup installed on the machine. Sphinx
binaries will be searched in typical locations (eg. /usr/bin, /usr/local/bin),
or can be specified explicitly in the environment with SPHINXSEARCH_INDEXER
and SPHINXSEARCH_SEARCHD for the two required binaries. If the external Sphinx
binaries can not be found, then Sphinx tests will be disabled (using some
--source include/have_sphinx.inc in the test cases).
2. The mysql-test-run framework will install Sphinx search data and start/stop
the Sphinx search daemon for the test cases, similarly how it is done for the
other servers mysqld, ndbd, etc. We will run the Sphinx search daemon with
options --console, --config, and --pidfile.
3. The mysql-test-run framework will generate a Sphinx config file from a
template in mysql-test/suite/sphinx/my.cnf. This config file will allocate
ports and data directories appropriate for avoiding conflicts between multiple
simultaneous mysql-test-run executions. The Sphinx config file is sufficiently
similar to MySQL my.cnf that we can use the existing framework for generating
config file, with just a slightly modified variant of the code writing the
file to disk.
4. The mysql-test-run framework will pre-load the mysql database with tables
and data for Sphinx to index. It will then run the `indexer` program to
generate the indexes, and then start the `searchd` daemon. These three steps
must be done in order, as each step depends on the previous. ALTERNATIVE: it
might be possible to pre-generate the necessary data/index files and store
them in the source tree.
I pushed a proof-of-concept patch for this here:
Here is a sample test case using this:
--replace_result $SPHINXSEARCH_PORT SPHINXSEARCH_PORT
eval create table ts ( id int unsigned not null, w int not null, q varchar(255)
not null, index(q) ) engine=sphinx
select * from ts where q='test';
drop table ts;
code review, sphinxse fixes, looking at mtr changes - moved them to wl#127
Code Review signoff
--- /tmp/wklog.42.old.14860 2010-07-26 08:48:40.000000000 +0000
+++ /tmp/wklog.42.new.14860 2010-07-26 08:48:40.000000000 +0000
@@ -1 +1 @@
Dependency created: WL#127 now depends on WL#42
--- /tmp/wklog.42.old.2562 2010-07-23 12:05:29.000000000 +0000
+++ /tmp/wklog.42.new.2562 2010-07-23 12:05:29.000000000 +0000
@@ -1 +1 @@
Architecture Review updated: -> Sergei
Architecture Review signoff
Code Review updated: -> Sergei
Documentation updated: -> Dbart
Observers changed: Sergei
Help Andrew with the integration.
Wrote patch that allows to test SphinxSE in mysql-test-run, using external Sphinx daemon.