diff options
Diffstat (limited to 'src/api/cur_btree.c')
-rw-r--r-- | src/api/cur_btree.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/api/cur_btree.c b/src/api/cur_btree.c index a9638901947..a5c52fcec43 100644 --- a/src/api/cur_btree.c +++ b/src/api/cur_btree.c @@ -243,8 +243,7 @@ __wt_cursor_open(SESSION *session, WT_CONFIG_ITEM cval; WT_CURSOR *cursor; const char *key_format, *value_format; - int bulk, raw, ret; - uint32_t dump; + int bulk, dump, printable, raw, ret; size_t csize; API_CONF_INIT(session, open_cursor, config); @@ -278,13 +277,9 @@ __wt_cursor_open(SESSION *session, WT_ERR(__wt_config_gets(__cfg, "bulk", &cval)); bulk = (cval.val != 0); WT_ERR(__wt_config_gets(__cfg, "dump", &cval)); - if ((cval.type == ITEM_STRING || cval.type == ITEM_ID) && - cval.len > 0) { - if (strncasecmp("printable", cval.str, cval.len) == 0) - dump = WT_DUMP_PRINT; - else if (strncasecmp("raw", cval.str, cval.len) == 0) - dump = WT_DUMP_RAW; - } + dump = (cval.val != 0); + WT_ERR(__wt_config_gets(__cfg, "printable", &cval)); + printable = (cval.val != 0); WT_ERR(__wt_config_gets(__cfg, "raw", &cval)); raw = (cval.val != 0); @@ -302,7 +297,7 @@ __wt_cursor_open(SESSION *session, if (bulk) WT_ERR(__wt_curbulk_init((CURSOR_BULK *)cbt)); if (dump != 0) - __wt_curdump_init(cursor, dump); + __wt_curdump_init(cursor, printable); if (raw) F_SET(cursor, WT_CURSTD_RAW); |