Skip to content

Commit ef67c3a

Browse files
author
Jan Lindström
committed
MDEV-6443: Server crashed with assertaion failure in file ha_innodb.cc
line 8473 In case InnoDB index is not found, print the MySQL and InnoDB index name we were trying to find and all MySQL and InnoDB index names there is for this table.
1 parent fe3859c commit ef67c3a

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

storage/innobase/handler/ha_innodb.cc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7969,6 +7969,21 @@ ha_innobase::innobase_get_index(
79697969
keynr, key ? key->name : "NULL",
79707970
index->name,
79717971
prebuilt->table->name);
7972+
7973+
for(ulint i=0; i < table->s->keys; i++) {
7974+
index = innobase_index_lookup(share, i);
7975+
key = table->key_info + keynr;
7976+
7977+
if (index) {
7978+
7979+
fprintf(stderr, "InnoDB: [Note] Index for key no %u"
7980+
" mysql name %s , InnoDB name %s for table %s\n",
7981+
keynr, key ? key->name : "NULL",
7982+
index->name,
7983+
prebuilt->table->name);
7984+
}
7985+
}
7986+
79727987
}
79737988

79747989
ut_a(ut_strcmp(index->name, key->name) == 0);

storage/xtradb/handler/ha_innodb.cc

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8480,6 +8480,20 @@ ha_innobase::innobase_get_index(
84808480
keynr, key ? key->name : "NULL",
84818481
index->name,
84828482
prebuilt->table->name);
8483+
8484+
for(ulint i=0; i < table->s->keys; i++) {
8485+
index = innobase_index_lookup(share, i);
8486+
key = table->key_info + keynr;
8487+
8488+
if (index) {
8489+
8490+
fprintf(stderr, "InnoDB: [Note] Index for key no %u"
8491+
" mysql name %s , InnoDB name %s for table %s\n",
8492+
keynr, key ? key->name : "NULL",
8493+
index->name,
8494+
prebuilt->table->name);
8495+
}
8496+
}
84838497
}
84848498

84858499
ut_a(ut_strcmp(index->name, key->name) == 0);
@@ -18490,7 +18504,7 @@ ib_senderrf(
1849018504

1849118505
va_start(args, code);
1849218506

18493-
myf l;
18507+
myf l=0;
1849418508

1849518509
switch(level) {
1849618510
case IB_LOG_LEVEL_INFO:

0 commit comments

Comments
 (0)