Commit d9e9792d authored by Yoni Fogel's avatar Yoni Fogel

Addresses #893

Parameters to pre_lock are supposed to be const DBT*'s instead of DBT*'s.

git-svn-id: file:///svn/tokudb@4403 c7de825b-a66e-492c-adef-691d508d4ae1
parent e22d67bb
......@@ -172,7 +172,7 @@ struct __toku_db {
void* __toku_dummy0[2];
void *app_private; /* 32-bit offset=16 size=4, 64=bit offset=32 size=8 */
DB_ENV *dbenv; /* 32-bit offset=20 size=4, 64=bit offset=40 size=8 */
int (*pre_acquire_read_lock)(DB*, DB_TXN*, DBT*, DBT*, DBT*, DBT*);
int (*pre_acquire_read_lock)(DB*, DB_TXN*, const DBT*, const DBT*, const DBT*, const DBT*);
void* __toku_dummy1[28];
char __toku_dummy2[96];
void *api_internal; /* 32-bit offset=236 size=4, 64=bit offset=376 size=8 */
......
......@@ -182,7 +182,7 @@ struct __toku_db {
void* __toku_dummy0[2];
void *app_private; /* 32-bit offset=16 size=4, 64=bit offset=32 size=8 */
DB_ENV *dbenv; /* 32-bit offset=20 size=4, 64=bit offset=40 size=8 */
int (*pre_acquire_read_lock)(DB*, DB_TXN*, DBT*, DBT*, DBT*, DBT*);
int (*pre_acquire_read_lock)(DB*, DB_TXN*, const DBT*, const DBT*, const DBT*, const DBT*);
void* __toku_dummy1[31];
char __toku_dummy2[96];
void *api_internal; /* 32-bit offset=248 size=4, 64=bit offset=400 size=8 */
......
......@@ -184,7 +184,7 @@ struct __toku_db {
void* __toku_dummy0[2];
void *app_private; /* 32-bit offset=16 size=4, 64=bit offset=32 size=8 */
DB_ENV *dbenv; /* 32-bit offset=20 size=4, 64=bit offset=40 size=8 */
int (*pre_acquire_read_lock)(DB*, DB_TXN*, DBT*, DBT*, DBT*, DBT*);
int (*pre_acquire_read_lock)(DB*, DB_TXN*, const DBT*, const DBT*, const DBT*, const DBT*);
void* __toku_dummy1[33];
char __toku_dummy2[96];
void *api_internal; /* 32-bit offset=256 size=4, 64=bit offset=416 size=8 */
......
......@@ -183,7 +183,7 @@ struct __toku_db {
void* __toku_dummy0[2];
void *app_private; /* 32-bit offset=16 size=4, 64=bit offset=32 size=8 */
DB_ENV *dbenv; /* 32-bit offset=20 size=4, 64=bit offset=40 size=8 */
int (*pre_acquire_read_lock)(DB*, DB_TXN*, DBT*, DBT*, DBT*, DBT*);
int (*pre_acquire_read_lock)(DB*, DB_TXN*, const DBT*, const DBT*, const DBT*, const DBT*);
void* __toku_dummy1[36];
char __toku_dummy2[96];
void *api_internal; /* 32-bit offset=268 size=4, 64=bit offset=440 size=8 */
......
......@@ -187,7 +187,7 @@ struct __toku_db {
char __toku_dummy1[8];
void *app_private; /* 32-bit offset=20 size=4, 64=bit offset=32 size=8 */
DB_ENV *dbenv; /* 32-bit offset=24 size=4, 64=bit offset=40 size=8 */
int (*pre_acquire_read_lock)(DB*, DB_TXN*, DBT*, DBT*, DBT*, DBT*);
int (*pre_acquire_read_lock)(DB*, DB_TXN*, const DBT*, const DBT*, const DBT*, const DBT*);
void* __toku_dummy2[41];
char __toku_dummy3[80];
void *api_internal; /* 32-bit offset=276 size=4, 64=bit offset=464 size=8 */
......
......@@ -302,7 +302,7 @@ int main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__un
assert(sizeof(db_fields32)==sizeof(db_fields64));
const char *extra[]={"int (*key_range64)(DB*, DB_TXN *, DBT *, u_int64_t *less, u_int64_t *equal, u_int64_t *greater, int *is_exact)",
"int (*pre_acquire_read_lock)(DB*, DB_TXN*, DBT*, DBT*, DBT*, DBT*)",
"int (*pre_acquire_read_lock)(DB*, DB_TXN*, const DBT*, const DBT*, const DBT*, const DBT*)",
"const DBT* (*dbt_pos_infty)(void)",
"const DBT* (*dbt_neg_infty)(void)",
NULL};
......
......@@ -184,7 +184,7 @@ struct __toku_db {
void* __toku_dummy0[2];
void *app_private; /* 32-bit offset=16 size=4, 64=bit offset=32 size=8 */
DB_ENV *dbenv; /* 32-bit offset=20 size=4, 64=bit offset=40 size=8 */
int (*pre_acquire_read_lock)(DB*, DB_TXN*, DBT*, DBT*, DBT*, DBT*);
int (*pre_acquire_read_lock)(DB*, DB_TXN*, const DBT*, const DBT*, const DBT*, const DBT*);
void* __toku_dummy1[33];
char __toku_dummy2[96];
void *api_internal; /* 32-bit offset=256 size=4, 64=bit offset=416 size=8 */
......
......@@ -2618,7 +2618,7 @@ static int toku_db_key_range64(DB* db, DB_TXN* txn __attribute__((__unused__)),
return r;
}
int toku_db_pre_acquire_read_lock(DB *db, DB_TXN *txn, DBT *key_left, DBT *val_left, DBT *key_right, DBT *val_right) {
int toku_db_pre_acquire_read_lock(DB *db, DB_TXN *txn, const DBT *key_left, const DBT *val_left, const DBT *key_right, const DBT *val_right) {
HANDLE_PANICKED_DB(db);
if (!db->i->lt || !txn) return EINVAL;
......@@ -2716,7 +2716,7 @@ static int locked_db_get (DB * db, DB_TXN * txn, DBT * key, DBT * data, u_int32_
toku_ydb_lock(); int r = autotxn_db_get(db, txn, key, data, flags); toku_ydb_unlock(); return r;
}
int locked_db_pre_acquire_read_lock(DB *db, DB_TXN *txn, DBT *key_left, DBT *val_left, DBT *key_right, DBT *val_right) {
int locked_db_pre_acquire_read_lock(DB *db, DB_TXN *txn, const DBT *key_left, const DBT *val_left, const DBT *key_right, const DBT *val_right) {
toku_ydb_lock();
int r = toku_db_pre_acquire_read_lock(db, txn, key_left, val_left, key_right, val_right);
toku_ydb_unlock();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment