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

MWL#253: Assertion `join->best_read < double(...)' failed in greedy_search with optimizer_use_condition_selectivity=3

    XMLWordPrintable

    Details

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

      Description

      mysqld: /data/bzr/maria-10.0-mwl253/sql/sql_select.cc:6673: bool greedy_search(JOIN*, table_map, uint, uint, uint): Assertion `join->best_read < double(1.79769313486231570815e+308L)' failed.
      130411 20:04:19 [ERROR] mysqld got signal 6 ;

      #7  0x00007f7afcfc1192 in __GI___assert_fail (assertion=0xd8dc28 "join->best_read < double(1.79769313486231570815e+308L)", file=0xd8d2e0 "/data/bzr/maria-10.0-mwl253/sql/sql_select.cc", line=6673, function=0xd904e0 "bool greedy_search(JOIN*, table_map, uint, uint, uint)") at assert.c:103
      #8  0x00000000006577c2 in greedy_search (join=0x2c639e0, remaining_tables=7, search_depth=62, prune_level=1, use_cond_selectivity=3) at /data/bzr/maria-10.0-mwl253/sql/sql_select.cc:6673
      #9  0x0000000000656d63 in choose_plan (join=0x2c639e0, join_tables=7) at /data/bzr/maria-10.0-mwl253/sql/sql_select.cc:6242
      #10 0x0000000000650c6d in make_join_statistics (join=0x2c639e0, tables_list=..., conds=0x2c4f360, keyuse_array=0x2c63d18) at /data/bzr/maria-10.0-mwl253/sql/sql_select.cc:3899
      #11 0x0000000000647b0d in JOIN::optimize_inner (this=0x2c639e0) at /data/bzr/maria-10.0-mwl253/sql/sql_select.cc:1306
      #12 0x0000000000646ab8 in JOIN::optimize (this=0x2c639e0) at /data/bzr/maria-10.0-mwl253/sql/sql_select.cc:1008
      #13 0x000000000064e76d in mysql_select (thd=0x2cfa718, rref_pointer_array=0x2cfd6c0, tables=0x2e482a0, wild_num=1, fields=..., conds=0x2c4f360, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748612, result=0x2d310d0, unit=0x2cfcd18, select_lex=0x2cfd410) at /data/bzr/maria-10.0-mwl253/sql/sql_select.cc:3220
      #14 0x000000000067f5b5 in mysql_explain_union (thd=0x2cfa718, unit=0x2cfcd18, result=0x2d310d0) at /data/bzr/maria-10.0-mwl253/sql/sql_select.cc:22819
      #15 0x000000000061c1f0 in execute_sqlcom_select (thd=0x2cfa718, all_tables=0x2e482a0) at /data/bzr/maria-10.0-mwl253/sql/sql_parse.cc:4768
      #16 0x00000000006149d4 in mysql_execute_command (thd=0x2cfa718) at /data/bzr/maria-10.0-mwl253/sql/sql_parse.cc:2266
      #17 0x000000000061ec76 in mysql_parse (thd=0x2cfa718, rawbuf=0x2981560 "EXPLAIN EXTENDED\nSELECT * FROM t1, t2 AS t2a, t2 AS t2b WHERE f1 <= 'a' AND t2a.f2 = f1", length=87, parser_state=0x7f7afc0814f0) at /data/bzr/maria-10.0-mwl253/sql/sql_parse.cc:5920
      #18 0x0000000000611cf8 in dispatch_command (command=COM_QUERY, thd=0x2cfa718, packet=0x2cf0dd9 "", packet_length=87) at /data/bzr/maria-10.0-mwl253/sql/sql_parse.cc:1091
      #19 0x0000000000610f26 in do_command (thd=0x2cfa718) at /data/bzr/maria-10.0-mwl253/sql/sql_parse.cc:810
      #20 0x0000000000729f88 in do_handle_one_connection (thd_arg=0x2cfa718) at /data/bzr/maria-10.0-mwl253/sql/sql_connect.cc:1266
      #21 0x0000000000729973 in handle_one_connection (arg=0x2cfa718) at /data/bzr/maria-10.0-mwl253/sql/sql_connect.cc:1181
      #22 0x0000000000c59fae in pfs_spawn_thread (arg=0x2d31188) at /data/bzr/maria-10.0-mwl253/storage/perfschema/pfs.cc:1015
      #23 0x00007f7afdd91e9a in start_thread (arg=0x7f7afc082700) at pthread_create.c:308
      #24 0x00007f7afd085cbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
      #25 0x0000000000000000 in ?? ()

      revision-id: igor@askmonty.org-20130409172639-trzpqsen35froxpd
      revno: 3526
      branch-nick: maria-10.0-mwl253

      EXPLAIN also crashes.

      --source include/have_innodb.inc
       
      SET use_stat_tables=PREFERABLY;
      SET optimizer_use_condition_selectivity=3;
       
      CREATE TABLE t1 (f1 VARCHAR(1)) ENGINE=InnoDB;
      INSERT t1 VALUES ('p'),('q');
       
      CREATE TABLE t2 (f2 VARCHAR(1)) ENGINE=InnoDB;
      INSERT INTO t2 VALUES 
      ('o'),('v'),('f'),('f'),('e'),('l'),('j'),('p'),('r'),('j'),('j'),('u'),('i'),('r'),('x'),('a'),('x'),('s');
       
      ANALYZE TABLE t1, t2;
      FLUSH TABLES;
       
      SELECT * FROM t1, t2 AS t2a, t2 AS t2b WHERE f1 <= 'a' AND t2a.f2 = f1;

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              igor Igor Babaev
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: