Change the WT_SESSION's WT_EVENT_HANDLER reference to be a real
structure, and copy values into it instead of simply pointing to the
user-specified structure. The argument for using a reference is the
application can swap functions whenever it feels like it, the argument
against using a reference is that if the application allocates the
structure only long enough to call wiredtiger_open, we're going to drop
core. We don't document that the structure needs to persist, and if the
application wants to swap functions, it can do it inside the function
it gives us, so using a real structure doesn't lose any functionality.
Change the semantics of the event-handler error function (used
to return void, now returns int) and the progress function (used to
return int, now returns void). Change the semantics of the erorr and
informational handlers so that if the handler returns failure, we
fallback to the default behavior.
Document the event-handler parameters.
Change the code so that a missing handler calls the default
handler function: that means a NULL event-handler structure does the
right thing, and eliminates the need for __wt_event_handler_default
and some initialization code in a few places, and the need to make
the default error and informational message handlers look like the
application-specified versions.
Delete api/api_event.c, move the default informational and
error message handlers into support/err.c Delete the default progress
message handler entirely, it didn't do anything.
Delete include/progress.i (The only function the file had was
the default progress handler function, __wt_progress, which is only used
by verify and salvage, the compiler can inline it if it wants.) Moved
__wt_progress to support/err.c.
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.
set-key, search and search-near.
Change the statistics cursor "key" to be the description field of the
statistic (the previous key was the internal name, and while the
description field isn't a great choice because it might easily change,
the internal name is completely useless).
Change the order of the raw statistics return from v,pval to pval,v,
so it matches the printable return.
Add the -p option to the "wt stat" command, it prints out all stats
with the specified prefix.