diff options
author | unknown <tim@cane.mysql.fi> | 2000-12-22 16:19:54 +0200 |
---|---|---|
committer | unknown <tim@cane.mysql.fi> | 2000-12-22 16:19:54 +0200 |
commit | c326c64972d6c5bf3b3892e521b5ac748fde52b9 (patch) | |
tree | dbad5c081e6821bac16948cfff91de33ffd5dc52 /sql | |
parent | 4a1f883b9dd1d87b6c07c9a2a475380dfda24442 (diff) | |
download | mariadb-git-c326c64972d6c5bf3b3892e521b5ac748fde52b9.tar.gz |
Fix replace bug w/ BDB tables by passing key_length to index_read_idx.
mysql-test/t/replace.test:
- test replace with an extra row that has a higher key value
sql/sql_insert.cc:
- pass real key length to index_read_idx, instead of relying on the
table handler to convert 0 -> key_length (fixes replace bug in BDB)
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_insert.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 13da095607d..c10e2a205b8 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -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; } |