D7858: Only remove init connections to the database on server shutdown.

Heinz Wiesinger noreply at phabricator.kde.org
Sun Sep 17 10:19:16 BST 2017


pprkut created this revision.
Restricted Application added a project: KDE PIM.
Restricted Application added a subscriber: KDE PIM.

REVISION SUMMARY
  With MariaDB 10.2 libmysqlclient was replaced with libmariadb that
  changed how establishing database connections behaves. The MySQL
  QSQL driver calls mysql_server_end() on QSqlDatabase::removeDatabase()
  if the overall connection count dropped to 0 (which it does when
  the init connection is removed).
  A future QSqlDatabase:addDatabase() would call mysql_server_init()
  again, but this no longer works with libmariadb as that one only
  allows calling mysql_server_init() once. Future calls are simply
  ignored.
  
  In order to prevent this from happening we have to keep the
  init connection open until the server shuts down, so the connection
  count only drops to 0 at shutdown and mysql_server_end() isn't
  called before.
  
  This is a workaround for QTBUG-63108
  
  CCBUG: 383991

REPOSITORY
  R165 Akonadi

BRANCH
  libmariadb

REVISION DETAIL
  https://phabricator.kde.org/D7858

AFFECTED FILES
  src/server/akonadi.cpp
  src/server/storage/dbconfigmysql.cpp

To: pprkut
Cc: #kde_pim, dvasin, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20170917/b59292d3/attachment.html>


More information about the kde-pim mailing list