On 01/-10/-28163 20:59, Dima Panov wrote:
Hello!

19.03.2011, 01:20, "Raphael Kubo da Costa"<[email protected]>:
Bartosz Fabianowski<[email protected]>; writes:

  This is a bug in MySQL. When the embedded MySQL server starts, it fails
  to read ~/.kde4/share/apps/amarok/my.cnf, therefore does not set a local
  datadir and tries to create the Amarok database in /var/db/mysql, the
  built-in default.

MySQL 5.5, right? Wasn't this already solved on FreeBSD? fluffy?

http://bugs.mysql.com/bug.php?id=59280

But ale@ was declined to apply this patch to mysql55 port when i've poited him 
to the problem :(

Since mysql55 is default for kde and amarok, our default amarok package will be broken as long as Oracle does not make up their minds how to fix the bug. IMHO, we should use a local hack in the meantime.

I have written a patch that seems to work... rather hackish since I have never used either qt or mysql, but good enough, I guess.

Can the file attached be put into audio/amarok-kde4/files/?

Cheers,
Jan Henrik
--- 
src/core-impl/collections/db/sql/mysqlecollection/MySqlEmbeddedStorage.cpp.orig 
    2011-01-11 16:58:06.000000000 +0100
+++ src/core-impl/collections/db/sql/mysqlecollection/MySqlEmbeddedStorage.cpp  
2011-03-19 14:50:59.000000000 +0100
@@ -82,7 +82,17 @@
     }
 
     setenv( "MYSQL_HOME", storagePath.toAscii().data(), 1 );
-    if( mysql_server_init( 0 , 0, 0 ) != 0 )
+    QString defaultsFileOption = "--defaults-file=";
+    defaultsFileOption += defaultsFile;
+    QByteArray defaultsFileOptionAscii = defaultsFileOption.toAscii();
+    QString databaseDirOption = "--datadir=";
+    databaseDirOption += databaseDir;
+    QByteArray databaseDirOptionAscii = databaseDirOption.toAscii();
+    char *mysqlServerArgs[3];
+    mysqlServerArgs[0] = "UNUSED";
+    mysqlServerArgs[1] = defaultsFileOptionAscii.data();
+    mysqlServerArgs[2] = databaseDirOptionAscii.data();
+    if( mysql_server_init( 3 , mysqlServerArgs, 0 ) != 0 )
     {
         error() << "MySQL library initialization failed.";
         reportError( "init" );
_______________________________________________
kde-freebsd mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-freebsd
See also http://freebsd.kde.org/ for latest information

Reply via email to