[Bug 241977] Akonadi prints a fatal error but starts anyways

Tobias Koenig tokoe at kde.org
Sat Oct 23 22:59:49 BST 2010


https://bugs.kde.org/show_bug.cgi?id=241977





--- Comment #5 from Tobias Koenig <tokoe kde org>  2010-10-23 23:59:43 ---
commit 9515cc990364060a08021184c22a4a9bd84ffb03
branch refs/tags/v1.4.1
Author: Tobias Koenig <tokoe at kde.org>
Date:   Tue Aug 3 15:24:27 2010 +0000

    Move the mysql_upgrade call to a place where we
    have made sure that mysqld is up and running and accepts
    connections. This will avoid mysql_upgrade to fail with the
    FATAL ERROR message.

    BUG: 241977

    svn path=/branches/akonadi/1.4/; revision=1158741

diff --git a/server/src/storage/dbconfigmysql.cpp
b/server/src/storage/dbconfigmysql.cpp
index 19818a2..833ba5f 100644
--- a/server/src/storage/dbconfigmysql.cpp
+++ b/server/src/storage/dbconfigmysql.cpp
@@ -267,11 +267,6 @@ void DbConfigMysql::startInternalServer()
     akFatal() << "process error:" << mDatabaseProcess->errorString();
   }

-  if ( !mMysqlUpgradeDBPath.isEmpty() ) {
-    const QStringList arguments = QStringList() << QString::fromLatin1(
"--socket=%1/mysql.socket" ).arg( miscDir );
-    QProcess::execute( mMysqlUpgradeDBPath, arguments );
-  }
-
   const QLatin1String initCon( "initConnection" );
   {
     QSqlDatabase db = QSqlDatabase::addDatabase( QLatin1String( "QMYSQL" ),
initCon );
@@ -298,6 +293,11 @@ void DbConfigMysql::startInternalServer()
     }

     if ( opened ) {
+      if ( !mMysqlUpgradeDBPath.isEmpty() ) {
+        const QStringList arguments = QStringList() << QLatin1String(
"--verbose" ) << QString::fromLatin1( "--socket=%1/mysql.socket" ).arg( miscDir
);
+        QProcess::execute( mMysqlUpgradeDBPath, arguments );
+      }
+
       {
         QSqlQuery query( db );
         if ( !query.exec( QString::fromLatin1( "USE %1" ).arg( mDatabaseName )
) ) {

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the Kdepim-bugs mailing list