• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
re: corrupt coredata DB
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: corrupt coredata DB
      • From: Marc Monguio <email@hidden>
  • Prev by Date: Re: CALayer bounds with ResizeAspect mask?
  • Next by Date: Re: NSPersistentDocument No Support "Save To" ("Save As"?)
  • Previous by thread: Re: corrupt coredata DB
  • Next by thread: Re: corrupt coredata DB
  • Index(es):
    • Date
    • Thread