diff options
author | unknown <monty@hundin.mysql.fi> | 2001-09-14 17:59:05 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-09-14 17:59:05 +0300 |
commit | bd98eb612170f1ac401518de06b5aabdc1c80c70 (patch) | |
tree | 7e952862e45ea1418eb96e1cbd225a646acd0849 /sql/ha_berkeley.cc | |
parent | c88dd9b291cf7fe9086102d74d255f4b880d1486 (diff) | |
download | mariadb-git-bd98eb612170f1ac401518de06b5aabdc1c80c70.tar.gz |
Fixed problem with "record not found" in BDB tables.
Docs/manual.texi:
Fixed wrong reference to --with-thread-safe-client
mysql-test/r/bdb.result:
New tests
mysql-test/t/bdb.test:
New tests
Diffstat (limited to 'sql/ha_berkeley.cc')
-rw-r--r-- | sql/ha_berkeley.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc index 9a437607729..10866a1872b 100644 --- a/sql/ha_berkeley.cc +++ b/sql/ha_berkeley.cc @@ -365,11 +365,9 @@ berkeley_cmp_packed_key(DB *file, const DBT *new_key, const DBT *saved_key) { if (*new_key_ptr != *saved_key_ptr++) return ((int) *new_key_ptr - (int) saved_key_ptr[-1]); + key_length--; if (!*new_key_ptr++) - { - key_length--; continue; - } } if ((cmp=key_part->field->pack_cmp(new_key_ptr,saved_key_ptr, key_part->length))) @@ -1399,7 +1397,7 @@ int ha_berkeley::index_read_idx(byte * buf, uint keynr, const byte * key, statistic_increment(ha_read_key_count,&LOCK_status); DBUG_ENTER("index_read_idx"); current_row.flags=DB_DBT_REALLOC; - active_index= -1; + active_index= (uint) -1; DBUG_RETURN(read_row(key_file[keynr]->get(key_file[keynr], transaction, pack_key(&last_key, keynr, key_buff, key, key_len), @@ -1504,7 +1502,7 @@ int ha_berkeley::index_first(byte * buf) statistic_increment(ha_read_first_count,&LOCK_status); bzero((char*) &row,sizeof(row)); DBUG_RETURN(read_row(cursor->c_get(cursor, &last_key, &row, DB_FIRST), - (char*) buf, active_index, &row, &last_key, 0)); + (char*) buf, active_index, &row, &last_key, 1)); } int ha_berkeley::index_last(byte * buf) |