refs #5629 ensure the proper byte order

git-svn-id: file:///svn/toku/tokudb@50316 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
John Esmet 2013-04-17 00:01:18 -04:00 committed by Yoni Fogel
parent 84d2b6350f
commit 67bf34707f

View file

@ -19,8 +19,9 @@ struct iibench_op_extra {
uint64_t autoincrement;
};
static uint64_t next_autoincrement(struct iibench_op_extra *info) {
return toku_sync_fetch_and_add(&info->autoincrement, 1);
static uint64_t next_autoincrement_network_order(struct iibench_op_extra *info) {
uint64_t k = toku_sync_fetch_and_add(&info->autoincrement, 1);
return toku_htonl64(k);
}
static int UU() iibench_put_op(DB_TXN *txn, ARG arg, void *operation_extra, void *stats_extra) {
@ -49,7 +50,7 @@ static int UU() iibench_put_op(DB_TXN *txn, ARG arg, void *operation_extra, void
fill_zeroed_array(valbuf, arg->cli->val_size,
arg->random_data, arg->cli->compressibility);
struct iibench_op_extra *CAST_FROM_VOIDP(info, operation_extra);
uint64_t pk = next_autoincrement(info);
uint64_t pk = next_autoincrement_network_order(info);
dbt_init(&mult_key_dbt[0], &pk, sizeof pk);
dbt_init(&mult_val_dbt[0], valbuf, sizeof valbuf);
r = env->put_multiple(