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

MWL#253: Assertion `join->best_read < double(..) fails in greedy_search with selectivity=3 and use_stat_tables, without ANALYZE

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 10.0.2
    • 10.0.5
    • None
    • None

    Description

      SET optimizer_use_condition_selectivity=3;
      SET use_stat_tables=PREFERABLY;
       
      CREATE TABLE t1 (a INT, b INT);
      INSERT INTO t1 VALUES (1,1),(8,8);
       
      CREATE TABLE t2 (c INT);
      INSERT INTO t2 VALUES (5),(6);
       
      SELECT * FROM t1 AS t1x, t1 t1y STRAIGHT_JOIN t2 WHERE t1y.b = t1x.a AND t1x.a = 0;

      Version: '10.0.2-MariaDB-debug-log'  socket: '/data/repo/bzr/10.0/mysql-test/var/tmp/mysqld.1.sock'  port: 16000  Source distribution
      mysqld: /home/elenst/bzr/10.0/sql/sql_select.cc:6671: bool greedy_search(JOIN*, table_map, uint, uint, uint): Assertion `join->best_read < double(1.79769313486231570815e+308L)' failed.
      130424  1:31:37 [ERROR] mysqld got signal 6 ;

      #7  0x00007fa93b4a7192 in __GI___assert_fail (assertion=0xdc6480 "join->best_read < double(1.79769313486231570815e+308L)", file=0xdc5ba8 "/home/elenst/bzr/10.0/sql/sql_select.cc", line=6671, function=0xdc8c00 "bool greedy_search(JOIN*, table_map, uint, uint, uint)") at assert.c:103
      #8  0x00000000006615bb in greedy_search (join=0x7fa92403e7b8, remaining_tables=7, search_depth=62, prune_level=1, use_cond_selectivity=3) at /home/elenst/bzr/10.0/sql/sql_select.cc:6671
      #9  0x0000000000660b7a in choose_plan (join=0x7fa92403e7b8, join_tables=7) at /home/elenst/bzr/10.0/sql/sql_select.cc:6240
      #10 0x000000000065aaad in make_join_statistics (join=0x7fa92403e7b8, tables_list=..., conds=0x7fa92403f5f8, keyuse_array=0x7fa92403eac0) at /home/elenst/bzr/10.0/sql/sql_select.cc:3895
      #11 0x0000000000651ae6 in JOIN::optimize_inner (this=0x7fa92403e7b8) at /home/elenst/bzr/10.0/sql/sql_select.cc:1301
      #12 0x0000000000650ab0 in JOIN::optimize (this=0x7fa92403e7b8) at /home/elenst/bzr/10.0/sql/sql_select.cc:1003
      #13 0x00000000006585be in mysql_select (thd=0x3674570, rref_pointer_array=0x36779d0, tables=0x7fa9240219e0, wild_num=1, fields=..., conds=0x7fa92403e610, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fa924023748, unit=0x3677098, select_lex=0x3677770) at /home/elenst/bzr/10.0/sql/sql_select.cc:3215
      #14 0x000000000064ef25 in handle_select (thd=0x3674570, lex=0x3676fe0, result=0x7fa924023748, setup_tables_done_option=0) at /home/elenst/bzr/10.0/sql/sql_select.cc:371
      #15 0x0000000000624d88 in execute_sqlcom_select (thd=0x3674570, all_tables=0x7fa9240219e0) at /home/elenst/bzr/10.0/sql/sql_parse.cc:5021
      #16 0x000000000061d3b3 in mysql_execute_command (thd=0x3674570) at /home/elenst/bzr/10.0/sql/sql_parse.cc:2482
      #17 0x0000000000627646 in mysql_parse (thd=0x3674570, rawbuf=0x7fa924021768 "SELECT * FROM t1 AS t1x, t1 t1y STRAIGHT_JOIN t2 WHERE t1y.b = t1x.a AND t1x.a = 0", length=82, parser_state=0x7fa92e955510) at /home/elenst/bzr/10.0/sql/sql_parse.cc:6154
      #18 0x000000000061a598 in dispatch_command (command=COM_QUERY, thd=0x3674570, packet=0x36787c1 "SELECT * FROM t1 AS t1x, t1 t1y STRAIGHT_JOIN t2 WHERE t1y.b = t1x.a AND t1x.a = 0", packet_length=82) at /home/elenst/bzr/10.0/sql/sql_parse.cc:1274
      #19 0x0000000000619a0e in do_command (thd=0x3674570) at /home/elenst/bzr/10.0/sql/sql_parse.cc:983
      #20 0x000000000072ea37 in do_handle_one_connection (thd_arg=0x3674570) at /home/elenst/bzr/10.0/sql/sql_connect.cc:1267
      #21 0x000000000072e78a in handle_one_connection (arg=0x3674570) at /home/elenst/bzr/10.0/sql/sql_connect.cc:1181
      #22 0x00000000009a952d in pfs_spawn_thread (arg=0x34edf40) at /home/elenst/bzr/10.0/storage/perfschema/pfs.cc:1800
      #23 0x00007fa93c277e9a in start_thread (arg=0x7fa92e956700) at pthread_create.c:308
      #24 0x00007fa93b56bcbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

      revision-id: igor@askmonty.org-20130423035522-w8b8rz72zdav0p7r
      revno: 3744
      branch-nick: 10.0

      EXPLAIN also fails.

      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.