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

Server crashes in get_mm_tree with optimizer_use_condition_selectivity>=3, constant table

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.0.9
    • 10.0.10
    • None
    • None

    Description

      SET optimizer_use_condition_selectivity=3;
       
      CREATE TABLE t1 (a VARCHAR(3), b VARCHAR(3)) ENGINE=MyISAM;
      INSERT INTO t1 VALUES ('foo', 'foo');
       
      CREATE TABLE t2 (c INT) ENGINE=MyISAM;
      INSERT INTO t2 VALUES (1),(2);
       
      SELECT * FROM t1, t2 WHERE c >= 0 OR a = b ;

      #2  0x000000000085b9e1 in handle_fatal_signal (sig=11) at /home/elenst/bzr/10.0/sql/signal_handler.cc:262
      #3  <signal handler called>
      #4  0x0000000000976b33 in get_mm_tree (param=0x7fa6e5fe6c80, cond=0x0) at /home/elenst/bzr/10.0/sql/opt_range.cc:7816
      #5  0x000000000096d654 in calculate_cond_selectivity_for_table (thd=0x7fa6dcb62070, table=0x7fa6d089e070, cond=0x0) at /home/elenst/bzr/10.0/sql/opt_range.cc:3452
      #6  0x00000000006b1c19 in make_join_statistics (join=0x7fa6d08fa710, tables_list=..., conds=0x0, keyuse_array=0x7fa6d08faa18) at /home/elenst/bzr/10.0/sql/sql_select.cc:3930
      #7  0x00000000006a8e36 in JOIN::optimize_inner (this=0x7fa6d08fa710) at /home/elenst/bzr/10.0/sql/sql_select.cc:1327
      #8  0x00000000006a7df4 in JOIN::optimize (this=0x7fa6d08fa710) at /home/elenst/bzr/10.0/sql/sql_select.cc:1013
      #9  0x00000000006af95b in mysql_select (thd=0x7fa6dcb62070, rref_pointer_array=0x7fa6dcb666d8, tables=0x7fa6d08f92a0, wild_num=1, fields=..., conds=0x7fa6d08fa548, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fa6d08fa6f0, unit=0x7fa6dcb65d78, select_lex=0x7fa6dcb66460) at /home/elenst/bzr/10.0/sql/sql_select.cc:3278
      #10 0x00000000006a611b in handle_select (thd=0x7fa6dcb62070, lex=0x7fa6dcb65cb0, result=0x7fa6d08fa6f0, setup_tables_done_option=0) at /home/elenst/bzr/10.0/sql/sql_select.cc:372
      #11 0x000000000067af50 in execute_sqlcom_select (thd=0x7fa6dcb62070, all_tables=0x7fa6d08f92a0) at /home/elenst/bzr/10.0/sql/sql_parse.cc:5301
      #12 0x00000000006732fb in mysql_execute_command (thd=0x7fa6dcb62070) at /home/elenst/bzr/10.0/sql/sql_parse.cc:2587
      #13 0x000000000067d6db in mysql_parse (thd=0x7fa6dcb62070, rawbuf=0x7fa6d08f9088 "SELECT * FROM t1, t2 WHERE c >= 0 OR a = b", length=42, parser_state=0x7fa6e5fea610) at /home/elenst/bzr/10.0/sql/sql_parse.cc:6447
      #14 0x00000000006704a8 in dispatch_command (command=COM_QUERY, thd=0x7fa6dcb62070, packet=0x7fa6d8ab2071 "SELECT * FROM t1, t2 WHERE c >= 0 OR a = b ", packet_length=43) at /home/elenst/bzr/10.0/sql/sql_parse.cc:1308
      #15 0x000000000066f84a in do_command (thd=0x7fa6dcb62070) at /home/elenst/bzr/10.0/sql/sql_parse.cc:1005
      #16 0x0000000000789f02 in do_handle_one_connection (thd_arg=0x7fa6dcb62070) at /home/elenst/bzr/10.0/sql/sql_connect.cc:1379
      #17 0x0000000000789c55 in handle_one_connection (arg=0x7fa6dcb62070) at /home/elenst/bzr/10.0/sql/sql_connect.cc:1293
      #18 0x0000000000a2f27c in pfs_spawn_thread (arg=0x7fa6d86cbef0) at /home/elenst/bzr/10.0/storage/perfschema/pfs.cc:1853
      #19 0x00007fa6e5c1eb50 in start_thread (arg=<optimized out>) at pthread_create.c:304
      #20 0x00007fa6e4129a7d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

      Stack trace from:

      revision-id: knielsen@knielsen-hq.org-20140321123055-8ch69qymsj1xqmw4
      date: 2014-03-21 13:30:55 +0100
      build-date: 2014-03-22 14:13:54 +0400
      revno: 4076
      branch-nick: 10.0

      Attachments

        Activity

          People

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