Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-63108

Problem with threaded database connections when using libmariadb

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 4.8.x, 5.7, 5.8, 5.9
    • Fix Version/s: 5.9.2
    • Component/s: SQL Support
    • Labels:
      None
    • Commits:
      d25346417238b7dc0fb37359a9b56eff2908a5dc

      Description

      MariaDB 10.2 now ships with libmariadb instead of libmysqlclient as a client library. While the API stayed compatible, there was a behavior change regarding connection initialization.
      mysql_server_init (and mysql_library_init) are now inside a pthread_once call. This means that in a threaded environment, once one thread calls mysql_server_end, a later call to mysql_server_init does nothing and connections are no longer initialized.

      According to upstream (MariaDB Bug Report), mysql_server_end should only be called when the application terminates, not as it is now when the number of connections drops to 0.

      An example applications exhibiting this problem is akonadi (Bug report).

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              daniel.vratil Daniel Vrátil (Duplicate) (Inactive)
              Reporter:
              pprkut Heinz Wiesinger
            • Votes:
              5 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes