Commit 06959e0e authored by unknown's avatar unknown
Browse files

ha_innodb.cc:

  If ALTER TABLE ... DROP FOREIGN KEY ... fails because of a wrong constraint name, return a table handler error number 150 instead of 152; the value 152 was misleading, as it referred to '152 = Cannot delete a parent row', whereas '150 = Foreign key constraint is incorrectly formed' is less misleading


sql/ha_innodb.cc:
  If ALTER TABLE ... DROP FOREIGN KEY ... fails because of a wrong constraint name, return a table handler error number 150 instead of 152; the value 152 was misleading, as it referred to '152 = Cannot delete a parent row', whereas '150 = Foreign key constraint is incorrectly formed' is less misleading
parent 8133ce04
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -285,8 +285,9 @@ convert_error_code_to_mysql(

        } else if (error == (int) DB_CANNOT_DROP_CONSTRAINT) {

    		return(HA_ERR_ROW_IS_REFERENCED);

    		return(HA_ERR_CANNOT_ADD_FOREIGN); /* TODO: This is a bit
						misleading, a new MySQL error
						code should be introduced */
        } else if (error == (int) DB_COL_APPEARS_TWICE_IN_INDEX) {

    		return(HA_ERR_CRASHED);