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

Return proper error message for cursor modify operation for not supported cursor types

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.2.1, WT3.2.1, 4.3.1
    • Affects Version/s: None
    • Component/s: None
    • None
    • 3
    • Storage Engines 2019-08-26

      cursor modify operation is failing with the following error.

       requires key be set: Invalid argument
      

      The error is raised from the following call stack.

      #0  __wt_cursor_kv_not_set (cursor=0x555555dcee80, key=true) at ../src/cursor/cur_std.c:201
      #1  0x00007ffff585ff3d in __cursor_checkkey (cursor=0x555555dcee80) at ../src/include/cursor.i:39
      #2  0x00007ffff58679e4 in __cursor_modify (cursor=0x555555dcee80, entries=0x555555dc13d8, nentries=4) at ../src/cursor/cur_std.c:930
      #3  0x00007ffff5bd244a in __wt_cursor__modify (list=<optimized out>, self=0x555555dcee80) at wiredtiger_wrap.c:5428
      #4  _wrap_Cursor_modify (self=<optimized out>, args=<optimized out>) at wiredtiger_wrap.c:5428
      #5  0x0000555555650f6e in PyEval_EvalFrameEx () 
      

      The cursor modify operation is supported for table cursors only where the value format is either 'S' or 'u' for simple tables. During the initialization of the cursor, the default cursor modify function is modified from _wt_cursor_modify_notsup to }}{{cursor_modify. But the }}{{cursor_modify is not designed to operate on WT_CURSOR_TABLE like }}{{_wt_curtable_set_key function, because of this reason it raised the above error.

       

            Assignee:
            haribabu.kommi@mongodb.com Haribabu Kommi
            Reporter:
            haribabu.kommi@mongodb.com Haribabu Kommi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: