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

Assertion `0' failed in json_find_path

    XMLWordPrintable

Details

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

    Description

      CREATE TABLE t(j TEXT NOT NULL);
      INSERT INTO t VALUES ('1'), ('2'), ('10'), ('"1"'), ('"2"'), ('"10"'),('true'), ('false'), ('null');
      SELECT j FROM t ORDER BY JSON_EXTRACT(j, '$');
      

      10.2 3371904380

      mysqld: /data/src/10.2/strings/json_lib.c:1279: json_find_path: Assertion `0' failed.
      161206  1:41:47 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f8bf72dc312 in __GI___assert_fail (assertion=0x7f8bfab92c42 "0", file=0x7f8bfab92bc0 "/data/src/10.2/strings/json_lib.c", line=1279, function=0x7f8bfab92c7d <__PRETTY_FUNCTION__.8853> "json_find_path") at assert.c:101
      #8  0x00007f8bfa7ffa49 in json_find_path (je=0x7f8bfaeae0c0, p=0x7f8bb2461310, p_cur_step=0x7f8bb2461758, array_counters=0x7f8bfaeae040) at /data/src/10.2/strings/json_lib.c:1279
      #9  0x00007f8bfa1ee187 in Item_func_json_extract::val_str (this=0x7f8bb2460aa8, str=0x7f8bfaeae250) at /data/src/10.2/sql/item_jsonfunc.cc:464
      #10 0x00007f8bf9cf032a in Item::str_result (this=0x7f8bb2460aa8, tmp=0x7f8bfaeae250) at /data/src/10.2/sql/item.h:1158
      #11 0x00007f8bfa012b60 in Type_handler_string_result::make_sort_key (this=0x7f8bfb2a1028 <type_handler_varchar>, to=0x7f8bb2582960 '\245' <repeats 200 times>..., item=0x7f8bb2460aa8, sort_field=0x7f8bb2463510, param=0x7f8bfaeae5b0) at /data/src/10.2/sql/filesort.cc:1009
      #12 0x00007f8bf9cf0113 in Item::make_sort_key (this=0x7f8bb2460aa8, to=0x7f8bb2582960 '\245' <repeats 200 times>..., item=0x7f8bb2460aa8, sort_field=0x7f8bb2463510, param=0x7f8bfaeae5b0) at /data/src/10.2/sql/item.h:856
      #13 0x00007f8bfa0132ab in make_sortkey (param=0x7f8bfaeae5b0, to=0x7f8bb2582960 '\245' <repeats 200 times>..., ref_pos=0x7f8bb24271d0 "") at /data/src/10.2/sql/filesort.cc:1190
      #14 0x00007f8bfa012527 in find_all_keys (thd=0x7f8bb2416070, param=0x7f8bfaeae5b0, select=0x7f8bb2462ae8, fs_info=0x7f8bb24f4600, buffpek_pointers=0x7f8bfaeae7c0, tempfile=0x7f8bfaeae640, pq=0x0, found_rows=0x7f8bb24f47f0) at /data/src/10.2/sql/filesort.cc:870
      #15 0x00007f8bfa0107a6 in filesort (thd=0x7f8bb2416070, table=0x7f8bb24db070, filesort=0x7f8bb2462cc8, tracker=0x7f8bb24634a0, join=0x7f8bb2460cc8, first_table_bit=1) at /data/src/10.2/sql/filesort.cc:284
      #16 0x00007f8bf9e256b9 in create_sort_index (thd=0x7f8bb2416070, join=0x7f8bb2460cc8, tab=0x7f8bb2462188, fsort=0x7f8bb2462cc8) at /data/src/10.2/sql/sql_select.cc:21481
      #17 0x00007f8bf9e20134 in st_join_table::sort_table (this=0x7f8bb2462188) at /data/src/10.2/sql/sql_select.cc:19318
      #18 0x00007f8bf9e1fe2d in join_init_read_record (tab=0x7f8bb2462188) at /data/src/10.2/sql/sql_select.cc:19265
      #19 0x00007f8bf9e1dd97 in sub_select (join=0x7f8bb2460cc8, join_tab=0x7f8bb2462188, end_of_records=false) at /data/src/10.2/sql/sql_select.cc:18350
      #20 0x00007f8bf9e1d3b7 in do_select (join=0x7f8bb2460cc8, procedure=0x0) at /data/src/10.2/sql/sql_select.cc:17897
      #21 0x00007f8bf9df83a0 in JOIN::exec_inner (this=0x7f8bb2460cc8) at /data/src/10.2/sql/sql_select.cc:3387
      #22 0x00007f8bf9df78ea in JOIN::exec (this=0x7f8bb2460cc8) at /data/src/10.2/sql/sql_select.cc:3198
      #23 0x00007f8bf9df8a41 in mysql_select (thd=0x7f8bb2416070, tables=0x7f8bb24602a0, wild_num=0, fields=..., conds=0x0, og_num=1, order=0x7f8bb2460b98, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f8bb2460ca8, unit=0x7f8bb2419b48, select_lex=0x7f8bb241a280) at /data/src/10.2/sql/sql_select.cc:3583
      #24 0x00007f8bf9dedb25 in handle_select (thd=0x7f8bb2416070, lex=0x7f8bb2419a80, result=0x7f8bb2460ca8, setup_tables_done_option=0) at /data/src/10.2/sql/sql_select.cc:373
      #25 0x00007f8bf9dba46f in execute_sqlcom_select (thd=0x7f8bb2416070, all_tables=0x7f8bb24602a0) at /data/src/10.2/sql/sql_parse.cc:6356
      #26 0x00007f8bf9daff2a in mysql_execute_command (thd=0x7f8bb2416070) at /data/src/10.2/sql/sql_parse.cc:3379
      #27 0x00007f8bf9dbde2e in mysql_parse (thd=0x7f8bb2416070, rawbuf=0x7f8bb2460088 "SELECT j FROM t ORDER BY JSON_EXTRACT(j, '$')", length=45, parser_state=0x7f8bfaeafe20, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7799
      #28 0x00007f8bf9dabb7e in dispatch_command (command=COM_QUERY, thd=0x7f8bb2416070, packet=0x7f8bb2454071 "", packet_length=45, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1808
      #29 0x00007f8bf9daa558 in do_command (thd=0x7f8bb2416070) at /data/src/10.2/sql/sql_parse.cc:1368
      #30 0x00007f8bf9ef1a26 in do_handle_one_connection (connect=0x7f8bf685ff70) at /data/src/10.2/sql/sql_connect.cc:1354
      #31 0x00007f8bf9ef17b3 in handle_one_connection (arg=0x7f8bf685ff70) at /data/src/10.2/sql/sql_connect.cc:1260
      #32 0x00007f8bf93e90a4 in start_thread (arg=0x7f8bfaeb1300) at pthread_create.c:309
      #33 0x00007f8bf739687d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

      Attachments

        Issue Links

          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.