Author: arekm Date: Sun Aug 28 06:53:28 2011 GMT Module: packages Tag: HEAD ---- Log message: - sphinx 2.0.1 beta
---- Files affected: packages/mysql: mysql.spec (1.556 -> 1.557) , sphinx-mysql.patch (NONE -> 1.1) (NEW) ---- Diffs: ================================================================ Index: packages/mysql/mysql.spec diff -u packages/mysql/mysql.spec:1.556 packages/mysql/mysql.spec:1.557 --- packages/mysql/mysql.spec:1.556 Thu Aug 25 12:08:46 2011 +++ packages/mysql/mysql.spec Sun Aug 28 08:53:22 2011 @@ -43,8 +43,8 @@ # Source0Download: http://dev.mysql.com/downloads/mysql/5.5.html#downloads Source0: http://vesta.informatik.rwth-aachen.de/mysql/Downloads/MySQL-5.5/%{name}-%{version}.tar.gz # Source0-md5: 306b5549c7bd72e8e705a890db0da82b -Source100: http://www.sphinxsearch.com/downloads/sphinx-0.9.9.tar.gz -# Source100-md5: 7b9b618cb9b378f949bb1b91ddcc4f54 +Source100: http://www.sphinxsearch.com/files/sphinx-2.0.1-beta.tar.gz +# Source100-md5: 95c217d81d0b7a4ff73d5297318c3481 Source1: %{name}.init Source2: %{name}.sysconfig Source3: %{name}.logrotate @@ -75,6 +75,8 @@ Patch19: %{name}-chain-certs.patch # from fedora Patch20: %{name}-dubious-exports.patch +# http://sphinxsearch.com/bugs/view.php?id=676 +Patch21: sphinx-mysql.patch # <percona patches, updated with percona.sh> Patch100: microsec_process.patch Patch101: optimizer_fix.patch @@ -562,6 +564,9 @@ %patch14 -p0 %patch19 -p1 %patch20 -p1 +cd storage/sphinx +%patch21 -p1 +cd ../.. # <percona %patches> %patch100 -p1 %patch101 -p1 @@ -1005,7 +1010,7 @@ %attr(755,root,root) %{_libdir}/%{name}/plugin/semisync_master.so %attr(755,root,root) %{_libdir}/%{name}/plugin/semisync_slave.so %if %{with sphinx} -%attr(755,root,root) %{_libdir}/%{name}/plugin/sphinx.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/ha_sphinx.so %endif # for plugins %attr(755,root,root) %{_libdir}/libmysqlservices.so @@ -1243,6 +1248,9 @@ All persons listed below can be reached at <cvs_login>@pld-linux.org $Log$ +Revision 1.557 2011/08/28 06:53:22 arekm +- sphinx 2.0.1 beta + Revision 1.556 2011/08/25 10:08:46 arekm - up to 5.5.15 ================================================================ Index: packages/mysql/sphinx-mysql.patch diff -u /dev/null packages/mysql/sphinx-mysql.patch:1.1 --- /dev/null Sun Aug 28 08:53:28 2011 +++ packages/mysql/sphinx-mysql.patch Sun Aug 28 08:53:23 2011 @@ -0,0 +1,189 @@ +Index: mysqlse/ha_sphinx.cc +=================================================================== +--- mysqlse/ha_sphinx.cc (wersja 2920) ++++ mysqlse/ha_sphinx.cc (wersja 2921) +@@ -24,7 +24,10 @@ + + #include <mysql_version.h> + +-#if MYSQL_VERSION_ID>50100 ++#if MYSQL_VERSION_ID>=50515 ++#include "sql_class.h" ++#include "sql_array.h" ++#elif MYSQL_VERSION_ID>50100 + #include "mysql_priv.h" + #include <mysql/plugin.h> + #else +@@ -119,6 +122,22 @@ + + #endif + ++#if MYSQL_VERSION_ID>=50515 ++ ++#define sphinx_hash_init my_hash_init ++#define sphinx_hash_free my_hash_free ++#define sphinx_hash_search my_hash_search ++#define sphinx_hash_delete my_hash_delete ++ ++#else ++ ++#define sphinx_hash_init hash_init ++#define sphinx_hash_free hash_free ++#define sphinx_hash_search hash_search ++#define sphinx_hash_delete hash_delete ++ ++#endif ++ + ///////////////////////////////////////////////////////////////////////////// + + // FIXME! make this all dynamic +@@ -675,8 +694,8 @@ + if ( !sphinx_init ) + { + sphinx_init = 1; +- VOID ( pthread_mutex_init ( &sphinx_mutex, MY_MUTEX_INIT_FAST ) ); +- hash_init ( &sphinx_open_tables, system_charset_info, 32, 0, 0, ++ void ( pthread_mutex_init ( &sphinx_mutex, MY_MUTEX_INIT_FAST ) ); ++ sphinx_hash_init ( &sphinx_open_tables, system_charset_info, 32, 0, 0, + sphinx_get_key, 0, 0 ); + + #if MYSQL_VERSION_ID > 50100 +@@ -726,7 +745,7 @@ + sphinx_init = 0; + if ( sphinx_open_tables.records ) + error = 1; +- hash_free ( &sphinx_open_tables ); ++ sphinx_hash_free ( &sphinx_open_tables ); + pthread_mutex_destroy ( &sphinx_mutex ); + } + +@@ -1131,12 +1150,12 @@ + { + // check if we already have this share + #if MYSQL_VERSION_ID>=50120 +- pShare = (CSphSEShare*) hash_search ( &sphinx_open_tables, (const uchar *) table_name, strlen(table_name) ); ++ pShare = (CSphSEShare*) sphinx_hash_search ( &sphinx_open_tables, (const uchar *) table_name, strlen(table_name) ); + #else + #ifdef __WIN__ +- pShare = (CSphSEShare*) hash_search ( &sphinx_open_tables, (const byte *) table_name, strlen(table_name) ); ++ pShare = (CSphSEShare*) sphinx_hash_search ( &sphinx_open_tables, (const byte *) table_name, strlen(table_name) ); + #else +- pShare = (CSphSEShare*) hash_search ( &sphinx_open_tables, table_name, strlen(table_name) ); ++ pShare = (CSphSEShare*) sphinx_hash_search ( &sphinx_open_tables, table_name, strlen(table_name) ); + #endif // win + #endif // pre-5.1.20 + +@@ -1188,7 +1207,7 @@ + + if ( !--pShare->m_iUseCount ) + { +- hash_delete ( &sphinx_open_tables, (byte *)pShare ); ++ sphinx_hash_delete ( &sphinx_open_tables, (byte *)pShare ); + SafeDelete ( pShare ); + } + +@@ -2073,15 +2092,29 @@ + } else + { + int tmp_errno; ++ bool bError = false; ++ ++#if MYSQL_VERSION_ID>=50515 ++ struct addrinfo tmp_hostent, *hp; ++ tmp_errno = getaddrinfo ( sHost, NULL, &tmp_hostent, &hp ); ++ if ( !tmp_errno ) ++ { ++ freeaddrinfo ( hp ); ++ bError = true; ++ } ++#else + struct hostent tmp_hostent, *hp; + char buff2 [ GETHOSTBYNAME_BUFF_SIZE ]; +- +- hp = my_gethostbyname_r ( sHost, &tmp_hostent, +- buff2, sizeof(buff2), &tmp_errno ); ++ hp = my_gethostbyname_r ( sHost, &tmp_hostent, buff2, sizeof(buff2), &tmp_errno ); + if ( !hp ) + { + my_gethostbyname_r_free(); ++ bError = true; ++ } ++#endif + ++ if ( bError ) ++ { + char sError[256]; + my_snprintf ( sError, sizeof(sError), "failed to resolve searchd host (name=%s)", sHost ); + +@@ -2089,9 +2122,13 @@ + SPH_RET(-1); + } + +- memcpy ( &sin.sin_addr, hp->h_addr, +- Min ( sizeof(sin.sin_addr), (size_t)hp->h_length ) ); ++#if MYSQL_VERSION_ID>=50515 ++ memcpy ( &sin.sin_addr, hp->ai_addr, Min ( sizeof(sin.sin_addr), (size_t)hp->ai_addrlen ) ); ++ freeaddrinfo ( hp ); ++#else ++ memcpy ( &sin.sin_addr, hp->h_addr, Min ( sizeof(sin.sin_addr), (size_t)hp->h_length ) ); + my_gethostbyname_r_free(); ++#endif + } + } else + { +@@ -2932,7 +2969,7 @@ + + for ( uint32 i=0; i<m_iAttrs; i++ ) + { +- longlong iValue64; ++ longlong iValue64 = 0; + uint32 uValue = UnpackDword (); + if ( m_dAttrs[i].m_uType==SPH_ATTR_BIGINT ) + iValue64 = ( (longlong)uValue<<32 ) | UnpackDword(); +Index: mysqlse/ha_sphinx.h +=================================================================== +--- mysqlse/ha_sphinx.h (wersja 2920) ++++ mysqlse/ha_sphinx.h (wersja 2921) +@@ -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 @@ + + 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 +@@ -90,7 +92,7 @@ + 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 ); +Index: mysqlse/CMakeLists.txt +=================================================================== +--- mysqlse/CMakeLists.txt (wersja 2920) ++++ mysqlse/CMakeLists.txt (wersja 2921) +@@ -8,4 +8,9 @@ + ${CMAKE_SOURCE_DIR}/regex) + + SET(SPHINX_SOURCES ha_sphinx.cc) ++IF(MYSQL_VERSION_ID LESS 50515) + ADD_LIBRARY(sphinx ha_sphinx.cc) ++ELSE() ++SET(SPHINX_PLUGIN_DYNAMIC "ha_sphinx") ++MYSQL_ADD_PLUGIN(sphinx ${SPHINX_SOURCES} STORAGE_ENGINE MODULE_ONLY LINK_LIBRARIES mysys) ++ENDIF() ================================================================ ---- CVS-web: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql.spec?r1=1.556&r2=1.557&f=u _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
