Bug 2840 - Crash during scanning when using MySQL
: Crash during scanning when using MySQL
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Database
: 6.5b1
: PC Windows XP
: P2 major (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-19 16:01 UTC by Chris
Modified: 2008-09-15 14:39 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 Chris 2006-01-19 16:01:08 UTC
I also get the following error when I start a scan using MySQL:

2006-01-14 22:32:15.4961 directory entry: file:///L:/Music/Charvie/Alanis%20Mor
issette/Jagged%20Little%20Pill/01%20All%20I%20Really%20Want.mp3
2006-01-14 22:32:15.8415 DBD::mysql::st execute failed: Field 'contributor' does
n't have a default value at C:/Program Files/SlimServer_svn/server/Slim/DataStor
es/DBI/DataModel.pm line 907.
Can't insert new Slim::DataStores::DBI::Album: DBD::mysql::st execute failed: Fi
eld 'contributor' doesn't have a default value at C:/Program Files/SlimServer_sv
n/server/Slim/DataStores/DBI/DataModel.pm line 907.
at C:/Program Files/SlimServer_svn/server/Slim/DataStores/DBI/DBIStore.pm line
1879


If I remove the NOT NULL attribute from the Album Contributor field in the file mysql/dbcreate.sql, the problem goes away.

I'm not sure if a null contributor is valid? If it is valid, the NOT NULL attribute should be removed from the code. If its not valid (ie my tags are screwed), then SlimServer should catch the error condition instead of crashing.
Comment 1 Dan Sully 2006-04-10 22:19:58 UTC
Chris - do you still have this issue with the latest nightly builds?

Thanks.
Comment 2 Chris 2006-04-13 09:44:50 UTC
Hi Dan,

Using svn r6921, I get the following error:

2006-04-13 17:38:00.1179 DBD::mysql::st execute failed: Field 'contributor' doesn't have a default value at C:/Program Files/SlimServer_svn/server/Slim/DataStores/DBI/DataModel.pm line 935.
Can't insert new Slim::DataStores::DBI::Album: DBD::mysql::st execute failed: Field 'contributor' doesn't have a default value at C:/Program Files/SlimServer_svn/server/Slim/DataStores/DBI/DataModel.pm line 935. at C:/Program Files/SlimServer_svn/server/Slim/DataStores/DBI/DBIStore.pm line 1908


If I remove the NOT NULL attribute from the Album Contributor field, the problem goes away.

This problem also occurs on the split-scanner branch.

Cheers
Chris
Comment 3 Dan Sully 2006-04-13 09:49:20 UTC
Thanks Chris - do you happen to have a corresponding audio file that is causing the crash? And if so, can you send it to me, or attach to the bug?

Thanks.
Comment 4 Dan Sully 2006-04-13 10:30:08 UTC
I've checked in a schema update as change 6923
Comment 5 Chris 2006-04-13 10:39:55 UTC
Looks good - I think this bug can be closed now.

Thanks!!
Chris