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

Assertion failure in Item_float::do_build_clone (Item_static_float_func)

    XMLWordPrintable

Details

    Description

      CREATE OR REPLACE VIEW v1 (f,f2) AS SELECT connection_id(),pi();
      CREATE OR REPLACE TABLE t1 AS SELECT 1;
      SELECT * FROM v1 JOIN t1 ON f=f2;
      

      Leads to

      10.5.27 872dbec93570bb934473907f5d1fcf74aeee4f85 (Debug)

      mariadbd: /test/10.5_dbg/sql/item.h:1677: Item* Item::get_copy(THD*) const: Assertion `typeid(*copy) == typeid(*this)' failed.
      

      10.5.27 872dbec93570bb934473907f5d1fcf74aeee4f85 (Debug)

      Core was generated by `/test/MD290824-mariadb-10.5.27-linux-x86_64-dbg/bin/mariadbd --no-defaults --ma'.
      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 0x15447c9d8700 (LWP 966390))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000015447fe2a859 in __GI_abort () at abort.c:79
      #2  0x000015447fe2a729 in __assert_fail_base (fmt=0x15447ffc0588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x559bee12e6d0 "typeid(*copy) == typeid(*this)", file=0x559bee12e308 "/test/10.5_dbg/sql/item.h", line=1677, function=<optimized out>) at assert.c:92
      #3  0x000015447fe3bfd6 in __GI___assert_fail (assertion=assertion@entry=0x559bee12e6d0 "typeid(*copy) == typeid(*this)", file=file@entry=0x559bee12e308 "/test/10.5_dbg/sql/item.h", line=line@entry=1677, function=function@entry=0x559bee12e6a8 "Item* Item::get_copy(THD*) const") at assert.c:101
      #4  0x0000559bed725cc2 in Item::get_copy (thd=<optimized out>, this=0x154430017c18) at /test/10.5_dbg/sql/item.h:1677
      #5  Item_float::do_build_clone (this=0x154430017c18, thd=<optimized out>) at /test/10.5_dbg/sql/item.h:4523
      #6  0x0000559bed705c50 in Item::build_clone (thd=0x154430000d48, this=0x154430017c18) at /test/10.5_dbg/sql/item.h:1691
      #7  Item_field::derived_field_transformer_for_where (this=0x154430069cd8, thd=0x154430000d48, arg=<optimized out>) at /test/10.5_dbg/sql/item.cc:7912
      #8  0x0000559bed6fe077 in Item::transform (this=0x154430069cd8, thd=0x154430000d48, transformer=&virtual Item::derived_field_transformer_for_where(THD*, unsigned char*), arg=0x154430017620 "") at /test/10.5_dbg/sql/item.cc:605
      #9  0x0000559bed781bf1 in Item_args::transform_args (this=this@entry=0x154430069ea8, thd=thd@entry=0x154430000d48, transformer=<optimized out>, arg=arg@entry=0x154430017620 "") at /test/10.5_dbg/sql/item_func.cc:503
      #10 0x0000559bed781c84 in Item_func::transform (this=0x154430069e18, thd=0x154430000d48, transformer=&virtual table offset 1344, argument=0x154430017620 "") at /test/10.5_dbg/sql/item_func.cc:539
      #11 0x0000559bed3c2682 in transform_condition_or_part (thd=thd@entry=0x154430000d48, cond=cond@entry=0x154430069e18, transformer=<optimized out>, arg=arg@entry=0x154430017620 "") at /test/10.5_dbg/sql/sql_derived.cc:1390
      #12 0x0000559bed3f7380 in st_select_lex::pushdown_cond_into_where_clause (this=this@entry=0x154430017620, thd=thd@entry=0x154430000d48, cond=cond@entry=0x154430069e18, remaining_cond=remaining_cond@entry=0x15447c9d6668, transformer=<optimized out>, arg=0x154430017620 "") at /test/10.5_dbg/sql/sql_lex.cc:10757
      #13 0x0000559bed3c2a40 in pushdown_cond_for_derived (thd=0x154430000d48, cond=<optimized out>, derived=derived@entry=0x1544300134b8) at /test/10.5_dbg/sql/sql_derived.cc:1583
      #14 0x0000559bed493542 in JOIN::optimize_inner (this=this@entry=0x1544300687e0) at /test/10.5_dbg/sql/sql_select.cc:2229
      #15 0x0000559bed49404b in JOIN::optimize (this=this@entry=0x1544300687e0) at /test/10.5_dbg/sql/sql_select.cc:1765
      #16 0x0000559bed494123 in mysql_select (thd=thd@entry=0x154430000d48, tables=0x1544300134b8, fields=@0x154430012fc8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x154430013470, last = 0x1544300699f0, elements = 3}, <No data fields>}, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x154430018b48, unit=0x154430004ef8, select_lex=0x154430012e60) at /test/10.5_dbg/sql/sql_select.cc:4900
      #17 0x0000559bed494c79 in handle_select (thd=thd@entry=0x154430000d48, lex=lex@entry=0x154430004e30, result=result@entry=0x154430018b48, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.5_dbg/sql/sql_select.cc:449
      #18 0x0000559bed40d0dc in execute_sqlcom_select (thd=thd@entry=0x154430000d48, all_tables=0x1544300134b8) at /test/10.5_dbg/sql/sql_parse.cc:6431
      #19 0x0000559bed41a152 in mysql_execute_command (thd=thd@entry=0x154430000d48) at /test/10.5_dbg/sql/sql_parse.cc:4030
      #20 0x0000559bed406418 in mysql_parse (thd=thd@entry=0x154430000d48, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x15447c9d72c0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:8229
      #21 0x0000559bed41515d in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x154430000d48, packet=packet@entry=0x15443000aa19 "SELECT * FROM v1 JOIN t1 ON f=f2", packet_length=packet_length@entry=32, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_class.h:1329
      #22 0x0000559bed417e96 in do_command (thd=0x154430000d48) at /test/10.5_dbg/sql/sql_parse.cc:1376
      #23 0x0000559bed564fee in do_handle_one_connection (connect=<optimized out>, connect@entry=0x559bf150b078, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1417
      #24 0x0000559bed56568c in handle_one_connection (arg=arg@entry=0x559bf150b078) at /test/10.5_dbg/sql/sql_connect.cc:1319
      #25 0x0000559bed9e6673 in pfs_spawn_thread (arg=0x559bf09dc778) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
      #26 0x000015448033b609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #27 0x000015447ff27133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.