Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-11448

Assertion `*p_cur_step < p->last_step' failed in strings/json_lib.c handle_match

    XMLWordPrintable

    Details

      Description

      SELECT JSON_ARRAY_INSERT('true', '$', 1);
      

      10.2 6a10681266

      mysqld: /data/src/10.2/strings/json_lib.c:1152: handle_match: Assertion `*p_cur_step < p->last_step' failed.
      161202  1:26:13 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f31ac41f312 in __GI___assert_fail (assertion=0x7f31afcd7162 "*p_cur_step < p->last_step", file=0x7f31afcd7140 "/data/src/10.2/strings/json_lib.c", line=1152, function=0x7f31afcd71f0 <__PRETTY_FUNCTION__.8830> "handle_match") at assert.c:101
      #8  0x00007f31af9418f1 in handle_match (je=0x7f31afff35b0, p=0x7f3167460bc8, p_cur_step=0x7f3167461010, array_counters=0x7f31afff3530) at /data/src/10.2/strings/json_lib.c:1152
      #9  0x00007f31af941bc8 in json_find_path (je=0x7f31afff35b0, p=0x7f3167460bc8, p_cur_step=0x7f3167461010, array_counters=0x7f31afff3530) at /data/src/10.2/strings/json_lib.c:1229
      #10 0x00007f31af3331fe in Item_func_json_array_insert::val_str (this=0x7f3167460390, str=0x7f31afff37a0) at /data/src/10.2/sql/item_jsonfunc.cc:1051
      #11 0x00007f31af180473 in Item::send (this=0x7f3167460390, protocol=0x7f3167416600, buffer=0x7f31afff37a0) at /data/src/10.2/sql/item.cc:6735
      #12 0x00007f31aee2f178 in Protocol::send_result_set_row (this=0x7f3167416600, row_items=0x7f316741a3a8) at /data/src/10.2/sql/protocol.cc:979
      #13 0x00007f31aeeade50 in select_send::send_data (this=0x7f3167460598, items=...) at /data/src/10.2/sql/sql_class.cc:2915
      #14 0x00007f31aef3ae4f in JOIN::exec_inner (this=0x7f31674605b8) at /data/src/10.2/sql/sql_select.cc:3278
      #15 0x00007f31aef3a8ea in JOIN::exec (this=0x7f31674605b8) at /data/src/10.2/sql/sql_select.cc:3198
      #16 0x00007f31aef3ba41 in mysql_select (thd=0x7f3167416070, tables=0x0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f3167460598, unit=0x7f3167419b48, select_lex=0x7f316741a280) at /data/src/10.2/sql/sql_select.cc:3583
      #17 0x00007f31aef30b25 in handle_select (thd=0x7f3167416070, lex=0x7f3167419a80, result=0x7f3167460598, setup_tables_done_option=0) at /data/src/10.2/sql/sql_select.cc:373
      #18 0x00007f31aeefd46f in execute_sqlcom_select (thd=0x7f3167416070, all_tables=0x0) at /data/src/10.2/sql/sql_parse.cc:6356
      #19 0x00007f31aeef2f2a in mysql_execute_command (thd=0x7f3167416070) at /data/src/10.2/sql/sql_parse.cc:3379
      #20 0x00007f31aef00e2e in mysql_parse (thd=0x7f3167416070, rawbuf=0x7f3167460088 "SELECT JSON_ARRAY_INSERT('true', '$', 1)", length=40, parser_state=0x7f31afff4e20, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7799
      #21 0x00007f31aeeeeb7e in dispatch_command (command=COM_QUERY, thd=0x7f3167416070, packet=0x7f3167454071 "", packet_length=40, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1808
      #22 0x00007f31aeeed558 in do_command (thd=0x7f3167416070) at /data/src/10.2/sql/sql_parse.cc:1368
      #23 0x00007f31af034a26 in do_handle_one_connection (connect=0x7f31ab85ff70) at /data/src/10.2/sql/sql_connect.cc:1354
      #24 0x00007f31af0347b3 in handle_one_connection (arg=0x7f31ab85ff70) at /data/src/10.2/sql/sql_connect.cc:1260
      #25 0x00007f31ae52c0a4 in start_thread (arg=0x7f31afff6300) at pthread_create.c:309
      #26 0x00007f31ac4d987d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

      In MySQL it produces an error:

      MySQL

      MySQL [test]> SELECT JSON_ARRAY_INSERT('true', '$', 1);
      ERROR 3165 (42000): A path expression is not a path to a cell in an array.
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              holyfoot Alexey Botchkov
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: