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

Assertion `cur_step->type & JSON_PATH_KEY' failed in json_find_path

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.2
    • 10.2.6
    • JSON

    Description

      SELECT JSON_VALUE('[{"foo": 1},"bar"]', '$[*][0]');
      

      10.2 1ca8637ae3506

      mysqld: /data/src/10.2/strings/json_lib.c:1299: json_find_path: Assertion `cur_step->type & JSON_PATH_KEY' failed.
      170324  3:23:36 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fd787960312 in __GI___assert_fail (assertion=0x7fd78b093318 "cur_step->type & JSON_PATH_KEY", file=0x7fd78b0932d8 "/data/src/10.2/strings/json_lib.c", line=1299, function=0x7fd78b0933d7 <__PRETTY_FUNCTION__.9103> "json_find_path") at assert.c:101
      #8  0x00007fd78ac710a2 in json_find_path (je=0x7fd78b3d4560, p=0x7fd77ec64598, p_cur_step=0x7fd77ec649e0, array_counters=0x7fd78b3d44e0) at /data/src/10.2/strings/json_lib.c:1299
      #9  0x00007fd78a684a00 in Item_func_json_value::val_str (this=0x7fd77ec644d8, str=0x7fd78b3d4750) at /data/src/10.2/sql/item_jsonfunc.cc:479
      #10 0x00007fd78a4ce04b in Item::send (this=0x7fd77ec644d8, protocol=0x7fd77ec16608, buffer=0x7fd78b3d4750) at /data/src/10.2/sql/item.cc:6887
      #11 0x00007fd78a177166 in Protocol::send_result_set_row (this=0x7fd77ec16608, row_items=0x7fd77ec1a3a8) at /data/src/10.2/sql/protocol.cc:979
      #12 0x00007fd78a1f7f12 in select_send::send_data (this=0x7fd77ec64b50, items=...) at /data/src/10.2/sql/sql_class.cc:2760
      #13 0x00007fd78a286021 in JOIN::exec_inner (this=0x7fd77ec64b70) at /data/src/10.2/sql/sql_select.cc:3346
      #14 0x00007fd78a285abc in JOIN::exec (this=0x7fd77ec64b70) at /data/src/10.2/sql/sql_select.cc:3266
      #15 0x00007fd78a286c2f in mysql_select (thd=0x7fd77ec16070, tables=0x0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fd77ec64b50, unit=0x7fd77ec19b50, select_lex=0x7fd77ec1a280) at /data/src/10.2/sql/sql_select.cc:3658
      #16 0x00007fd78a27b710 in handle_select (thd=0x7fd77ec16070, lex=0x7fd77ec19a88, result=0x7fd77ec64b50, setup_tables_done_option=0) at /data/src/10.2/sql/sql_select.cc:373
      #17 0x00007fd78a247b59 in execute_sqlcom_select (thd=0x7fd77ec16070, all_tables=0x0) at /data/src/10.2/sql/sql_parse.cc:6415
      #18 0x00007fd78a23db86 in mysql_execute_command (thd=0x7fd77ec16070) at /data/src/10.2/sql/sql_parse.cc:3448
      #19 0x00007fd78a24b52c in mysql_parse (thd=0x7fd77ec16070, rawbuf=0x7fd77ec641d0 "SELECT JSON_VALUE('[{\"foo\": 1},\"bar\"]', '$[*][0]')", length=50, parser_state=0x7fd78b3d5dd0, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7858
      #20 0x00007fd78a2395f2 in dispatch_command (command=COM_QUERY, thd=0x7fd77ec16070, packet=0x7fd77ec58071 "", packet_length=50, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1812
      #21 0x00007fd78a237f62 in do_command (thd=0x7fd77ec16070) at /data/src/10.2/sql/sql_parse.cc:1362
      #22 0x00007fd78a380f3f in do_handle_one_connection (connect=0x7fd787065410) at /data/src/10.2/sql/sql_connect.cc:1358
      #23 0x00007fd78a380ccc in handle_one_connection (arg=0x7fd787065410) at /data/src/10.2/sql/sql_connect.cc:1264
      #24 0x00007fd78a799658 in pfs_spawn_thread (arg=0x7fd7870499f0) at /data/src/10.2/storage/perfschema/pfs.cc:1862
      #25 0x00007fd789862064 in start_thread (arg=0x7fd78b3d7300) at pthread_create.c:309
      #26 0x00007fd787a1a62d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.