diff options
Diffstat (limited to 'innobase/dict/dict0dict.c')
-rw-r--r-- | innobase/dict/dict0dict.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c index a6f268c2153..7c166ecd068 100644 --- a/innobase/dict/dict0dict.c +++ b/innobase/dict/dict0dict.c @@ -2805,6 +2805,12 @@ dict_update_statistics_low( index = dict_table_get_first_index(table); + if (index == NULL) { + /* Table definition is corrupt */ + + return; + } + while (index) { size = btr_get_size(index, BTR_TOTAL_SIZE); @@ -3196,6 +3202,14 @@ dict_print_info_on_foreign_keys( buf2 += sprintf(buf2, ")"); + if (foreign->type == DICT_FOREIGN_ON_DELETE_CASCADE) { + buf2 += sprintf(buf2, " ON DELETE CASCADE"); + } + + if (foreign->type == DICT_FOREIGN_ON_DELETE_SET_NULL) { + buf2 += sprintf(buf2, " ON DELETE SET NULL"); + } + foreign = UT_LIST_GET_NEXT(foreign_list, foreign); } |