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

Assertion `subq_pred->test_set_strategy(8)' failed in bool setup_jtbm_semi_joins(JOIN*, List<TABLE_LIST>*, List<Item>&)

    XMLWordPrintable

Details

    Description

      CREATE TABLE t (a INT) ENGINE=MyISAM;
      SET GLOBAL aria_encrypt_tables=1;
      SET GLOBAL encrypt_tmp_disk_tables=1;
      SET big_tables=1;
      EXPLAIN SELECT * FROM t WHERE a in (SELECT MAX(a) FROM t);
      

      Leads to

      10.4.31 4b3f93063958834e3d55089d23d16ad242430bf8 (Optimized)

      Core was generated by `/test/mtest/MD180723-mariadb-10.4.31-linux-x86_64-opt/bin/mariadbd --no-default'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  0x000055cc5eda3776 in setup_table_map (tablenr=<optimized out>, 
          table_list=0x154c7c014c20, table=0x154c7c010db0)
          at /test/mtest/10.4_opt/sql/sql_base.h:355
      355	  table->covering_keys= table->s->keys_for_keyread;
      [Current thread is 1 (Thread 0x154ce010c700 (LWP 4151382))]
      (gdb) bt
      #0  0x000055cc5eda3776 in setup_table_map (tablenr=<optimized out>, table_list=0x154c7c014c20, table=0x154c7c010db0) at /test/mtest/10.4_opt/sql/sql_base.h:355
      #1  setup_jtbm_semi_joins (join=join@entry=0x154c7c0136d0, join_list=<optimized out>, eq_list=@0x154ce0109360: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55cc5fca2620 <end_of_list>, last = 0x154ce0109360, elements = 0}, <No data fields>}) at /test/mtest/10.4_opt/sql/opt_subselect.cc:6359
      #2  0x000055cc5ecd4329 in JOIN::optimize_inner (this=0x154c7c0136d0) at /test/mtest/10.4_opt/sql/sql_select.cc:2162
      #3  0x000055cc5ecd731b in JOIN::optimize (this=this@entry=0x154c7c0136d0) at /test/mtest/10.4_opt/sql/sql_select.cc:1711
      #4  0x000055cc5ecd7ec5 in mysql_select (thd=0x154c7c000c48, tables=0x154c7c010590, wild_num=1, fields=@0x154c7c0100e0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x154c7c010548, last = 0x154c7c010548, elements = 1}, <No data fields>}, conds=0x154c7c012480, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=<optimized out>, result=0x154c7c0130a8, unit=0x154c7c004828, select_lex=0x154c7c00ff80) at /test/mtest/10.4_opt/sql/sql_select.cc:4812
      #5  0x000055cc5ecd8c17 in mysql_explain_union (thd=thd@entry=0x154c7c000c48, unit=unit@entry=0x154c7c004828, result=result@entry=0x154c7c0130a8) at /test/mtest/10.4_opt/sql/sql_select.cc:27707
      #6  0x000055cc5ec64d5b in execute_sqlcom_select (thd=0x154c7c000c48, all_tables=0x154c7c010590) at /test/mtest/10.4_opt/sql/sql_parse.cc:6412
      #7  0x000055cc5ec7308d in mysql_execute_command (thd=0x154c7c000c48) at /test/mtest/10.4_opt/sql/sql_parse.cc:3976
      #8  0x000055cc5ec755d2 in mysql_parse (thd=0x154c7c000c48, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/mtest/10.4_opt/sql/sql_parse.cc:8008
      #9  0x000055cc5ec78085 in dispatch_command (command=COM_QUERY, thd=0x154c7c000c48, packet=<optimized out>, packet_length=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/mtest/10.4_opt/sql/sql_class.h:1231
      #10 0x000055cc5ec798df in do_command (thd=0x154c7c000c48) at /test/mtest/10.4_opt/sql/sql_parse.cc:1378
      #11 0x000055cc5ed66dae in do_handle_one_connection (connect=<optimized out>) at /test/mtest/10.4_opt/sql/sql_connect.cc:1420
      #12 0x000055cc5ed66e3d in handle_one_connection (arg=<optimized out>) at /test/mtest/10.4_opt/sql/sql_connect.cc:1324
      #13 0x0000154ce20c0609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #14 0x0000154ce1cac133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.4.31 4b3f93063958834e3d55089d23d16ad242430bf8 (Debug)

      mariadbd: /test/mtest/10.4_dbg/sql/opt_subselect.cc:6351: bool setup_jtbm_semi_joins(JOIN*, List<TABLE_LIST>*, List<Item>&): Assertion `subq_pred->test_set_strategy(8)' failed.
      

      10.4.31 4b3f93063958834e3d55089d23d16ad242430bf8 (Debug)

      Core was generated by `/test/mtest/MD180723-mariadb-10.4.31-linux-x86_64-dbg/bin/mariadbd --no-default'.
      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 0x1475139e3700 (LWP 4114136))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000014755a4da859 in __GI_abort () at abort.c:79
      #2  0x000014755a4da729 in __assert_fail_base (fmt=0x14755a670588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5638e8170a20 "subq_pred->test_set_strategy(8)", file=0x5638e816fea0 "/test/mtest/10.4_dbg/sql/opt_subselect.cc", line=6351, function=<optimized out>) at assert.c:92
      #3  0x000014755a4ebfd6 in __GI___assert_fail (assertion=assertion@entry=0x5638e8170a20 "subq_pred->test_set_strategy(8)", file=file@entry=0x5638e816fea0 "/test/mtest/10.4_dbg/sql/opt_subselect.cc", line=line@entry=6351, function=function@entry=0x5638e81709d8 "bool setup_jtbm_semi_joins(JOIN*, List<TABLE_LIST>*, List<Item>&)") at assert.c:101
      #4  0x00005638e76b00ae in setup_jtbm_semi_joins (join=join@entry=0x1474f0015d30, join_list=<optimized out>, eq_list=@0x1475139e04a0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x5638e89b6ab0 <end_of_list>, last = 0x1475139e04a0, elements = 0}, <No data fields>}) at /test/mtest/10.4_dbg/sql/sql_alloc.h:39
      #5  0x00005638e75a833e in JOIN::optimize_inner (this=this@entry=0x1474f0015d30) at /test/mtest/10.4_dbg/sql/sql_select.cc:2162
      #6  0x00005638e75a8ee2 in JOIN::optimize (this=this@entry=0x1474f0015d30) at /test/mtest/10.4_dbg/sql/sql_select.cc:1711
      #7  0x00005638e75a980a in mysql_select (thd=thd@entry=0x1474f0000d28, tables=0x1474f0012ba0, wild_num=1, fields=@0x1474f00126f0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1474f0012b58, last = 0x1474f0012b58, elements = 1}, <No data fields>}, conds=0x1474f0014a90, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=<optimized out>, result=0x1474f00156b8, unit=0x1474f0004ac8, select_lex=0x1474f0012590) at /test/mtest/10.4_dbg/sql/sql_select.cc:4812
      #8  0x00005638e75a9d99 in mysql_explain_union (thd=thd@entry=0x1474f0000d28, unit=unit@entry=0x1474f0004ac8, result=result@entry=0x1474f00156b8) at /test/mtest/10.4_dbg/sql/sql_select.cc:27707
      #9  0x00005638e7525cae in execute_sqlcom_select (thd=thd@entry=0x1474f0000d28, all_tables=0x1474f0012ba0) at /test/mtest/10.4_dbg/sql/sql_parse.cc:6412
      #10 0x00005638e752fe23 in mysql_execute_command (thd=thd@entry=0x1474f0000d28) at /test/mtest/10.4_dbg/sql/sql_parse.cc:3976
      #11 0x00005638e753a293 in mysql_parse (thd=thd@entry=0x1474f0000d28, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1475139e23b0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/mtest/10.4_dbg/sql/sql_parse.cc:8008
      #12 0x00005638e753cdae in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1474f0000d28, packet=packet@entry=0x1474f0019509 "", packet_length=packet_length@entry=57, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/mtest/10.4_dbg/sql/sql_class.h:1231
      #13 0x00005638e753f5d9 in do_command (thd=0x1474f0000d28) at /test/mtest/10.4_dbg/sql/sql_parse.cc:1378
      #14 0x00005638e765c0c9 in do_handle_one_connection (connect=<optimized out>) at /test/mtest/10.4_dbg/sql/sql_connect.cc:1420
      #15 0x00005638e765c185 in handle_one_connection (arg=<optimized out>) at /test/mtest/10.4_dbg/sql/sql_connect.cc:1324
      #16 0x000014755a9eb609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #17 0x000014755a5d7133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Attachments

        Activity

          People

            psergei Sergei Petrunia
            ramesh Ramesh Sivaraman
            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.