Manual port Bug #Bug #54582 "stack overflow when opening many tables

linked with foreign keys at once" from mysql-5.1-security to
mysql-5.5-security again.

rb://391 approved by Heikki
This commit is contained in:
Jimmy Yang 2010-10-06 06:55:34 -07:00
commit 35f5429eda
9 changed files with 139 additions and 11 deletions

View file

@ -901,6 +901,19 @@ convert_error_code_to_mysql(
case DB_INTERRUPTED:
my_error(ER_QUERY_INTERRUPTED, MYF(0));
/* fall through */
case DB_FOREIGN_EXCEED_MAX_CASCADE:
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
HA_ERR_ROW_IS_REFERENCED,
"InnoDB: Cannot delete/update "
"rows with cascading foreign key "
"constraints that exceed max "
"depth of %d. Please "
"drop extra constraints and try "
"again", DICT_FK_MAX_RECURSIVE_LOAD);
/* fall through */
case DB_ERROR:
default:
return(-1); /* unspecified error */