mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 14:54:20 +01:00
Addresses #889
Leaf boundary test now checks left to right and right to left. git-svn-id: file:///svn/tokudb@4401 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
72c0171ab6
commit
98feb20905
1 changed files with 20 additions and 5 deletions
|
@ -65,13 +65,28 @@ void doit (BOOL committed_provdels) {
|
|||
r=env->txn_begin(env, 0, &txn, 0); CKERR(r);
|
||||
r = db->cursor(db, txn, &dbc, 0); CKERR(r);
|
||||
}
|
||||
i=2*num_insert;
|
||||
j=(i<<1)+37;
|
||||
r=db->put(db, txn, dbt_init(&key, &i, sizeof(i)), dbt_init(&data, &j, sizeof(j)), DB_YESOVERWRITE);
|
||||
int ifirst, ilast, jfirst, jlast;
|
||||
ilast=2*num_insert;
|
||||
jlast=(ilast<<1)+37;
|
||||
ifirst=-1*num_insert;
|
||||
jfirst=(ifirst<<1)+37;
|
||||
r=db->put(db, txn, dbt_init(&key, &ifirst, sizeof(ifirst)), dbt_init(&data, &jfirst, sizeof(jfirst)), DB_YESOVERWRITE);
|
||||
CKERR(r);
|
||||
r=db->put(db, txn, dbt_init(&key, &ilast, sizeof(ilast)), dbt_init(&data, &jlast, sizeof(jlast)), DB_YESOVERWRITE);
|
||||
CKERR(r);
|
||||
|
||||
r = dbc->c_get(dbc, dbt_init(&key, NULL, 0), dbt_init(&data, NULL, 0), DB_FIRST); CKERR(r);
|
||||
assert(*(int*)key.data == i);
|
||||
assert(*(int*)data.data == j);
|
||||
assert(*(int*)key.data == ifirst);
|
||||
assert(*(int*)data.data == jfirst);
|
||||
r = dbc->c_get(dbc, dbt_init(&key, NULL, 0), dbt_init(&data, NULL, 0), DB_NEXT); CKERR(r);
|
||||
assert(*(int*)key.data == ilast);
|
||||
assert(*(int*)data.data == jlast);
|
||||
r = dbc->c_get(dbc, dbt_init(&key, NULL, 0), dbt_init(&data, NULL, 0), DB_LAST); CKERR(r);
|
||||
assert(*(int*)key.data == ilast);
|
||||
assert(*(int*)data.data == jlast);
|
||||
r = dbc->c_get(dbc, dbt_init(&key, NULL, 0), dbt_init(&data, NULL, 0), DB_PREV); CKERR(r);
|
||||
assert(*(int*)key.data == ifirst);
|
||||
assert(*(int*)data.data == jfirst);
|
||||
r = dbc->c_close(dbc); CKERR(r);
|
||||
r=txn->commit(txn, 0); CKERR(r);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue