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

Assertion `got_name == named_item_expected()' failed in void Json_writer::on_start_object()

    XMLWordPrintable

Details

    • Bug
    • Status: Stalled (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.6, 10.9, 10.10, 10.11, 11.0, 11.1, 11.2
    • 10.6, 10.11, 11.1
    • None

    Description

      CREATE TABLE t (a INET6);
      SET character_set_connection=ucs2;
      SET optimizer_trace=1;
      SELECT * FROM t WHERE (SELECT a FROM t) IN ('','');
      

      Leads to

      10.6.15 f7b8a2c953e21d7a1c8e7ef3b7107c13a1402967 (Debug)

      mariadbd: /test/10.6_dbg/sql/my_json_writer.cc:42: void Json_writer::on_start_object(): Assertion `got_name == named_item_expected()' failed.
      

      10.6.15 f7b8a2c953e21d7a1c8e7ef3b7107c13a1402967 (Debug)

      Core was generated by `/test/MD050723-mariadb-10.6.15-linux-x86_64-dbg/bin/mariadbd --no-defaults --co'.
      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 0x14ac3cdfd700 (LWP 3300270))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000014ac557d8859 in __GI_abort () at abort.c:79
      #2  0x000014ac557d8729 in __assert_fail_base (fmt=0x14ac5596e588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x555ed63c6ae8 "got_name == named_item_expected()", file=0x555ed63c69f0 "/test/10.6_dbg/sql/my_json_writer.cc", line=42, function=<optimized out>) at assert.c:92
      #3  0x000014ac557e9fd6 in __GI___assert_fail (assertion=assertion@entry=0x555ed63c6ae8 "got_name == named_item_expected()", file=file@entry=0x555ed63c69f0 "/test/10.6_dbg/sql/my_json_writer.cc", line=line@entry=42, function=function@entry=0x555ed63c6be8 "void Json_writer::on_start_object()") at assert.c:101
      #4  0x0000555ed597c55f in Json_writer::on_start_object (this=0x14ac0801ced0) at /test/10.6_dbg/sql/my_json_writer.cc:42
      #5  Json_writer::start_object (this=this@entry=0x14ac0801ced0) at /test/10.6_dbg/sql/my_json_writer.cc:51
      #6  0x0000555ed5838173 in Json_writer_object::Json_writer_object (str=0x0, writer=0x14ac0801ced0, this=<synthetic pointer>) at /test/10.6_dbg/sql/my_json_writer.h:446
      #7  Json_writer_object::Json_writer_object (str=0x0, thd=<optimized out>, this=<synthetic pointer>) at /test/10.6_dbg/sql/my_json_writer.h:451
      #8  JOIN::exec_inner (this=this@entry=0x14ac08016b38) at /test/10.6_dbg/sql/sql_select.cc:4635
      #9  0x0000555ed5839524 in JOIN::exec (this=0x14ac08016b38) at /test/10.6_dbg/sql/sql_select.cc:4604
      #10 0x0000555ed5b7c38e in subselect_single_select_engine::exec (this=0x14ac08015558) at /test/10.6_dbg/sql/item_subselect.cc:4095
      #11 0x0000555ed5b7b9dc in Item_subselect::exec (this=0x14ac080153d0) at /test/10.6_dbg/sql/item_subselect.cc:811
      #12 0x0000555ed5b7a23e in Item_singlerow_subselect::val_str (this=0x14ac080153d0, str=0x14ac3cdfb300) at /test/10.6_dbg/sql/item_subselect.cc:1477
      #13 0x0000555ed5aa1be0 in Item_func_conv_charset::Item_func_conv_charset (cache_if_const=true, cs=0x555ed6c275a0 <my_charset_ucs2_general_ci>, a=0x14ac080153d0, thd=0x14ac08000d48, this=0x14ac08018ea0) at /test/10.6_dbg/sql/sql_string.h:301
      #14 Item::safe_charset_converter (this=0x14ac080153d0, thd=0x14ac08000d48, tocs=0x555ed6c275a0 <my_charset_ucs2_general_ci>) at /test/10.6_dbg/sql/item.cc:1286
      #15 0x0000555ed5ab5877 in Type_std_attributes::agg_item_set_converter (this=this@entry=0x14ac0806c860, coll=@0x14ac3cdfb430: {collation = 0x555ed6c275a0 <my_charset_ucs2_general_ci>, derivation = DERIVATION_COERCIBLE, repertoire = MY_REPERTOIRE_ASCII}, fname=@0x14ac3cdfb440: {str = 0x555ed63d5b31 "=", length = 1}, args=args@entry=0x14ac0806c8d0, nargs=nargs@entry=2, flags=flags@entry=7, item_sep=1) at /test/10.6_dbg/sql/item.cc:2651
      #16 0x0000555ed5ad1fc3 in Type_std_attributes::agg_arg_charsets (item_sep=1, flags=7, nitems=2, items=0x14ac0806c8d0, func_name=@0x14ac3cdfb440: {str = 0x555ed63d5b31 "=", length = 1}, c=@0x14ac3cdfb430: {collation = 0x555ed6c275a0 <my_charset_ucs2_general_ci>, derivation = DERIVATION_COERCIBLE, repertoire = MY_REPERTOIRE_ASCII}, this=0x14ac0806c860) at /test/10.6_dbg/sql/sql_type.h:3276
      #17 Type_std_attributes::agg_arg_charsets_for_comparison (item_sep=1, nitems=2, items=0x14ac0806c8d0, func_name=@0x14ac3cdfb440: {str = 0x555ed63d5b31 "=", length = 1}, c=@0x14ac3cdfb430: {collation = 0x555ed6c275a0 <my_charset_ucs2_general_ci>, derivation = DERIVATION_COERCIBLE, repertoire = MY_REPERTOIRE_ASCII}, this=0x14ac0806c860) at /test/10.6_dbg/sql/sql_type.h:3325
      #18 Item_func_or_sum::agg_arg_charsets_for_comparison (item_sep=1, nitems=2, items=0x14ac0806c8d0, c=@0x14ac3cdfb430: {collation = 0x555ed6c275a0 <my_charset_ucs2_general_ci>, derivation = DERIVATION_COERCIBLE, repertoire = MY_REPERTOIRE_ASCII}, this=0x14ac0806c858) at /test/10.6_dbg/sql/item.h:5430
      #19 Item_func::setup_args_and_comparator (this=this@entry=0x14ac0806c858, thd=0x14ac08000d48, cmp=cmp@entry=0x14ac0806c908) at /test/10.6_dbg/sql/item_cmpfunc.cc:422
      #20 0x0000555ed5ad2072 in Item_bool_rowready_func2::fix_length_and_dec (this=0x14ac0806c858) at /test/10.6_dbg/sql/item_cmpfunc.cc:461
      #21 0x0000555ed5b088e6 in Item_func::fix_fields (this=0x14ac0806c858, thd=0x14ac08000d48, ref=<optimized out>) at /test/10.6_dbg/sql/item_func.cc:362
      #22 0x0000555ed5ad7a51 in Item_func_in::in_predicate_to_equality_transformer (this=0x14ac080156e0, thd=0x14ac08000d48, arg=<optimized out>) at /test/10.6_dbg/sql/item_cmpfunc.cc:4391
      #23 0x0000555ed5b15ab5 in Item_func::transform (this=0x14ac080156e0, thd=0x14ac08000d48, transformer=&virtual table offset 1408, argument=0x0) at /test/10.6_dbg/sql/item_func.cc:511
      #24 0x0000555ed56de135 in Item::top_level_transform (this=<optimized out>, thd=<optimized out>, transformer=<optimized out>, arg=<optimized out>) at /test/10.6_dbg/sql/item.h:2125
      #25 0x0000555ed58313d8 in JOIN::transform_all_conds_and_on_exprs (this=this@entry=0x14ac080161f0, thd=0x14ac08000d48, transformer=&virtual table offset 1408) at /test/10.6_dbg/sql/sql_select.cc:31297
      #26 0x0000555ed583142d in JOIN::transform_in_predicates_into_equalities (this=this@entry=0x14ac080161f0, thd=<optimized out>) at /test/10.6_dbg/sql/sql_select.cc:31271
      #27 0x0000555ed583671d in JOIN::optimize_inner (this=this@entry=0x14ac080161f0) at /test/10.6_dbg/sql/sql_select.cc:2254
      #28 0x0000555ed5837465 in JOIN::optimize (this=this@entry=0x14ac080161f0) at /test/10.6_dbg/sql/sql_select.cc:1868
      #29 0x0000555ed583753e in mysql_select (thd=thd@entry=0x14ac08000d48, tables=0x14ac08013740, fields=@0x14ac080133e0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14ac080136f8, last = 0x14ac080136f8, elements = 1}, <No data fields>}, conds=0x14ac080156e0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x14ac080161c8, unit=0x14ac08004eb8, select_lex=0x14ac08013128) at /test/10.6_dbg/sql/sql_select.cc:5069
      #30 0x0000555ed5837d04 in handle_select (thd=thd@entry=0x14ac08000d48, lex=lex@entry=0x14ac08004df0, result=result@entry=0x14ac080161c8, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.6_dbg/sql/sql_select.cc:559
      #31 0x0000555ed57b701a in execute_sqlcom_select (thd=thd@entry=0x14ac08000d48, all_tables=0x14ac08013740) at /test/10.6_dbg/sql/sql_parse.cc:6273
      #32 0x0000555ed57c334f in mysql_execute_command (thd=thd@entry=0x14ac08000d48, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.6_dbg/sql/sql_parse.cc:3949
      #33 0x0000555ed57b12c9 in mysql_parse (thd=thd@entry=0x14ac08000d48, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14ac3cdfc310) at /test/10.6_dbg/sql/sql_parse.cc:8041
      #34 0x0000555ed57beb75 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14ac08000d48, packet=packet@entry=0x14ac0800acb9 "SELECT * FROM t WHERE (SELECT a FROM t) IN ('','')", packet_length=packet_length@entry=50, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1388
      #35 0x0000555ed57c1049 in do_command (thd=0x14ac08000d48, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1409
      #36 0x0000555ed5906e9b in do_handle_one_connection (connect=<optimized out>, connect@entry=0x555ed8999138, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1416
      #37 0x0000555ed590736a in handle_one_connection (arg=0x555ed8999138) at /test/10.6_dbg/sql/sql_connect.cc:1318
      #38 0x000014ac55ce9609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #39 0x000014ac558d5133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.6.15 (dbg), 10.9.8 (dbg), 10.10.6 (dbg), 10.11.5 (dbg), 11.0.3 (dbg), 11.1.2 (dbg), 11.2.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.4.31 (dbg), 10.4.31 (opt), 10.5.21 (dbg), 10.5.22 (dbg), 10.5.22 (opt), 10.6.15 (opt), 10.9.8 (opt), 10.10.6 (opt), 10.11.4 (dbg), 10.11.4 (opt), 10.11.5 (opt), 11.0.3 (opt), 11.1.2 (opt), 11.2.0 (opt)

      Attachments

        Issue Links

          Activity

            People

              oleg.smirnov Oleg Smirnov
              ramesh Ramesh Sivaraman
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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