Bug 409302 - knotes has no akonadi collection table, could be the primary cause of failure
Summary: knotes has no akonadi collection table, could be the primary cause of failure
Status: REPORTED
Alias: None
Product: knotes
Classification: Applications
Component: general (show other bugs)
Version: 5.11.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-29 10:28 UTC by nmset
Modified: 2019-06-30 11:51 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nmset 2019-06-29 10:28:13 UTC
SUMMARY
knotes has no collection in collectiontable on fresh start. knotes is not usable at all.

STEPS TO REPRODUCE
1. Create a new user and login.
2. Start knotes in a terminal
3. Start akonadiconsole. In DB Browser, collectiontable has no entries for knotes.

OBSERVED RESULT
When the created-by-default 'Notes' agent is restarted :

org.kde.pim.akonadiserver: DATABASE ERROR:
org.kde.pim.akonadiserver:   Error code: "1452"
org.kde.pim.akonadiserver:   DB error:  "Cannot add or update a child row: a foreign key constraint fails (`akonadi`.`collectionmimetyperelation`, CONSTRAINT `collectionmimetyperelation_ibfk_1` FOREIGN KEY (`Collection_id`) REFERENCES `collectiontable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE)"
org.kde.pim.akonadiserver:   Error text: "Cannot add or update a child row: a foreign key constraint fails (`akonadi`.`collectionmimetyperelation`, CONSTRAINT `collectionmimetyperelation_ibfk_1` FOREIGN KEY (`Collection_id`) REFERENCES `collectiontable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) QMYSQL3: Impossible d'exécuter la requête"
org.kde.pim.akonadiserver:   Values: QMap((":0", QVariant(qlonglong, 14))(":1", QVariant(qlonglong, 8)))
org.kde.pim.akonadiserver:   Query: "INSERT INTO CollectionMimeTypeRelation (Collection_id, MimeType_id) VALUES (:0, :1)"
org.kde.pim.akonadiserver: Error during adding a record to table "CollectionMimeTypeRelation"
org.kde.pim.akonadiserver: Failed to append mimetype "inode/directory" to Collection 14
org.kde.pim.akonadiserver: Failed to append mimetypes ("inode/directory", "text/x-vnd.akonadi.note") to new collection "Notes" (ID 14 ) in resource "akonadi_akonotes_resource_0"
org.kde.pim.akonadiserver: Error while handling command CreateCollection on connection akonadi_akonotes_resource_0 (0x5595780c70a0)



EXPECTED RESULT
A usable knotes application, with a Notes collection in akonadiconsole, and all downstream DB constraints honored.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.16-1
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 5.59.0
Qt Version: 5.12.4

ADDITIONAL INFORMATION
Arch Linux
Comment 1 nmset 2019-06-30 11:51:21 UTC
This is a general akonadi failure with newer mariadb version 10.4.6. This fix from Arch's forum gives a usable akonadi server, though knotes itself is not immediately usable on a new account :

> # mysql --socket=/tmp/akonadi-USERID.XXXXXX/mysql.socket -e 'create database
> mysql'
> # mysql_upgrade --socket=/tmp/akonadi-USERID.XXXXXX/mysql.socket
> # akonadictl restart

Let's hope akonadi devs come around this issue.