This is an example demonstrating how to enable and update extra diagnostic code at runtime.
#include <test_util.h>
static const char *home;
int
main(int argc, char *argv[])
{
home = example_setup(argc, argv);
#ifdef HAVE_DIAGNOSTIC
testutil_assert(
wiredtiger_open(home, NULL,
"create,extra_diagnostics=[key_out_of_order]", &conn) == EINVAL);
#else
error_check(
wiredtiger_open(home, NULL,
"create,extra_diagnostics=[key_out_of_order]", &conn));
error_check(conn->
reconfigure(conn,
"extra_diagnostics=[txn_visibility]"));
#endif
return (EXIT_SUCCESS);
}
int wiredtiger_open(const char *home, WT_EVENT_HANDLER *event_handler, const char *config, WT_CONNECTION **connectionp)
Open a connection to a database.
A connection to a WiredTiger database.
Definition wiredtiger.in:2106
int reconfigure(WT_CONNECTION *connection, const char *config)