Bug 133319 - Amarok does not read Statistics table after a database restore
Summary: Amarok does not read Statistics table after a database restore
Status: RESOLVED NOT A BUG
Alias: None
Product: amarok
Classification: Applications
Component: general (other bugs)
Version First Reported In: 1.4.2
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-31 08:03 UTC by Bearcat M. Sandor
Modified: 2008-10-29 05:00 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bearcat M. Sandor 2006-08-31 08:03:00 UTC
Version:            (using KDE KDE 3.4.2)
Installed from:    Compiled From Sources
Compiler:          gcc 4.0.3 
OS:                Linux

I backed up my postgresql amarok database via pg_dump.  I installed amarok 1.4.2 and encountered the database problems others are experiencing. I removed 1.4.2 and reinstalled 1.4.1. I dropped the database and created a new one giving all privileges to the user that amarok logs in with.  I imported the saved 1.4.1 database back into the new db.

I browse the data in the Statistics table and see that there are some 3k records.  I close my postgresql session. I fire up amarok and play a track that according to the Statistics table i have played 20 times. Amarok tells me it has never been played before. I stop the track and close amarok. Looking at the table i see that it now has a playcount of 1.

While i see why Amarok would write out the playcount and playdate info on exiting, why is Amarok not reading in the Statistics table of a new database?
Comment 1 Bearcat M. Sandor 2006-08-31 08:17:11 UTC
Also, note i have seen the same behavior with mysql.

I am running postgresql 8.1.4

Thanks all
Comment 2 Christer Ekholm 2006-09-24 01:27:10 UTC
I had the same problem and managed to get all my statistics back by doing

   update statistics set deviceid='-1' where deviceid!='-1';

After restoring the amarok database.  I don't know why this works and I don't know what the deviceid column is used for. But perhaps a developer reading this can explain?
Comment 3 Seb Ruiz 2008-10-29 05:00:50 UTC
Can't find the duplicate, but we know of this problem. CLosing.