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

Server crashes in st_join_table::is_inner_table_of_outer_join

    XMLWordPrintable

Details

    Description

      CREATE TABLE t1 (pk INT PRIMARY KEY);
      INSERT INTO t1 VALUES (1),(2);
      WITH cte AS ( SELECT pk FROM t1 WHERE pk IS NULL GROUP BY pk ) SELECT * FROM cte;
      

      10.3 c664c48726cdfa

      #3  <signal handler called>
      #4  0x0000556e79236ed2 in st_join_table::is_inner_table_of_outer_join (this=0x0) at /data/src/10.3/sql/sql_select.h:532
      #5  0x0000556e793a2841 in JOIN::check_for_splittable_materialized (this=0x7f6bf00172c0) at /data/src/10.3/sql/opt_split.cc:354
      #6  0x0000556e79204b76 in JOIN::check_two_phase_optimization (this=0x7f6bf00172c0, thd=0x7f6bf0000b00) at /data/src/10.3/sql/sql_select.cc:8933
      #7  0x0000556e791ef095 in JOIN::optimize_inner (this=0x7f6bf00172c0) at /data/src/10.3/sql/sql_select.cc:1548
      #8  0x0000556e791ed903 in JOIN::optimize (this=0x7f6bf00172c0) at /data/src/10.3/sql/sql_select.cc:1125
      #9  0x0000556e7916fcc8 in mysql_derived_optimize (thd=0x7f6bf0000b00, lex=0x7f6bf0004770, derived=0x7f6bf0016558) at /data/src/10.3/sql/sql_derived.cc:909
      #10 0x0000556e7916e431 in mysql_handle_single_derived (lex=0x7f6bf0004770, derived=0x7f6bf0016558, phases=4) at /data/src/10.3/sql/sql_derived.cc:197
      #11 0x0000556e791ee5b6 in JOIN::optimize_inner (this=0x7f6bf0016c70) at /data/src/10.3/sql/sql_select.cc:1365
      #12 0x0000556e791ed903 in JOIN::optimize (this=0x7f6bf0016c70) at /data/src/10.3/sql/sql_select.cc:1125
      #13 0x0000556e791f6e5c in mysql_select (thd=0x7f6bf0000b00, tables=0x7f6bf0016558, wild_num=1, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f6bf0016c50, unit=0x7f6bf0004838, select_lex=0x7f6bf0004f70) at /data/src/10.3/sql/sql_select.cc:3805
      #14 0x0000556e791eaf9a in handle_select (thd=0x7f6bf0000b00, lex=0x7f6bf0004770, result=0x7f6bf0016c50, setup_tables_done_option=0) at /data/src/10.3/sql/sql_select.cc:375
      #15 0x0000556e791b6765 in execute_sqlcom_select (thd=0x7f6bf0000b00, all_tables=0x7f6bf0016558) at /data/src/10.3/sql/sql_parse.cc:6510
      #16 0x0000556e791acef9 in mysql_execute_command (thd=0x7f6bf0000b00) at /data/src/10.3/sql/sql_parse.cc:3743
      #17 0x0000556e791ba098 in mysql_parse (thd=0x7f6bf0000b00, rawbuf=0x7f6bf0014b58 "WITH cte AS ( SELECT pk FROM t1 WHERE pk IS NULL GROUP BY pk ) SELECT * FROM cte", length=80, parser_state=0x7f6c000da610, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7966
      #18 0x0000556e791a7a0d in dispatch_command (command=COM_QUERY, thd=0x7f6bf0000b00, packet=0x7f6bf011ec21 "WITH cte AS ( SELECT pk FROM t1 WHERE pk IS NULL GROUP BY pk ) SELECT * FROM cte", packet_length=80, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1824
      #19 0x0000556e791a6441 in do_command (thd=0x7f6bf0000b00) at /data/src/10.3/sql/sql_parse.cc:1369
      #20 0x0000556e792ff190 in do_handle_one_connection (connect=0x556e7c4cb420) at /data/src/10.3/sql/sql_connect.cc:1420
      #21 0x0000556e792fef1d in handle_one_connection (arg=0x556e7c4cb420) at /data/src/10.3/sql/sql_connect.cc:1326
      #22 0x0000556e7978e83e in pfs_spawn_thread (arg=0x556e7c56c8a0) at /data/src/10.3/storage/perfschema/pfs.cc:1863
      #23 0x00007f6c07b42494 in start_thread (arg=0x7f6c000db700) at pthread_create.c:333
      #24 0x00007f6c05f2893f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Attachments

        Issue Links

          Activity

            People

              igor Igor Babaev
              elenst Elena Stepanova
              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.