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

Server crashes in Explain_union::print_explain on ER_TOO_BIG_SELECT with explain in slow log

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.0.5
    • Component/s: None
    • Labels:
      None

      Description

      CREATE TABLE t1 (i INT) ENGINE=MyISAM;
      INSERT INTO t1 VALUES
      (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
       
      SET max_join_size = 10;
      SET log_slow_verbosity = 'explain';
      SET long_query_time = 0.000001;
       
      --error ER_TOO_BIG_SELECT
      ( SELECT ta.* FROM t1 ta, t1 tb ) UNION ( SELECT * FROM t1 );
       
      SELECT 'Checking that server is still alive';

      #3  <signal handler called>
      #4  0x0000000000765271 in Explain_union::print_explain (this=0x7f516402cbe8, query=0x7f5164013110, output=0x7f516c3dabf0, explain_flags=0 '\000') at 10.0-base-explain-slowquerylog/sql/sql_explain.cc:168
      #5  0x0000000000764fcd in Explain_query::print_explain (this=0x7f5164013110, output=0x7f516c3dabf0, explain_flags=0 '\000') at 10.0-base-explain-slowquerylog/sql/sql_explain.cc:121
      #6  0x0000000000765095 in Explain_query::print_explain_str (this=0x7f5164013110, thd=0x21c7690, out_str=0x7f516c3dad70) at 10.0-base-explain-slowquerylog/sql/sql_explain.cc:139
      #7  0x0000000000765001 in print_explain_query (lex=0x21cab48, thd=0x21c7690, str=0x7f516c3dad70) at 10.0-base-explain-slowquerylog/sql/sql_explain.cc:128
      #8  0x00000000008c34f5 in MYSQL_QUERY_LOG::write (this=0x1f6d230, thd=0x21c7690, current_time=1381146510, user_host=0x7f516c3db210 "root[root] @ localhost []", user_host_len=25, query_utime=4568, lock_utime=2078, is_command=false, sql_text=0x7f51640114c8 "( SELECT ta.* FROM t1 ta, t1 tb ) UNION ( SELECT * FROM t1 )", sql_text_len=60) at 10.0-base-explain-slowquerylog/sql/log.cc:2833
      #9  0x00000000008be690 in Log_to_file_event_handler::log_slow (this=0x1f6cce0, thd=0x21c7690, current_time=..., user_host=0x7f516c3db210 "root[root] @ localhost []", user_host_len=25, query_utime=4568, lock_utime=2078, is_command=false, sql_text=0x7f51640114c8 "( SELECT ta.* FROM t1 ta, t1 tb ) UNION ( SELECT * FROM t1 )", sql_text_len=60) at 10.0-base-explain-slowquerylog/sql/log.cc:996
      #10 0x00000000008bf167 in LOGGER::slow_log_print (this=0x154ab80, thd=0x21c7690, query=0x7f51640114c8 "( SELECT ta.* FROM t1 ta, t1 tb ) UNION ( SELECT * FROM t1 )", query_length=60, current_utime=240579461470) at 10.0-base-explain-slowquerylog/sql/log.cc:1287
      #11 0x00000000008cb4ad in slow_log_print (thd=0x21c7690, query=0x7f51640114c8 "( SELECT ta.* FROM t1 ta, t1 tb ) UNION ( SELECT * FROM t1 )", query_length=60, current_utime=240579461470) at 10.0-base-explain-slowquerylog/sql/log.cc:5870
      #12 0x000000000061c7df in log_slow_statement (thd=0x21c7690) at 10.0-base-explain-slowquerylog/sql/sql_parse.cc:1572
      #13 0x000000000061c483 in dispatch_command (command=COM_QUERY, thd=0x21c7690, packet=0x21cc341 "", packet_length=60) at 10.0-base-explain-slowquerylog/sql/sql_parse.cc:1495
      #14 0x000000000061a441 in do_command (thd=0x21c7690) at 10.0-base-explain-slowquerylog/sql/sql_parse.cc:812
      #15 0x0000000000734e6d in do_handle_one_connection (thd_arg=0x21c7690) at 10.0-base-explain-slowquerylog/sql/sql_connect.cc:1266
      #16 0x0000000000734bdb in handle_one_connection (arg=0x21c7690) at 10.0-base-explain-slowquerylog/sql/sql_connect.cc:1181
      #17 0x0000000000998862 in pfs_spawn_thread (arg=0x21c2a70) at 10.0-base-explain-slowquerylog/storage/perfschema/pfs.cc:1015
      #18 0x00007f5170ac8e9a in start_thread (arg=0x7f516c3dc700) at pthread_create.c:308
      #19 0x00007f516fdbccbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

      bzr version-info
      revision-id: psergey@askmonty.org-20131005091945-lphh0ek2w8oiotzu
      revno: 3706
      branch-nick: 10.0-base-explain-slowquerylog

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              psergey Sergei Petrunia
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: