Commit 06959e0e authored by unknown's avatar unknown

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
...@@ -285,8 +285,9 @@ convert_error_code_to_mysql( ...@@ -285,8 +285,9 @@ convert_error_code_to_mysql(
} else if (error == (int) DB_CANNOT_DROP_CONSTRAINT) { } 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) { } else if (error == (int) DB_COL_APPEARS_TWICE_IN_INDEX) {
return(HA_ERR_CRASHED); return(HA_ERR_CRASHED);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment