mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 12:01:42 +01:00
A fix that makes the {{{test_dupsort_del}}} pass. However {{{test_dupsort_del_checksum}}} still breaks under TokuDB, but not under BDB. Addesses #690.
git-svn-id: file:///svn/tokudb@3442 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
eb9b6d8558
commit
676c4dc0ee
2 changed files with 9 additions and 13 deletions
18
newbrt/brt.c
18
newbrt/brt.c
|
@ -1357,21 +1357,17 @@ static int brt_leaf_apply_cmd_once (BRT t, BRTNODE node, BRT_CMD cmd, TOKULOGGER
|
||||||
|
|
||||||
if (le) {
|
if (le) {
|
||||||
// It's there, note that it's gone and remove it from the mempool
|
// It's there, note that it's gone and remove it from the mempool
|
||||||
node->u.l.n_bytes_in_buffer -= PMA_ITEM_OVERHEAD + leafentry_disksize(le);
|
|
||||||
node->local_fingerprint -= node->rand4fingerprint * toku_le_crc(le);
|
|
||||||
|
|
||||||
r = toku_log_deleteleafentry(logger, &node->log_lsn, 0, filenum, node->thisnodename, idx, le);
|
r = toku_log_deleteleafentry(logger, &node->log_lsn, 0, filenum, node->thisnodename, idx, le);
|
||||||
if (r!=0) return r;
|
if (r!=0) return r;
|
||||||
|
|
||||||
BRT_CMD_S cmd2 = *cmd;
|
|
||||||
DBT val_from_lekey;
|
|
||||||
cmd2.u.id.val = toku_fill_dbt(&val_from_lekey, le_latest_val(le), le_latest_vallen(le));
|
|
||||||
struct cmd_leafval_bessel_extra be = {t, &cmd2, 1}; // always compare both in this mode, if the value is there
|
|
||||||
struct move_struct ms = {.logger=logger, .filenum=filenum, .from=node, .to=node};
|
struct move_struct ms = {.logger=logger, .filenum=filenum, .from=node, .to=node};
|
||||||
toku_gpma_delete_bessel(node->u.l.buffer,
|
r = toku_gpma_delete_at_index(node->u.l.buffer, idx, note_move_items_within, &ms);
|
||||||
toku_cmd_leafval_bessel, &be,
|
if (r!=0) return r;
|
||||||
0, 0,
|
|
||||||
note_move_items_within, &ms);
|
node->u.l.n_bytes_in_buffer -= PMA_ITEM_OVERHEAD + leafentry_disksize(le);
|
||||||
|
node->local_fingerprint -= node->rand4fingerprint * toku_le_crc(le);
|
||||||
|
|
||||||
toku_mempool_mfree(&node->u.l.buffer_mempool, 0, storedlen); // Must pass 0, since le may be no good any more.
|
toku_mempool_mfree(&node->u.l.buffer_mempool, 0, storedlen); // Must pass 0, since le may be no good any more.
|
||||||
}
|
}
|
||||||
if (newdata) {
|
if (newdata) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Test to see if delete works right with dupsort. */
|
/* Test to see if delete works right with dupsort.
|
||||||
/* Try to exercise all the cases for the leafcommands in brt.c
|
* The issue is that things might look OK before the commit, but bad after the commit.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <db.h>
|
#include <db.h>
|
||||||
|
|
Loading…
Add table
Reference in a new issue