mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 14:54:20 +01:00
refs #5164 fix some garbage in the threaded helpers file
also fix the ule interface to not use const, since it doesn't do what I want because of a pesky typedef git-svn-id: file:///svn/toku/tokudb@45064 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
49927cf809
commit
f2df2994c5
4 changed files with 5 additions and 10 deletions
4
ft/ule.c
4
ft/ule.c
|
@ -77,7 +77,7 @@ toku_le_get_status(LE_STATUS statp) {
|
|||
//
|
||||
|
||||
ULEHANDLE
|
||||
toku_ule_create(const LEAFENTRY le) {
|
||||
toku_ule_create(LEAFENTRY le) {
|
||||
ULE ule_p = toku_xmalloc(sizeof(ULE_S));
|
||||
le_unpack(ule_p, le);
|
||||
return (ULEHANDLE) ule_p;
|
||||
|
@ -518,7 +518,7 @@ ule_cleanup(ULE ule) {
|
|||
|
||||
// Purpose of le_unpack() is to populate our private workspace with the contents of the given le.
|
||||
void
|
||||
le_unpack(ULE ule, const LEAFENTRY le) {
|
||||
le_unpack(ULE ule, LEAFENTRY le) {
|
||||
//Read the keylen
|
||||
ule->keylen = toku_dtoh32(le->keylen);
|
||||
uint8_t type = le->type;
|
||||
|
|
2
ft/ule.h
2
ft/ule.h
|
@ -24,7 +24,7 @@ typedef struct ule *ULEHANDLE;
|
|||
typedef struct uxr *UXRHANDLE;
|
||||
|
||||
// create a ULE by copying the contents of the given leafentry
|
||||
ULEHANDLE toku_ule_create(const LEAFENTRY le);
|
||||
ULEHANDLE toku_ule_create(LEAFENTRY le);
|
||||
|
||||
void toku_ule_free(ULEHANDLE ule_p);
|
||||
|
||||
|
|
|
@ -374,10 +374,8 @@ le_cursor_callback(ITEMLEN UU(keylen), bytevec UU(key), ITEMLEN UU(vallen), byte
|
|||
// leafentry into its own buffers, so we don't need to malloc space
|
||||
// for this value to exist outside the callback.
|
||||
//
|
||||
// this cast is only necssary because the typedef is preventing us
|
||||
// from declaring a "const LEAFENTRY" le. we're only able to say
|
||||
// const "LEAFENTRY le".
|
||||
const LEAFENTRY le = (const LEAFENTRY) val;
|
||||
// blast away the const from bytevec by casting to LEAFENTRY
|
||||
LEAFENTRY le = (LEAFENTRY) val;
|
||||
ULEHANDLE ule = toku_ule_create(le);
|
||||
invariant(ule);
|
||||
ule_prov_info_init(prov_info, ule);
|
||||
|
|
|
@ -815,9 +815,6 @@ cleanup:
|
|||
return r;
|
||||
}
|
||||
|
||||
struct leaf_entry * le;
|
||||
const struct leaf_entry * le;
|
||||
|
||||
static int UU() random_put_op(DB_TXN *txn, ARG arg, void *UU(operation_extra), void *stats_extra) {
|
||||
int db_index = myrandom_r(arg->random_data)%arg->cli->num_DBs;
|
||||
DB* db = arg->dbp[db_index];
|
||||
|
|
Loading…
Add table
Reference in a new issue