mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 06:44:16 +01:00
[t:2318] Replace DB_DBT_TEMPMEMORY with flags==0
git-svn-id: file:///svn/toku/tokudb@17197 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
838e0e5b1c
commit
2146c3d242
9 changed files with 5 additions and 13 deletions
|
@ -164,7 +164,6 @@ typedef enum {
|
|||
#define DB_DBT_MALLOC 4
|
||||
#define DB_DBT_REALLOC 16
|
||||
#define DB_DBT_USERMEM 32
|
||||
#define DB_DBT_TEMPMEMORY 2
|
||||
#define DB_TXN_WRITE_NOSYNC 524288
|
||||
#define DB_TXN_NOWAIT 2048
|
||||
#define DB_TXN_SYNC 4096
|
||||
|
|
|
@ -165,7 +165,6 @@ typedef enum {
|
|||
#define DB_DBT_MALLOC 4
|
||||
#define DB_DBT_REALLOC 16
|
||||
#define DB_DBT_USERMEM 32
|
||||
#define DB_DBT_TEMPMEMORY 2
|
||||
#define DB_LOG_AUTOREMOVE 65536
|
||||
#define DB_TXN_WRITE_NOSYNC 268435456
|
||||
#define DB_TXN_NOWAIT 4096
|
||||
|
|
|
@ -165,7 +165,6 @@ typedef enum {
|
|||
#define DB_DBT_MALLOC 4
|
||||
#define DB_DBT_REALLOC 16
|
||||
#define DB_DBT_USERMEM 32
|
||||
#define DB_DBT_TEMPMEMORY 2
|
||||
#define DB_LOG_AUTOREMOVE 262144
|
||||
#define DB_TXN_WRITE_NOSYNC 1024
|
||||
#define DB_TXN_NOWAIT 8192
|
||||
|
|
|
@ -165,7 +165,6 @@ typedef enum {
|
|||
#define DB_DBT_MALLOC 4
|
||||
#define DB_DBT_REALLOC 16
|
||||
#define DB_DBT_USERMEM 64
|
||||
#define DB_DBT_TEMPMEMORY 2
|
||||
#define DB_LOG_AUTOREMOVE 524288
|
||||
#define DB_TXN_WRITE_NOSYNC 2048
|
||||
#define DB_TXN_NOWAIT 16384
|
||||
|
|
|
@ -167,7 +167,6 @@ typedef enum {
|
|||
#define DB_DBT_MULTIPLE 16
|
||||
#define DB_DBT_REALLOC 64
|
||||
#define DB_DBT_USERMEM 256
|
||||
#define DB_DBT_TEMPMEMORY 4
|
||||
#define DB_LOG_AUTOREMOVE 524288
|
||||
#define DB_TXN_WRITE_NOSYNC 4096
|
||||
#define DB_TXN_NOWAIT 1024
|
||||
|
|
|
@ -142,7 +142,6 @@ void print_defines (void) {
|
|||
#endif
|
||||
dodefine_track(dbt_flags, DB_DBT_REALLOC);
|
||||
dodefine_track(dbt_flags, DB_DBT_USERMEM);
|
||||
dodefine_from_track(dbt_flags, DB_DBT_TEMPMEMORY);
|
||||
}
|
||||
|
||||
// flags for the env->set_flags function
|
||||
|
|
|
@ -167,7 +167,6 @@ typedef enum {
|
|||
#define DB_DBT_MULTIPLE 16
|
||||
#define DB_DBT_REALLOC 64
|
||||
#define DB_DBT_USERMEM 256
|
||||
#define DB_DBT_TEMPMEMORY 4
|
||||
#define DB_LOG_AUTOREMOVE 524288
|
||||
#define DB_TXN_WRITE_NOSYNC 4096
|
||||
#define DB_TXN_NOWAIT 1024
|
||||
|
|
|
@ -167,7 +167,6 @@ typedef enum {
|
|||
#define DB_DBT_MULTIPLE 16
|
||||
#define DB_DBT_REALLOC 64
|
||||
#define DB_DBT_USERMEM 256
|
||||
#define DB_DBT_TEMPMEMORY 4
|
||||
#define DB_LOG_AUTOREMOVE 524288
|
||||
#define DB_TXN_WRITE_NOSYNC 4096
|
||||
#define DB_TXN_NOWAIT 1024
|
||||
|
|
|
@ -523,13 +523,13 @@ static int toku_recover_enq_insert_multiple (struct logtype_enq_insert_multiple
|
|||
assert(r==0);
|
||||
r = toku_brt_maybe_insert(tuple->brt, &dest_key, &dest_val, txn, TRUE, l->lsn, FALSE);
|
||||
assert(r == 0);
|
||||
//DB_DBT_TEMPMEMORY indicates the return values are stored in temporary memory that does
|
||||
//flags==0 indicates the return values are stored in temporary memory that does
|
||||
//not need to be freed. We need to continue using DB_DBT_REALLOC however.
|
||||
if (dest_key.flags & DB_DBT_TEMPMEMORY) {
|
||||
if (dest_key.flags == 0) {
|
||||
toku_init_dbt(&dest_key);
|
||||
dest_key.flags = DB_DBT_REALLOC;
|
||||
}
|
||||
if (dest_val.flags & DB_DBT_TEMPMEMORY) {
|
||||
if (dest_val.flags == 0) {
|
||||
toku_init_dbt(&dest_val);
|
||||
dest_val.flags = DB_DBT_REALLOC;
|
||||
}
|
||||
|
@ -585,9 +585,9 @@ static int toku_recover_enq_delete_multiple (struct logtype_enq_delete_multiple
|
|||
assert(r==0);
|
||||
r = toku_brt_maybe_delete(tuple->brt, &dest_key, txn, TRUE, l->lsn, FALSE);
|
||||
assert(r == 0);
|
||||
//DB_DBT_TEMPMEMORY indicates the return values are stored in temporary memory that does
|
||||
//flags==0 indicates the return values are stored in temporary memory that does
|
||||
//not need to be freed. We need to continue using DB_DBT_REALLOC however.
|
||||
if (dest_key.flags & DB_DBT_TEMPMEMORY) {
|
||||
if (dest_key.flags == 0) {
|
||||
toku_init_dbt(&dest_key);
|
||||
dest_key.flags = DB_DBT_REALLOC;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue