Commit 01673997 authored by Sergei Golubchik's avatar Sergei Golubchik

sphinxse 2.1.5-release

parent 6c9c8d56
......@@ -7,5 +7,10 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/extra/yassl/include
${CMAKE_SOURCE_DIR}/regex)
SET(SPHINX_SOURCES ha_sphinx.cc)
ADD_LIBRARY(sphinx ha_sphinx.cc)
SET(SPHINX_SOURCES ha_sphinx.cc snippets_udf.cc)
IF(MYSQL_VERSION_ID LESS 50515)
ADD_LIBRARY(sphinx ha_sphinx.cc snippets_udf.cc)
ELSE()
SET(SPHINX_PLUGIN_DYNAMIC "ha_sphinx")
MYSQL_ADD_PLUGIN(sphinx ${SPHINX_SOURCES} STORAGE_ENGINE MODULE_ONLY LINK_LIBRARIES mysys)
ENDIF()
Building MySQL with SphinxSE
=============================
Note: BUILD/autorun.sh step on Linux might malfunction with some
versions of automake; autorun.sh will not fail but the build will.
automake 1.9.6 is known to work.
MySQL 5.0.x on Linux
---------------------
tar zxvf mysql-5.0.91.tar.gz
cp -R mysqlse mysql-5.0.91/sql/sphinx
cd mysql-5.0.91
patch -p1 -i sql/sphinx/sphinx.5.0.91.diff
sh BUILD/autorun.sh
./configure --with-sphinx-storage-engine
make
MySQL 5.1.x on Linux
---------------------
tar zxvf mysql-5.1.47.tar.gz
cp -R -p mysqlse mysql-5.1.47/storage/sphinx
cd mysql-5.1.47
sh BUILD/autorun.sh
./configure --with-plugins=sphinx
make
MySQL 5.0.x on Windows
-----------------------
tar zxvf mysql-5.0.91.tar.gz
cp -R mysqlse mysql-5.0.91/sql/sphinx
cd mysql-5.0.91
patch -p1 -i sql/sphinx/sphinx.5.0.91.diff
win\configure.js WITH_SPHINX_STORAGE_ENGINE
win\build-vs8
--eof--
This diff is collapsed.
//
// $Id$
// $Id: ha_sphinx.h 3866 2013-05-22 11:54:20Z kevg $
//
#ifdef USE_PRAGMA_INTERFACE
......@@ -7,7 +7,9 @@
#endif
#if MYSQL_VERSION_ID>50100
#if MYSQL_VERSION_ID>=50515
#define TABLE_ARG TABLE_SHARE
#elif MYSQL_VERSION_ID>50100
#define TABLE_ARG st_table_share
#else
#define TABLE_ARG st_table
......@@ -47,7 +49,7 @@ class ha_sphinx : public handler
public:
#if MYSQL_VERSION_ID<50100
ha_sphinx ( TABLE_ARG * table_arg );
ha_sphinx ( TABLE_ARG * table_arg ); // NOLINT
#else
ha_sphinx ( handlerton * hton, TABLE_ARG * table_arg );
#endif
......@@ -82,14 +84,15 @@ class ha_sphinx : public handler
int open ( const char * name, int mode, uint test_if_locked );
int close ();
int write_row ( uchar * buf );
int update_row ( const uchar * old_data, uchar * new_data );
int delete_row ( const uchar * buf );
int write_row ( byte * buf );
int update_row ( const byte * old_data, byte * new_data );
int delete_row ( const byte * buf );
int extra ( enum ha_extra_function op );
int index_init ( uint keynr, bool sorted ); // 5.1.x
int index_init ( uint keynr ) { return index_init ( keynr, false ); } // 5.0.x
int index_end ();
int index_end ();
int index_read ( byte * buf, const byte * key, uint key_len, enum ha_rkey_function find_flag );
int index_read_idx ( byte * buf, uint idx, const byte * key, uint key_len, enum ha_rkey_function find_flag );
int index_next ( byte * buf );
......@@ -121,10 +124,14 @@ class ha_sphinx : public handler
int rename_table ( const char * from, const char * to );
int create ( const char * name, TABLE * form, HA_CREATE_INFO * create_info );
THR_LOCK_DATA **store_lock ( THD * thd, THR_LOCK_DATA ** to, enum thr_lock_type lock_type );
THR_LOCK_DATA ** store_lock ( THD * thd, THR_LOCK_DATA ** to, enum thr_lock_type lock_type );
public:
#if MYSQL_VERSION_ID<50610
virtual const COND * cond_push ( const COND *cond );
#else
virtual const Item * cond_push ( const Item *cond );
#endif
virtual void cond_pop ();
private:
......@@ -138,12 +145,15 @@ class ha_sphinx : public handler
int * m_dUnboundFields;
private:
int ConnectToSearchd ( const char * sQueryHost, int iQueryPort );
int Connect ( const char * sQueryHost, ushort uPort );
int ConnectAPI ( const char * sQueryHost, int iQueryPort );
int HandleMysqlError ( struct st_mysql * pConn, int iErrCode );
uint32 UnpackDword ();
char * UnpackString ();
bool UnpackSchema ();
bool UnpackStats ( CSphSEStats * pStats );
bool CheckResponcePtr ( int iLen );
CSphSEThreadData * GetTls ();
};
......@@ -160,5 +170,5 @@ int sphinx_showfunc_word_count ( THD *, SHOW_VAR *, char * );
int sphinx_showfunc_words ( THD *, SHOW_VAR *, char * );
//
// $Id$
// $Id: ha_sphinx.h 3866 2013-05-22 11:54:20Z kevg $
//
File mode changed from 100644 to 100755
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment