You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MDEV-37969 sphinx_snippets() UDF fails to resolve hostname
The SphinxSE sphinx_snippets had a erronous test condition
on the getaddrinfo return value. With this inverted there
was always an error.
The entire CSphUrl::Connect also failed to handle IPv6
addresses. As getaddrinfo can return multiple addresses
it makes sense to try each of these.
Performing freeaddrinfo(hp) on an error condition in getaddrinfo
caused a SEGV.
Removed some boilerplate #ifdef around very old MySQL versions
and unused defines.
This sphinx tests reuse the parsing of configuration files
from the test My::Config packaging, which needed to change
as sphinx supports multiple listen directives needed for
the test. Without this the last specified listen only was
recorded in the configuration file.
charset_type removed the indexer reported 2.2.11:
WARNING: key 'charset_type' was permanently removed from Sphinx configuration.
Thanks to bug report by Misagh Laghaei who kindly refered me
to manticoresoftware/manticoresearch#3804
by Sergey Nikolaev <[email protected]> that showed
showed the getaddrinfo handling errors, and other odd handling
of connection code.
Copy file name to clipboardExpand all lines: storage/sphinx/mysql-test/sphinx/sphinx.result
+17Lines changed: 17 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -95,3 +95,20 @@ id w q
95
95
1 2 test;range=meta.foo_count,100,500
96
96
5 1 test;range=meta.foo_count,100,500
97
97
drop table ts;
98
+
# MDEV-37969 sphinx_snippets() UDF fails to resolve hostname
99
+
CREATE FUNCTION sphinx_snippets RETURNS STRING SONAME 'ha_sphinx.so';
100
+
SELECT sphinx_snippets('d', 'test1', 'search_term', 'sphinx://localhost:SPHINXSEARCH_PORT' AS sphinx);
101
+
sphinx_snippets('d', 'test1', 'search_term', 'sphinx://localhost:SPHINXSEARCH_PORT' AS sphinx)
102
+
d
103
+
SELECT sphinx_snippets('this is to test groups', 'test1', 'groups', 'sphinx://127.0.0.1:19001' AS sphinx);
104
+
sphinx_snippets('this is to test groups', 'test1', 'groups', 'sphinx://127.0.0.1:19001' AS sphinx)
105
+
this is to test <b>groups</b>
106
+
SELECT sphinx_snippets('this is to test groups', 'test1', 'groups', 'unix://SPHINXSEARCH_SOCKET' AS sphinx);
107
+
sphinx_snippets('this is to test groups', 'test1', 'groups', 'unix://SPHINXSEARCH_SOCKET' AS sphinx)
108
+
this is to test <b>groups</b>
109
+
SELECT sphinx_snippets('d', 'test1', 'search_term', 'sphinx://somedomainthatdoesntresolve.example.com:19001' AS sphinx);
110
+
ERROR HY000: Unable to connect to foreign data source: failed to resolve searchd host (name=somedomainthatdoesntresolve
111
+
SELECT sphinx_snippets('this is to test groups', 'test1', 'groups', 'unix:///home/dan/repos/build-mariadb-server-10.11/mysql-test/var/tmp/missing_socket' AS sphinx);
112
+
ERROR HY000: Unable to connect to foreign data source: unix:////home/dan/repos/build-mariadb-server-10.11/mysql-test/va
0 commit comments