re: corrupt coredata DB
re: corrupt coredata DB
- Subject: re: corrupt coredata DB
- From: Ben Trumbull <email@hidden>
- Date: Wed, 8 Oct 2008 12:43:38 -0700
Marc,
Looks like it's trying to delete the object repeatedly in the database
but it can't and then rolls back and tries again. By looking inside
the sqlite database directly through sqlite3 tool I see that the tuple
that coredata is trying to delete has Z_OPT equal to null:
That looks bad, and it looks like you have enough information to be
worth filing a bug. What version of OSX are you on ?
Two other things you can do are (a) run "pragma integrity_check" on
the db file, and (b) "delete from zplayedtrack where z_pk in (660, 661)"
CD shouldn't ever get into that situation, so the SQL generation isn't
expecting it. The clause Z_OPT = ? where ? is bound to NULL is
wrong. NULL can only be meaningfully compared with "is null" or "is
not null", the standard operators don't work as expected in SQL. So
the row doesn't match, because nothing is ever "=" to NULL in SQL, and
we realize we failed to delete it and try again...again...again
- Ben
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden