Summary: | kde-apps/akonadi-18.12.3-r1 with dev-db/mariadb-10.4.6 - org.kde.pim.akonadiserver: DB error: "Cannot add or update a child row: a foreign key constraint fails (`akonadi`.`collectionmimetyperelation`, CONSTRAINT `collectionmimetyperelation_ibfk_1` ... | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | jms <jms.gentoo> |
Component: | Current packages | Assignee: | Gentoo KDE team <kde> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ab4bd, ao, dschridde+gentoobugs, josef64, mark+gentoobugs, pavel.a.denisov, piorekf, solpeth |
Priority: | Normal | Keywords: | UPSTREAM |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://bugs.kde.org/show_bug.cgi?id=409224 | ||
Whiteboard: | workaround: mysql_upgrade --socket=/tmp/akonadi-${USER}.XXXXX/mysql.socket | ||
Package list: | Runtime testing required: | --- | |
Attachments: | emerge --info |
Description
jms
2019-06-26 14:24:15 UTC
I have this now mariadb Installed versions: 10.3.16(0/18)(15:59:51 26/06/2019)(backup bindist pam perl server xml -client-libs -cracklib -debug -extraengine -galera -innodb-lz4 -innodb-lzo -innodb-snappy -jdbc -jemalloc -kerberos -latin1 -libressl -mroonga -numa -odbc -oqgraph -profiling -rocksdb -selinux -sphinx -sst-mariabackup -sst-rsync -static -systemd -systemtap -tcmalloc -test -tokudb -yassl ELIBC="-FreeBSD") and I] kde-apps/akonadi Available versions: (5) 18.12.3-r1^t **18.12.49.9999^t[1] (~)19.04.2^t **9999^t[1] {debug designer +mysql postgres sqlite test tools xml} Installed versions: 19.04.2(5)^t(15:31:14 07/06/2019)(mysql tools xml -debug -designer -postgres -sqlite -test) Homepage: https://community.kde.org/KDE_PIM/akonadi Description: Storage service for PIM data and libraries for PIM apps Created attachment 580974 [details]
emerge --info
is going to mariadb-10.3 To mariadb-10.4 a major version change ? as I didn't run the mysql_upgrade tool. In this case no a bug but a misunderstanding... I can confirm that it's 10.4.6 related. After downgrading to mariadb 10.3.x, kmail works again - and is able to fetch news mails. Upstream bug: https://bugs.kde.org/show_bug.cgi?id=409224 so (In reply to Mark Nowiasz from comment #5) > Upstream bug: https://bugs.kde.org/show_bug.cgi?id=409224 ok mabe ebuild should have <dev-db/mariadb-10.4.6 by the way I reported problem with kde-apps/akonadi-18.12.3-r1 but in fact I think I had kde-apps/akonadi-19.04.2 Is this bug is affecting both version? can you specify which akonadi version you have this problem with?
>
> Is this bug is affecting both version?
> can you specify which akonadi version you have this problem with?
I've got 19.04.2 - the update to mariadb was done together with lots of packages, including kde and plasma ones. So I can't tell if the problem was also in 18.x.
I had to run: mysql_upgrade --socket=/tmp/akonadi-rondo.mpDWDW/mysql.socket Which gave me this error: Version check failed. Got the following error when calling the 'mysql' command line client ERROR 1049 (42000): Unknown database 'mysql' FATAL ERROR: Upgrade failed And then I created mysql database: mysql --socket=/tmp/akonadi-rondo.mpDWDW/mysql.socket create database mysql; Then I ran mysql_upgrade again. After that connecting to socket was impossible for both mysql client and Akonadi. Running "akonadictl restart" fixed everything. (In reply to Pavel Volkov from comment #8) > And then I created mysql database: > mysql --socket=/tmp/akonadi-rondo.mpDWDW/mysql.socket > create database mysql; The akonadi database runs as your normal desktop user. It does not have the default mysql database tables, only akonadi relevant tables. Your creation of a mysql database messes up akonadi as it adds a new database and tables and this is why you experienced problems thereafter. This is what the mysql structure used by akonadi contains on my system: ==================================================================== $ mysql -u michael --socket=/tmp/akonadi-michael.tJdRwT/mysql.socket Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 43 Server version: 10.2.22-MariaDB Source distribution Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> show databases; +--------------------+ | Database | +--------------------+ | akonadi | | information_schema | +--------------------+ 2 rows in set (0.00 sec) MariaDB [(none)]> use akonadi; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed MariaDB [akonadi]> show tables; +----------------------------------+ | Tables_in_akonadi | +----------------------------------+ | collectionattributetable | | collectionmimetyperelation | | collectionpimitemrelation | | collectiontable | | flagtable | | mimetypetable | | parttable | | parttypetable | | pimitemflagrelation | | pimitemtable | | pimitemtagrelation | | relationtable | | relationtypetable | | resourcetable | | schemaversiontable | | tagattributetable | | tagremoteidresourcerelationtable | | tagtable | | tagtypetable | +----------------------------------+ 19 rows in set (0.00 sec) MariaDB [akonadi]> use information_schema; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed MariaDB [information_schema]> show tables; +---------------------------------------+ | Tables_in_information_schema | +---------------------------------------+ | ALL_PLUGINS | | APPLICABLE_ROLES | | CHARACTER_SETS | | CHECK_CONSTRAINTS | | COLLATIONS | | COLLATION_CHARACTER_SET_APPLICABILITY | | COLUMNS | | COLUMN_PRIVILEGES | | ENABLED_ROLES | | ENGINES | | EVENTS | | FILES | | GLOBAL_STATUS | | GLOBAL_VARIABLES | | KEY_CACHES | | KEY_COLUMN_USAGE | | PARAMETERS | | PARTITIONS | | PLUGINS | | PROCESSLIST | | PROFILING | | REFERENTIAL_CONSTRAINTS | | ROUTINES | | SCHEMATA | | SCHEMA_PRIVILEGES | | SESSION_STATUS | | SESSION_VARIABLES | | STATISTICS | | SYSTEM_VARIABLES | | TABLES | | TABLESPACES | | TABLE_CONSTRAINTS | | TABLE_PRIVILEGES | | TRIGGERS | | USER_PRIVILEGES | | VIEWS | | GEOMETRY_COLUMNS | | SPATIAL_REF_SYS | | CLIENT_STATISTICS | | INDEX_STATISTICS | | INNODB_SYS_DATAFILES | | USER_STATISTICS | | INNODB_SYS_TABLESTATS | | INNODB_LOCKS | | INNODB_MUTEXES | | INNODB_CMPMEM | | INNODB_CMP_PER_INDEX | | INNODB_CMP | | INNODB_FT_DELETED | | INNODB_CMP_RESET | | INNODB_LOCK_WAITS | | TABLE_STATISTICS | | INNODB_TABLESPACES_ENCRYPTION | | INNODB_BUFFER_PAGE_LRU | | INNODB_SYS_FIELDS | | INNODB_CMPMEM_RESET | | INNODB_SYS_COLUMNS | | INNODB_FT_INDEX_TABLE | | INNODB_CMP_PER_INDEX_RESET | | user_variables | | INNODB_FT_INDEX_CACHE | | INNODB_SYS_FOREIGN_COLS | | INNODB_FT_BEING_DELETED | | INNODB_BUFFER_POOL_STATS | | INNODB_TRX | | INNODB_SYS_FOREIGN | | INNODB_SYS_TABLES | | INNODB_FT_DEFAULT_STOPWORD | | INNODB_FT_CONFIG | | INNODB_BUFFER_PAGE | | INNODB_SYS_TABLESPACES | | INNODB_METRICS | | INNODB_SYS_INDEXES | | INNODB_SYS_VIRTUAL | | INNODB_TABLESPACES_SCRUBBING | | INNODB_SYS_SEMAPHORE_WAITS | +---------------------------------------+ 76 rows in set (0.00 sec) MariaDB [information_schema]> \q Bye ================================ Adding databases and tables in akonadi is probably not advisable. In any case, akonadiserver which launches mysql for akonadi to use, always runs mysqlcheck at the start to catch any database version upgrade changes and resolve them. Therefore, AFAIK there should be no need to run mysql_upgrade manually. -- Regards, Mick What do you mean by problems thereafter? I didn't have any. I also didn't have 'information_schema' db before mysql_upgrade. (In reply to Pavel Volkov from comment #10) > What do you mean by problems thereafter? I didn't have any. I meant you not being able to connect (to the same socket), but this may be because the mysql-upgrade script restarted mysql and created a new socket? I do not know if creating a new database on the same socket akonadi is running, will generate new/different global variables and stats which could mess up akonadi's operation. I was just being cautionary. > I also didn't have 'information_schema' db before mysql_upgrade. I have an 'information_schema' as shown above on mariadb-10.2.22-r1. My understanding is this is created by default whenever a database is set up. -- Regards, Mick The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ea3a25e7a92db18125aba2cc1e6e7323ed9dd550 commit ea3a25e7a92db18125aba2cc1e6e7323ed9dd550 Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2019-07-23 18:49:27 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2019-07-23 18:55:05 +0000 kde-apps/akonadi: Warn users about the trouble with USE mysql External DBs can't be fixed automatically, and >=mariadb-10.4 still can't be upgraded automatically, at least add warnings that hopefully will be read. Bug: https://bugs.gentoo.org/688746 Package-Manager: Portage-2.3.69, Repoman-2.3.16 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> kde-apps/akonadi/akonadi-19.04.3.ebuild | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/kde.git/commit/?id=b7b95f71ddff77ab067caba16374081b4949f8d0 commit b7b95f71ddff77ab067caba16374081b4949f8d0 Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2019-07-23 18:49:27 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2019-07-24 11:29:25 +0000 kde-apps/akonadi: Warn users about the trouble with USE mysql External DBs can't be fixed automatically, and >=mariadb-10.4 still can't be upgraded automatically, at least add warnings that hopefully will be read. Bug: https://bugs.gentoo.org/688746 Package-Manager: Portage-2.3.69, Repoman-2.3.16 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> kde-apps/akonadi/akonadi-19.07.80.ebuild | 22 ++++++++++++++++++++++ kde-apps/akonadi/akonadi-19.08.49.9999.ebuild | 22 ++++++++++++++++++++++ kde-apps/akonadi/akonadi-9999.ebuild | 22 ++++++++++++++++++++++ 3 files changed, 66 insertions(+) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/kde.git/commit/?id=c64308088b7b68117d4243ee02d0cbf3adbaf432 commit c64308088b7b68117d4243ee02d0cbf3adbaf432 Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2021-03-16 23:04:33 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2021-04-04 19:50:18 +0000 kde-apps/akonadi: Update IUSE=mysql instructions using readme.gentoo Provide detailed instructions for how to fix existing backends. Bug: https://bugs.gentoo.org/688746 Package-Manager: Portage-3.0.17, Repoman-3.0.2 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> kde-apps/akonadi/akonadi-9999.ebuild | 15 ++++++-------- kde-apps/akonadi/files/README.gentoo | 39 ++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 9 deletions(-) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe87d665b6f99bad6352d89eb9862632ba144fa0 commit fe87d665b6f99bad6352d89eb9862632ba144fa0 Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2021-03-16 23:04:33 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2021-04-04 19:53:09 +0000 kde-apps/akonadi: Update IUSE=mysql instructions using readme.gentoo Provide detailed instructions for how to fix existing backends. Bug: https://bugs.gentoo.org/688746 Package-Manager: Portage-3.0.17, Repoman-3.0.2 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> kde-apps/akonadi/akonadi-20.12.3.ebuild | 15 +++++-------- kde-apps/akonadi/files/README.gentoo | 39 +++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 9 deletions(-) Has not been a problem in a very long time. |