Summary: | [PATCH]Amarok 2.3.0 incompatible with MySQL 5.5 | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | Bartosz Fabianowski <freebsd> |
Component: | Collections/Local | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | keith, mitchell |
Priority: | NOR | ||
Version: | 2.3.0 | ||
Target Milestone: | 2.3.1 | ||
Platform: | Compiled Sources | ||
OS: | All | ||
Latest Commit: | Version Fixed In: | 2.3.1 | |
Attachments: | Patch to fix Amarok 2.3.0 with MySQL 5.5. |
Description
Bartosz Fabianowski
2010-03-17 23:22:05 UTC
Not that it is likely to make much difference but the system I am using is actually FreeBSD 8, not 7. Seems like a crash in Mysql: [KCrash Handler] #6 0x0000000803523208 in pthread_mutexattr_init () from /lib/libthr.so.3 #7 0x0000000815ac1e4a in my_thread_init () from /usr/local/kde4/lib/kde4/amarok_collection-mysqlecollection.so #8 0x0000000815a85578 in mysql_thread_init () from /usr/local/kde4/lib/kde4/amarok_collection-mysqlecollection.so Maybe 5.5.2 is too recent... Or maybe it's Bsd... Jeff? It does seem to be a crash in mysql. I know of no other distribution using mysql 5.5, which I take to mean "nobody thinks it's stable" and "it's not well tested" :-) Please try downgrading mysql, rebuilding Amarok, and seeing if that fixes things. Created attachment 42393 [details]
Patch to fix Amarok 2.3.0 with MySQL 5.5.
I have added some debug code and identified the problem. The issue is in line 78 of MySqlEmbeddedStorage.cpp. Here, the "default-table-type" variable is set to MYISAM. This variable has been synonymous with "default-storage-engine" (set in line 79 of the same file) since MySQL 5.0 and also has been deprecated since then. In MySQL 5.5, the variable was finally removed. Hence, the embedded MySQL server fails to start up and it all goes downhill from there. The attached patch removes the line that set "default-table-type" to MYISAM, fixing Amarok with MySQL 5.5. Users of MySQL 5.0 will see no change as setting both "default-table-type" and "default-storage-engine" was redundant anyway. As MySQL 5.5 will become more and more popular: nominating as release blocker. @reporter: it would be great if you could create a merge request of this at http://gitorious.org/amarok/amarok/merge_requests No, please, do not create a merge request. I don't even need the patch, just the description is plenty. :-) Fixed in git. commit cebd6875f9fa614ceeb5428236737f3f9f354833 Author: Jeff Mitchell <mitchell@kde.org> Date: Wed Mar 31 07:25:30 2010 -0400 Fix crash on startup with MySQL 5.5. Thanks to Bartosz Fabianowski for figuring out the cause. BUG: 231166 diff --git a/ChangeLog b/ChangeLog index 5f761a9..bba787d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -51,6 +51,8 @@ VERSION 2.3.1-Beta 1 some MySQL versions. (BR 225052) BUGFIXES: + * Fixed crash on startup for users of MySQL 5.5. Thanks to Bartosz Fabianowski + for figuring it out. (BR 231166) * Readded missing hover info for the new filebrowser. * Fixed missing images in the hover info shown for various browser categories. * Fixed crash when running some Amarok urls on startup. (such as when passed on diff --git a/src/core-implementations/collections/sqlcollection/mysqlecollection/MySqlEmbeddedStorage.cpp b/src/core-implementations/collections/sqlcollection/mysqlecollection/MySqlEmbeddedStorage.cpp index 902ef6c..2a03002 100644 --- a/src/core-implementations/collections/sqlcollection/mysqlecollection/MySqlEmbeddedStorage.cpp +++ b/src/core-implementations/collections/sqlcollection/mysqlecollection/MySqlEmbeddedStorage.cpp @@ -68,20 +68,19 @@ MySqlEmbeddedStorage::MySqlEmbeddedStorage( const QString &storageLocation ) dir.mkpath( "." ); } - static const int num_elements = 10; + static const int num_elements = 9; char **server_options = new char* [ num_elements + 1 ]; server_options[0] = const_cast<char*>( "amarokmysqld" ); server_options[1] = defaultsLine; server_options[2] = databaseLine; // CAUTION: if we ever change the table type we will need to fix a number of MYISAM specific // functions, such as FULLTEXT indexing. - server_options[3] = const_cast<char*>( "--default-table-type=MYISAM" ); - server_options[4] = const_cast<char*>( "--default-storage-engine=MYISAM" ); - server_options[5] = const_cast<char*>( "--loose-skip-innodb" ); - server_options[6] = const_cast<char*>( "--skip-grant-tables" ); - server_options[7] = const_cast<char*>( "--myisam-recover=FORCE" ); - server_options[8] = const_cast<char*>( "--character-set-server=utf8" ); - server_options[9] = const_cast<char*>( "--collation-server=utf8_bin" ); + server_options[3] = const_cast<char*>( "--default-storage-engine=MYISAM" ); + server_options[4] = const_cast<char*>( "--loose-skip-innodb" ); + server_options[5] = const_cast<char*>( "--skip-grant-tables" ); + server_options[6] = const_cast<char*>( "--myisam-recover=FORCE" ); + server_options[7] = const_cast<char*>( "--character-set-server=utf8" ); + server_options[8] = const_cast<char*>( "--collation-server=utf8_bin" ); server_options[num_elements] = 0; char **server_groups = new char* [ 3 ]; *** Bug 267409 has been marked as a duplicate of this bug. *** |