summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorheikki@hundin.mysql.fi <>2004-10-12 18:12:00 +0300
committerheikki@hundin.mysql.fi <>2004-10-12 18:12:00 +0300
commit41ab008a366b67d13431cf4977572713b9e1939e (patch)
treecb3364934fa98e85be0f7c9b45a2d7734b010b93
parent1ddec876d6810e23785cf55a54d96ec3dbbe6e85 (diff)
downloadmariadb-git-41ab008a366b67d13431cf4977572713b9e1939e.tar.gz
ha_innodb.cc:
Change error code to HA_ERR_ROW_IS_REFERENCED if we cannot DROP a parent table referenced by a FOREIGN KEY constraint; this error number is less misleading than the previous value HA_ERR_CANNOT_ADD_FOREIGN, but misleading still; we should introduce to 5.0 a proper MySQL error code
-rw-r--r--sql/ha_innodb.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index f149af85b3f..fa9537b3217 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -285,7 +285,7 @@ convert_error_code_to_mysql(
} else if (error == (int) DB_CANNOT_DROP_CONSTRAINT) {
- return(HA_ERR_CANNOT_ADD_FOREIGN); /* TODO: This is a bit
+ return(HA_ERR_ROW_IS_REFERENCED); /* TODO: This is a bit
misleading, a new MySQL error
code should be introduced */
} else if (error == (int) DB_COL_APPEARS_TWICE_IN_INDEX) {