Commit graph

2172 commits

Author SHA1 Message Date
Bradley C. Kuszmaul
97e7173e5f Whoops the errors weren't quite right. Addresses #246.
git-svn-id: file:///svn/tokudb@1539 c7de825b-a66e-492c-adef-691d508d4ae1
2008-01-07 19:58:10 +00:00
Bradley C. Kuszmaul
ebd5618f15 Fix up error handling and add tests. Fixes #246.
git-svn-id: file:///svn/tokudb@1535 c7de825b-a66e-492c-adef-691d508d4ae1
2008-01-07 18:54:14 +00:00
Rich Prohaska
61757cdd76 accomodate the strange cache size settings of bdb. closes #243
git-svn-id: file:///svn/tokudb@1528 c7de825b-a66e-492c-adef-691d508d4ae1
2008-01-07 15:24:57 +00:00
Rich Prohaska
ae4f08d9d4 make it work correctly on bdb. closes #244
git-svn-id: file:///svn/tokudb@1527 c7de825b-a66e-492c-adef-691d508d4ae1
2008-01-07 14:29:08 +00:00
Yoni Fogel
988295b953 Closes #241
DB->get on a secondary with flag DB_GET_BOTH will now return EINVAL
instead of crashing on an assert.

Also revamped test_db_get_put_flags to test this, and made all tests run on both
BDB and tokudb

git-svn-id: file:///svn/tokudb@1502 c7de825b-a66e-492c-adef-691d508d4ae1
2008-01-04 17:53:16 +00:00
Yoni Fogel
981db5f817 Bugfix with makefile: Tokudb tests now support VERBOSE=2 again
(was running in VERBOSE=1 mode)

