Fix replace bug w/ BDB tables by passing key_length to index_read_idx.

This commit is contained in:
tim@cane.mysql.fi 2000-12-22 16:19:54 +02:00
parent 94806e013d
commit 281a054f2a
2 changed files with 3 additions and 1 deletions

View File

@ -10,6 +10,7 @@ CREATE TABLE t1 (
PRIMARY KEY (gesuchnr,benutzer_id)
) type=ISAM;
replace into t1 (gesuchnr,benutzer_id) values (2,1);
replace into t1 (gesuchnr,benutzer_id) values (1,1);
replace into t1 (gesuchnr,benutzer_id) values (1,1);
alter table t1 type=myisam;

View File

@ -366,7 +366,8 @@ int write_record(TABLE *table,COPY_INFO *info)
}
key_copy((byte*) key,table,key_nr,0);
if ((error=(table->file->index_read_idx(table->record[1],key_nr,
(byte*) key,0,
(byte*) key,
table->key_info[key_nr].key_length,
HA_READ_KEY_EXACT))))
goto err;
}