* WT-2658 Only include PPC-specific files in PPC builds
* Add support for conditional file inclusion by adding a second argument on lines in dist/filelist. Add a new automake conditional, POWERPC_HOST, set for the various PPC host CPUs. Change dist/filelist to only compile the checksum/power8 files if POWERPC_HOST is set.
* Merge the Windows and POSIX file lists, use POSIX_HOST and WINDOWS_HOST to mark source files needed for builds on those systems.
Define system call success as a 0 return, and split error handling into two parts: if the call returns -1, use errno, otherwise expect the failing return to be an error value.
Replace calls to remove with unlink, so we know errno will be set. Do the best we can with rename, there's no easy workaround.
POSIX requires posix_madvise return an errno value, but some OS versions return a -1/errno pair instead (at least FreeBSD and OS X). I don't care about retrying posix_madvise calls on failure, but since WT_SYSCALL_RETRY includes the necessary error handling magic, wrap the posix_madvise calls in WT_SYSCALL_RETRY.
Remove the need for a hash and name comparison to identify the metadata file, set a flag in the data handle when the file is opened.
Move the code to insert the data handle into the connection list from the find function to the allocate function for clarity.
We used to ensure it was at least 50 times the leaf page size, enhancements to how we split pages mean that's no longer necessary.
While reviewing the code adjust the maximum page size allowed to ten percent of the cache size. It is more reasonable for workloads with multiple tables, and should only be relevant when applications configure tiny caches.
* WT-2268 Change dump representation so every byte represents a single 0x00-0xff
Unicode character. Otherwise arbitrary binary data (that does not conform to
Unicode) cannot be represented. Fix an off-by-one error in counting bytes
on input. Added some better Unicode tests.
* JSON Dump now uses a 'dump version' stamp, as well as showing WT version.
Dump input that is too old, and input that is too new will be rejected.
* In setting a key for dump, converting a JSON string must always occur first.
* When loading JSON, treat binary data just like strings.
Fixed an error in determining the string length of JSON in the presence
of Unicode strings.
* Add LSM tests to JSON dump/load testing.
* Add more extensive testing for dump/reload of JSON binary data.
* Byte arrays differ from strings for JSON input, they do not null terminate.
Handle escapes like '\n', '\t', etc. on input.
* Added tests of JSON dump/load of all byte codes.
* whitespace
* WT-2660 Fix eviction hang when closing.
* Real fix: return if we're closing the connection.
* Move check for connection close into wt_eviction_needed.
* Fill in pct_full before returning.
* Whitespace
* WT-2660 Uninitialized variable
* WT-2660 Fix eviction hang when closing.
* Real fix: return if we're closing the connection.
* Move check for connection close into wt_eviction_needed.
* Fill in pct_full before returning.
* Whitespace
* WT-2661: Coverity failures: 1356050-1356053
CID 1356050: (NULL_RETURNS)
Dereferencing a pointer that might be null "opts->home" when calling "snprintf".
CID 1356050: (NULL_RETURNS)
Dereferencing a pointer that might be null "opts->uri" when calling "snprintf".
* Assigning address of auto variable '_opts' to static (it's an auto
variable in main(), so it's safe, but make lint happy).
* Coverity appears to be confused by argv handling and eventually passing
NULL to snprintf.
2. var_assign_alias: Assigning: opts->progname = argv[0]. Both
are now tainted.
47. vararg_transitive: Call to snprintf with tainted argument
opts->progname taints NULL.
48. tainted_data_sink_lv_call: Passing tainted variable 0UL to
tainted data sink snprintf.
NULL is tainted? I'm hoping that using a strlen() call to figure out the
string length instead of snprintf() will make this one go away.
* test_wt2246_col_append wasn't actually doing any work, set nrecords to
a 20 million default.
* KNF
* Don't use "inline" in example programs, it requires Windows #ifdef's.
Add examples of passing in per-device configuration information to the demo file system initialization function.
Use the WiredTiger extension API to handle errors in functions called by WiredTiger.
Set the default session's strerror method. If one of the extensions being loaded reports an error via the WT_EXTENSION_API strerror method, but doesn't supply that method a WT_SESSION handle, we'll use the WT_CONNECTION_IMPL's default session and its strerror method.
* WT-2659: csuite tests, assorted lint and cleanup.
Fail if memory allocation fails, ignore usleep() and pthread_join()
returns.
* Don't check for NULL before calling free, free does that for you.
* Convert (int) casts to the correct printf format string, KNF.
* Assert that ret == WT_NOTFOUND when exiting the WT_CURSOR.next loop
(Warning 438: Last value assigned to variable 'ret' (defined at line
122) not used).
Add testutil_assert macro to make it easy to assert boolean values.
* Explicit global initialization.
* Use correct printf format types instead of casting to (int), KNF.
* Remove unused variable.
* Fix testutil_assert() to lint cleanly.
* Assert various WiredTiger functions succeed.
* Default checkpoint_wait is true. This change is useful because it means concurrent create/drop calls don't generate EBUSY returns.
* Mark lock_wait and checkpoint_wait as undoc
* WT-2554 Add initial C test framework.
With a few sample applications. Need to do further work to cleanup
the same applications and share as much code/style as possible.
* WT-2554 Fixup build errors.
* Fix compiler warning.
* Cleanup
* Ensure each test runs in a different directory.
* Update C test suite names and add copyright.
* Move test code into subdirectories.
* Replace test_util.i with a real utility library now that we have one.
Nothing needs to be an inline function.
Mostly cherry picked from 7c18420.
* Use WiredTiger getopt in C test suite for platform portability.
* Add a header comment to each test case.
* Add a C test suite entry auto generator
* Style, KNF
* Implement review feedback.
* Build test/utility library on Windows
* Add comment to script. Fix a printf.
* Free memory when returning an error.
* Remove unnecessary parenthesis.
* Make repeated addition/subtraction operator order of evaluation explicit.
* Remove repeated #includes.
* Some minor restructuring of the config file parsing to handle more
complicated line continuation and whitespace combinations.
* Modify wtperf to handle escaped quotes.
* Made local function static.
Added backslash in quote (normally redundant) needed to keep spell check sane.
Fixed C++ style comment.
* WT-2644 recognize lsm: URLs in the list of items to be renamed.
* Add a test to load a dump file, renaming the url. Fix other dump/load tests,
as the populate_check methods always use self.session. Up to now they were only
confirming that tables in the current directory were correct, not tables
in the dump.dir directory.
* WT-2637: The file-extension documentation doesn't cover not-supported cases
Clarify not-supported cases in the file-extension documentation.
Public domain the POSIX file system implementation, it's a natural
starting point for anyone writing their own implementation.
* Fix a typo, add some wording around when methods can be changed after
hnadle creation.
* Add a pointer to ex_file_system.c, the principle custom file system
example.
Don't clean up reconciliation structures before they've been initialized.
Fix two paths where scratch buffers could be allocated and fail to be
released.
* WT-2627: Coverity complaints
Coverity complaint 1354814: error path leaking allocated memory.
Initially clear caller's handle in __wt_fopen().
* Coverity 1355027 thinks there's a path to leak memory in:
__backup_list_uri_append()
calls __wt_metadata_search()
calls__wt_turtle_read()
calls __metadata_config()
calls __wt_config_collapse()
which I think should only happen if one of those functions allocates
memory and then returns an error, and I don't see it.
Change __wt_config_collapse to always clear the caller's
memory location, it's good practice.
Simplify __metadata_config slightly, we don't need need a local variable
into which we store the allocated memory, and there's no error path that
might need to free that allocated memory, hope that helps Coverity.
* Whitespace, KNF.
* Whitespace
Don't print "home" if it's NULL.
Make ex_async work like the rest of the example programs, creating and
using WT_HOME.
* We need two sizes, the size of the data in the buffer and the size of the
buffer itself, split the two apart, otherwise it's possible to read data
that's never been written.
Remove the assert the file size is never 0, that's a reasonable condition
if the file has never been written.
Don't bother realloc the buffer when truncating it to a smaller size.
* Add a full smoke test, create a table then write it, close and reopen
it, and read the values back.
* main() should return EXIT_SUCCESS or EXIT_FAILURE, not a return value
from the underlying WiredTiger library.
Don't queue threads for checkpoint operations, just skip the scheduled
checkpoint operation if a checkpoint is already in progress.
Don't wait for backups to complete if scheduled to do a named checkpoint,
do an unnamed checkpoint instead.
Fix a bug: we were scheduling named checkpoints 80% of the time instead
of the documented 20%; change that number to 5%, named checkpoints aren't
worth testing that heavily.
Don't bother avoiding scheduling two named checkpoints in a row, it's
not worth the effort.