summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <ingo/mydev@chilla.local>2006-07-29 21:58:50 +0200
committerunknown <ingo/mydev@chilla.local>2006-07-29 21:58:50 +0200
commit721b1d7fc69a32fab4c055691e8ee1fb93e0abda (patch)
treeb42dfd70ebe2ad04b956a88dd77cebfc08dbd45d
parenta01daf8000f2776c09bc95ddddaff0a1176ee1c2 (diff)
downloadmariadb-git-721b1d7fc69a32fab4c055691e8ee1fb93e0abda.tar.gz
Bug#20719 - Reading dynamic records with write buffer could fail
After merge fix
-rw-r--r--myisam/mi_dynrec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/myisam/mi_dynrec.c b/myisam/mi_dynrec.c
index 51f2ff349f8..4dec3055fa1 100644
--- a/myisam/mi_dynrec.c
+++ b/myisam/mi_dynrec.c
@@ -1141,6 +1141,9 @@ int _mi_read_dynamic_record(MI_INFO *info, my_off_t filepos, byte *buf)
block_info.second_read= 0;
do
{
+ /* A corrupted table can have wrong pointers. (Bug# 19835) */
+ if (filepos == HA_OFFSET_ERROR)
+ goto panic;
if (info->opt_flag & WRITE_CACHE_USED &&
info->rec_cache.pos_in_file < filepos + MI_BLOCK_INFO_HEADER_LENGTH &&
flush_io_cache(&info->rec_cache))