summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authormonty@mysql.com <>2004-01-20 00:15:01 +0100
committermonty@mysql.com <>2004-01-20 00:15:01 +0100
commitb078d2df64e46a8fc4f4d266dccd7906e084d559 (patch)
treed20bcd6bae79e9d29ece05ef1bb92e9041747f39 /myisam
parent0eb607006879210b04278d0a961e28e72616645d (diff)
parenteb0ae211c589ca767a464b47da2fda98fabce674 (diff)
downloadmariadb-git-b078d2df64e46a8fc4f4d266dccd7906e084d559.tar.gz
merge
Diffstat (limited to 'myisam')
-rw-r--r--myisam/mi_check.c8
-rw-r--r--myisam/mi_write.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c
index a55929805fa..5687e7d48e3 100644
--- a/myisam/mi_check.c
+++ b/myisam/mi_check.c
@@ -551,7 +551,7 @@ static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo,
ha_checksum *key_checksum, uint level)
{
int flag;
- uint used_length,comp_flag,nod_flag,key_length,not_used;
+ uint used_length,comp_flag,nod_flag,key_length=0,not_used;
uchar key[MI_MAX_POSSIBLE_KEY_BUFF],*temp_buff,*keypos,*old_keypos,*endpos;
my_off_t next_page,record;
char llbuff[22];
@@ -586,6 +586,8 @@ static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo,
}
for ( ;; )
{
+ memcpy((char*) info->lastkey,(char*) key,key_length);
+ info->lastkey_length=key_length;
if (nod_flag)
{
next_page=_mi_kpos(nod_flag,keypos);
@@ -629,8 +631,6 @@ static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo,
}
(*key_checksum)+= mi_byte_checksum((byte*) key,
key_length- info->s->rec_reflength);
- memcpy((char*) info->lastkey,(char*) key,key_length);
- info->lastkey_length=key_length;
record= _mi_dpos(info,0,key+key_length);
if (keyinfo->flag & HA_FULLTEXT) /* special handling for ft2 */
{
@@ -658,7 +658,7 @@ static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo,
DBUG_PRINT("test",("page: %s record: %s filelength: %s",
llstr(page,llbuff),llstr(record,llbuff2),
llstr(info->state->data_file_length,llbuff3)));
- DBUG_DUMP("key",(byte*) info->lastkey,key_length);
+ DBUG_DUMP("key",(byte*) key,key_length);
DBUG_DUMP("new_in_page",(char*) old_keypos,(uint) (keypos-old_keypos));
goto err;
}
diff --git a/myisam/mi_write.c b/myisam/mi_write.c
index 4b7a22dac84..88e7f070642 100644
--- a/myisam/mi_write.c
+++ b/myisam/mi_write.c
@@ -374,7 +374,7 @@ static int w_search(register MI_INFO *info, register MI_KEYDEF *keyinfo,
my_off_t root=info->dupp_key_pos;
keyinfo=&info->s->ft2_keyinfo;
key+=off;
- keypos-=keyinfo->keylength; /* we'll modify key entry 'in vivo' */
+ keypos-=keyinfo->keylength+nod_flag; /* we'll modify key entry 'in vivo' */
error=_mi_ck_real_write_btree(info, keyinfo, key, 0,
&root, comp_flag);
_mi_dpointer(info, keypos+HA_FT_WLEN, root);