I was trying to set the parent case on two cases, and got an error. Now when I try to set the parent case of the second of the two cases I get this error. Is there a way to fix my database?
FogBugz Internal Error
An internal error occurred in FogBugz. If you are unsure of how to fix this error, and you have made no changes to the source code of FogBugz, please report this error to Fog Creek Software by clicking "Submit."
Error: Duplicate entry '109' for key 'PRIMARY'
SQL: INSERT INTO FBLock (sLock, sKey) VALUES (?, '')
Params: S
1: NestedSetRoot_98
Stack Trace: Show Stack TraceHide Stack Trace
Wasabi.Runtime.WasabiException (0x80004005): Duplicate entry '109' for key 'PRIMARY'
SQL: INSERT INTO FBLock (sLock, sKey) VALUES (?, '')
Params: S
1: NestedSetRoot_98
MySql.Data.MySqlClient.MySqlException: Duplicate entry '109' for key 'PRIMARY'
at MySql.Data.MySqlClient.MySqlStream.OpenPacket () [0x00000]
at MySql.Data.MySqlClient.NativeDriver.ReadResult (System.UInt64& affectedRows, System.Int64& lastInsertId) [0x00000]
at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet () [0x00000]
at MySql.Data.MySqlClient.MySqlDataReader.NextResult () [0x00000]
at Wasabi.Runtime.Error.Raise (Int32 number, System.String source, System.String description, System.String helpfile, Nullable`1 helpcontext) [0x00000]
at FogCreek.FogBugz.CCmd.ExecuteNonQuery (Nullable`1 nCacheClearLevel) [0x00000]
at FogCreek.FogBugz.CLock.EnsureOneRow (System.String sLock) [0x00000]
at FogCreek.FogBugz.CLock.GetLock (System.String sLock, Int32 cSecondsValid, System.Boolean& fBrokeLock, Nullable`1 fForceTake) [0x00000]
at FogCreek.FogBugz.CLock.GetLockOrSpin (System.String sLock, Int32 cSecondsValid, System.Boolean& fBrokeLock, Int32 cSecondsSpin) [0x00000]
at FogCreek.FogBugz.BugOutlineUpdate.GetLockForRoot (Int32 ixRoot) [0x00000]
at FogCreek.FogBugz.BugOutlineUpdate.AppendToParent (Int32 ixBug, Int32 ixBugParent) [0x00000]
at FogCreek.FogBugz.CBug.CommitNewParent () [0x00000]
at FogCreek.FogBugz.CBug.CommitBug (Int32 ixPerson, Nullable`1 fCleaned, FogCreek.FogBugz.CBugEvent bugevent) [0x00000]
at FogCreek.FogBugz.CBug.CommitBugWithEvent (BugAction nBugAction, System.String sPathToUploadedFile, FogCreek.FogBugz.CBugEvent bugevent, Nullable`1 fPublic) [0x00000]
at FogCreek.FogBugz.CBug.Edit (Int32 ixPerson, System.String sEvent, System.String sPathToUploadedFile, Boolean fFormatEventAsEmail, Boolean fAutoCreated, Boolean fResolveChildrenIfParentResolved, Wasabi.Runtime.Mail.MailMessage msgEmail) [0x00000]
at (wrapper remoting-invoke-with-check) FogCreek.FogBugz.CBug:Edit (int,string,string,bool,bool,bool,Wasabi.Runtime.Mail.MailMessage)
at FogCreek.FogBugz.__Global.SubmitBug (System.Boolean& fNewBug, System.String& sCommand, System.Boolean& fCancel, System.String& sErrorFileTooLong, System.String& sErrorFileNotFound, System.String& sError, System.String& sWarnTitle, System.String& sWarnBody, System.String& sWarnAttachment, System.Int32& ixScreenshotTry, Boolean fAlaCarte, Boolean fActionTokenOK) [0x00000]
at FogCreek.FogBugz.__Global.RawpreSubmitBug () [0x00000]
at FogCreek.FogBugz.__Global.preSubmitBug () [0x00000]
at FogCreek.FogBugz.__Global.RunPre () [0x00000]
at FogCreek.FogBugz.__Global.RawRunFogBugz () [0x00000]
at FogCreek.FogBugz.__Global.RunFogBugz () [0x00000]
at FogCreek.FogBugz.__Global.StartDefault () [0x00000]
at FogCreek.FogBugz.HttpHandler.ProcessRequest (System.Web.HttpContext context) [0x00000]
Browser: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.2.8) Gecko/20100723 Linux Mint/8 (Helena) Firefox/3.6.8
Update
I found this in the administration page that looks like the original error received when trying to set the parent case:
23/10/2010 12:55 (GMT+01:00): System.Threading.ThreadAbortException: Thread was being aborted
at FogCreek.FogBugz.CCmd.ExecuteNonQuery (Nullable`1 nCacheClearLevel) [0x00000]
at FogCreek.FogBugz.CLock.ReleaseLock (System.String sLock, System.String sKey) [0x00000]
at FogCreek.FogBugz.CDbSession.ReleaseWriteLock (System.String sSessionId, System.String sKey) [0x00000]
at FogCreek.FogBugz.CDbSession.Commit () [0x00000]
at FogCreek.FogBugz.__Global.DbSessionCommit () [0x00000]
Thanks
Richard