Skip to content

Conversation

@grooverdan
Copy link
Member

  • The Jira issue number for this PR is: MDEV-37969

Description

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.

Thanks to bug report by Misagh Laghaei who kindly refered me to manticoresoftware/manticoresearch#3804 by Sergey Nikolaev prostuda@academ.org that showed showed the getaddrinfo handling errors, and other odd handling of connection code.

Release Notes

TODO: What should the release notes say about this change?
Include any changed system variables, status variables or behaviour. Optionally list any https://mariadb.com/kb/ pages that need changing.

How can this PR be tested?

sphinx.sphinx test case.

If the changes are not amenable to automated testing, please explain why not and carefully describe how to test manually.

Basing the PR against the correct MariaDB version

  • This is a new feature or a refactoring, and the PR is based against the main branch.
  • This is a bug fix, and the PR is based against the earliest maintained branch in which the bug can be reproduced.

PR quality check

  • I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
  • For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.

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 <prostuda@academ.org> that showed
showed the getaddrinfo handling errors, and other odd handling
of connection code.
@grooverdan grooverdan requested a review from svoj November 5, 2025 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

MariaDB Foundation Pull requests created by MariaDB Foundation

Development

Successfully merging this pull request may close these issues.

2 participants