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
This commit is contained in:
heikki@hundin.mysql.fi 2004-09-01 16:41:09 +03:00
parent 1a44a2110c
commit 40c0fde904

View file

@ -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);