diff options
Diffstat (limited to 'src/third_party/wiredtiger/src/cursor/cur_join.c')
-rw-r--r-- | src/third_party/wiredtiger/src/cursor/cur_join.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/third_party/wiredtiger/src/cursor/cur_join.c b/src/third_party/wiredtiger/src/cursor/cur_join.c index 8d0abbeccbf..1a23f4a51fc 100644 --- a/src/third_party/wiredtiger/src/cursor/cur_join.c +++ b/src/third_party/wiredtiger/src/cursor/cur_join.c @@ -324,8 +324,8 @@ __curjoin_close(WT_CURSOR *cursor) u_int i; cjoin = (WT_CURSOR_JOIN *)cursor; - JOINABLE_CURSOR_API_CALL_PREPARE_ALLOWED(cursor, session, close, NULL); +err: WT_TRET(__wt_schema_release_table(session, cjoin->table)); @@ -362,9 +362,9 @@ __curjoin_close(WT_CURSOR *cursor) WT_TRET(cjoin->main->close(cjoin->main)); __wt_free(session, cjoin->entries); - WT_TRET(__wt_cursor_close(cursor)); + __wt_cursor_close(cursor); -err: API_END_RET(session, ret); + API_END_RET(session, ret); } /* @@ -500,7 +500,7 @@ __curjoin_entry_in_range(WT_SESSION_IMPL *session, WT_CURSOR_JOIN_ENTRY *entry, passed = (cmp < 0); break; - WT_ILLEGAL_VALUE(session); + WT_ILLEGAL_VALUE(session, WT_CURJOIN_END_RANGE(end)); } if (!passed) { @@ -651,15 +651,17 @@ __curjoin_entry_member(WT_SESSION_IMPL *session, WT_CURSOR_JOIN_ENTRY *entry, if (iter != NULL && entry == iter->entry) WT_ITEM_SET(v, iter->idxkey); else { - memset(&v, 0, sizeof(v)); /* Keep lint quiet. */ + memset(&v, 0, sizeof(v)); /* Keep lint quiet. */ c = entry->main; c->set_key(c, key); entry->stats.main_access++; if ((ret = c->search(c)) == 0) ret = c->get_value(c, &v); - else if (ret == WT_NOTFOUND) - WT_ERR_MSG(session, WT_ERROR, + else if (ret == WT_NOTFOUND) { + __wt_err(session, ret, "main table for join is missing entry"); + ret = WT_ERROR; + } WT_TRET(c->reset(c)); WT_ERR(ret); } @@ -801,7 +803,8 @@ __curjoin_init_bloom(WT_SESSION_IMPL *session, WT_CURSOR_JOIN *cjoin, goto done; WT_ERR(ret); } else - WT_ERR(__wt_illegal_value(session, NULL)); + WT_PANIC_ERR(session, EINVAL, + "fatal error in join cursor position state"); } collator = (entry->index == NULL) ? NULL : entry->index->collator; while (ret == 0) { @@ -1336,11 +1339,12 @@ __wt_curjoin_open(WT_SESSION_IMPL *session, session, tablename, size, false, 0, &table)); WT_RET(__wt_calloc_one(session, &cjoin)); - cursor = &cjoin->iface; + cursor = (WT_CURSOR *)cjoin; *cursor = iface; - cursor->session = &session->iface; + cursor->session = (WT_SESSION *)session; cursor->key_format = table->key_format; cursor->value_format = table->value_format; + cjoin->table = table; /* Handle projections. */ |