Commit Graph

13 Commits

Author SHA1 Message Date
Keith Bostic
78bd4f8995 Implement the wiredtiger_open "create" and "exclusive" configuration
flags, and hook them up to the WT_CONNECTION->is_new method.

Add a global structure (WT_PROCESS), which includes a mutex and
maintains a linked list of the WT_CONNECTION structures in the process.

Change the underlying "file exists" function to correctly return errors,
rather than including errors in "file doesn't exist" returns.

The only place we're using the string output separator is in the debug
code, remove it from the "global" structure, and make it static in the
Btree debug file.

Move the close of the logging file handle into WT_CONNECTION destroy,
instead of doing in connection close.   This isn't right, but right now
we don't have a good dividing line between what code in
connection-open/connection-close, connection-init/connection-destroy,
and then there's a bunch of initialization in wiredtiger_open too.

Delete the home/mode arguments from __wt_connection_open, they were
never used and I think they are never going to be used, at this point.

Minor re-working of the mutex functions so they handle NULL WT_SESSION
handles correctly.
2011-10-01 10:11:01 +00:00
Keith Bostic
f23af55849 Minor cleanup, we only need a single counter.
--HG--
extra : rebase_source : 5b415206085f26b0912418ad6c49aee956d0b349
2011-09-22 13:32:40 +00:00
Keith Bostic
01e168f0f9 add support for search-near in column-store files.
delete timespecsub (not used)

--HG--
extra : rebase_source : 34eac7446f51e51ed19403d032251d7eeb0ba033
2011-09-22 13:27:56 +00:00
Keith Bostic
245dd3640a Last change broke configuration -- typo in the config string code.
--HG--
extra : rebase_source : 2c6bd42545a5e356b7e81725b896cd604d5fa515
2011-09-22 12:54:00 +00:00
Keith Bostic
6b90d5f419 Insert doesn't need to set page or allocation sizes, remove that code.
Don't search for the <newline> on the string, that guarantees we never match.

--HG--
extra : rebase_source : 4c1e38d1dbfbd9758cb1968f5c284de6b17b823b
2011-09-22 12:51:25 +00:00
Keith Bostic
48b2ea62f9 Remove the second row-store append loop, always time the first insert loop.
--HG--
extra : rebase_source : f394dd9d18094ea64a4bb71e2ebfeb2043ee0c7e
2011-09-11 10:06:43 +00:00
Keith Bostic
92b78da376 Make the cursor->search_near method's "exact" argument work.
Add cursor->search function for Btree tables, cursor->search_near has
to do quite a bit more work if there's no exact match, we don't want
to slow down normal lookup.

Replace WT_CURSOR_BTREE->match with WT_CURSOR_BTREE->compare which
matches the semantics of the exact parameter to cursor->search_near,
that is, -1 if it's a smaller key in the tree, 0 for an exact match,
and 1 if it's a larger key in the tree.

The cursor->search_near function has to return a key if the match is
not exact: change __wt_return_value() to optionally return a key, and
rename it to __wt_kv_return().

Split read statistics into read and read-near.

Move set of WT_CURSOR_BTREE->flags(WT_CBT_SEARCH_SET) down into the
search routines.

Change __cursor_deleted() to be a boolean, not returning an error value,
we don't necessarily return error on deleted records.

The search routines don't return WT_RESTART, that only happens if the
tree is modified: remove restart loops from search calls, add restart
loops to modify calls.
2011-09-05 09:54:27 +00:00
Keith Bostic
b79cbcdd7c Now that cursors have real semantics, we have to get the cursor back to
the first record in order to print -- rather than doing a call to first,
just close & re-open the cursor.
2011-08-31 12:04:28 +00:00
Keith Bostic
733a238621 cursor->update is update-only, insert fails, switch to cursor->insert.
--HG--
extra : rebase_source : c79a8079f6f68d680095bd64bb03df969f46063f
2011-08-23 16:51:50 +00:00
Keith Bostic
c01843e378 The insert test program doesn't need wt_internal.h, it should use
the public wiredtiger.h.
2011-08-05 12:52:36 -04:00
Michael Cahill
470e6454b9 Use typed columns in the insert test, don't modify cursor->recno directly. 2011-08-03 16:12:18 +10:00
Michael Cahill
1e0b37f18b Switch the insert test to use plain old clock() for timing for portability. 2011-08-01 21:45:24 +10:00
Keith Bostic
9f4355007c Add an insert test program. 2011-07-27 22:04:15 -04:00