| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* WT-2693 Check open_cursor error paths for consistent handling
There's a problem with cursor functions which don't call their typed
close functions, relying instead on a simple free of the base cursor
type because the __wt_cursor_init() function is the last function called
before successful return. The problem is __wt_cursor_init() doesn't
clean up after itself: for example, it allocates memory to hold the URI
in WT_CURSOR.internal_uri, then has a number of subsequent potential
error returns, and WT_CURSOR.internal_uri won't be free'd unless
__wt_cursor_close() is called. In other words, we should always call
the typed closed function (which in turn calls __wt_cursor_close()).
Specific additional concerns:
cursor/cur_backup.c: __wt_curbackup_open() doesn't turn off backups or
clear the hot-backup flag if __wt_cursor_init() fails, which will hang
the process. Remove the cleanup-on-error code from the __backup_start()
function and rely instead on the backup cursor's close function to do
the work. There's a problem if we fail the initial backup cursor test,
in which case we don't want to do cleanup other than discarding the
cursors themselves. Add the WT_CURBACKUP_LOCKER flag to the
WT_CURSOR_BACKUP structure, which isn't set until we're holding the hot
backup cursor flag, and use it to figure out how much cleanup needs to
be done.
cursor/cur_file.c: the change to call the __curfile_close() function has
a problem with __wt_bulk_wrapup(), which assumes WT_CURSOR_BULK.reconcile
has been initialized, change it to check for NULL.
cursor/cur_file.c: the change to call the __curfile_close() function has
a problem with incrementing the data-source's in-use counter. Instead
of incrementing the counter in __wt_curfile_open() before calling
__curfile_create(), increment it in __curfile_create() after the point
where all failure paths close the cursor.
cursor/cur_log.c: the change to call the __curlog_close() function means
we may be required to clean up a cursor that has not yet acquired the
log archive lock. Add the WT_CURLOG_ARCHIVE_LOCK flag to the WT_CURSOR_LOG
structure so the close function knows if the log archive lock needs to be
released.
cursor/cur_log.c: remove the __curlog_reset() call from __curlog_close(),
we're closing the cursor, resetting it doesn't do anything useful.
cursor/cur_metadata.c: the change to call the __curmetadata_close()
function is slightly tricky, be cautious about closing the underlying
WT_CURSOR_METADATA.file_cursor field, it may not be set when we call
__curmetadata_close().
* comment typo
* fix a comment
* Add explicit comment on the life-cycle of the WT_CURBACKUP_LOCKER flag.
* Review comment, set a specific size on the flags field. Generally, the
cursors all use uint8_t for flags, and I don't think it matters much
what we use, use the same thing everywhere.
|
|
|
|
|
| |
gcc 4.7, clang 3.4 and clang 3.8 all complain about different things;
cast the arguments to our new wrapper functions, hopefully that makes
all of the complaints go away.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Cast arguments for ctype functions to avoid sign extension errors.
Create __wt_* versions of all ctype functions, and use them whenever
wt_internal.h is available. Add check to prevent direct use of ctype functions
from core source.
* Change wrappers to use u_char arguments, and return bool.
Remove unused wrappers.
* Use u_char in preference to unsigned char.
* Examples do not have u_char defined on Windows.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
| |
Don't cast function pointers to different types, it's undefined behavior.
Fixes for the cursor layer.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- "join:" URI handling added to WT_SESSION::open_cursor, added WT_SESSION::join.
- Added support for in-memory bloom filters.
- Minor fix to cur_dump_close CURSOR_API_CALL.
- Some refactoring in __wt_{curindex,curtable}_get_value() to allow them
to be called internally.
- Use new macro JOINABLE_CURSOR_API_CALL() instead of CURSOR_API_CALL()
to trap illegal calls to joined cursor.
- __wt_curtable_open now takes an owning cursor arg.
- Added __wt_struct_unpack_size() and __wt_struct_repack()
|
| |
|
|
|
|
| |
boolean expression and add F_MASK for applying a mask to flags.
|
|
|
|
| |
naming with the standard public name.
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
src/cursor/cur_std.c
src/cursor/cur_table.c
src/include/extern.h
|
| |\ |
|
| |\ \
| | | |
| | | |
| | | |
| | | | |
Conflicts:
src/cursor/cur_metadata.c
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
While here, add a generic cursor equals stub in curstd, rather than
redirecting via cursor function pointer lists.
Implement the Java API wrapper.
|
| |_|/
|/| | |
|
| |/
|/| |
|
|/
|
|
|
| |
create the macro __wt_calloc_one that doesn't take a count or a
sizeof.
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
dist/s_string.ok
src/include/extern.h
src/utilities/util_load.c
|
| |
| |
| |
| |
| |
| | |
far too likely to be seen in the field), prefix it with WT
SIZE_CHECK is local to include/verify_build.h, make sure it stays
there.
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Since we document that is how it works.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
don't need, except for get/set-key and get/set-value, almost all of the
methods are explicitly set, it's simpler to set them all then to leave
that code in place.
Two real changes besides the semantic sugar: change the config cursor
reset method from not-supported to a no-op, that's the default, delete
the __cursor_search function (the default search method), no code needed
it.
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Allow set_key and set_value on JSON cursors. The argument is a string
that is interpreted as JSON and must match the format created by a JSON
dump cursor or the 'wt dump -j' command.
Add -j option to 'wt load' utility to allow loading JSON.
Small adjustment to Python interface so that JSON cursor key/values inputs
are always treated as strings.
Added doc and Python tests for JSON cursors and wt load -j.
|
|
|
|
|
| |
which doesn't; create API_END_RET and API_END_RET_NOTFOUND_MAP, leave
API_END for functions without any return value.
|
| |
|
|
|
|
| |
fail to call call va_end().
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| | |
refs #969
|
|/ |
|
|
|
|
| |
Move lang/java and lang/python into the public domain.
|
|
|
|
| |
s_style).
|
|
|
|
| |
follow the standard cursor patterns.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can't stack a random set of entries into a cfg[] because we don't
want to allocate memory in the API. Instead, whenever a method's
arguments are reconfigured, re-build the base configuration string by
appending the new configuration, and re-build the checks array, that way
we always have a single base configuration string and a single checks
array.
Re-work how we're handling lists, we can't expect the application to
crack them, they can be seriously messy. If it's a list, create an
array of NULL-terminated refrences to nul-terminated strings (create
an "argv" array, in other words). It's ugly, and the user has to free
the memory, but I don't see an alternative.
|
|
|
|
|
|
|
|
| |
method, WT_CONNECTION::configure_method.
For some reason I can'quite figure out, this set of changes made lint run a
bunch better on some sources, and showed up a few different uninitialized
variables in error paths. Got me why, but they're real, and I fixed them.
|
|
|
|
|
|
|
|
|
|
|
|
| |
structure: create the array of WT_CONFIG_ENTRY structures that the connection
references, and a set of #defines so we can easily reference any single slot.
Replace API_CONF_DEFAULTS and explicit references to the old structures with
WT_CONFIG_VALUE and WT_CONFIG_CHECKS.
Some (hopefully) minor shuffling of the cfg array manipulation in various
chunks of code. The test suite and various test programs run with this
change.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
of API_END/return consistent, a blank line before the error label,
API_END next to the return.
|
|
|
|
| |
of our namespace.
|
|
|
|
|
| |
This simplifies code that tried to get the effect of auto-commit internally.
closes #309, refs #310
|
| |
|