diff options
author | Susan LoVerso <sue@mongodb.com> | 2016-02-10 13:15:44 -0500 |
---|---|---|
committer | Susan LoVerso <sue@mongodb.com> | 2016-02-10 13:15:44 -0500 |
commit | c09b6acc7ad97f202d57bf966e12aac10a59f04d (patch) | |
tree | 143f8d53d4296a4cfc2d9d541dfb14cd15257d7d /src/session | |
parent | 5c872815b1f6b42f73056ee9d837b0ceafcd74d7 (diff) | |
download | mongo-c09b6acc7ad97f202d57bf966e12aac10a59f04d.tar.gz |
WT-2349 Add test testing methods not supported.
Added error message to unsupported options and fixed several tests to
check for that message.
Diffstat (limited to 'src/session')
-rw-r--r-- | src/session/session_api.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/session/session_api.c b/src/session/session_api.c index ea524b12ada..e2723c660fe 100644 --- a/src/session/session_api.c +++ b/src/session/session_api.c @@ -20,10 +20,12 @@ int __wt_session_notsup_cfg( WT_SESSION *wt_session, const char *config) { - WT_UNUSED(wt_session); + WT_SESSION_IMPL *session; + + session = (WT_SESSION_IMPL *)wt_session; WT_UNUSED(config); - return (ENOTSUP); + WT_RET_MSG(session, ENOTSUP, "Unsupported session method"); } /* @@ -35,11 +37,13 @@ int __wt_session_notsup_uri( WT_SESSION *wt_session, const char *uri, const char *config) { - WT_UNUSED(wt_session); + WT_SESSION_IMPL *session; + + session = (WT_SESSION_IMPL *)wt_session; WT_UNUSED(uri); WT_UNUSED(config); - return (ENOTSUP); + WT_RET_MSG(session, ENOTSUP, "Unsupported session method"); } /* @@ -577,7 +581,7 @@ __session_log_printf(WT_SESSION *wt_session, const char *fmt, ...) SESSION_API_CALL_NOCONF(session, log_printf); if (F_ISSET(S2C(session), WT_CONN_READONLY)) - WT_ERR(ENOTSUP); + WT_ERR_MSG(session, ENOTSUP, "Unsupported session method"); va_start(ap, fmt); ret = __wt_log_vprintf(session, fmt, ap); @@ -601,7 +605,7 @@ __session_rebalance(WT_SESSION *wt_session, const char *uri, const char *config) SESSION_API_CALL(session, rebalance, config, cfg); if (F_ISSET(S2C(session), WT_CONN_IN_MEMORY | WT_CONN_READONLY)) - WT_ERR(ENOTSUP); + WT_ERR_MSG(session, ENOTSUP, "Unsupported session method"); /* Block out checkpoints to avoid spurious EBUSY errors. */ WT_WITH_CHECKPOINT_LOCK(session, ret, @@ -627,7 +631,7 @@ __session_rename(WT_SESSION *wt_session, SESSION_API_CALL(session, rename, config, cfg); if (F_ISSET(S2C(session), WT_CONN_READONLY)) - WT_ERR(ENOTSUP); + WT_ERR_MSG(session, ENOTSUP, "Unsupported session method"); /* Disallow objects in the WiredTiger name space. */ WT_ERR(__wt_str_name_check(session, uri)); @@ -990,7 +994,7 @@ __session_truncate(WT_SESSION *wt_session, WT_STAT_FAST_CONN_INCR(session, cursor_truncate); if (F_ISSET(S2C(session), WT_CONN_READONLY)) - WT_ERR(ENOTSUP); + WT_ERR_MSG(session, ENOTSUP, "Unsupported session method"); /* * If the URI is specified, we don't need a start/stop, if start/stop |