summaryrefslogtreecommitdiff
path: root/src/cursor
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2012-08-03 18:43:03 +0000
committerKeith Bostic <keith@wiredtiger.com>2012-08-03 18:43:03 +0000
commitaa1b8bb078cafd9146a597191a6ddc0a76f3b010 (patch)
treeef0d9233fc3fd2de9fde53ac9f394f1d7e086048 /src/cursor
parent21ab1c9544834281ec0a0980fd5c991e28bc5806 (diff)
downloadmongo-aa1b8bb078cafd9146a597191a6ddc0a76f3b010.tar.gz
Remove the cursor.reconfigure method, and replace it with documentation
showing how to "reconfigure" cursors using the session.open_cursor method to duplicate them with different configuration strings. Close #282.
Diffstat (limited to 'src/cursor')
-rw-r--r--src/cursor/cur_backup.c2
-rw-r--r--src/cursor/cur_config.c2
-rw-r--r--src/cursor/cur_dump.c2
-rw-r--r--src/cursor/cur_file.c1
-rw-r--r--src/cursor/cur_index.c2
-rw-r--r--src/cursor/cur_stat.c2
-rw-r--r--src/cursor/cur_std.c34
-rw-r--r--src/cursor/cur_table.c1
8 files changed, 0 insertions, 46 deletions
diff --git a/src/cursor/cur_backup.c b/src/cursor/cur_backup.c
index a4665a67ffa..cced98d8f04 100644
--- a/src/cursor/cur_backup.c
+++ b/src/cursor/cur_backup.c
@@ -135,8 +135,6 @@ __wt_curbackup_open(WT_SESSION_IMPL *session,
__wt_cursor_notsup, /* update */
__wt_cursor_notsup, /* remove */
__curbackup_close,
- (int (*) /* reconfigure */
- (WT_CURSOR *, const char *))__wt_cursor_notsup,
{ NULL, NULL }, /* TAILQ_ENTRY q */
0, /* recno key */
{ 0 }, /* recno raw buffer */
diff --git a/src/cursor/cur_config.c b/src/cursor/cur_config.c
index 7be4ce50458..00894bb306a 100644
--- a/src/cursor/cur_config.c
+++ b/src/cursor/cur_config.c
@@ -45,8 +45,6 @@ __wt_curconfig_open(WT_SESSION_IMPL *session,
__wt_cursor_notsup, /* update */
__wt_cursor_notsup, /* remove */
__curconfig_close,
- (int (*) /* reconfigure */
- (WT_CURSOR *, const char *))__wt_cursor_notsup,
{ NULL, NULL }, /* TAILQ_ENTRY q */
0, /* recno key */
{ 0 }, /* recno raw buffer */
diff --git a/src/cursor/cur_dump.c b/src/cursor/cur_dump.c
index a76490eb546..82208851989 100644
--- a/src/cursor/cur_dump.c
+++ b/src/cursor/cur_dump.c
@@ -310,8 +310,6 @@ __wt_curdump_create(WT_CURSOR *child, WT_CURSOR *owner, WT_CURSOR **cursorp)
__curdump_update,
__curdump_remove,
__curdump_close,
- (int (*) /* reconfigure */
- (WT_CURSOR *, const char *))__wt_cursor_notsup,
{ NULL, NULL }, /* TAILQ_ENTRY q */
0, /* recno key */
{ 0 }, /* recno raw buffer */
diff --git a/src/cursor/cur_file.c b/src/cursor/cur_file.c
index ac2e6589bb0..6836020b506 100644
--- a/src/cursor/cur_file.c
+++ b/src/cursor/cur_file.c
@@ -271,7 +271,6 @@ __wt_curfile_create(WT_SESSION_IMPL *session,
__curfile_update,
__curfile_remove,
__curfile_close,
- NULL,
{ NULL, NULL }, /* TAILQ_ENTRY q */
0, /* recno key */
{ 0 }, /* recno raw buffer */
diff --git a/src/cursor/cur_index.c b/src/cursor/cur_index.c
index a280389391c..5d87ecb5ea5 100644
--- a/src/cursor/cur_index.c
+++ b/src/cursor/cur_index.c
@@ -360,8 +360,6 @@ __wt_curindex_open(WT_SESSION_IMPL *session,
__wt_cursor_notsup, /* update */
__wt_cursor_notsup, /* remove */
__curindex_close,
- (int (*) /* reconfigure */
- (WT_CURSOR *, const char *))__wt_cursor_notsup,
{ NULL, NULL }, /* TAILQ_ENTRY q */
0, /* recno key */
{ 0 }, /* recno raw buffer */
diff --git a/src/cursor/cur_stat.c b/src/cursor/cur_stat.c
index 0ec9d728b0d..eab55906c22 100644
--- a/src/cursor/cur_stat.c
+++ b/src/cursor/cur_stat.c
@@ -324,8 +324,6 @@ __wt_curstat_open(WT_SESSION_IMPL *session,
__wt_cursor_notsup, /* update */
__wt_cursor_notsup, /* remove */
__curstat_close,
- (int (*) /* reconfigure */
- (WT_CURSOR *, const char *))__wt_cursor_notsup,
{ NULL, NULL }, /* TAILQ_ENTRY q */
0, /* recno key */
{ 0 }, /* recno raw buffer */
diff --git a/src/cursor/cur_std.c b/src/cursor/cur_std.c
index 8fc9cecc61c..9a4ae7b5111 100644
--- a/src/cursor/cur_std.c
+++ b/src/cursor/cur_std.c
@@ -36,8 +36,6 @@ __wt_cursor_set_notsup(WT_CURSOR *cursor)
cursor->insert = __wt_cursor_notsup;
cursor->update = __wt_cursor_notsup;
cursor->remove = __wt_cursor_notsup;
- cursor->reconfigure =
- (int (*)(WT_CURSOR *, const char *))__wt_cursor_notsup;
}
/*
@@ -413,36 +411,6 @@ __cursor_runtime_config(WT_CURSOR *cursor, const char *cfg[])
}
/*
- * __cursor_reconfigure --
- * WT_CURSOR->reconfigure default implementation.
- */
-static int
-__cursor_reconfigure(WT_CURSOR *cursor, const char *config)
-{
- WT_DECL_RET;
- WT_SESSION_IMPL *session;
-
- CURSOR_API_CALL(cursor, session, reconfigure, NULL, config, cfg);
- WT_UNUSED(cfg);
-
- /*
- * We need to take care here: only override with values that appear in
- * the config string from the application, not with defaults.
- *
- * Set config in raw_cfg[1], not raw_cfg[0]; the underlying function
- * calls __wt_config_gets_defno to speed up cursor creation and a NULL
- * cfg[1] in that function implies no user-specified configuration.
- */
- {
- const char *raw_cfg[] = { "", config, NULL };
- ret = __cursor_runtime_config(cursor, raw_cfg);
- }
-
-err: API_END(session);
- return (ret);
-}
-
-/*
* __wt_cursor_dup --
* Duplicate a cursor.
*/
@@ -538,8 +506,6 @@ __wt_cursor_init(WT_CURSOR *cursor,
cursor->remove = __wt_cursor_notsup;
if (cursor->close == NULL)
WT_RET_MSG(session, EINVAL, "cursor lacks a close method");
- if (cursor->reconfigure == NULL)
- cursor->reconfigure = __cursor_reconfigure;
if (cursor->uri == NULL)
WT_RET(__wt_strdup(session, uri, &cursor->uri));
diff --git a/src/cursor/cur_table.c b/src/cursor/cur_table.c
index ba2d94fc0aa..7fe56a19788 100644
--- a/src/cursor/cur_table.c
+++ b/src/cursor/cur_table.c
@@ -686,7 +686,6 @@ __wt_curtable_open(WT_SESSION_IMPL *session,
__curtable_update,
__curtable_remove,
__curtable_close,
- NULL,
{ NULL, NULL }, /* TAILQ_ENTRY q */
0, /* recno key */
{ 0 }, /* raw recno buffer */