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

Server crashes in JOIN::fix_all_splittings_in_plan or Assertion `join->best_read < double(1.79...e+308L)' failed

    XMLWordPrintable

Details

    Description

      CREATE OR REPLACE TABLE t1 (f1 INT) WITH SYSTEM VERSIONING;
      INSERT INTO t1 VALUES (1),(2);
      CREATE OR REPLACE TABLE t2 (f2 INT);
      CREATE OR REPLACE TABLE t3 (f3 INT);
      CREATE OR REPLACE TABLE t4 (f4 INT) WITH SYSTEM VERSIONING;
       
      SELECT f1 FROM t1 JOIN t2 LEFT JOIN t3 LEFT JOIN t4 ON f3 = f4 ON f3 = f2;
       
      # Cleanup
      DROP TABLE t1, t2, t3, t4;
      

      10.3 afc56a509 RelWithDebInfo

      #2  <signal handler called>
      #3  JOIN::fix_all_splittings_in_plan (this=this@entry=0x7f98e0014fc0) at /data/src/10.3/sql/opt_split.cc:1128
      #4  0x00005620eab44e20 in JOIN::get_best_combination (this=0x7f98e0014fc0) at /data/src/10.3/sql/sql_select.cc:9491
      #5  0x00005620eab657ae in JOIN::optimize_stage2 (this=0x7f98e0014fc0) at /data/src/10.3/sql/sql_select.cc:2002
      #6  0x00005620eab68711 in JOIN::optimize_inner (this=0x7f98e0014fc0) at /data/src/10.3/sql/sql_select.cc:1981
      #7  0x00005620eab6890f in JOIN::optimize (this=this@entry=0x7f98e0014fc0) at /data/src/10.3/sql/sql_select.cc:1553
      #8  0x00005620eab6acc0 in mysql_select (thd=thd@entry=0x7f98e00009a8, tables=0x7f98e0011810, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f98e0014fa0, unit=0x7f98e0004578, select_lex=0x7f98e0004ce0) at /data/src/10.3/sql/sql_select.cc:4258
      #9  0x00005620eab6ae87 in handle_select (thd=thd@entry=0x7f98e00009a8, lex=lex@entry=0x7f98e00044b0, result=result@entry=0x7f98e0014fa0, setup_tables_done_option=setup_tables_done_option@entry=0) at /data/src/10.3/sql/sql_select.cc:382
      #10 0x00005620eaa4b273 in execute_sqlcom_select (thd=0x7f98e00009a8, all_tables=0x7f98e0011810) at /data/src/10.3/sql/sql_parse.cc:6523
      #11 0x00005620eab17b46 in mysql_execute_command (thd=0x7f98e00009a8) at /data/src/10.3/sql/sql_parse.cc:3748
      #12 0x00005620eab1a57a in mysql_parse (thd=0x7f98e00009a8, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:7980
      #13 0x00005620eab1ddba in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f98e00009a8, packet=packet@entry=0x7f98e0009249 "SELECT f1 FROM t1 JOIN t2 LEFT JOIN t3 LEFT JOIN t4 ON f3 = f4 ON f3 = f2", packet_length=packet_length@entry=73, 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:1825
      #14 0x00005620eab1e3ad in do_command (thd=0x7f98e00009a8) at /data/src/10.3/sql/sql_parse.cc:1370
      #15 0x00005620eabeffa4 in do_handle_one_connection (connect=connect@entry=0x5620edd4db98) at /data/src/10.3/sql/sql_connect.cc:1402
      #16 0x00005620eabf0144 in handle_one_connection (arg=arg@entry=0x5620edd4db98) at /data/src/10.3/sql/sql_connect.cc:1308
      #17 0x00005620eaee6b44 in pfs_spawn_thread (arg=0x5620eddbf908) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #18 0x00007f9904dd7494 in start_thread (arg=0x7f98fd43e700) at pthread_create.c:333
      #19 0x00007f99031bd93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      10.3 988ec800edb Debug

      mysqld: /data/src/10.3/sql/sql_select.cc:7958: bool greedy_search(JOIN*, table_map, uint, uint, uint): Assertion `join->best_read < double(1.79769313486231570815e+308L)' failed.
      180222 23:19:19 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fa6f07a2ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x0000559635df7d4c in greedy_search (join=0x7fa6d80186e0, remaining_tables=13, search_depth=62, prune_level=1, use_cond_selectivity=1) at /data/src/bb-10.3-serg/sql/sql_select.cc:7872
      #9  0x0000559635df6b1e in choose_plan (join=0x7fa6d80186e0, join_tables=13) at /data/src/bb-10.3-serg/sql/sql_select.cc:7442
      #10 0x0000559635dea9a3 in make_join_statistics (join=0x7fa6d80186e0, tables_list=..., keyuse_array=0x7fa6d80189d0) at /data/src/bb-10.3-serg/sql/sql_select.cc:4941
      #11 0x0000559635dd67a0 in JOIN::optimize_inner (this=0x7fa6d80186e0) at /data/src/bb-10.3-serg/sql/sql_select.cc:1882
      #12 0x0000559635dd3cbe in JOIN::optimize (this=0x7fa6d80186e0) at /data/src/bb-10.3-serg/sql/sql_select.cc:1467
      #13 0x0000559635de589b in mysql_select (thd=0x7fa6d8000b00, tables=0x7fa6d8014ef8, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fa6d80186c0, unit=0x7fa6d8004890, select_lex=0x7fa6d8005000) at /data/src/bb-10.3-serg/sql/sql_select.cc:4172
      #14 0x0000559635dcbbab in handle_select (thd=0x7fa6d8000b00, lex=0x7fa6d80047c8, result=0x7fa6d80186c0, setup_tables_done_option=0) at /data/src/bb-10.3-serg/sql/sql_select.cc:382
      #15 0x0000559635d63187 in execute_sqlcom_select (thd=0x7fa6d8000b00, all_tables=0x7fa6d8014ef8) at /data/src/bb-10.3-serg/sql/sql_parse.cc:6523
      #16 0x0000559635d4da1a in mysql_execute_command (thd=0x7fa6d8000b00) at /data/src/bb-10.3-serg/sql/sql_parse.cc:3748
      #17 0x0000559635d69e3b in mysql_parse (thd=0x7fa6d8000b00, rawbuf=0x7fa6d8014c98 "SELECT f1 FROM t1 JOIN t2 LEFT JOIN t3 LEFT JOIN t4 ON f3 = f4 ON f3 = f2", length=73, parser_state=0x7fa6eaa115e0, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-serg/sql/sql_parse.cc:7980
      #18 0x0000559635d42b21 in dispatch_command (command=COM_QUERY, thd=0x7fa6d8000b00, packet=0x7fa6d811edb1 "SELECT f1 FROM t1 JOIN t2 LEFT JOIN t3 LEFT JOIN t4 ON f3 = f4 ON f3 = f2", packet_length=73, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-serg/sql/sql_parse.cc:1825
      #19 0x0000559635d3ff75 in do_command (thd=0x7fa6d8000b00) at /data/src/bb-10.3-serg/sql/sql_parse.cc:1370
      #20 0x0000559635fe8904 in do_handle_one_connection (connect=0x55963b760b90) at /data/src/bb-10.3-serg/sql/sql_connect.cc:1402
      #21 0x0000559635fe8350 in handle_one_connection (arg=0x55963b760b90) at /data/src/bb-10.3-serg/sql/sql_connect.cc:1308
      #22 0x00005596368727dd in pfs_spawn_thread (arg=0x55963b774430) at /data/src/bb-10.3-serg/storage/perfschema/pfs.cc:1862
      #23 0x00007fa6f2479494 in start_thread (arg=0x7fa6eaa12700) at pthread_create.c:333
      #24 0x00007fa6f085f93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Also reproducible on bb-10.3-serg 13457bf2b063.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              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.