deleting projects not working if build-results exist
----------------------------------------------------

                 Key: CONTINUUM-1813
                 URL: http://jira.codehaus.org/browse/CONTINUUM-1813
             Project: Continuum
          Issue Type: Bug
          Components: Database
    Affects Versions: 1.1
         Environment: MySQL-version is 5.0.32
driver-version is mysql-connector-java-5.1.6-bin.jar

            Reporter: Marc Lustig


If build-results (failure or success) exist, then the project doesn't get 
deleted. The following error's occur:

javax.jdo.JDODataStoreException: Delete request failed: DELETE FROM `PROJECT` 
WHERE `ID` = ? NestedThrowables: 
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: 
Cannot delete or update a parent row: a foreign key constraint fails 
(`continuum/BUILDRESULT`, CONSTRAINT `BUILDRESULT_FK3` FOREIGN KEY 
(`PROJECT_ID_OID`) REFERENCES `PROJECT` (`ID`))

or 

javax.jdo.JDODataStoreException: Update request failed: UPDATE `BUILDRESULT` 
SET `BUILD_DEFINITION_ID_OID`=?, `BUILD_NUMBER`=?, `END_TIME`=?, `ERROR`=?, 
`EXIT_CODE`=?, `MODEL_ENCODING`=?, `PROJECT_ID_OID`=?, `START_TIME`=?, 
`RESULTSTATE`=?, `SUCCESS`=?, `RESULTTRIGGER`=? WHERE `ID`=? NestedThrowables: 
com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock 
found when trying to get lock; try restarting transaction


After deleting all build-results, the project can be deleted.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to