mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 14:54:20 +01:00
110754f57c
Current tests fail (not regressions, they fail as of 13461) * {{{x1.tdbrun}}} * {{{test_log(2,3,4,5,6,7,8,9,10).recover}}} * {{{test-recover(1,2,3).tdbrun}}} * {{{test1324.tdbrun}}} ULE_DEBUG disabled (defined to 0) Can be re-enabled for test purposes (set to 1). refs [t:1125] Merging into the temp branch (tokudb.main_13461+1125) {{{svn merge --accept=postpone -r 12527:13461 ../tokudb.1125 ./}}} Merging into main {{{svn merge --accept=postpone -r13462:13463 ../tokudb.main_13461+1125/ ./}}} git-svn-id: file:///svn/toku/tokudb@13464 c7de825b-a66e-492c-adef-691d508d4ae1
74 lines
1.7 KiB
C
74 lines
1.7 KiB
C
/* -*- mode: C; c-basic-offset: 4 -*- */
|
|
#ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved."
|
|
|
|
|
|
#include <toku_portability.h>
|
|
#include "brttypes.h"
|
|
#include "xids.h"
|
|
#include "fifo_msg.h"
|
|
#include "brt_msg.h"
|
|
|
|
//BRT_MSG internals are in host order
|
|
//XIDS are not 'internal' to BRT_MSG
|
|
|
|
void
|
|
brt_msg_from_dbts(BRT_MSG brt_msg,
|
|
DBT *key, DBT *val,
|
|
XIDS xids, brt_msg_type type) {
|
|
brt_msg->u.id.key = key;
|
|
brt_msg->u.id.val = val;
|
|
brt_msg->xids = xids;
|
|
brt_msg->type = type;
|
|
}
|
|
|
|
//No conversion (from disk to host) is necessary
|
|
//Accessor functions for fifo return host order bytes.
|
|
#if 0
|
|
void
|
|
brt_msg_from_fifo_msg(BRT_MSG brt_msg, FIFO_MSG fifo_msg) {
|
|
brt_msg->keylen = fifo_msg_get_keylen(fifo_msg);
|
|
brt_msg->vallen = fifo_msg_get_vallen(fifo_msg);
|
|
brt_msg->vallen = fifo_msg_get_vallen(fifo_msg);
|
|
brt_msg->key = fifo_msg_get_key(fifo_msg);
|
|
brt_msg->val = fifo_msg_get_val(fifo_msg);
|
|
brt_msg->xids = fifo_msg_get_xids(fifo_msg);
|
|
brt_msg->type = fifo_msg_get_type(fifo_msg);
|
|
}
|
|
#endif
|
|
|
|
u_int32_t
|
|
brt_msg_get_keylen(BRT_MSG brt_msg) {
|
|
u_int32_t rval = brt_msg->u.id.key->size;
|
|
return rval;
|
|
}
|
|
|
|
u_int32_t
|
|
brt_msg_get_vallen(BRT_MSG brt_msg) {
|
|
u_int32_t rval = brt_msg->u.id.val->size;
|
|
return rval;
|
|
}
|
|
|
|
XIDS
|
|
brt_msg_get_xids(BRT_MSG brt_msg) {
|
|
XIDS rval = brt_msg->xids;
|
|
return rval;
|
|
}
|
|
|
|
void *
|
|
brt_msg_get_key(BRT_MSG brt_msg) {
|
|
void * rval = brt_msg->u.id.key->data;
|
|
return rval;
|
|
}
|
|
|
|
void *
|
|
brt_msg_get_val(BRT_MSG brt_msg) {
|
|
void * rval = brt_msg->u.id.val->data;
|
|
return rval;
|
|
}
|
|
|
|
brt_msg_type
|
|
brt_msg_get_type(BRT_MSG brt_msg) {
|
|
brt_msg_type rval = brt_msg->type;
|
|
return rval;
|
|
}
|
|
|