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

Server crashes in table_multi_eq_cond_selectivity with optimizer_use_condition_selectivity>1, constant table

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.0.6
    • 10.0.7
    • None
    • None

    Description

      #3  <signal handler called>
      #4  0x00000000006a9b86 in table_multi_eq_cond_selectivity (join=0x7fc4d3dca088, idx=1, s=0x7fc4d3dcb018, rem_tables=4, keyparts=0, ref_keyuse_steps=0x7fc4de508c70) at /home/elenst/bzr/10.0/sql/sql_select.cc:7100
      #5  0x00000000006aa4fa in table_cond_selectivity (join=0x7fc4d3dca088, idx=1, s=0x7fc4d3dcb018, rem_tables=4) at /home/elenst/bzr/10.0/sql/sql_select.cc:7290
      #6  0x00000000006aac22 in best_extension_by_limited_search (join=0x7fc4d3dca088, remaining_tables=6, idx=1, record_count=1, read_time=0, search_depth=62, prune_level=1, use_cond_selectivity=2) at /home/elenst/bzr/10.0/sql/sql_select.cc:7538
      #7  0x00000000006a9152 in greedy_search (join=0x7fc4d3dca088, remaining_tables=6, search_depth=62, prune_level=1, use_cond_selectivity=2) at /home/elenst/bzr/10.0/sql/sql_select.cc:6820
      #8  0x00000000006a8724 in choose_plan (join=0x7fc4d3dca088, join_tables=6) at /home/elenst/bzr/10.0/sql/sql_select.cc:6397
      #9  0x00000000006a1daf in make_join_statistics (join=0x7fc4d3dca088, tables_list=..., conds=0x7fc4d3dcd618, keyuse_array=0x7fc4d3dca390) at /home/elenst/bzr/10.0/sql/sql_select.cc:3977
      #10 0x0000000000698e8c in JOIN::optimize_inner (this=0x7fc4d3dca088) at /home/elenst/bzr/10.0/sql/sql_select.cc:1326
      #11 0x0000000000697dcc in JOIN::optimize (this=0x7fc4d3dca088) at /home/elenst/bzr/10.0/sql/sql_select.cc:1012
      #12 0x000000000069f9a5 in mysql_select (thd=0x7fc4d6b3d070, rref_pointer_array=0x7fc4d6b41688, tables=0x7fc4d3f572a0, wild_num=1, fields=..., conds=0x7fc4d3f58b58, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fc4d3f58d48, unit=0x7fc4d6b40d38, select_lex=0x7fc4d6b41418) at /home/elenst/bzr/10.0/sql/sql_select.cc:3278
      #13 0x0000000000696123 in handle_select (thd=0x7fc4d6b3d070, lex=0x7fc4d6b40c78, result=0x7fc4d3f58d48, setup_tables_done_option=0) at /home/elenst/bzr/10.0/sql/sql_select.cc:371
      #14 0x000000000066b5f8 in execute_sqlcom_select (thd=0x7fc4d6b3d070, all_tables=0x7fc4d3f572a0) at /home/elenst/bzr/10.0/sql/sql_parse.cc:5221
      #15 0x0000000000663ab8 in mysql_execute_command (thd=0x7fc4d6b3d070) at /home/elenst/bzr/10.0/sql/sql_parse.cc:2552
      #16 0x000000000066dd78 in mysql_parse (thd=0x7fc4d6b3d070, rawbuf=0x7fc4d3f57088 "SELECT * FROM t1, t2, t3 WHERE a = 4 AND c = b", length=46, parser_state=0x7fc4de50a630) at /home/elenst/bzr/10.0/sql/sql_parse.cc:6365
      #17 0x0000000000660cba in dispatch_command (command=COM_QUERY, thd=0x7fc4d6b3d070, packet=0x7fc4d5fe2071 "SELECT * FROM t1, t2, t3 WHERE a = 4 AND c = b", packet_length=46) at /home/elenst/bzr/10.0/sql/sql_parse.cc:1296
      #18 0x000000000066005c in do_command (thd=0x7fc4d6b3d070) at /home/elenst/bzr/10.0/sql/sql_parse.cc:993
      #19 0x0000000000777e8d in do_handle_one_connection (thd_arg=0x7fc4d6b3d070) at /home/elenst/bzr/10.0/sql/sql_connect.cc:1379
      #20 0x0000000000777be0 in handle_one_connection (arg=0x7fc4d6b3d070) at /home/elenst/bzr/10.0/sql/sql_connect.cc:1293
      #21 0x0000000000a986a1 in pfs_spawn_thread (arg=0x7fc4d5e3cdf0) at /home/elenst/bzr/10.0/storage/perfschema/pfs.cc:1853
      #22 0x00007fc4de257b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
      #23 0x00007fc4dcda6a7d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

      revision-id: bar@mnogosearch.org-20131205125450-ru39z21qz8t323jy
      revno: 3914
      branch-nick: 10.0
      BUILD/compile-pentium-debug-max-no-ndb

      Test case:

       
      SET use_stat_tables=PREFERABLY;
      SET optimizer_use_condition_selectivity=2;
       
      CREATE TABLE t1 (a INT) ENGINE=MyISAM;
      INSERT INTO t1 VALUES (1);
       
      CREATE TABLE t2 (b INT, INDEX(b)) ENGINE=MyISAM;
      INSERT INTO t2 VALUES (2),(3);
       
      CREATE TABLE t3 (c INT) ENGINE=MyISAM;
      INSERT INTO t3 VALUES (4),(5);
       
      ANALYZE TABLE t1, t2, t3;
       
      SELECT * FROM t1, t2, t3 WHERE a = 4 AND c = b;

      EXPLAIN also crashes.

      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.