Summary: | Akonadi prints a fatal error but starts anyways | ||
---|---|---|---|
Product: | [Frameworks and Libraries] Akonadi | Reporter: | Andre Heinecke <aheinecke> |
Component: | server | Assignee: | Volker Krause <vkrause> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aheinecke, kdepim-bugs, mklapetek, sascha.teichmann, tokoe |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Andre Heinecke
2010-06-17 11:51:53 UTC
Hej Andre, can you still reproduce it with a current version? Ciao, Tobias Tested again with akonadi from trunk, Revision: 1158618 Still the same problem, according to Volker Krause this error message happens because mysql_upgrade is called every startup just in case a distribution changed the mysql Version. If you do not see it, do you have mysql_upgrade installed? Output section: [akonadiserver] Found mysql_install_db: "/usr/bin/mysql_install_db" [akonadiserver] Found mysql_upgrade: "/usr/bin/mysql_upgrade" "akonadiserver" [out] "Looking for 'mysql' as: /usr/bin/mysql " "akonadiserver" [out] "Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck " "akonadiserver" [out] "Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/var/run/mysqld/mysqld.sock' '--socket=/home/komodev/.kde4_trunk/xdg_data/akonadi/db_misc/mysql.socket' " [akonadiserver] /usr/bin/mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/home/komodev/.kde4_trunk/xdg_data/akonadi/db_misc/mysql.socket' (2) when trying to connect [akonadiserver] FATAL ERROR: Upgrade failed [akonadiserver] Database "akonadi" opened using driver "QMYSQL" [akonadiserver] DbInitializer::run() SVN commit 1158741 by tokoe: 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 M +5 -5 dbconfigmysql.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1158741 SVN commit 1164039 by wstephens: Backports from 1.4 branch, agreed with tokoe: r1158741 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 r1159382 | tokoe | 2010-08-05 11:02:10 +0200 (Thu, 05 Aug 2010) | 5 lines Do not use 'mysql_upgrade', it will call 'mysql_fix_privilege_tables' internally which prevents us from further logins. Only call 'mysqlcheck' instead, which does the checks we want to have. M +12 -7 akonadi.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1164039 commit 9515cc990364060a08021184c22a4a9bd84ffb03 branch refs/tags/v1.4.1 Author: Tobias Koenig <tokoe@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 ) ) ) { |