summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/examples/c/ex_file_system.c
diff options
context:
space:
mode:
authorAlex Gorrod <alexander.gorrod@mongodb.com>2017-03-02 13:34:29 +1100
committerAlex Gorrod <alexander.gorrod@mongodb.com>2017-03-02 13:40:59 +1100
commit086c21e2b4c87952273fde78ab8fb18f18e8fdc6 (patch)
tree23f231369745a7d2e724f6db1ad4473a85db36aa /src/third_party/wiredtiger/examples/c/ex_file_system.c
parente73cfbddea6d3f5c1499f93878679a768aa97dff (diff)
downloadmongo-086c21e2b4c87952273fde78ab8fb18f18e8fdc6.tar.gz
Import wiredtiger: d6659de8d742b9562d08c1ba5138be881f8e24fa from branch mongodb-3.4
ref: 8d23249433..d6659de8d7 for: 3.4.3 SERVER-16796 Increase logging activity for journal recovery operations WT-2402 Misaligned structure accesses lead to undefined behavior WT-2771 Add a statistic to track per-btree dirty cache usage WT-2790 Fix a text case false positive in test_sweep01 WT-2833 improvement: add projections to wt dump utility WT-2898 Improve performance of eviction-heavy workloads by dynamically controlling the number of eviction threads WT-2909 Create automatable test verifying checkpoint integrity after errors WT-2994 Create documentation describing page sizes and relationships WT-3080 Python test suite: add timestamp or elapsed time for tests WT-3082 Python test suite: shorten default run to avoid pull request timeouts. WT-3083 Fix a bug in wtperf config dump WT-3086 Add transaction state information to cache stuck diagnostic information WT-3088 bug: Don't evict a page with refs visible to readers after a split WT-3091 Add stats to test_perf0001 WT-3092 Quiet a warning from autogen.sh WT-3093 Padding the WT_RWLOCK structure grew the WT_PAGE structure. WT-3097 Race on reconfigure or shutdown can lead to waiting for statistics log server WT-3099 lint: static function declarations, non-text characters in documentation WT-3100 test bug: format is weighted to delete, insert, then write operations. WT-3104 Fix wtperf configs for eviction tests WT-3105 Fix a deadlock caused by allocating eviction thread sessions dynamically WT-3106 Add truncate support to command line wt utility WT-3108 Also dump disk page size as part of metadata information WT-3109 wording fix in transaction doc WT-3110 Add more test cases for the WT command line utility WT-3111 util_create() doesnt free memory assigned to "uri" WT-3112 Handle list lock statistic not incremented in eviction server WT-3113 Add a verbose mode to dump the cache when eviction is stuck WT-3114 Avoid archiving log files immediately after recovery WT-3115 Change the dhandle lock to a read/write lock WT-3116 Python style testing in s_all may not execute correctly WT-3118 Protect random-abort test against unexpectedly slow child start WT-3120 Fix ordering problem in connection_close for filesystem loaded in an extension WT-3121 In test suite create standard way to load extensions WT-3126 Fix a bug in dist/s_all script WT-3127 bug: CPU yield calls don't necessarily imply memory barriers WT-3128 Fix a bug where wt printlog returns operation-not-supported if it doesn't find any log files WT-3130 Proposal to change initialization of custom filesystem WT-3134 Coverity scan reports 1368529 and 1368528 WT-3135 search_near() for index with custom collator WT-3137 Hang in __log_slot_join/__log_slot_switch_internal WT-3139 Enhance wtperf to support periodic table scans WT-3143 Fix Coverity static analysis complaint in test program WT-3144 bug fix: random cursor returns not-found when descending to an empty page WT-3148 Improve eviction efficiency with many small trees WT-3149 Change eviction to start new walks from a random place in the tree WT-3150 Reduce impact of checkpoints on eviction server WT-3152 Convert table lock from a spinlock to a read write lock WT-3156 Assertion in log_write fires after write failure WT-3157 checkpoint/transaction integrity issue when writes fail. WT-3159 Incorrect key for index containing multiple variable sized entries WT-3161 checkpoint hang after write failure injection. WT-3164 Ensure all relevant btree fields are reset on checkpoint error WT-3170 Clear the eviction walk point while populating from a tree WT-3173 Add runtime detection for s390x CRC32 hardware support WT-3174 Coverity/lint cleanup WT-3175 New hang in internal page split WT-3179 test bug: clang sanitizer failure in fail_fs WT-3180 fault injection tests should only run as "long" tests and should not create core files WT-3184 Problem duplicating index cursor with custom collator WT-3186 Fix error path and panic detection in logging loops WT-3187 Hang on shutdown with a busy cache pool WT-3188 Fix error handling in logging where fatal errors could lead to a hang WT-3189 Fix a segfault in the eviction server random positioning
Diffstat (limited to 'src/third_party/wiredtiger/examples/c/ex_file_system.c')
-rw-r--r--src/third_party/wiredtiger/examples/c/ex_file_system.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/third_party/wiredtiger/examples/c/ex_file_system.c b/src/third_party/wiredtiger/examples/c/ex_file_system.c
index 56869171558..e807ac54d3b 100644
--- a/src/third_party/wiredtiger/examples/c/ex_file_system.c
+++ b/src/third_party/wiredtiger/examples/c/ex_file_system.c
@@ -399,6 +399,7 @@ demo_fs_directory_list(WT_FILE_SYSTEM *file_system,
uint32_t allocated, count;
int ret = 0;
char *name, **entries;
+ void *p;
(void)session; /* Unused */
@@ -424,14 +425,16 @@ demo_fs_directory_list(WT_FILE_SYSTEM *file_system,
* matter if the list is a bit longer than necessary.
*/
if (count >= allocated) {
- entries = realloc(
- entries, (allocated + 10) * sizeof(char *));
- if (entries == NULL) {
+ p = realloc(
+ entries, (allocated + 10) * sizeof(*entries));
+ if (p == NULL) {
ret = ENOMEM;
goto err;
}
- memset(entries + allocated * sizeof(char *),
- 0, 10 * sizeof(char *));
+
+ entries = p;
+ memset(entries + allocated * sizeof(*entries),
+ 0, 10 * sizeof(*entries));
allocated += 10;
}
entries[count++] = strdup(name);