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

Assertion `0' failed in Item_row::illegal_method_call on SELECT FROM JSON_TABLE

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL)
    • 10.6.11, 10.7.7
    • JSON

    Description

      SELECT 1 FROM JSON_TABLE (ROW (1,2),'$' COLUMNS (o FOR ORDINALITY)) AS j;
      

      Leads to:

      10.9.0 0b14dbd45b5a1c02616d611876158d44b92b77bf (Debug)

      mysqld: /test/10.9_dbg/sql/item_row.cc:32: void Item_row::illegal_method_call(const char*): Assertion `0' failed.
      

      10.9.0 0b14dbd45b5a1c02616d611876158d44b92b77bf (Debug)

      Core was generated by `/test/MD030522-mariadb-10.9.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      [Current thread is 1 (Thread 0x1518381f9700 (LWP 1666033))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000015185e7a3859 in __GI_abort () at abort.c:79
      #2  0x000015185e7a3729 in __assert_fail_base (fmt=0x15185e939588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x563f4682e09d "0", file=0x563f46822c60 "/test/10.9_dbg/sql/item_row.cc", line=32, function=<optimized out>) at assert.c:92
      #3  0x000015185e7b5006 in __GI___assert_fail (assertion=assertion@entry=0x563f4682e09d "0", file=file@entry=0x563f46822c60 "/test/10.9_dbg/sql/item_row.cc", line=line@entry=32, function=function@entry=0x563f46822cf8 "void Item_row::illegal_method_call(const char*)") at assert.c:101
      #4  0x0000563f45e49d8c in Item_row::illegal_method_call (this=<optimized out>, method=method@entry=0x563f468165e6 "val_str") at /test/10.9_dbg/sql/item_row.cc:32
      #5  0x0000563f45e4a4ba in Item_row::val_str (this=<optimized out>) at /test/10.9_dbg/sql/item_row.h:82
      #6  0x0000563f45cd5e07 in ha_json_table::rnd_init (this=0x15178801ac80, scan=<optimized out>) at /test/10.9_dbg/sql/json_table.cc:339
      #7  0x0000563f45d7ec23 in handler::ha_rnd_init (scan=true, this=0x15178801ac80) at /test/10.9_dbg/sql/handler.h:3428
      #8  handler::ha_rnd_init_with_error (this=0x15178801ac80, scan=scan@entry=true) at /test/10.9_dbg/sql/handler.cc:3632
      #9  0x0000563f459a56f9 in init_read_record (info=info@entry=0x15178801c558, thd=0x151788000db8, table=0x151788019f10, select=0x15178801cbf0, filesort=0x0, use_record_cache=use_record_cache@entry=1, print_error=true, disable_rr_cache=false) at /test/10.9_dbg/sql/records.cc:328
      #10 0x0000563f45b06f6b in join_init_read_record (tab=0x15178801c490) at /test/10.9_dbg/sql/sql_select.cc:22106
      #11 0x0000563f45aeff17 in sub_select (join=0x151788016650, join_tab=0x15178801c490, end_of_records=false) at /test/10.9_dbg/sql/sql_select.cc:21123
      #12 0x0000563f45b23795 in do_select (procedure=<optimized out>, join=0x151788016650) at /test/10.9_dbg/sql/sql_select.cc:20671
      #13 JOIN::exec_inner (this=this@entry=0x151788016650) at /test/10.9_dbg/sql/sql_select.cc:4778
      #14 0x0000563f45b23d2e in JOIN::exec (this=this@entry=0x151788016650) at /test/10.9_dbg/sql/sql_select.cc:4556
      #15 0x0000563f45b21ab2 in mysql_select (thd=thd@entry=0x151788000db8, tables=0x151788015588, fields=@0x1517880140f0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x151788014348, last = 0x151788014348, elements = 1}, <No data fields>}, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x151788016628, unit=0x151788004fd8, select_lex=0x151788013e50) at /test/10.9_dbg/sql/sql_select.cc:5036
      #16 0x0000563f45b222a8 in handle_select (thd=thd@entry=0x151788000db8, lex=lex@entry=0x151788004f00, result=result@entry=0x151788016628, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.9_dbg/sql/sql_select.cc:570
      #17 0x0000563f45a8e6c8 in execute_sqlcom_select (thd=thd@entry=0x151788000db8, all_tables=0x151788015588) at /test/10.9_dbg/sql/sql_parse.cc:6271
      #18 0x0000563f45a9a935 in mysql_execute_command (thd=thd@entry=0x151788000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.9_dbg/sql/sql_parse.cc:3961
      #19 0x0000563f45a8867b in mysql_parse (thd=thd@entry=0x151788000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1518381f8470) at /test/10.9_dbg/sql/sql_parse.cc:8046
      #20 0x0000563f45a95f79 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x151788000db8, packet=packet@entry=0x15178800b699 "", packet_length=packet_length@entry=72, blocking=blocking@entry=true) at /test/10.9_dbg/sql/sql_class.h:1364
      #21 0x0000563f45a98686 in do_command (thd=0x151788000db8, blocking=blocking@entry=true) at /test/10.9_dbg/sql/sql_parse.cc:1408
      #22 0x0000563f45bf5d02 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x563f4880eaf8, put_in_cache=put_in_cache@entry=true) at /test/10.9_dbg/sql/sql_connect.cc:1418
      #23 0x0000563f45bf620b in handle_one_connection (arg=0x563f4880eaf8) at /test/10.9_dbg/sql/sql_connect.cc:1312
      #24 0x000015185ecb4609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #25 0x000015185e8a0163 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.6.8 (dbg), 10.7.4 (dbg), 10.8.3 (dbg), 10.9.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.44 (dbg), 10.2.44 (opt), 10.3.35 (dbg), 10.3.35 (opt), 10.4.25 (dbg), 10.4.25 (opt), 10.5.16 (dbg), 10.5.16 (opt), 10.6.8 (opt), 10.7.4 (opt), 10.8.3 (opt), 10.9.0 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.37 (dbg), 5.7.37 (opt), 8.0.28 (dbg), 8.0.28 (opt)

      Attachments

        Issue Links

          Activity

            People

              rucha174 Rucha Deodhar
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.