Bug 1799 - Slimserver 6.1b2 crashes on updating MySQL
: Slimserver 6.1b2 crashes on updating MySQL
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Database
: 6.1.0
: PC Linux (other)
: P2 normal (vote)
: Future
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-07-11 10:38 UTC by parpar
Modified: 2011-03-16 04:19 UTC (History)
0 users

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description parpar 2005-07-11 10:38:29 UTC
Apparently the MySQL contains constraints that aren't followed when updating 
the database. MySQL version is 4.0.20 on Mandrake 10.2. I have rebuilt the 
database tables & contents  entirely from an empty database. Only on updates 
(automatic or by pressing 'rescan') the following error is emitted 
(with ./slimserver.pl --diag):

DBD::mysql::st execute failed: Cannot delete or update a parent row: a foreign k
ey constraint fails at /usr/local/slimserver/CPAN/DBIx/ContextualFetch.pm line 5
1.
Uncaught exception from user code:
        Can't delete file:///opt/mp3/The_Beach_Boys_-_Sounds_of_Summer/03%20-%20
Beach%20Boys%20-%20Surfin%27%20Safari%20-%20EMG%20-%20www.elitemusic.es.mn.mp3:
DBD::mysql::st execute failed: Cannot delete or update a parent row: a foreign k
ey constraint fails at /usr/local/slimserver/CPAN/DBIx/ContextualFetch.pm line 5
1.
 at /usr/local/slimserver/Slim/DataStores/DBI/DBIStore.pm line 539
 at /usr/local/slimserver/CPAN/Class/DBI.pm line 230
        Class::DBI::_croak('Slim::DataStores::DBI::Track=HASH(0x9a9ddb0)', 'Can\
't delete file:///opt/mp3/The_Beach_Boys_-_Sounds_of_Summ...', 'err', 'DBD::mysq
l::st execute failed: Cannot delete or update a pare...') called at /usr/local/s
limserver/CPAN/Class/DBI.pm line 793
        Class::DBI::delete('Slim::DataStores::DBI::Track=HASH(0x9a9ddb0)') calle
d at /usr/local/slimserver/Slim/DataStores/DBI/DBIStore.pm line 539
        Slim::DataStores::DBI::DBIStore::delete('Slim::DataStores::DBI::DBIStore
=HASH(0x9a88a48)', 'Slim::DataStores::DBI::Track=HASH(0x9a9ddb0)', 0) called at
/usr/local/slimserver/Slim/DataStores/DBI/DBIStore.pm line 765
        Slim::DataStores::DBI::DBIStore::forceCommit('Slim::DataStores::DBI::DBI
Store=HASH(0x9a88a48)') called at /usr/local/slimserver/Slim/DataStores/DBI/DBIS
tore.pm line 988
        Slim::DataStores::DBI::DBIStore::_commitDBTimer('Slim::DataStores::DBI::
DBIStore=HASH(0x9a88a48)') called at /usr/local/slimserver/Slim/Utils/Timers.pm
line 100
        Slim::Utils::Timers::checkTimers() called at ./slimserver.pl line 641
        main::idle() called at ./slimserver.pl line 579
        main::main() called at ./slimserver.pl line 1170
Comment 1 Dan Sully 2005-07-11 11:22:16 UTC
MySQL is not officially supported.

You should be using 4.1 anyways.
Comment 2 parpar 2005-07-11 22:57:29 UTC
Upgraded to 4.1.12 last night, but that doesn't help....

I know mySQL is not supported, but I have it running anyways, so comes kinda 
cheap and I happen to like my music library queryable.
Your support is much appreciated!! 
Comment 3 KDF 2006-01-29 04:32:05 UTC
is this really still an issue?
Comment 4 parpar 2006-01-29 12:27:03 UTC
Subject: Re:  Slimserver 6.1b2 crashes on updating MySQL

Thanks for informing! Well as it stands, I have moved my Slim databases  
 from MySQL to SQLLite, since that is supported. With SQLLite I don't have  
any problems.
If you like, I could enable MySQL again and see if the problem still  
exists.

Cheers,

Paul

On Sun, 29 Jan 2006 13:32:05 +0100, Slim Devices Bugzilla  
<bugs@bugs.slimdevices.com> wrote:

>
> ------- Comment #3 from slim-mail@deane-freeman.com  2006-01-29 04:32  
> -------
> is this really still an issue?
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.



Comment 5 Dan Sully 2006-04-10 22:10:18 UTC
This has been fixed in the mysql schemas.
Comment 6 parpar 2006-04-11 00:29:21 UTC
(In reply to comment #5)
> This has been fixed in the mysql schemas.
> 

Thanks Dan, really great! I assume this is in the daily dev branch or can I download the new schemas separately?

Comment 7 Dan Sully 2006-04-11 07:25:13 UTC
Probably the easiest thing to do is edit your existing SQL/mysql/dbcreate.sql script, and change all occurences of 'NO ACTION' to 'CASCADE'
Comment 8 James Richardson 2008-12-15 13:06:50 UTC
This bug appears to have been fixed in the latest release!

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.

Make sure to include the version number of the software you are seeing the error with.