Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-6541

hardcoded vio calls break greenthreads

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Incomplete
    • Affects Version/s: 10.0.12
    • Fix Version/s: N/A
    • Component/s: OTHER
    • Labels:
      None
    • Environment:
      Debian GNU/Linux

      Description

      We are trying to switch from mysql 5.5 to mariadb 10.1, but ran into an unsolvable (for us) binary incompatibility problem in libmysqlclient. I kept the priority for this ticket as the default (major), because it's a complete blocker for us, but I understand that this is a niche problem and might be more of a feature request.

      Basically, we use a greenthreads implementation for Perl (the only way to do concurrent sql requests in Perl transparently).

      For this, we hook vio_write, vio_read and other "methods" in the vio structure. This has worked for many years in the past, but no longer works with mariadb 10.1 (no other mariadb versions tested).

      The minor problem is that the vio functions are no longer exported, which is why cannot check for binary compatibility with the library. The major issue is that sendto/recvfrom and possibly other calls are now hardcoded into the mariadb client - previous versions used the vio->read, vio->write and related function pointers.

      As a result, our threads now block the whole process as soon as a sql statement is called, with no way to hook them.

      We cannot use the async interface because that requires rewriting all SQL interactions.

      My question is: is this considered a bug and will never change, or is this merely an oversight and a fix will be issues?

      I understand that vio doesn't look like a very documented feature, but violite.h is installed on most distributions, so it's likely that other software depoends on it as well. Also, there is no alternative to hooking vio for greenthreads implementations - changing the API means rewriting all software that uses it.

      I hope future releases of libmysqlclient will again be hookable to allow greenthreads implementations.

      Thanks for your time!

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            elenst Elena Stepanova added a comment -

            I suppose it happened during libmysqlclient refactoring, and if so, it was intentional; I'm passing this to Sergei Golubchik to decide whether it can be reverted.

            Show
            elenst Elena Stepanova added a comment - I suppose it happened during libmysqlclient refactoring, and if so, it was intentional; I'm passing this to Sergei Golubchik to decide whether it can be reverted.
            Hide
            serg Sergei Golubchik added a comment -

            Do you mean this used to work on libmysqlclient from mysql-libs rpm on, say, Fedora or RedHat?

            We've adopted a stricter symbol visibility and versioning strategy based on what RedHat was doing for years.

            If greenthreads worked with libmysqlclient on RedHat before, that means we have a bug and mistakenly didn't export part of the API. If greenthreads never worked on RedHat, it means this is not a bug, but a feature request.

            Show
            serg Sergei Golubchik added a comment - Do you mean this used to work on libmysqlclient from mysql-libs rpm on, say, Fedora or RedHat? We've adopted a stricter symbol visibility and versioning strategy based on what RedHat was doing for years. If greenthreads worked with libmysqlclient on RedHat before, that means we have a bug and mistakenly didn't export part of the API. If greenthreads never worked on RedHat, it means this is not a bug, but a feature request.

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                schmorp Marc Lehmann
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: