Amarok support of MySQL Embedded
Edward Hades
edward.hades at gmail.com
Sat Aug 30 21:57:25 CEST 2008
On Sat, Aug 30, 2008 at 3:53 PM, Maximilian Kossick
<maximilian.kossick at googlemail.com> wrote:
> I'm not quite sure what you mean by "hitting the key limit in MyISAM".
> Are some of our index names too long for mysql?
No, the indexes themselves are too long.
Consider, for example, this (DatabaseUpdater.cpp:333):
QString create = "CREATE TABLE urls "
"(id " + m_collection->idType() +
",deviceid INTEGER"
",rpath " + m_collection->exactTextColumnType() +
",directory INTEGER"
",uniqueid " +
m_collection->exactTextColumnType(128) + " UNIQUE);";
m_collection->query( create );
m_collection->query( "CREATE UNIQUE INDEX urls_id_rpath ON
urls(deviceid, rpath);" );
The rpath field is 1024 bytes long (or even bigger because of UTF),
deviceid is some bytes long too (lets assume 4 bytes for simplicity),
that makes index urls_id_rpath 1028 bytes long, while the default
limit in mysql is 1000 bytes.
More information about the Amarok-devel
mailing list