Gentoo Archives: gentoo-user

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

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
[gentoo-user] Re: akonadi-server upgrade desaster "Jörg Schaible" <joerg.schaible@×××.de>