Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SphinxSE patches for MariaDB 10.1 and MySQL 5.7 #32

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

adriannuta
Copy link
Contributor

Should superseed #13

@arekm
Copy link

arekm commented Mar 10, 2018

on percona server (based on mysql 5.7) it fails with:

percona-server-5.7.21-20/storage/sphinx/snippets_udf.cc: In member function 'int CSphUrl::Connect()':
percona-server-5.7.21-20/storage/sphinx/snippets_udf.cc:383:25: error: 'inet_addr' was not declared in this scope
   if ( (int)( ip_addr = inet_addr ( m_sHost ) )!=(int)INADDR_NONE )

and in case if anyone needs a fix:

--- storage/sphinx/snippets_udf.cc~     2016-07-19 12:42:18.000000000 +0200
+++ storage/sphinx/snippets_udf.cc      2018-03-10 20:16:19.241113584 +0100
@@ -34,6 +34,9 @@
 #include "../mysql_priv.h"
 #endif
 
+#if  !defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID>=50709
+       #include <arpa/inet.h>
+#endif
 #include <mysys_err.h>
 #include <my_sys.h>

@shodanium
Copy link
Member

SphinxSE is not supported anymore starting from 3.0 anyway. Switching to SphinxQL is recommended.

@zobzn
Copy link

zobzn commented Jul 2, 2019

SphinxSE is not supported anymore

Why? It's such a great feature. It gives the possibility to join mysql and sphinx search results!

@shodanium
Copy link
Member

SphinxSE is not supported anymore

Why? It's such a great feature. It gives the possibility to join mysql and sphinx search results!

For several different reasons. Basically, at this time it's an extremely obscure feature, difficult from our end to maintain, difficult from the user end to both deploy and test, not that generic (ie. tied to MySQL specifically), and last but not least, actually almost unused in prod these days, as far as I could tell.

Starting from 3.x you should be able to either store everything you need to store in Sphinx itself, and avoid an extra roundtrip to MySQL.

Or merely fetch a handful of document IDs and pass them to MySQL (or whatever other DB). Normally that should be only a few extra lines of code :)

@sphinxsearch sphinxsearch deleted a comment from manticoresearch Jul 3, 2019
@midn1
Copy link

midn1 commented Jun 24, 2023

Your first solution is stupidly wasteful of storage, and your second is slower than if SphinxSE directly takes as much as it needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants