diff options
author | monty@hundin.mysql.fi <> | 2001-11-22 13:50:50 +0200 |
---|---|---|
committer | monty@hundin.mysql.fi <> | 2001-11-22 13:50:50 +0200 |
commit | 9209210d30e5bd29f4df30f208f6e91cee3e089b (patch) | |
tree | 8c1d3e9b787e1017fce3c9e905b829557889f97a /myisam/mi_packrec.c | |
parent | c6b3afe2d743fd75a96debea3adc591f1ef47faa (diff) | |
download | mariadb-git-9209210d30e5bd29f4df30f208f6e91cee3e089b.tar.gz |
Fix bug when repairing compressed MyISAM files
LOCATE() is now case sensitive
Diffstat (limited to 'myisam/mi_packrec.c')
-rw-r--r-- | myisam/mi_packrec.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/myisam/mi_packrec.c b/myisam/mi_packrec.c index 31be2113c20..00e2c05ef5e 100644 --- a/myisam/mi_packrec.c +++ b/myisam/mi_packrec.c @@ -785,7 +785,10 @@ static void decode_bytes(MI_COLUMNDEF *rec,MI_BIT_BUFF *bit_buff,uchar *to, if (bits <= 32) { if (bit_buff->pos > bit_buff->end+4) + { + bit_buff->error=1; return; /* Can't be right */ + } bit_buff->current_byte= (bit_buff->current_byte << 32) + ((((uint) bit_buff->pos[3])) + (((uint) bit_buff->pos[2]) << 8) + @@ -829,7 +832,8 @@ static void decode_bytes(MI_COLUMNDEF *rec,MI_BIT_BUFF *bit_buff,uchar *to, #else -static void decode_bytes(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to, uchar *end) +static void decode_bytes(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to, + uchar *end) { reg1 uint bits,low_byte; reg3 uint16 *pos; @@ -846,7 +850,10 @@ static void decode_bytes(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to, uc if (bits < table_bits) { if (bit_buff->pos > bit_buff->end+1) + { + bit_buff->error=1; return; /* Can't be right */ + } #if BITS_SAVED == 32 bit_buff->current_byte= (bit_buff->current_byte << 24) + (((uint) ((uchar) bit_buff->pos[2]))) + |