<table><tr><td style="">pprkut created this revision.<br />Restricted Application added a project: KDE PIM.<br />Restricted Application added a subscriber: KDE PIM.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D7858" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>With MariaDB 10.2 libmysqlclient was replaced with libmariadb that<br />
changed how establishing database connections behaves. The MySQL<br />
QSQL driver calls mysql_server_end() on QSqlDatabase::removeDatabase()<br />
if the overall connection count dropped to 0 (which it does when<br />
the init connection is removed).<br />
A future QSqlDatabase:addDatabase() would call mysql_server_init()<br />
again, but this no longer works with libmariadb as that one only<br />
allows calling mysql_server_init() once. Future calls are simply<br />
ignored.</p>

<p>In order to prevent this from happening we have to keep the<br />
init connection open until the server shuts down, so the connection<br />
count only drops to 0 at shutdown and mysql_server_end() isn't<br />
called before.</p>

<p>This is a workaround for QTBUG-63108</p>

<p>CCBUG: 383991</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R165 Akonadi </div></div></div><br /><div><strong>BRANCH</strong><div><div>libmariadb</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D7858" rel="noreferrer">https://phabricator.kde.org/D7858</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/server/akonadi.cpp<br />
src/server/storage/dbconfigmysql.cpp</div></div></div><br /><div><strong>To: </strong>pprkut<br /><strong>Cc: </strong>KDE PIM, dvasin, winterz, vkrause, mlaurent, knauss, dvratil<br /></div>