diff options
author | He Zhenxing <zhenxing.he@sun.com> | 2009-03-09 16:42:31 +0800 |
---|---|---|
committer | He Zhenxing <zhenxing.he@sun.com> | 2009-03-09 16:42:31 +0800 |
commit | 6d3bdcf19087312ea82769be40183c8b3f161b7d (patch) | |
tree | 5e9c15e6a721ff3c177b93a8343977f855b2cfb6 /storage/myisammrg | |
parent | 5229ef4ac8d187760b2ed2c7a8108e03e3185da7 (diff) | |
parent | ec5e3b624c11566d6dc05c815d74dc22e29d9f1b (diff) | |
download | mariadb-git-6d3bdcf19087312ea82769be40183c8b3f161b7d.tar.gz |
Auto merge
Diffstat (limited to 'storage/myisammrg')
-rw-r--r-- | storage/myisammrg/ha_myisammrg.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/storage/myisammrg/ha_myisammrg.cc b/storage/myisammrg/ha_myisammrg.cc index d674f6bc150..5bd7c7dd05c 100644 --- a/storage/myisammrg/ha_myisammrg.cc +++ b/storage/myisammrg/ha_myisammrg.cc @@ -872,6 +872,16 @@ int ha_myisammrg::info(uint flag) table->s->crashed= 1; #endif stats.data_file_length= mrg_info.data_file_length; + if (mrg_info.errkey >= table_share->keys) + { + /* + If value of errkey is higher than the number of keys + on the table set errkey to MAX_KEY. This will be + treated as unknown key case and error message generator + won't try to locate key causing segmentation fault. + */ + mrg_info.errkey= MAX_KEY; + } errkey= mrg_info.errkey; table->s->keys_in_use.set_prefix(table->s->keys); stats.mean_rec_length= mrg_info.reclength; |