mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 12:01:42 +01:00
addresses #180
Support DB_GET_BOTH for dbs without DUPSORT. Also modified test_db_assert_einval to validate the changes. git-svn-id: file:///svn/tokudb@1164 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
daaf8751e3
commit
1c918c44c8
2 changed files with 3 additions and 3 deletions
|
@ -79,12 +79,12 @@ typedef struct {
|
|||
|
||||
PUT_TEST put_tests[] = {
|
||||
{0, 0, DB_NODUPDATA, EINVAL},
|
||||
{1, DB_DUP|DB_DUPSORT, DB_NODUPDATA, EINVAL}, //Might need to be removed later.
|
||||
{1, DB_DUP|DB_DUPSORT, DB_NODUPDATA, EINVAL}, //r_expect must change to 0, and don't skip with BDB once implemented.
|
||||
};
|
||||
const int num_put = sizeof(put_tests) / sizeof(put_tests[0]);
|
||||
|
||||
GET_TEST get_tests[] = {
|
||||
{{1, 0, 0, 0}, DB_GET_BOTH, EINVAL},
|
||||
{{0, 0, 0, 0}, DB_GET_BOTH, 0},
|
||||
{{0, DB_DUP|DB_DUPSORT, 0, 0}, DB_GET_BOTH, 0},
|
||||
{{0, 0, 0, 0}, DB_RMW, EINVAL},
|
||||
{{0, DB_DUP|DB_DUPSORT, 0, 0}, DB_RMW, EINVAL},
|
||||
|
|
|
@ -835,7 +835,7 @@ static int toku_db_get_noassociate(DB * db, DB_TXN * txn, DBT * key, DBT * data,
|
|||
unsigned int brtflags;
|
||||
|
||||
toku_brt_get_flags(db->i->brt, &brtflags);
|
||||
if (brtflags & TOKU_DB_DUPSORT) {
|
||||
if ((brtflags & TOKU_DB_DUPSORT) || flags == DB_GET_BOTH) {
|
||||
|
||||
if (flags != 0 && flags != DB_GET_BOTH) return EINVAL;
|
||||
// We aren't ready to handle flags such as DB_READ_COMMITTED or DB_READ_UNCOMMITTED or DB_RMW
|
||||
|
|
Loading…
Add table
Reference in a new issue