Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-2592

Joins using non-recno key types not working

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT2.9.0
    • Labels:
      None

      Description

      f...@quantbrothers.com reports:

      In function __curjoin_next

              if (ret == 0) {
      		/*
      		 * Position the 'main' cursor, this will be used to
      		 * retrieve values from the cursor join.
      		 */
      		c = iter->main;
      		c->set_key(c, iter->curkey);
      		if ((ret = c->search(c)) != 0)
      			WT_ERR(c->search(c));
      		F_SET(cursor, WT_CURSTD_KEY_INT | WT_CURSTD_VALUE_INT);
      	}
      

      'iter->curkey' passed to table cursor as WT_ITEM. This will works for 'recnum' key format but my table key was configured as 'QQ'

      i work aroud this by patch:

      diff --git a/src/cursor/cur_join.c b/src/cursor/cur_join.c
      index 38a8321..5be0e2f 100644
      --- a/src/cursor/cur_join.c
      +++ b/src/cursor/cur_join.c
      @@ -800,7 +800,10 @@ nextkey:
                       * retrieve values from the cursor join.
                       */
                      c = iter->main;
      +               int cflg = c->flags;
      +               c->flags |= WT_CURSTD_RAW;
                      c->set_key(c, iter->curkey);
      +               c->flags = cflg;
                      if ((ret = c->search(c)) != 0)
                              WT_ERR(c->search(c));
                      F_SET(cursor, WT_CURSTD_KEY_INT | WT_CURSTD_VALUE_INT);
      

        Attachments

          Activity

            People

            • Assignee:
              donald.anderson Donald Anderson
              Reporter:
              donald.anderson Donald Anderson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: