summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/schema
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/wiredtiger/src/schema')
-rw-r--r--src/third_party/wiredtiger/src/schema/schema_create.c2
-rw-r--r--src/third_party/wiredtiger/src/schema/schema_open.c6
-rw-r--r--src/third_party/wiredtiger/src/schema/schema_rename.c4
-rw-r--r--src/third_party/wiredtiger/src/schema/schema_stat.c8
4 files changed, 14 insertions, 6 deletions
diff --git a/src/third_party/wiredtiger/src/schema/schema_create.c b/src/third_party/wiredtiger/src/schema/schema_create.c
index 756f1fdcc6c..67d64cf1c75 100644
--- a/src/third_party/wiredtiger/src/schema/schema_create.c
+++ b/src/third_party/wiredtiger/src/schema/schema_create.c
@@ -35,7 +35,7 @@ __wt_direct_io_size_check(WT_SESSION_IMPL *session,
* units of its happy place.
*/
if (FLD_ISSET(conn->direct_io,
- WT_FILE_TYPE_CHECKPOINT | WT_FILE_TYPE_DATA)) {
+ WT_DIRECT_IO_CHECKPOINT | WT_DIRECT_IO_DATA)) {
align = (int64_t)conn->buffer_alignment;
if (align != 0 && (cval.val < align || cval.val % align != 0))
WT_RET_MSG(session, EINVAL,
diff --git a/src/third_party/wiredtiger/src/schema/schema_open.c b/src/third_party/wiredtiger/src/schema/schema_open.c
index e7ce4e42498..1554d021953 100644
--- a/src/third_party/wiredtiger/src/schema/schema_open.c
+++ b/src/third_party/wiredtiger/src/schema/schema_open.c
@@ -427,6 +427,8 @@ __schema_open_table(WT_SESSION_IMPL *session,
const char *tconfig;
char *tablename;
+ *tablep = NULL;
+
cursor = NULL;
table = NULL;
tablename = NULL;
@@ -527,6 +529,8 @@ __wt_schema_get_colgroup(WT_SESSION_IMPL *session,
const char *tablename, *tend;
u_int i;
+ if (tablep != NULL)
+ *tablep = NULL;
*colgroupp = NULL;
tablename = uri;
@@ -571,6 +575,8 @@ __wt_schema_get_index(WT_SESSION_IMPL *session,
const char *tablename, *tend;
u_int i;
+ if (tablep != NULL)
+ *tablep = NULL;
*indexp = NULL;
tablename = uri;
diff --git a/src/third_party/wiredtiger/src/schema/schema_rename.c b/src/third_party/wiredtiger/src/schema/schema_rename.c
index 21402ed9332..8f4d374fd22 100644
--- a/src/third_party/wiredtiger/src/schema/schema_rename.c
+++ b/src/third_party/wiredtiger/src/schema/schema_rename.c
@@ -55,7 +55,7 @@ __rename_file(
default:
WT_ERR(ret);
}
- WT_ERR(__wt_exist(session, newfile, &exist));
+ WT_ERR(__wt_fs_exist(session, newfile, &exist));
if (exist)
WT_ERR_MSG(session, EEXIST, "%s", newfile);
@@ -64,7 +64,7 @@ __rename_file(
WT_ERR(__wt_metadata_insert(session, newuri, oldvalue));
/* Rename the underlying file. */
- WT_ERR(__wt_rename(session, filename, newfile));
+ WT_ERR(__wt_fs_rename(session, filename, newfile));
if (WT_META_TRACKING(session))
WT_ERR(__wt_meta_track_fileop(session, uri, newuri));
diff --git a/src/third_party/wiredtiger/src/schema/schema_stat.c b/src/third_party/wiredtiger/src/schema/schema_stat.c
index d3d0605c60a..c204d6b1a24 100644
--- a/src/third_party/wiredtiger/src/schema/schema_stat.c
+++ b/src/third_party/wiredtiger/src/schema/schema_stat.c
@@ -69,6 +69,7 @@ __curstat_size_only(WT_SESSION_IMPL *session,
WT_ITEM namebuf;
wt_off_t filesize;
char *tableconf;
+ bool exist;
WT_CLEAR(namebuf);
*was_fast = false;
@@ -96,10 +97,11 @@ __curstat_size_only(WT_SESSION_IMPL *session,
* are concurrent schema level operations (for example drop). That is
* fine - failing here results in falling back to the slow path of
* opening the handle.
- * !!! Deliberately discard the return code from a failed call - the
- * error is flagged by not setting fast to true.
*/
- if (__wt_filesize_name(session, namebuf.data, true, &filesize) == 0) {
+ WT_ERR(__wt_fs_exist(session, namebuf.data, &exist));
+ if (exist) {
+ WT_ERR(__wt_fs_size(session, namebuf.data, &filesize));
+
/* Setup and populate the statistics structure */
__wt_stat_dsrc_init_single(&cst->u.dsrc_stats);
cst->u.dsrc_stats.block_size = filesize;