Bug 15092 - Foreign key constraint error when rescanning
: Foreign key constraint error when rescanning
Status: RESOLVED WONTFIX
Product: Logitech Media Server
Classification: Unclassified
Component: Database
: 7.4.1
: PC Ubuntu Linux
: P3 normal (vote)
: ---
Assigned To: Squeezebox QA Team email alias
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-10 17:10 UTC by David Kågedal
Modified: 2011-01-14 00:56 UTC (History)
1 user (show)

See Also:
Category: Bug


Attachments
Error log (2.03 KB, text/plain)
2009-11-10 17:10 UTC, David Kågedal
Details
log (3.09 KB, text/plain)
2009-11-10 17:18 UTC, David Kågedal
Details
cue file (2.88 KB, text/plain)
2009-11-11 08:39 UTC, David Kågedal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Kågedal 2009-11-10 17:10:13 UTC
Created attachment 6291 [details]
Error log

I did a full rescan by running

$ squeezeboxserver-scanner --wipe

At the end, I got: Cannot add or update a child row: a foreign key constraint
fails (`slimserver/contributor_album`, CONSTRAINT `contributor_album_ibfk_1`
FOREIGN KEY (`album`) REFERENCES `albums` (`id`) ON DELETE CASCADE)

See attached file for a more complete log.

I'm running Ubuntu 9.04 (jaunty) with the latest deb from your repository
(which is squeezeboxserver 7.4.1).
Comment 1 David Kågedal 2009-11-10 17:18:25 UTC
Created attachment 6292 [details]
log

I noticed at least one album was still missing, so I tried scanning just for it. The result was another internal error, which is perhaps related.

[09-11-11 02:10:41.4455] Slim::Formats::Playlists::parseList (83) Error: While running $playlistClass->read(): [Can't call method "title" on an undefined value at /usr/share/perl5/Slim/Schema.pm line 2337.

I'm attaching the full log of running 

$ squeezeboxserver-scanner /vault/Musik/Library/cue/david/Ray\ Abshire\ --\ Arrête\ pas\ la\ musique

But maybe I should have opened a separate bug report for this.
Comment 2 James Richardson 2009-11-11 07:35:41 UTC
David: thank you for the logs, can you attach a sample track/album (the one that is failing) to the bug so we can reproduce it locally
Comment 3 David Kågedal 2009-11-11 08:39:20 UTC
Created attachment 6294 [details]
cue file

There are two problems here, and I don't know how they relate. The "can't call method 'title'" is perhaps the old bug of non-ASCII characters in the path. I'm attaching the cue file, but see the log file for the full path to its location. The path to the referenced flac file also has non-ASCII.

The foreign key problem is maybe an effect of this, or perhaps completely unrelated.
Comment 4 Chris Owens 2010-03-08 11:17:21 UTC
Moving P3 and lower bugs to next release target
Comment 5 Chris Owens 2010-05-20 15:09:51 UTC
Is this causing an issue other than the scanner error?  I.e. is the affected file not getting added correctly to the database?
Comment 6 Alan Young 2011-01-14 00:56:17 UTC
Move to Sqlite in 7.6 makes this obsolete