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

Assertion `join->best_read < double(1.79...15e+308L)' or server crash in JOIN::fix_all_splittings_in_plan

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.3(EOL)
    • 10.3.5
    • Optimizer
    • None

    Description

      Note: might be related to MDEV-15017.

      CREATE TABLE t1 (f INT PRIMARY KEY) ENGINE=MyISAM;
      CREATE VIEW v1 AS SELECT a.* FROM t1 AS a STRAIGHT_JOIN t1 AS b;
      CREATE VIEW v2 AS SELECT f FROM v1 GROUP BY f;
      SELECT * FROM v1 JOIN v2 USING (f);
      

      10.3 ec32c050726 debug

      mysqld: /data/src/10.3/sql/sql_select.cc:7939: bool greedy_search(JOIN*, table_map, uint, uint, uint): Assertion `join->best_read < double(1.79769313486231570815e+308L)' failed.
      180122  3:28:40 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f5a78156ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x00005568de26c606 in greedy_search (join=0x7f5a60149db0, remaining_tables=6, search_depth=62, prune_level=1, use_cond_selectivity=1) at /data/src/10.3/sql/sql_select.cc:7939
      #9  0x00005568de26ba70 in choose_plan (join=0x7f5a60149db0, join_tables=6) at /data/src/10.3/sql/sql_select.cc:7509
      #10 0x00005568de2647b1 in make_join_statistics (join=0x7f5a60149db0, tables_list=..., keyuse_array=0x7f5a6014a0a0) at /data/src/10.3/sql/sql_select.cc:5008
      #11 0x00005568de259815 in JOIN::optimize_inner (this=0x7f5a60149db0) at /data/src/10.3/sql/sql_select.cc:1959
      #12 0x00005568de2580e1 in JOIN::optimize (this=0x7f5a60149db0) at /data/src/10.3/sql/sql_select.cc:1544
      #13 0x00005568de26189c in mysql_select (thd=0x7f5a60000b00, tables=0x7f5a60014e48, wild_num=1, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f5a60149d90, unit=0x7f5a60004890, select_lex=0x7f5a60004fe8) at /data/src/10.3/sql/sql_select.cc:4236
      #14 0x00005568de25388a in handle_select (thd=0x7f5a60000b00, lex=0x7f5a600047c8, result=0x7f5a60149d90, setup_tables_done_option=0) at /data/src/10.3/sql/sql_select.cc:379
      #15 0x00005568de21e956 in execute_sqlcom_select (thd=0x7f5a60000b00, all_tables=0x7f5a60014e48) at /data/src/10.3/sql/sql_parse.cc:6524
      #16 0x00005568de215040 in mysql_execute_command (thd=0x7f5a60000b00) at /data/src/10.3/sql/sql_parse.cc:3745
      #17 0x00005568de2222aa in mysql_parse (thd=0x7f5a60000b00, rawbuf=0x7f5a60014c38 "SELECT * FROM v1 JOIN v2 USING (f)", length=34, parser_state=0x7f5a723c55f0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7981
      #18 0x00005568de20faef in dispatch_command (command=COM_QUERY, thd=0x7f5a60000b00, packet=0x7f5a6000b141 "SELECT * FROM v1 JOIN v2 USING (f)", packet_length=34, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1826
      #19 0x00005568de20e523 in do_command (thd=0x7f5a60000b00) at /data/src/10.3/sql/sql_parse.cc:1370
      #20 0x00005568de375768 in do_handle_one_connection (connect=0x5568e1c6ded0) at /data/src/10.3/sql/sql_connect.cc:1401
      #21 0x00005568de3754f5 in handle_one_connection (arg=0x5568e1c6ded0) at /data/src/10.3/sql/sql_connect.cc:1307
      #22 0x00005568de8130b8 in pfs_spawn_thread (arg=0x5568e1c896b0) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #23 0x00007f5a79e2d494 in start_thread (arg=0x7f5a723c6700) at pthread_create.c:333
      #24 0x00007f5a7821393f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      10.3 e15f4af4d non-debug

      #2  <signal handler called>
      #3  JOIN::fix_all_splittings_in_plan (this=this@entry=0x7f60b80ad858) at /data/src/10.3/sql/opt_split.cc:1125
      #4  0x000055d1e8aa1dd0 in JOIN::get_best_combination (this=0x7f60b80ad858) at /data/src/10.3/sql/sql_select.cc:9472
      #5  0x000055d1e8ac25de in JOIN::optimize_stage2 (this=0x7f60b80ad858) at /data/src/10.3/sql/sql_select.cc:1993
      #6  0x000055d1e8ac5541 in JOIN::optimize_inner (this=0x7f60b80ad858) at /data/src/10.3/sql/sql_select.cc:1972
      #7  0x000055d1e8ac573f in JOIN::optimize (this=this@entry=0x7f60b80ad858) at /data/src/10.3/sql/sql_select.cc:1544
      #8  0x000055d1e8ac7b20 in mysql_select (thd=thd@entry=0x7f60b80009a8, tables=0x7f60b8011770, wild_num=1, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f60b80ad838, unit=0x7f60b8004570, select_lex=0x7f60b8004cc8) at /data/src/10.3/sql/sql_select.cc:4236
      #9  0x000055d1e8ac7ce7 in handle_select (thd=thd@entry=0x7f60b80009a8, lex=lex@entry=0x7f60b80044a8, result=result@entry=0x7f60b80ad838, setup_tables_done_option=setup_tables_done_option@entry=0) at /data/src/10.3/sql/sql_select.cc:379
      #10 0x000055d1e89a9f90 in execute_sqlcom_select (thd=0x7f60b80009a8, all_tables=0x7f60b8011770) at /data/src/10.3/sql/sql_parse.cc:6524
      #11 0x000055d1e8a75972 in mysql_execute_command (thd=0x7f60b80009a8) at /data/src/10.3/sql/sql_parse.cc:3745
      #12 0x000055d1e8a77fa9 in mysql_parse (thd=0x7f60b80009a8, rawbuf=<optimized out>, length=34, parser_state=0x7f60c9340630, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:7981
      #13 0x000055d1e8a7a868 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f60b80009a8, packet=packet@entry=0x7f60b80091f9 "SELECT * FROM v1 JOIN v2 USING (f)", packet_length=packet_length@entry=34, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.3/sql/sql_parse.cc:1826
      #14 0x000055d1e8a7b0ed in do_command (thd=0x7f60b80009a8) at /data/src/10.3/sql/sql_parse.cc:1370
      #15 0x000055d1e8b4ca94 in do_handle_one_connection (connect=connect@entry=0x55d1ec2358a8) at /data/src/10.3/sql/sql_connect.cc:1401
      #16 0x000055d1e8b4cc34 in handle_one_connection (arg=arg@entry=0x55d1ec2358a8) at /data/src/10.3/sql/sql_connect.cc:1307
      #17 0x000055d1e8e43584 in pfs_spawn_thread (arg=0x55d1ec26e488) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #18 0x00007f60d0daa494 in start_thread (arg=0x7f60c9341700) at pthread_create.c:333
      #19 0x00007f60cf19093f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Attachments

        1. threads
          51 kB
          Elena Stepanova

        Issue Links

          Activity

            People

              igor Igor Babaev
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.