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

Problem with threaded database connections when using libmariadb

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.9.2
    • 4.8.x, 5.7, 5.8, 5.9
    • SQL Support
    • None
    • 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

            daniel.vratil Daniel Vrátil (Duplicate) (Inactive)
            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