Bug 223216 - Amarok fails to scan collection if $HOME/.my.cnf exists
Summary: Amarok fails to scan collection if $HOME/.my.cnf exists
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Collections/Local (show other bugs)
Version: 2.2.2
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-17 23:36 UTC by Gunter Ohrner
Modified: 2010-11-22 11:21 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.3.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gunter Ohrner 2010-01-17 23:36:21 UTC
Version:           2.2.1 (using KDE 4.3.3)
OS:                Linux
Installed from:    Debian testing/unstable Packages

Amarok 2.2.x did only show an empty collection an my machine while Amarok 2.1.x did work just fine.

The debug log shows tons of the following messages.

amarok:    [ERROR!] Tried to perform escape() on uninitialized MySQL                                                                                                                    
amarok:    [ERROR!] Tried to perform insert on uninitialized MySQL

In Debian bug 549543 (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=549543) the same problem is mentioned and the reporter found its cause, he and I both had a ~/.my.cnf mysql configuration file.

Renaming this file works, but is no option for me.
Comment 1 Myriam Schweingruber 2010-01-17 23:43:35 UTC
Gunter, can you please test again with Amarok 2.2.2?
Comment 2 Gunter Ohrner 2010-01-18 00:23:04 UTC
I just tried, no change, sorry.
Comment 3 Myriam Schweingruber 2010-01-18 12:55:28 UTC
Jeff, is this a bug on our side?
Comment 4 Jeff Mitchell 2010-01-18 17:51:55 UTC
Never heard of this before. I'm pretty sure we pass in the location of the my.cnf to use, so probably one of the following is happening:

1) I'm wrong and we're not passing it in.
2) We're passing it in, but it's empty or nonexistent, and MySQL decides to then look at a ~/.my.cnf
3) It's some sort of MySQL bug.

I'll take a look at this soon.
Comment 5 Gunter Ohrner 2010-01-18 22:37:07 UTC
Actually, if the following is the my.cnf file Amarok is supposed to use, it IS empty, in fact:

$ ls -la .kde/share/apps/amarok/my.cnf
-rw------- 1 gunter gunter 0 12. Jan 2009  .kde/share/apps/amarok/my.cnf

The question is, what should be contained therein, and why isn't it?

Also, the bug occured on my system soon or immediately after upgrading to Amarok 2.2.x, just as Jeremy describes in Debian bug #549543 - so maybe it's a Debian related issue, after all?
Comment 6 Jeff Mitchell 2010-01-18 22:47:22 UTC
(In reply to comment #5)
> The question is, what should be contained therein, and why isn't it?

Nothing. It's supposed to be empty. All needed parameters are passed in when the plugin is loaded. I think that mysql actually creates that file on its own.
 
> Also, the bug occured on my system soon or immediately after upgrading to
> Amarok 2.2.x, just as Jeremy describes in Debian bug #549543 - so maybe it's a
> Debian related issue, after all?

Maybe. Will report back after checking here on Arch.
Comment 7 fermulator 2010-07-06 07:25:17 UTC
I'm having those same error messages, but I do not have a my.cnf conf file.

fermulator@fermmy:~$ ls -al ~ | grep cnf
fermulator@fermmy:~$ ls -al ~/.kde/share/apps/amarok | grep cnf
-rw-r--r-- 1 fermulator fermulator       0 2010-07-04 01:32 my.cnf
fermulator@fermmy:~$ cat ~/.kde/share/apps/amarok/my.cnf

Running:
 * Ubuntu 10.04
 * Amarok 2.3.1
 * KDE 4.4.2
Comment 8 fermulator 2010-07-06 07:26:21 UTC
NOTE:  Trying to use an "external MySQL" database.
Comment 9 Ralf Engels 2010-11-19 18:00:50 UTC
Can this error be reproduced.
I tried it with a recent git version and a ~/.my.cnf is ignored and the correct configuration file written with every Amarok start.
Comment 10 Jeff Mitchell 2010-11-19 18:06:36 UTC
Amarok now explicitly sets the my.cnf that it uses.