Bug 141252 - Database sharing broken, mysql client server
Summary: Database sharing broken, mysql client server
Status: RESOLVED NOT A BUG
Alias: None
Product: amarok
Classification: Applications
Component: general (other bugs)
Version First Reported In: 1.4.5
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-06 02:19 UTC by Andy
Modified: 2007-09-03 13:39 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andy 2007-02-06 02:19:28 UTC
Version:           1.4.5 (using KDE KDE 3.5.6)
Installed from:    Fedora RPMs
OS:                Linux

Even with DynamicCollection=false Amarok is not able to read a remote mysql database.

Database in on the server, machine A.  Client B is remote.

If I build the collection with machine A (which has the DB) no problems.

If I build the collection with machine B (machine A has the DB) works
no problems but breaks machine A.

If I go back and rebuild the collection with machine A, it breaks machine B.

I have tried with a 100% clean system/config files.

On each broken end I get no DB errors, just zero in the collection.

Now, more interesting.  On the broken machine, if I enter the
collection setup, set it to localhost (which has no DB) and click ok,
then go back to the collection setup and enter the remote machine with
the collection it shows up!  But only till I close/reopen Amarok, then
it is  gone again.
Comment 1 Maximilian Kossick 2007-02-06 09:23:51 UTC
Did you put DynamicCollection=false into the amarokrc on ALL computers which share the database?
Comment 2 Andy 2007-02-07 14:56:38 UTC
Yes DynamicCollection=false is/was on all ends.

Some additional info, I've now found that it "works" if I perform the collection scan from one of any of the clients.  In this case the Amarok app on the server also can connect.  This behavior is different than 1.4.4 and recent SVNs.

If I perform the collection scan on the server its self, the clients cannot use the sharded DB, no errors, just shows zero files in collection.

Perhaps this is acceptable?  In many cases the server is not likely to have Amarok installed?
Comment 3 Maximilian Kossick 2007-02-07 17:21:35 UTC
There shouldn't be any difference between Amarok on the server itself and Amarok on the clients. Please run the following sql query once after scanning from the client, and once after scanning from the server and post the results:

SELECT DISTINCT deviceid FROM tags;
Comment 4 Andy 2007-02-07 17:34:39 UTC
Interesting.

Currently with the DB built from the client the deviceid from tags is "-1", which happens to match:

[Collection Folders]
-1=./main/backup/MP3

On the server:

[Collection Folders]
2=./main/backup/MP3

If i rescanned on the server would deviceid likely = 2?
Comment 5 Maximilian Kossick 2007-02-07 17:40:05 UTC
You didn't add DynamicCollection=false to the amarokrc on your server, or the line is in the wrong group.
Comment 6 Andy 2007-02-07 17:42:08 UTC
Here it is:

[Collection]
DatabaseEngine=1
DynamicCollection=false
Monitor Changes=false
Comment 7 Andy 2007-02-07 17:49:50 UTC
OK, how about this?

On server I started v1.4.5 with a clean install, which means I had no amarokrc file, couldn't add the DynamicCollection switch.  So I fired Amarok for the firt time, added the music directory with the GUI, shut down Amarok, then added the switch.  

Adding the music directory without the switch probably made the deviceid 2.  Doing it in this order probably confuses Amarok?
Comment 8 Maximilian Kossick 2007-02-07 17:59:09 UTC
ok, you do have the correct line in the amarokrc. I really need the results of those sql queries then please.
Comment 9 Andy 2007-02-07 18:05:09 UTC
Ok, its a big DB, takes 4-5 hours, I'll start it when I get home.
Comment 10 Andy 2007-02-07 23:27:43 UTC
Scanning the collection on the server results in a deviceid of 2 in tags.  Scanning from any of the clients results in -1.
Comment 11 Andy 2007-02-08 02:24:48 UTC
Max,

I manually set -1 on the server, see below:

[Collection Folders]
-1=./main/backup/MP3 

Did a rescan and the deviceid in tags was again 2.  And the clients cannot connect.

I updated deviceid to -1 and all is good, on both server/client.

Comment 12 Andy 2007-02-09 00:15:06 UTC
Max, more info, didn't notice till now.

Even though on the server (I had to manually edit amarokrc and change 2 to -1):

[Collection Folders]
-1=./main/backup/MP3

SELECT * FROM `amarok`.`directories` shows:

./backup/MP3 for ALL directories

Shouldn't it be ./main/backup/MP3?

Amarok is unable to play cause it cannot find the files.


Comment 13 Andy 2007-04-23 13:52:43 UTC
Max, any updated info?
Comment 14 Jeff Mitchell 2007-09-03 04:08:23 UTC
He's probably waiting on info from you, since you never posted the results of the SQL queries.
Comment 15 Andy 2007-09-03 13:02:17 UTC
I did, comment #10.
Comment 16 Maximilian Kossick 2007-09-03 13:16:39 UTC
In that case: either you are using an old Amarok version on the server, or you did not add DynamicCollection=false to the server's armarokrc.
Comment 17 Andy 2007-09-03 13:25:00 UTC
Well, it was the most recent when this bug was posted, 1.4.5 and I posted my amarokrc entry which did include DynamicCollection=false.

If there have been changes since 1.4.5 I'm willing to test, if not I'd prefer not to again lose my collection stats.

I've worked around this bug by never scanning/updating from the server box.
Comment 18 Maximilian Kossick 2007-09-03 13:39:15 UTC
I don't remember when that switch in amarokrc was introduced (I think it was earlier than 1.4.5. But there is no way to get a deviceid of 2 when rescanning the collection if the Amarok version is recent enough and it has been correctly switched off in the amarokrc file that the Amarok instance is using.