extragear/multimedia/amarok
Rich
rich at hq.vsaa.lv
Mon Aug 7 12:02:44 UTC 2006
i've had a strange problem, that might be caused by these changes (field
length & corresponding workarounds) - but it also might be not.
i had moved amarok db from mysql 4 to mysql 5 (5.0.22) by simply dumping
& then importing it.
it was sort of working fine at first, but then extreme slowdowns occured
(and mysqld cpu usage skyrocketed).
later, i crated a fresh mysql5 db, which i compared to the old, imported
db dump.
in the end, i traced the problem to two column in statistics table - url
& uniqueid.
all table description comparisons were done on files named new* & old*.
--------------------------------
diff *stats
5c5
< `url` varbinary(255) NOT NULL default '',
---
> `url` varchar(255) character set latin1 collate latin1_bin NOT NULL
default '',
12c12
< `uniqueid` varbinary(8) default NULL,
---
> `uniqueid` varchar(8) character set latin1 collate latin1_bin
default NULL,
--------------------------------
reimporting old table structure (and both with old & new data) fixed the
problem.
is this connected to field length/mysql compatibility problems or is
this just a difference in how amarok works with mysql 4 & 5 ?
what seems strange, the supposed problem would have to happen with
mysql4, but i had it with mysql5.
i also compared other tables, which show similar changes
(varbinary/varchar). KEY changes probably are for additional features
(as amarok versions also differed sligtly.
for the record, here are other changes in table descriptions :
diff *tables
45,46c45,46
< `locale` varchar(2) default NULL,
< `filename` varbinary(33) default NULL,
---
> `locale` char(2) default NULL,
> `filename` varchar(33) character set latin1 collate latin1_bin
default NULL,
86,87c86
< KEY `devices_uuid` (`uuid`),
< KEY `devices_rshare` (`servername`,`sharename`)
---
> KEY `devices_uuid` (`uuid`)
144c143
< `url` varbinary(255) default NULL,
---
> `url` varchar(255) character set latin1 collate latin1_bin default
NULL,
158c157
< `url` varbinary(255) default NULL,
---
> `url` varchar(255) character set latin1 collate latin1_bin default
NULL,
169c168
< `url` varbinary(255) default NULL,
---
> `url` varchar(255) character set latin1 collate latin1_bin default
NULL,
171,172c170,171
< `weblink` varbinary(255) default NULL,
< `image` varbinary(255) default NULL,
---
> `weblink` varchar(255) character set latin1 collate latin1_bin
default NULL,
> `image` varchar(255) character set latin1 collate latin1_bin
default NULL,
192,195c191,194
< `url` varbinary(255) default NULL,
< `localurl` varbinary(255) default NULL,
< `parent` varbinary(255) default NULL,
< `guid` varbinary(255) default NULL,
---
> `url` varchar(255) character set latin1 collate latin1_bin default
NULL,
> `localurl` varchar(255) character set latin1 collate latin1_bin
default NULL,
> `parent` varchar(255) character set latin1 collate latin1_bin
default NULL,
> `guid` varchar(255) character set latin1 collate latin1_bin default
NULL,
204a204
> `deleted` tinyint(1) default '0',
240c240
< `url` varbinary(255) NOT NULL default '',
---
> `url` varchar(255) character set latin1 collate latin1_bin NOT NULL
default '',
247c247
< `uniqueid` varbinary(8) default NULL,
---
> `uniqueid` varchar(8) character set latin1 collate latin1_bin
default NULL,
268d267
< `composer` int(11) default NULL,
273a273
> `composer` varchar(255) default NULL,
286d285
< KEY `composer_tag` (`composer`),
Martin Aumüller wrote:
> SVN commit 570589 by aumuell:
>
> - revert Jeff's workaround for the mysql problems introduced by extending exact text columns to 1024 chars
> - limit size of exact text columns (as used for urls, which are indexed) to 255 for mysql, as this
> would break compatibility with mysql < 5.0.3
> CCMAIL: amarok at kde.org
>
>
> M +2 -1 ChangeLog
> M +24 -31 src/collectiondb.cpp
> M +3 -5 src/collectiondb.h
...
--
Rich
More information about the Amarok
mailing list