Commit graph

2172 commits

Author SHA1 Message Date
Bradley C. Kuszmaul
ad217c2273 Clean up usage() and initialize activity_count. Fixes #193.
git-svn-id: file:///svn/tokudb@1156 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-17 16:31:31 +00:00
Bradley C. Kuszmaul
586a2b7675 Get rid of test_db_curs3.c, which is derivitive from test_db_assoc3.c
git-svn-id: file:///svn/tokudb@1155 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-17 16:27:03 +00:00
Yoni Fogel
d89f277346 toku_db_put_noassociate will call
get_noassociate instead of get (in case we ever call this on a secondary db).
Addresses #180

git-svn-id: file:///svn/tokudb@1154 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-17 16:21:34 +00:00
Rich Prohaska
d984283041 implement and test cursor->get_both_range. addresses #187
git-svn-id: file:///svn/tokudb@1152 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-17 13:48:20 +00:00
Rich Prohaska
f28b2fedc1 there was a path through the pma_insert_or_replace function that did not set the replace_v_size parameter. this occurred when inserting a key that had been deleted with a cursor reference. closes #191
git-svn-id: file:///svn/tokudb@1148 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-16 20:57:35 +00:00
Rich Prohaska
57a54715c0 make DB_DUP and DB_NODUPDATA warnings not errors. addresses #189
git-svn-id: file:///svn/tokudb@1144 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-15 21:04:59 +00:00
Rich Prohaska
44df006735 after env->close is called the env handle is invalid. this implies that the close happens even if the flags param is non-zero. closes #190
git-svn-id: file:///svn/tokudb@1143 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-15 20:32:33 +00:00
Rich Prohaska
f0f3df1b58 closes #190
git-svn-id: file:///svn/tokudb@1139 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-14 23:04:31 +00:00
Rich Prohaska
9d1694a27b add db->put DB_YESOVERWRITE. addresses #180
git-svn-id: file:///svn/tokudb@1138 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-14 22:56:50 +00:00
Rich Prohaska
2a34c17d63 rollback r1135 update. not yet ready
git-svn-id: file:///svn/tokudb@1136 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-14 20:55:03 +00:00
Rich Prohaska
e61251778c fix cursor->get_both in a dupsort db. closes #185
git-svn-id: file:///svn/tokudb@1135 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-14 20:51:27 +00:00
Rich Prohaska
8af05f08d6 set pma dupsort insert dup dup behaviour to replace. addresses #178
git-svn-id: file:///svn/tokudb@1132 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-14 13:18:47 +00:00
Rich Prohaska
1fb6403b07 remove unsort duplicates. closes #179
git-svn-id: file:///svn/tokudb@1128 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-14 00:49:46 +00:00
Yoni Fogel
af88312df7 Initial implementation of DBC->c_pget
Still requires tests.
Addresses #15

git-svn-id: file:///svn/tokudb@1127 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-13 23:51:47 +00:00
Rich Prohaska
d4a306799b add comment addresses #157
git-svn-id: file:///svn/tokudb@1118 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-13 19:37:11 +00:00
Rich Prohaska
7f55362822 make tokudb->set_flags compatible with bdb->set_flags. closes #157
git-svn-id: file:///svn/tokudb@1116 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-13 15:43:03 +00:00
Rich Prohaska
edbc8caf14 test flags param in db->cursor. addresses #89
git-svn-id: file:///svn/tokudb@1115 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-13 15:15:30 +00:00
Rich Prohaska
8d098df137 cursor->del clears pivots if last match. closes #159
git-svn-id: file:///svn/tokudb@1114 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-13 14:53:18 +00:00
Rich Prohaska
e369366145 fix compile problems
git-svn-id: file:///svn/tokudb@1105 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-12 19:08:05 +00:00
Bradley C. Kuszmaul
bb1933d0dd Add license and copyright. Fixes #151.
git-svn-id: file:///svn/tokudb@1100 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-12 16:32:57 +00:00
Bradley C. Kuszmaul
cad4727404 #162 appears not to be a bug. (It's a bug in the test program.) Fixes #162.
We have tests for DB->associate().  Fixes #61.

