Summary: | kmail with >=mariadb-10.4.6: not able to refresh email list: Unable to append status flags | ||
---|---|---|---|
Product: | [Frameworks and Libraries] Akonadi | Reporter: | Piotr <piorek> |
Component: | server | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ao, arojas, asturm, brix, bugs, bugzilla, carl, contact, fischer, heiko.becker, heri+kde, j.filzmaier, kde, kishore96, lonelywoolf, mark+kde, medhefgo, peter |
Priority: | NOR | ||
Version: | 5.11.2 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Piotr
2019-06-26 21:18:37 UTC
Same here - since upgrade to 5.11.2 kmail stopped getting new mail via IMAP, I basically stopped working at all :-/ Using a different mailclient on the same IMAP acccount, everything is fine. So, how can we make this work again? Right now kmail is dead in the water :-/ 019-06-27T16:54:51 [CRITICAL] org.kde.pim.akonadiserver: Error code: "1452" 2019-06-27T16:54:51 [CRITICAL] org.kde.pim.akonadiserver: DB error: "Cannot add or update a child row: a foreign key constraint fails (`akonadi`.`pimitemflagrelation`, CONSTRAINT `pimitemflagrelation_ibfk_1` FOREIGN KEY (`PimItem_id`) REFERENCES `pimitemtable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE)" 2019-06-27T16:54:51 [CRITICAL] org.kde.pim.akonadiserver: Error text: "Cannot add or update a child row: a foreign key constraint fails (`akonadi`.`pimitemflagrelation`, CONSTRAINT `pimitemflagrelation_ibfk_1` FOREIGN KEY (`PimItem_id`) REFERENCES `pimitemtable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) QMYSQL3: Unable to execute statement" 2019-06-27T16:54:51 [CRITICAL] org.kde.pim.akonadiserver: Values: QMap((":0", QVariant(qlonglong, 935132))(":1", QVariant(qlonglong, 1))) 2019-06-27T16:54:51 [CRITICAL] org.kde.pim.akonadiserver: Query: "INSERT INTO PimItemFlagRelation (PimItem_id, Flag_id) VALUES (:0, :1)" 2019-06-27T16:54:51 [WARN ] org.kde.pim.akonadiserver: Failed to append flag "\\SEEN" to Items (QVariant(qlonglong, 935132)) 2019-06-27T16:54:51 [WARN ] org.kde.pim.akonadiserver: Error while handling command CreateItem on connection akonadi_imap_resource_0 (0x562e30f4ba60) Could be related to mariadb 10.4.6, https://bugs.gentoo.org/688746
> Where does it takes this ID from then?
> How can I fix this so thath my KMail starts working again?
Downgrading mariadb from 10.4.6 to 10.3.x provided a workaround for me - after downgrading kmail works again, so I guess kmail/akonadi is currently incompatible with mariadb 10.4.
Indeed downgrading MariaDB to 10.3.16 fixed the issue. Thank you for that workaround. *** This bug has been confirmed by popular vote. *** Workaround for getting Akonadi working on mariadb-10.4.6 (tested on Arch): mysql_upgrade --socket=/tmp/akonadi-${USER}.XXXXX/mysql.socket Workaround wasn't working for me: piorek@dreadnought ~ $ mysql_upgrade --socket=/tmp/akonadi-piorek.XXXXXX/mysql.socket Version check failed. Got the following error when calling the 'mysql' command line client ERROR 1049 (42000): Unknown database 'mysql' FATAL ERROR: Upgrade failed Had to create DB mysql first (CREATE DATABASE mysql;). This fixed the problem and upgrade succeeded. Looks like KMail is working fine so far. Can these databases be dropped again after creating 'mysql' database and running upgrade tool? | information_schema | | mysql | | performance_schema | Same problem. I think, that akonadi should check versions of mysql and run mysql_upgrade. On Arch Linux and maybe other Linux distributions, the socket FSO 'mysql.socket' is not located in /tmp/akonadi-*/ but in /run/user/*/akonadi/default/ instead. Thus, the two commands to run become: mysql -S /run/user/$(id -u)/akonadi/default/mysql.socket -e 'create database mysql' && mysql_upgrade -S /run/user/$(id -u)/akonadi/default/mysql.socket At least for me, after running both commands KMail/Akonadi starts fetching and listing mails again. (In reply to Piotr from comment #7) > Workaround wasn't working for me: > > piorek@dreadnought ~ $ mysql_upgrade > --socket=/tmp/akonadi-piorek.XXXXXX/mysql.socket > Version check failed. Got the following error when calling the 'mysql' > command line client > ERROR 1049 (42000): Unknown database 'mysql' > FATAL ERROR: Upgrade failed > > Had to create DB mysql first (CREATE DATABASE mysql;). This fixed the > problem and upgrade succeeded. Looks like KMail is working fine so far. *** Bug 409403 has been marked as a duplicate of this bug. *** (In reply to Thomas Fischer from comment #10) > mysql -S /run/user/$(id -u)/akonadi/default/mysql.socket -e 'create > database mysql' && mysql_upgrade -S /run/user/$(id > -u)/akonadi/default/mysql.socket I had the same issues with mariadb-10.4.6 under ARCH and running those commands fixed the problems for me aswell. Git commit 88a3e25fdaae6f0bd05f552e3f9300207ab751bf by Christophe Giboudeaux. Committed on 18/03/2021 at 15:43. Pushed by cgiboudeaux into branch 'release/21.04'. Allow setting the MySQL scripts location Some of the MySQL tools are simple shell scripts and may be installed in custom locations. We now have a MYSQLD_SCRIPTS_PATH variable that can be set to point to the scripts dir. M +10 -0 CMakeLists.txt M +5 -0 src/server/CMakeLists.txt M +3 -0 src/server/storage/dbconfigmysql.cpp https://invent.kde.org/pim/akonadi/commit/88a3e25fdaae6f0bd05f552e3f9300207ab751bf mysql_upgrade is now run on startup to fix this sort of issues |