mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
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:
parent
1a44a2110c
commit
40c0fde904
1 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue