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

Assertion `found_tables > 0' failed

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 13.2
    • N/A
    • Optimizer
    • None
    • Can result in hang or crash

    Description

      Server crash while testing MDEV-39014

      Issue:

      mariadbd: /home/ppandith/wl-39014/sql/sql_select.cc:12375: enum_best_search best_extension_by_limited_search(JOIN*, table_map, uint, double, double, uint, uint, table_map*): Assertion `found_tables > 0' failed.
      260511 12:53:05 [ERROR] ./sql/mariadbd got signal 6 ;
      

      Version:

      Branch : 13.2-mdev-39014-full-join-p2
      commit 60412460748d5fd5bd61422dc3d7cd4173da7a46

      Repro:

      create table t1(a int);
      create table t2(b int);
      create table t3(c int);
      explain select /*+ join_order(t3,t1,t2) */ * from t3 inner join (t1 full join t2 on t1.a=t2.b) on (t3.c=t1.a or t2.b=5);
      

      Stack trace:

      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
      #1  __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
      #2  __GI___pthread_kill (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:89
      #3  my_write_core (sig=6) at /home/ppandith/wl-39014/mysys/stacktrace.c:424
      #4  handle_fatal_signal (sig=6) at /home/ppandith/wl-39014/sql/signal_handler.cc:298
      #5  <signal handler called>
      #6  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
      #7  __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
      #8  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
      #9  __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      #10 __GI_abort () at ./stdlib/abort.c:79
      #11 __assert_fail_base (fmt="%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry="found_tables > 0", 
          file=file@entry="/home/ppandith/wl-39014/sql/sql_select.cc", line=line@entry=12375, 
          function=function@entry="enum_best_search best_extension_by_limited_search(JOIN*, table_map, uint, double, double, uint, uint, table_map*)") at ./assert/assert.c:96
      #12 __assert_fail (assertion="found_tables > 0", file="/home/ppandith/wl-39014/sql/sql_select.cc", line=12375, 
          function="enum_best_search best_extension_by_limited_search(JOIN*, table_map, uint, double, double, uint, uint, table_map*)")
          at ./assert/assert.c:105
      #13 best_extension_by_limited_search (join=, remaining_tables=7, idx=0, record_count=1, read_time=0, search_depth=62, 
          use_cond_selectivity=4, processed_eq_ref_tables=) at /home/ppandith/wl-39014/sql/sql_select.cc:12375
      #14 greedy_search (join=, remaining_tables=7, search_depth=62, use_cond_selectivity=4)
          at /home/ppandith/wl-39014/sql/sql_select.cc:11017
      #15 choose_plan (join=, join_tables=7, emb_sjm_nest=) at /home/ppandith/wl-39014/sql/sql_select.cc:10522
      #16 make_join_statistics (join=, tables_list=..., keyuse_array=) at /home/ppandith/wl-39014/sql/sql_select.cc:6538
      #17 JOIN::optimize_inner (this=) at /home/ppandith/wl-39014/sql/sql_select.cc:2882
      #18 JOIN::optimize (this=) at /home/ppandith/wl-39014/sql/sql_select.cc:2132
      #19 mysql_select (thd=, tables=, fields=..., conds=, og_num=0, order=, group=, having=, proc_param=, select_options=2164525828, 
          result=, unit=, select_lex=) at /home/ppandith/wl-39014/sql/sql_select.cc:5544
      #20 mysql_explain_union (thd=, unit=, result=) at /home/ppandith/wl-39014/sql/sql_select.cc:32988
      #21 execute_sqlcom_select (thd=, all_tables=) at /home/ppandith/wl-39014/sql/sql_parse.cc:6152
      #22 mysql_execute_command (thd=, is_called_from_prepared_stmt=false) at /home/ppandith/wl-39014/sql/sql_parse.cc:3989
      #23 mysql_parse (thd=, 
          rawbuf="explain select /*+ join_order(t3,t1,t2) */ * from t3 inner join (t1 full join t2 on t1.a=t2.b) on (t3.c=t1.a or t2.b=5)", 
          length=119, parser_state=) at /home/ppandith/wl-39014/sql/sql_parse.cc:7941
      #24 dispatch_command (command=COM_QUERY, thd=, packet="", packet_length=119, blocking=true)
          at /home/ppandith/wl-39014/sql/sql_parse.cc:1898
      #25 do_command (thd=, blocking=true) at /home/ppandith/wl-39014/sql/sql_parse.cc:1432
      #26 do_handle_one_connection (connect=, put_in_cache=true) at /home/ppandith/wl-39014/sql/sql_connect.cc:1503
      #27 handle_one_connection (arg=) at /home/ppandith/wl-39014/sql/sql_connect.cc:1415
      --Type <RET> for more, q to quit, c to continue without paging--
      #28 pfs_spawn_thread (arg=) at /home/ppandith/wl-39014/storage/perfschema/pfs.cc:2198
      #29 start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
      #30 clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Attachments

        Issue Links

          Activity

            People

              Gosselin Dave Gosselin
              mariadb-pavithrapandith Pavithra Pandith
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.