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

JSON_TABLE: Server crashes in handler::print_error / hton_name upon ERROR ON EMPTY

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • N/A
    • 10.6.0
    • JSON
    • None

    Description

      SELECT a, b FROM JSON_TABLE('[]', '$' COLUMNS (a FOR ORDINALITY, b INT PATH '$[*]' ERROR ON EMPTY)) AS t ORDER BY a;
      

      bb-10.6-mdev17399-psergey2 8b533cc1d5

      #3  <signal handler called>
      #4  0x00005600ade7ff24 in hton_name (hton=0x5600af887380 <table_function_hton>) at /data/src/bb-10.6-mdev17399-psergey2/sql/handler.h:1728
      #5  0x00005600ade7ffca in handler::table_type (this=0x7f6a30032780) at /data/src/bb-10.6-mdev17399-psergey2/sql/handler.h:4154
      #6  0x00005600ae26ac50 in handler::print_error (this=0x7f6a30032780, error=1, errflag=0) at /data/src/bb-10.6-mdev17399-psergey2/sql/handler.cc:4227
      #7  0x00005600ae42c850 in rr_handle_error (info=0x7f6a30024020, error=1) at /data/src/bb-10.6-mdev17399-psergey2/sql/records.cc:390
      #8  0x00005600ae42cc4e in rr_from_pointers (info=0x7f6a30024020) at /data/src/bb-10.6-mdev17399-psergey2/sql/records.cc:621
      #9  0x00005600ade334c7 in READ_RECORD::read_record (this=0x7f6a30024020) at /data/src/bb-10.6-mdev17399-psergey2/sql/records.h:81
      #10 0x00005600adf73934 in join_init_read_record (tab=0x7f6a30023f58) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_select.cc:21742
      #11 0x00005600adf713a2 in sub_select (join=0x7f6a30022c30, join_tab=0x7f6a30023f58, end_of_records=false) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_select.cc:20764
      #12 0x00005600adf70910 in do_select (join=0x7f6a30022c30, procedure=0x0) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_select.cc:20314
      #13 0x00005600adf44040 in JOIN::exec_inner (this=0x7f6a30022c30) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_select.cc:4488
      #14 0x00005600adf43161 in JOIN::exec (this=0x7f6a30022c30) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_select.cc:4268
      #15 0x00005600adf449ad in mysql_select (thd=0x7f6a3000b6e8, tables=0x7f6a30021a50, fields=..., conds=0x0, og_num=1, order=0x7f6a30022ab0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f6a30022c08, unit=0x7f6a3000f8c0, select_lex=0x7f6a3001fcf8) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_select.cc:4744
      #16 0x00005600adf342db in handle_select (thd=0x7f6a3000b6e8, lex=0x7f6a3000f7f8, result=0x7f6a30022c08, setup_tables_done_option=0) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_select.cc:417
      #17 0x00005600adef6dd7 in execute_sqlcom_select (thd=0x7f6a3000b6e8, all_tables=0x7f6a30021a50) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_parse.cc:6230
      #18 0x00005600adeee037 in mysql_execute_command (thd=0x7f6a3000b6e8) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_parse.cc:3926
      #19 0x00005600adefbc24 in mysql_parse (thd=0x7f6a3000b6e8, rawbuf=0x7f6a3001fbb0 "SELECT a, b FROM JSON_TABLE('[]', '$' COLUMNS (a FOR ORDINALITY, b INT PATH '$[*]' ERROR ON EMPTY)) AS t ORDER BY a", length=115, parser_state=0x7f6a6c1aa510) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_parse.cc:8001
      #20 0x00005600adee8042 in dispatch_command (command=COM_QUERY, thd=0x7f6a3000b6e8, packet=0x7f6a30017589 "", packet_length=115, blocking=true) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_parse.cc:1886
      #21 0x00005600adee69e9 in do_command (thd=0x7f6a3000b6e8, blocking=true) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_parse.cc:1397
      #22 0x00005600ae094f98 in do_handle_one_connection (connect=0x5600b0c1df08, put_in_cache=true) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_connect.cc:1410
      #23 0x00005600ae094cf4 in handle_one_connection (arg=0x5600b0af3928) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_connect.cc:1312
      #24 0x00005600ae5f7987 in pfs_spawn_thread (arg=0x5600b0cc2a68) at /data/src/bb-10.6-mdev17399-psergey2/storage/perfschema/pfs.cc:2201
      #25 0x00007f6a6cc0e609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #26 0x00007f6a6c7e2293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Attachments

        Issue Links

          Activity

            People

              holyfoot Alexey Botchkov
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.