diff options
author | Sergei Golubchik <sergii@pisem.net> | 2010-10-19 15:58:35 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2010-10-19 15:58:35 +0200 |
commit | 745cc74c3301f193c7b82c31d11c3bf0c842be9e (patch) | |
tree | 4aa6101c051c91607d2623eed26fb41527fd0bd3 /storage/innodb_plugin/include/dict0mem.h | |
parent | f0c6576b85a57ec82fd911f73cce7c99683b378c (diff) | |
parent | cc6d22f5356e0969d8d5d1046edc69cb17ea19fb (diff) | |
download | mariadb-git-745cc74c3301f193c7b82c31d11c3bf0c842be9e.tar.gz |
5.1.51 merge
Diffstat (limited to 'storage/innodb_plugin/include/dict0mem.h')
-rw-r--r-- | storage/innodb_plugin/include/dict0mem.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/storage/innodb_plugin/include/dict0mem.h b/storage/innodb_plugin/include/dict0mem.h index 2fce1e00927..19782c2e76a 100644 --- a/storage/innodb_plugin/include/dict0mem.h +++ b/storage/innodb_plugin/include/dict0mem.h @@ -112,6 +112,21 @@ ROW_FORMAT=REDUNDANT. */ in table->flags. */ /* @} */ +/** Tables could be chained together with Foreign key constraint. When +first load the parent table, we would load all of its descedents. +This could result in rescursive calls and out of stack error eventually. +DICT_FK_MAX_RECURSIVE_LOAD defines the maximum number of recursive loads, +when exceeded, the child table will not be loaded. It will be loaded when +the foreign constraint check needs to be run. */ +#define DICT_FK_MAX_RECURSIVE_LOAD 250 + +/** Similarly, when tables are chained together with foreign key constraints +with on cascading delete/update clause, delete from parent table could +result in recursive cascading calls. This defines the maximum number of +such cascading deletes/updates allowed. When exceeded, the delete from +parent table will fail, and user has to drop excessive foreign constraint +before proceeds. */ +#define FK_MAX_CASCADE_DEL 300 /**********************************************************************//** Creates a table memory object. @@ -434,6 +449,12 @@ struct dict_table_struct{ NOT allowed until this count gets to zero; MySQL does NOT itself check the number of open handles at drop */ + unsigned fk_max_recusive_level:8; + /*!< maximum recursive level we support when + loading tables chained together with FK + constraints. If exceeds this level, we will + stop loading child table into memory along with + its parent table */ ulint n_foreign_key_checks_running; /*!< count of how many foreign key check operations are currently being performed |