assoc3 is a proto-amazon application.  Fixes #134.

There is a problem in the assoc3 test (References #175.)

Warning:  It helps to always use {{{DB_DUP}}} for associated secondary indices.  BDB and TokUDB will both corrupt things if you accidently insert a duplicate without {{{DB_DUP}}}.

DB->associate() appears to work.  Fixes #48.


git-svn-id: file:///svn/tokudb@1096 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-12 15:52:33 +00:00
Bradley C. Kuszmaul
5c316e0c35 Make the test_db_assoc3 test more repeatable.
* Use separate random number generator instead of the one that tokudb uses.
 * Don't use gettimeofday.  Instead look through the timestamps and use 1+ the max of the previous timestamps.  Increment whenever we need a new one.
 * Create a make rule to test it:  Do {{{make test_db_assoc3.tdbrun}}}
Addresses #162.


git-svn-id: file:///svn/tokudb@1095 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-12 15:38:21 +00:00
Rich Prohaska
12c89f3095 change 17 to 9 and the test works
git-svn-id: file:///svn/tokudb@1089 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-12 00:26:08 +00:00
Yoni Fogel
7331e46492 Added DB_UNKNOWN to db.h
You can use DB_UNKNOWN as a dbtype (as long as you don't use DB_EXCL) in dbopen,
and then it will load the flags from the file.

tokudb_dump
    Now supports duplicates/sorted duplicates.
tokudb_load will give a warning about any duplicate duplicate loads
    but will continue with the rest of the data.

Closes #148
Closes #166

git-svn-id: file:///svn/tokudb@1086 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-11 19:34:21 +00:00
Yoni Fogel
b446f09beb Added DB->get_flags to db_create and added toku_db_get_flags
Addresses #166

git-svn-id: file:///svn/tokudb@1085 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-11 18:58:42 +00:00
Yoni Fogel
3bbf5c9a5d DB->set_flags is now additive.
Closes #165

git-svn-id: file:///svn/tokudb@1083 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-11 18:46:47 +00:00
Bradley C. Kuszmaul
8de7c053b0 db_assoc3 is crashing
git-svn-id: file:///svn/tokudb@1079 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-11 16:55:28 +00:00
Bradley C. Kuszmaul
25e613344d Move junk to .junk. Addresses #162.
git-svn-id: file:///svn/tokudb@1077 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-11 14:43:00 +00:00
Bradley C. Kuszmaul
49819f43ff After getting rid of the duplicate keys, there is no bug found by test_db_curs4
git-svn-id: file:///svn/tokudb@1075 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-11 14:40:32 +00:00
Bradley C. Kuszmaul
f80b5ebcf8 Clean up the way cursors are handled. This code shows that something is freed that shouldn't be. Addresses #162.
git-svn-id: file:///svn/tokudb@1073 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-11 12:15:57 +00:00
Bradley C. Kuszmaul
49a904ea1f Cut off the uninteresting tail of the traces. Addresses #162.
git-svn-id: file:///svn/tokudb@1072 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-11 11:21:44 +00:00
Bradley C. Kuszmaul
735669ad58 Do some extra checks. Addresses #162.
git-svn-id: file:///svn/tokudb@1071 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-11 11:20:03 +00:00
Bradley C. Kuszmaul
3e5d772aca Shortened the string as much as I could
git-svn-id: file:///svn/tokudb@1070 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-11 11:16:40 +00:00
Bradley C. Kuszmaul
9797268da5 Shorten the name strings (but cannot shorten them all without encountering a BDB bug. Addresses #162.
git-svn-id: file:///svn/tokudb@1069 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-11 11:03:29 +00:00
Bradley C. Kuszmaul
7cac629817 Simplify further. Addresses #162.
git-svn-id: file:///svn/tokudb@1068 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-11 10:51:02 +00:00
Bradley C. Kuszmaul
fab0a6aa16 Get rid of random seeds. Addresses #162.
git-svn-id: file:///svn/tokudb@1067 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-11 10:27:30 +00:00
Bradley C. Kuszmaul
b5ca65fe2e Get rid of random seeds. Addresses #162.
git-svn-id: file:///svn/tokudb@1066 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-11 10:26:42 +00:00
Bradley C. Kuszmaul
04d6f31073 Get rid of a bunch of unused code. For example, no longer relies on random. Addresses #162.
git-svn-id: file:///svn/tokudb@1065 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-11 10:25:23 +00:00
Bradley C. Kuszmaul
e251c5cbed Start changing timestamp to 1 byte instead of 8. Addresses #162.
git-svn-id: file:///svn/tokudb@1064 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-11 10:11:15 +00:00
Bradley C. Kuszmaul
868a5dd8b8 Shorten the trace. Addresses #162.
git-svn-id: file:///svn/tokudb@1063 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-11 10:07:14 +00:00
Bradley C. Kuszmaul
be6b85b01c We now have divergent traces from BDB and TokuDB. Addreses #162.
git-svn-id: file:///svn/tokudb@1060 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-11 01:19:26 +00:00
Bradley C. Kuszmaul
b756f84dc1 c4.tdb runs, but c4.bdb returns EINVAL for a DB->put. I don't get it. Addresses #162
git-svn-id: file:///svn/tokudb@1059 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-10 23:04:44 +00:00
Bradley C. Kuszmaul
e6e47e5e8c test_db_curs4 is good, but too much randomness
git-svn-id: file:///svn/tokudb@1057 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-10 22:32:30 +00:00
Yoni Fogel
123dd77a8f c_pget makes certain never to touch original parameters until/unless success happens.
Code is cleaner now with less special cases, handles DB_DBT_(MALLOC|REALLOC|USERMEM) as well as no flags now.
Closes #144

git-svn-id: file:///svn/tokudb@1037 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-10 18:54:12 +00:00
Bradley C. Kuszmaul
a6736215c4 seeing the problem with {{{make && ./test_db_curs2.tdb 1 && ./test_db_curs2.tdb 1 --more}}}. Addresses #162.
git-svn-id: file:///svn/tokudb@1036 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-10 18:34:38 +00:00
Bradley C. Kuszmaul
06dd703781 Somehow messed up. Start over trying to recreate the problem. Addresses #162.
git-svn-id: file:///svn/tokudb@1035 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-10 17:10:53 +00:00
Yoni Fogel
012f706b67 DB_DBT_(MALLOC|REALOC|USERMEM) now behave the same as BDB.
We never touch ulen.  If DB_DBT_USERMEM and ulen is too small, we set size, (do not write anything)
and return DB_BUFFER_SMALL.

This includes test_db_dbt_mem_behavior.c
Closes #146

git-svn-id: file:///svn/tokudb@1034 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-10 17:04:02 +00:00
Bradley C. Kuszmaul
7b6b48673d Removing a bunch of ops, and still have it with
make && ./test_db_cursor.tdb && ./test_db_cursor.tdb --more
Addresses #162.


git-svn-id: file:///svn/tokudb@1033 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-10 15:58:21 +00:00
Rich Prohaska
3b5b5561c2 test case addresses #154
git-svn-id: file:///svn/tokudb@1032 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-10 15:41:31 +00:00
Bradley C. Kuszmaul
a112b6ee7f Addresses #162.
Simplified version has trouble if we change the line 402 to a 3 or a 2 then its bad or good to do:
 make && ./test_db_cursor.tdb 1 && ./test_db_cursor.tdb 1 --more


git-svn-id: file:///svn/tokudb@1031 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-10 15:40:50 +00:00