Details
-
Suggestion
-
Resolution: Won't Fix
-
None
-
None
Description
Changing to an improvement request because it turns out its not a bug, but the customer data was somehow missing certain constraints on the database.
You get the following error.
Caused by: com.cenqua.crucible.hibernate.CruDBException: SQL script error on line 12: "alter table cru_completed_frx drop foreign key FK927E9E9F1BD6EA47;" (Error on rename of './fisheye/cru_completed_frx' to './fisheye/#sql2-148e-586' (errno: 152)), please contact http://www.atlassian.com/support/ at com.cenqua.crucible.hibernate.DefaultDBControl.executeScript(DefaultDBControl.java:395) at com.cenqua.crucible.hibernate.DefaultDBControl.executeScript(DefaultDBControl.java:347) at com.cenqua.crucible.hibernate.DefaultDBControl.doUpgrade(DefaultDBControl.java:332) at com.cenqua.crucible.hibernate.DefaultDBControl.upgrade(DefaultDBControl.java:306) ... 93 more Caused by: java.sql.SQLException: Error on rename of './fisheye/cru_completed_frx' to './fisheye/#sql2-148e-586' (errno: 152) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3558) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3490) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2109) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2642) at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1647) at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1566) at com.cenqua.crucible.hibernate.DefaultDBControl.executeScript(DefaultDBControl.java:377) ... 96 more
If its possible, we should check to see if the constraint exists before trying to drop it. If it doesn't exist its no big deal in this case because we were dropping the table right afterwards.