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

Server crashes in optimize_keyuse

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.4(EOL)
    • 10.4.0
    • Optimizer
    • None

    Description

      CREATE TABLE t1 (id1 int);
      INSERT INTO t1 VALUES (1814),(0),(NULL),(1);
       
      CREATE TABLE t2 (id2 int);
       
      SELECT 1 FROM t2,t1,(SELECT * FROM t1) dt1 
      WHERE NOT EXISTS (SELECT id2 FROM t2 WHERE dt1.id1 IN (SELECT t2.id2 FROM t2 HAVING t2.id2 >= 1));
      

      10.4 55dd0776566000c5ea12e177df0c784b500
       
      #3  <signal handler called>
      #4  0x000055e7275bab59 in optimize_keyuse (join=0x7f4fe40abe88, keyuse_array=0x7f4fe40ac178) at /10.4/sql/sql_select.cc:6445
      #5  0x000055e7275b68d1 in make_join_statistics (join=0x7f4fe40abe88, tables_list=..., keyuse_array=0x7f4fe40ac178) at /10.4/sql/sql_select.cc:5021
      #6  0x000055e7275aba0f in JOIN::optimize_inner (this=0x7f4fe40abe88) at /10.4/sql/sql_select.cc:1939
      #7  0x000055e7275a9ceb in JOIN::optimize (this=0x7f4fe40abe88) at /10.4/sql/sql_select.cc:1448
      #8  0x000055e72753a909 in st_select_lex::optimize_unflattened_subqueries (this=0x7f4fe4015018, const_only=false) at /10.4/sql/sql_lex.cc:4102
      #9  0x000055e727728750 in JOIN::optimize_unflattened_subqueries (this=0x7f4fe40aae80) at /10.4/sql/opt_subselect.cc:5292
      #10 0x000055e7275ae1a5 in JOIN::optimize_stage2 (this=0x7f4fe40aae80) at /10.4/sql/sql_select.cc:2678
      #11 0x000055e7275abb07 in JOIN::optimize_inner (this=0x7f4fe40aae80) at /10.4/sql/sql_select.cc:1965
      #12 0x000055e7275a9ceb in JOIN::optimize (this=0x7f4fe40aae80) at /10.4/sql/sql_select.cc:1448
      #13 0x000055e7275b3d8b in mysql_select (thd=0x7f4fe4000b00, tables=0x7f4fe4015528, wild_num=0, fields=..., conds=0x7f4fe401ab90, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f4fe401add0, unit=0x7f4fe40049b0, select_lex=0x7f4fe4015018) at /10.4/sql/sql_select.cc:4274
      #14 0x000055e7275a578e in handle_select (thd=0x7f4fe4000b00, lex=0x7f4fe40048e8, result=0x7f4fe401add0, setup_tables_done_option=0) at /10.4/sql/sql_select.cc:382
      #15 0x000055e72756fe53 in execute_sqlcom_select (thd=0x7f4fe4000b00, all_tables=0x7f4fe4015528) at /10.4/sql/sql_parse.cc:6550
      #16 0x000055e7275662aa in mysql_execute_command (thd=0x7f4fe4000b00) at /10.4/sql/sql_parse.cc:3772
      #17 0x000055e727573c3b in mysql_parse (thd=0x7f4fe4000b00, rawbuf=0x7f4fe4014e98 "SELECT 1 FROM t2,t1,(SELECT * FROM t1) dt1 \nWHERE NOT EXISTS (SELECT id2 FROM t2 WHERE dt1.id1 IN (SELECT t2.id2 FROM t2 HAVING t2.id2 >= 1))", length=141, parser_state=0x7f5034181470, is_com_multi=false, is_next_command=false) at /10.4/sql/sql_parse.cc:8085
      #18 0x000055e727560d06 in dispatch_command (command=COM_QUERY, thd=0x7f4fe4000b00, packet=0x7f4fe4179421 "SELECT 1 FROM t2,t1,(SELECT * FROM t1) dt1 \nWHERE NOT EXISTS (SELECT id2 FROM t2 WHERE dt1.id1 IN (SELECT t2.id2 FROM t2 HAVING t2.id2 >= 1))", packet_length=141, is_com_multi=false, is_next_command=false) at /10.4/sql/sql_parse.cc:1850
      #19 0x000055e72755f723 in do_command (thd=0x7f4fe4000b00) at /10.4/sql/sql_parse.cc:1395
      #20 0x000055e7276c7d7f in do_handle_one_connection (connect=0x55e72b63f090) at /10.4/sql/sql_connect.cc:1402
      #21 0x000055e7276c7ad0 in handle_one_connection (arg=0x55e72b63f090) at /10.4/sql/sql_connect.cc:1308
      #22 0x000055e727f9e2f9 in pfs_spawn_thread (arg=0x55e72b646070) at /10.4/storage/perfschema/pfs.cc:1862
      #23 0x00007f503c8d06ba in start_thread (arg=0x7f5034182700) at pthread_create.c:333
      #24 0x00007f503bd6541d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
      
      

      Attachments

        Issue Links

          Activity

            People

              igor Igor Babaev
              alice Alice Sherepa
              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.