Gentoo Archives: gentoo-user

From: "Jörg Schaible" <joerg.schaible@×××.de>
To: gentoo-user@l.g.o
Subject: [gentoo-user] akonadi-server upgrade desaster
Date: Wed, 17 Dec 2014 19:13:39
Message-Id: m6skjv$d0l$1@ger.gmane.org
1 Hi folks,
2
3 it seems there's no way for me to upgrade my akonadi-server 1.11.0 to
4 1.12.x or 1.13.x. I am using an external MySQL for years, but it fails to
5 upgrade the tables nor will it recreate them without errors if I drop them
6 all. All I can do is to downgrade to 1.11.0 again and restore the DB schema
7 from a backup.
8
9 When I start akonadi manually with the DB restored for version 1.11.0,
10 I get:
11
12 ======================= %< ====================
13 ~ $ akonadictl start
14 Starting Akonadi Server...
15 done.
16 Connecting to deprecated signal
17 QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
18 ~ $ search paths: ("/usr/local/bin", "/usr/bin", "/bin", "/opt/bin",
19 "/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.3", "/usr/games/bin",
20 "/home/joehni/bin", "/home/joehni/bin", "/usr/sbin", "/usr/local/sbin",
21 "/usr/local/libexec", "/usr/libexec", "/opt/mysql/libexec",
22 "/opt/local/lib/mysql5/bin", "/opt/mysql/sbin")
23 Found mysql_install_db: ""
24 Found mysqlcheck: "/usr/bin/mysqlcheck"
25 QSqlDatabasePrivate::removeDatabase: connection 'initConnection' is still
26 in use, all queries will cease to work.
27 Database "akonadi" opened using driver "QMYSQL"
28 DbInitializer::run()
29 checking table "SchemaVersionTable"
30 checking table "ResourceTable"
31 checking table "CollectionTable"
32 "ALTER TABLE CollectionTable ADD COLUMN enabled BOOL NOT NULL DEFAULT true"
33 "ALTER TABLE CollectionTable ADD COLUMN syncPref TINYINT DEFAULT 2"
34 "ALTER TABLE CollectionTable ADD COLUMN displayPref TINYINT DEFAULT 2"
35 "ALTER TABLE CollectionTable ADD COLUMN indexPref TINYINT DEFAULT 2"
36 "ALTER TABLE CollectionTable ADD COLUMN referenced BOOL NOT NULL DEFAULT
37 false"
38 "ALTER TABLE CollectionTable ADD COLUMN queryAttributes VARBINARY(255)"
39 "ALTER TABLE CollectionTable ADD COLUMN queryCollections VARBINARY(255)"
40 checking table "MimeTypeTable"
41 checking table "PimItemTable"
42 checking table "FlagTable"
43 checking table "PartTypeTable"
44 "CREATE TABLE PartTypeTable (id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
45 name VARBINARY(255) NOT NULL, ns VARBINARY(255) NOT NULL)
46 COLLATE=utf8_general_ci DEFAULT CHARSET=utf8"
47 "
48 Sql error: Table '`akonadi`.`PartTypeTable`' already exists QMYSQL: Unable
49 to execute query
50 Query: CREATE TABLE PartTypeTable (id BIGINT NOT NULL AUTO_INCREMENT
51 PRIMARY
52 KEY, name VARBINARY(255) NOT NULL, ns VARBINARY(255) NOT NULL)
53 COLLATE=utf8_general_ci DEFAULT CHARSET=utf8"
54 Unable to initialize database.
55 [== skipped stack trace ==]
56 ProcessControl: Application 'akonadiserver' returned with exit code 255
57 (Unknown error)
58 search paths: ("/usr/local/bin", "/usr/bin", "/bin", "/opt/bin",
59 "/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.3", "/usr/games/bin",
60 "/home/joehni/bin", "/home/joehni/bin", "/usr/sbin", "/usr/local/sbin",
61 "/usr/local/libexec", "/usr/libexec", "/opt/mysql/libexec",
62 "/opt/local/lib/mysql5/bin", "/opt/mysql/sbin")
63 Found mysql_install_db: ""
64 Found mysqlcheck: "/usr/bin/mysqlcheck"
65 QSqlDatabasePrivate::removeDatabase: connection 'initConnection' is still
66 in use, all queries will cease to work.
67 Database "akonadi" opened using driver "QMYSQL"
68 DbInitializer::run()
69 checking table "SchemaVersionTable"
70 checking table "ResourceTable"
71 checking table "CollectionTable"
72 checking table "MimeTypeTable"
73 checking table "PimItemTable"
74 checking table "FlagTable"
75 checking table "PartTypeTable"
76 "CREATE TABLE PartTypeTable (id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
77 name VARBINARY(255) NOT NULL, ns VARBINARY(255) NOT NULL)
78 COLLATE=utf8_general_ci DEFAULT CHARSET=utf8"
79 "
80 Sql error: Can't create table 'akonadi.PartTypeTable' (errno: -1) QMYSQL:
81 Unable to execute query
82 Query: CREATE TABLE PartTypeTable (id BIGINT NOT NULL AUTO_INCREMENT
83 PRIMARY
84 KEY, name VARBINARY(255) NOT NULL, ns VARBINARY(255) NOT NULL)
85 COLLATE=utf8_general_ci DEFAULT CHARSET=utf8"
86 Unable to initialize database.
87 [== skipped stack trace ==]
88 ProcessControl: Application 'akonadiserver' returned with exit code 255
89 (Unknown error)
90 ======================= %< ====================
91
92 It tries to create the (new) table PartTypeTable, fails with the obscure
93 "table already exists" error and fails on any subsequent try with this
94 errno
95 -1.
96
97 One problem seems to be that all my akonadi tables are based on the MyISAM
98 engine (executed before the failed upgrade attempt):
99
100 ======================= %< ====================
101 mysql> SELECT TABLE_NAME,ENGINE FROM information_schema.TABLES WHERE
102 TABLE_SCHEMA='akonadi';
103 +----------------------------+--------+
104 | TABLE_NAME | ENGINE |
105 +----------------------------+--------+
106 | CollectionAttributeTable | MyISAM |
107 | CollectionMimeTypeRelation | MyISAM |
108 | CollectionPimItemRelation | MyISAM |
109 | CollectionTable | MyISAM |
110 | FlagTable | MyISAM |
111 | MimeTypeTable | MyISAM |
112 | PartTable | MyISAM |
113 | PimItemFlagRelation | MyISAM |
114 | PimItemTable | MyISAM |
115 | ResourceTable | MyISAM |
116 | SchemaVersionTable | MyISAM |
117 +----------------------------+--------+
118 11 rows in set (0.00 sec)
119 ======================= %< ====================
120
121 However, after the failed upgrade I have an PartTypeType.ibd file in the
122 directory where MySQL keeps the files for the akonadi schema, while all
123 others are triples of (.MYD/.MYI/.frm) for each table.
124
125 Unfortunately it is also not possible to alter the DB engine for the tables:
126
127 ======================= %< ====================
128 mysql> ALTER TABLE akonadi.CollectionAttributeTable ENGINE = InnoDB;
129 ERROR 1050 (42S01): Table './akonadi/CollectionAttributeTable' already
130 exists
131 ======================= %< ====================
132
133 In the next step I dropped all those tables above in the hope akonadi will
134 recreate them at start again, this time with the proper engine type, but no
135 avail:
136
137 ======================= %< ====================
138 ~ $ akonadictl start
139 Starting Akonadi Server...
140 done.
141 Connecting to deprecated signal
142 QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
143 ~ $ search paths: ("/usr/local/bin", "/usr/bin", "/bin", "/opt/bin",
144 "/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.3", "/usr/games/bin",
145 "/home/joehni/bin", "/home/joehni/bin", "/usr/sbin", "/usr/local/sbin",
146 "/usr/local/libexec", "/usr/libexec", "/opt/mysql/libexec",
147 "/opt/local/lib/mysql5/bin", "/opt/mysql/sbin")
148 Found mysql_install_db: ""
149 Found mysqlcheck: "/usr/bin/mysqlcheck"
150 QSqlDatabasePrivate::removeDatabase: connection 'initConnection' is still
151 in
152 use, all queries will cease to work.
153 Database "akonadi" opened using driver "QMYSQL"
154 DbInitializer::run()
155 checking table "SchemaVersionTable"
156 "CREATE TABLE SchemaVersionTable (version INTEGER NOT NULL DEFAULT 0)
157 COLLATE=utf8_general_ci DEFAULT CHARSET=utf8"
158 "
159 Sql error: Table '`akonadi`.`SchemaVersionTable`' already exists QMYSQL:
160 Unable to execute query
161 Query: CREATE TABLE SchemaVersionTable (version INTEGER NOT NULL DEFAULT
162 0)
163 COLLATE=utf8_general_ci DEFAULT CHARSET=utf8"
164 Unable to initialize database.
165 ======================= %< ====================
166
167 So, what now? I am out of ideas ...
168
169 - Jörg

Replies

Subject Author
Re: [gentoo-user] akonadi-server upgrade desaster Mick <michaelkintzios@×××××.com>