Bug 219004

Summary: Akonadi uses the wrong case for updating CollectionTable.
Product: [Frameworks and Libraries] Akonadi Reporter: Ahmed Waheed <oneofone>
Component: serverAssignee: Volker Krause <vkrause>
Status: RESOLVED DUPLICATE    
Severity: crash CC: alab1001101
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Ahmed Waheed 2009-12-17 01:04:30 UTC
Version:           1.2.80 (using KDE 4.3.4)
Compiler:          gcc version 4.4.2 (Gentoo 4.4.2 p1.0) 
OS:                Linux
Installed from:    Gentoo Packages

In server/src/storage/dbupdate.xml the line 
"UPDATE collectiontable SET parentId = NULL WHERE parentId = 0;"
should be "UPDATE CollectionTable SET parentId = NULL WHERE parentId = 0;" (capitalized words), otherwise the server dies with :

[akonadiserver] DbUpdater: update to version: 13  mandatory: true  code: "UPDATE collectiontable SET parentId = NULL WHERE parentId = 0;
[akonadiserver] ALTER TABLE CollectionTable CHANGE parentId parentId BIGINT DEFAULT NULL;"
[akonadiserver] DBUpdater: query error: "Table 'akonadi.collectiontable' doesn't exist QMYSQL: Unable to execute query" " "
[akonadiserver] Query was:  "UPDATE collectiontable SET parentId = NULL WHERE parentId = 0;
[akonadiserver] ALTER TABLE CollectionTable CHANGE parentId parentId BIGINT DEFAULT NULL;"
Comment 1 alab 2010-01-13 18:04:54 UTC
akonadi_control --version
Akonadi 1.2.80

kde4-config --version
Qt: 4.6.0
KDE: 4.3.90 (KDE 4.3.90 (KDE 4.4 RC1))
kde4-config: 1.0

(This versions are from Launchpad Kubuntu Updates beta https://launchpad.net/~kubuntu-ppa/+archive/beta)

After manualy creating the table written in lower-case 'collectiontable', the update went through, and Akonadi is able to start.

sudo akonadi_control
[akonadiserver] QSqlDatabasePrivate::removeDatabase: connection 'initConnection' is still in use, all queries will cease to work.
[akonadiserver] Database "akonadi" opened using driver "QMYSQL"
[akonadiserver] DbInitializer::run()
[akonadiserver] checking table  "SchemaVersionTable"
[akonadiserver] checking table  "ResourceTable"
[akonadiserver] checking table  "CollectionTable"
[akonadiserver] checking table  "MimeTypeTable"
[akonadiserver] checking table  "PimItemTable"
[akonadiserver] checking table  "FlagTable"
[akonadiserver] checking table  "PartTable"
[akonadiserver] checking table  "CollectionAttributeTable"
[akonadiserver] checking relation  "PimItemFlagRelation"
[akonadiserver] checking relation  "CollectionMimeTypeRelation"
[akonadiserver] checking relation  "CollectionPimItemRelation"
[akonadiserver] DbInitializer::run() done
[akonadiserver] skipping update 2
[akonadiserver] skipping update 3
[akonadiserver] skipping update 4
[akonadiserver] skipping update 8
[akonadiserver] skipping update 10
[akonadiserver] skipping update 12
[akonadiserver] DbUpdater: update to version: 13  mandatory: true  code: "UPDATE collectiontable SET parentId = NULL WHERE parentId = 0;
[akonadiserver] ALTER TABLE CollectionTable CHANGE parentId parentId BIGINT DEFAULT NULL;"
[akonadiserver] DBUpdater: query error: "Table 'akonadi.collectiontable' doesn't exist QMYSQL: Unable to execute query" " "
[akonadiserver] Query was:  "UPDATE collectiontable SET parentId = NULL WHERE parentId = 0;
[akonadiserver] ALTER TABLE CollectionTable CHANGE parentId parentId BIGINT DEFAULT NULL;"
[akonadiserver] Target version was:  13
[akonadiserver] Mandatory:  true
[akonadiserver] Failed to commit transaction for database update
[akonadiserver] Unable to initialize database.
[akonadiserver] "[
[akonadiserver] 0: akonadiserver(_Z11akBacktracev+0x39) [0x40b2a9]
[akonadiserver] 1: akonadiserver [0x40b7f2]
[akonadiserver] 2: /lib/libc.so.6 [0x7fb11e259530]
[akonadiserver] 3: /lib/libc.so.6(gsignal+0x35) [0x7fb11e2594b5]
[akonadiserver] 4: /lib/libc.so.6(abort+0x180) [0x7fb11e25cf50]
[akonadiserver] 5: /usr/lib/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x74) [0x7fb11f423754]
[akonadiserver] 6: akonadiserver(_ZN15FileDebugStream9writeDataEPKcx+0xa8) [0x40c8b8]
[akonadiserver] 7: /usr/lib/libQtCore.so.4(_ZN9QIODevice5writeEPKcx+0x78) [0x7fb11f4b2f28]
[akonadiserver] 8: /usr/lib/libQtCore.so.4 [0x7fb11f4c4a19]
[akonadiserver] 9: /usr/lib/libQtCore.so.4(_ZN11QTextStreamD1Ev+0x3b) [0x7fb11f4c5b6b]
[akonadiserver] 10: akonadiserver(_ZN6QDebugD1Ev+0x4e) [0x406f1e]
[akonadiserver] 11: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServerC1EP7QObject+0x5fa) [0x7fb11f89499a]
[akonadiserver] 12: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServer8instanceEv+0x4a) [0x7fb11f89573a]
[akonadiserver] 13: akonadiserver(main+0x3b8) [0x406548]
[akonadiserver] 14: /lib/libc.so.6(__libc_start_main+0xfd) [0x7fb11e244abd]
[akonadiserver] 15: akonadiserver [0x406099]
[akonadiserver] ]
[akonadiserver] "
ProcessControl: Application 'akonadiserver' returned with exit code 255 (Unknown error)
Comment 2 alab 2010-01-13 18:29:23 UTC
Maybe of help also:

mysql --version
mysql  Ver 14.14 Distrib 5.1.37, for debian-linux-gnu (x86_64) using  EditLine wrapper
Comment 3 alab 2010-01-14 11:25:43 UTC
This is fixed as of https://bugs.kde.org/show_bug.cgi?id=220007
would someone close this bug report, please.
Comment 4 Volker Krause 2010-01-15 10:14:16 UTC

*** This bug has been marked as a duplicate of bug 220007 ***