git-svn-id: file:///svn/tokudb@1501 c7de825b-a66e-492c-adef-691d508d4ae1
2008-01-04 17:51:10 +00:00
Bradley C. Kuszmaul
f8078edf32 create rule for make clean at top level. (Getting ready to try a branch for the PMA-instead-of-hash-table experiment. Addresses #128.
git-svn-id: file:///svn/tokudb@1462 c7de825b-a66e-492c-adef-691d508d4ae1
2008-01-02 11:37:16 +00:00
Rich Prohaska
8fb2191a9c add test case for BRT_DELETE dup. addresses #201
git-svn-id: file:///svn/tokudb@1442 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-31 16:57:25 +00:00
Rich Prohaska
5fa3b1621e fix 32 bit arch addresses #223
git-svn-id: file:///svn/tokudb@1422 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-30 02:39:38 +00:00
Rich Prohaska
3296a92f9c addresses #223
git-svn-id: file:///svn/tokudb@1421 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-29 23:21:53 +00:00
Rich Prohaska
ebc4d21a8f addresses #223
git-svn-id: file:///svn/tokudb@1420 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-29 22:25:14 +00:00
Rich Prohaska
d40c455ca8 addresses #223
git-svn-id: file:///svn/tokudb@1419 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-29 22:21:12 +00:00
Rich Prohaska
205a72c987 fix the DB_ENV->set_errcall prototype. closes #225
git-svn-id: file:///svn/tokudb@1416 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-29 19:14:19 +00:00
Rich Prohaska
1b8efeee8b addresses #77
git-svn-id: file:///svn/tokudb@1414 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-29 18:33:25 +00:00
Bradley C. Kuszmaul
2dd205aec4 a bug in the pma split code: The thisnodename was coming out wrong inside a pma
git-svn-id: file:///svn/tokudb@1367 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-26 16:52:55 +00:00
Bradley C. Kuszmaul
019c9f984c Fix uninitialized counter. Fixes #221.
git-svn-id: file:///svn/tokudb@1341 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-23 12:12:13 +00:00
Bradley C. Kuszmaul
ad0a6695b5 add Db::del and Db::get and check that their exceptions are OK. Fixes #219.
git-svn-id: file:///svn/tokudb@1335 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-23 01:25:54 +00:00
Bradley C. Kuszmaul
d2667c2627 c++ interface is implemented (up to a point) and every method that can raise an exception is tested in exceptions.cpp. Fixes #197, #215.
git-svn-id: file:///svn/tokudb@1334 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-23 01:09:09 +00:00
Bradley C. Kuszmaul
179253d997 Use toku_malloc, not malloc. Fixes #169.
git-svn-id: file:///svn/tokudb@1332 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-22 22:18:50 +00:00
Bradley C. Kuszmaul
10fb98e4da Quiet down the src/tests. Addresses #13.
git-svn-id: file:///svn/tokudb@1331 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-22 20:57:07 +00:00
Bradley C. Kuszmaul
c0d629c7e9 Make test_db_assoc3 work with -v. Make it run with vgrind. Fixes #163.
git-svn-id: file:///svn/tokudb@1328 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-22 18:46:45 +00:00
Bradley C. Kuszmaul
161e70ed01 Get rid of various memory leaks in the cxx (and test cxx exceptions) Addresses #215.
git-svn-id: file:///svn/tokudb@1327 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-22 18:40:22 +00:00
Bradley C. Kuszmaul
6198e6f5c5 add exceptions to dbc.cpp. Addresses #215.
git-svn-id: file:///svn/tokudb@1316 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-21 15:32:21 +00:00
Yoni Fogel
4c90d3a8d0 DB_ENV->set_data_dir cleaned up and tightened
Fixes a bug where I forgot to set the reallocced memory.
Addresses #42

git-svn-id: file:///svn/tokudb@1305 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-21 06:18:16 +00:00
Yoni Fogel
131ce32d51 set_data_dir is now additive.
DB->open, and DB->remove now use the data dirs
We look (in order) in each of the data dirs for a file to open/remove.
The first file found, is the one used (even if another is similarly named with
different subdbs).

For creating dbs, (if file does not exist in any of the search dirs), we always
create in the first data dir (or env->i->dir if no data dirs are set).

Addresses #42
Addresses #108


git-svn-id: file:///svn/tokudb@1304 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-21 06:01:55 +00:00
Yoni Fogel
10c82d9f0c DbEnv.err
DbEnv.set_errfile

toku_db_env_err now writes to the file from set_errfile
toku_db_env_err calls toku_db_env_err_vararg

Fixed DbException.set_env, and callers of it.
Modified test1 to not use exceptions, since the test tried to use return codes.

Closes #214
Addresses #197
Addresses #215

git-svn-id: file:///svn/tokudb@1303 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-21 05:57:33 +00:00
Bradley C. Kuszmaul
80b5a4758b Add a comment. Addreses #180.
git-svn-id: file:///svn/tokudb@1293 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-20 22:08:42 +00:00
Bradley C. Kuszmaul
62dc77b1c3 Add some more cases to test_db_get_put_flags.c. Addresess #180.
git-svn-id: file:///svn/tokudb@1292 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-20 22:08:22 +00:00
Yoni Fogel
e669f58910 DB->remove (with no subdb) now correctly returns
error codes from unlink.
Modified test_db_remove_subdb to check for this.
Closes #211

git-svn-id: file:///svn/tokudb@1288 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-20 18:59:39 +00:00
Yoni Fogel
605ad57be1 Removed 'unused' attribute from a parameter actually used.
git-svn-id: file:///svn/tokudb@1287 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-20 18:46:36 +00:00
Yoni Fogel
221c5ba9d3 Modifications for c_put and test_db_get_put_flags
to support 'flags==0 returns EINVAL for put on a dupsort db'
Addresses #180
Addresses #15
Addresses #194

git-svn-id: file:///svn/tokudb@1282 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-20 18:16:53 +00:00
Bradley C. Kuszmaul
0c31bc0a83 the dupsort_get_both_range test now works under BDB. Addresses #187.
git-svn-id: file:///svn/tokudb@1277 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-20 15:13:46 +00:00
Bradley C. Kuszmaul
1e96e2f4d5 The test_db_env_open_nocreate.c test was complaining when it didn't
really have a right to.  It was creating the directory and then
calling {{{DB_ENV->open}}} without specifying {{{DB_CREATE}}} and then
complaining if the open was successful.

For BDB, the open is not successful because BDB has internal files it sets up.

TokuDB has no internal files (yet) because it only handles
{{{DB_PRIVATE}}} databases.  Hence creating the directory is enough to
make TokuDB happy.  And we're OK with that.

Addresses #209.


git-svn-id: file:///svn/tokudb@1263 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-19 22:50:06 +00:00
Bradley C. Kuszmaul
276256b3e6 Print an error message for DB_PRIVATE missing, and make the test actually observe issue #209 (open works even when the dir doesn't exist but DB_CREATE is not specified). Addresses #208, 209.
git-svn-id: file:///svn/tokudb@1262 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-19 22:38:10 +00:00
Bradley C. Kuszmaul
6530c1c216 Improve testing. Addresses #179, #178.
git-svn-id: file:///svn/tokudb@1261 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-19 21:38:15 +00:00
Bradley C. Kuszmaul
f31f24c237 Make set_errfile work. Fixes #72.
git-svn-id: file:///svn/tokudb@1260 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-19 21:17:37 +00:00
Rich Prohaska
a98f0cd111 change the db->put to require flags != 0. closes #180
git-svn-id: file:///svn/tokudb@1217 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-18 20:15:01 +00:00
Rich Prohaska
a7970a58d8 fix the mem leak. closes #199
git-svn-id: file:///svn/tokudb@1205 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-18 18:38:26 +00:00
Rich Prohaska
32e57a7811 shorten the tests. addresses #198
git-svn-id: file:///svn/tokudb@1199 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-18 17:04:36 +00:00
Yoni Fogel
58fd7e37fc Additional tests for c_put
Show that the key parameter is not only ignored, but never accessed nor written to
when flags == DB_CURRENT
Closes #15

Removed comments asking for this test.

git-svn-id: file:///svn/tokudb@1183 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-18 02:37:12 +00:00
Yoni Fogel
f945194b94 Added tests for c_put
Addresses #15

git-svn-id: file:///svn/tokudb@1181 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-18 02:23:29 +00:00
Yoni Fogel
e7d13a1a73 Added a comment to c_put
git-svn-id: file:///svn/tokudb@1180 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-18 02:21:34 +00:00
Rich Prohaska
feeff730d7 test for cursor stickyness. addresses #196
git-svn-id: file:///svn/tokudb@1173 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-17 21:34:58 +00:00
Yoni Fogel
1f6fb8627f Addresses #180
test_db_assert_einval.c renamed to test_db_get_put_flags.c

git-svn-id: file:///svn/tokudb@1166 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-17 17:53:35 +00:00
Yoni Fogel
14ff121e79 Addresses #180
Tests for DB_GET_BOTH with DUPSORT and no DUPSORT.

git-svn-id: file:///svn/tokudb@1165 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-17 17:53:02 +00:00
Yoni Fogel
1c918c44c8 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
2007-12-17 17:46:39 +00:00
Yoni Fogel
daaf8751e3 Replaced some BDB api call parameter checking asserts
with return EINVAL
Addresses #194

git-svn-id: file:///svn/tokudb@1163 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-17 17:38:22 +00:00
Bradley C. Kuszmaul
14a3707f5f The names were sometimes coming out with duplicates, which was confusing the comparison function.
Fix:  Make all the names unique by adding on the tod to the end of the name.
Fixes #175.


git-svn-id: file:///svn/tokudb@1159 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-17 17:13:23 +00:00
Yoni Fogel
467c07d5a1 Removed comments asking for test
Addresses #15

git-svn-id: file:///svn/tokudb@1158 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-17 17:10:42 +00:00
Rich Prohaska
c7283d799f pma_set now finds the leftmost non-deleted kv pair that matches the set key. closes #192
git-svn-id: file:///svn/tokudb@1157 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-17 17:09:54 +00:00