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

Server crashes in JOIN::optimize_inner / .. / mysql_derived_optimize

    XMLWordPrintable

Details

    • 10.2.4-1, 10.2.4-2

    Description

      CREATE TABLE t1 (c VARCHAR(3)) ENGINE=MyISAM;
      INSERT INTO t1 VALUES ('foo'),('bar');
      CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1;
      PREPARE stmt FROM "SELECT * FROM v1 WHERE (1, 2) IN ( SELECT 3, 4 ) OR c = 'foo'";
      EXECUTE stmt;
      EXECUTE stmt;
      

      10.2 fd0479ce592e debug build

      #3  <signal handler called>
      #4  0x00007f183b6a77c8 in JOIN::optimize_inner (this=0x7f182fc649d0) at /data/src/10.2/sql/sql_select.cc:1258
      #5  0x00007f183b6a6f0c in JOIN::optimize (this=0x7f182fc649d0) at /data/src/10.2/sql/sql_select.cc:1076
      #6  0x00007f183b6388f8 in mysql_derived_optimize (thd=0x7f182fc16070, lex=0x7f182fda7090, derived=0x7f182fda8860) at /data/src/10.2/sql/sql_derived.cc:867
      #7  0x00007f183b6372f6 in mysql_handle_single_derived (lex=0x7f182fda7090, derived=0x7f182fda8860, phases=4) at /data/src/10.2/sql/sql_derived.cc:197
      #8  0x00007f183b6a7aa8 in JOIN::optimize_inner (this=0x7f182fc643b8) at /data/src/10.2/sql/sql_select.cc:1298
      #9  0x00007f183b6a6f0c in JOIN::optimize (this=0x7f182fc643b8) at /data/src/10.2/sql/sql_select.cc:1076
      #10 0x00007f183b6af8dc in mysql_select (thd=0x7f182fc16070, tables=0x7f182fda8860, wild_num=0, fields=..., conds=0x7f182fc641c0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2416184064, result=0x7f182fdaa330, unit=0x7f182fda7158, select_lex=0x7f182fda7888) at /data/src/10.2/sql/sql_select.cc:3570
      #11 0x00007f183b6a494f in handle_select (thd=0x7f182fc16070, lex=0x7f182fda7090, result=0x7f182fdaa330, setup_tables_done_option=0) at /data/src/10.2/sql/sql_select.cc:373
      #12 0x00007f183b670ecf in execute_sqlcom_select (thd=0x7f182fc16070, all_tables=0x7f182fda8860) at /data/src/10.2/sql/sql_parse.cc:6399
      #13 0x00007f183b666ee9 in mysql_execute_command (thd=0x7f182fc16070) at /data/src/10.2/sql/sql_parse.cc:3429
      #14 0x00007f183b69191b in Prepared_statement::execute (this=0x7f182fc27f70, expanded_query=0x7f183c793170, open_cursor=false) at /data/src/10.2/sql/sql_prepare.cc:4645
      #15 0x00007f183b68fd80 in Prepared_statement::execute_loop (this=0x7f182fc27f70, expanded_query=0x7f183c793170, open_cursor=false, packet=0x0, packet_end=0x0) at /data/src/10.2/sql/sql_prepare.cc:4083
      #16 0x00007f183b68dad9 in mysql_sql_stmt_execute (thd=0x7f182fc16070) at /data/src/10.2/sql/sql_prepare.cc:3193
      #17 0x00007f183b666f2e in mysql_execute_command (thd=0x7f182fc16070) at /data/src/10.2/sql/sql_parse.cc:3445
      #18 0x00007f183b6748a0 in mysql_parse (thd=0x7f182fc16070, rawbuf=0x7f182fc64088 "EXECUTE stmt", length=12, parser_state=0x7f183c793dd0, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7842
      #19 0x00007f183b6629ab in dispatch_command (command=COM_QUERY, thd=0x7f182fc16070, packet=0x7f182fc58071 "EXECUTE stmt", packet_length=12, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1800
      #20 0x00007f183b6613a3 in do_command (thd=0x7f182fc16070) at /data/src/10.2/sql/sql_parse.cc:1360
      #21 0x00007f183b7a9c48 in do_handle_one_connection (connect=0x7f1838071410) at /data/src/10.2/sql/sql_connect.cc:1354
      #22 0x00007f183b7a99d5 in handle_one_connection (arg=0x7f1838071410) at /data/src/10.2/sql/sql_connect.cc:1260
      #23 0x00007f183bae9f62 in pfs_spawn_thread (arg=0x7f183800f9f0) at /data/src/10.2/storage/perfschema/pfs.cc:1862
      #24 0x00007f183ac940a4 in start_thread (arg=0x7f183c795300) at pthread_create.c:309
      #25 0x00007f1838c4187d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

      10.2 fd0479ce592e release build

      pure virtual method called
      terminate called without an active exception
      170117  0:19:43 [ERROR] mysqld got signal 6 ;
       
      #4  0x00007f59ba53b448 in __GI_abort () at abort.c:89
      #5  0x00007f59bac11b3d in __gnu_cxx::__verbose_terminate_handler () at ../../../../src/libstdc++-v3/libsupc++/vterminate.cc:95
      #6  0x00007f59bac0fbb6 in __cxxabiv1::__terminate (handler=<optimized out>) at ../../../../src/libstdc++-v3/libsupc++/eh_terminate.cc:47
      #7  0x00007f59bac0fc01 in std::terminate () at ../../../../src/libstdc++-v3/libsupc++/eh_terminate.cc:57
      #8  0x00007f59bac106cf in __cxxabiv1::__cxa_pure_virtual () at ../../../../src/libstdc++-v3/libsupc++/pure.cc:50
      #9  0x00007f59bc2aafe9 in propagate_cond_constants (thd=thd@entry=0x7f59b1412008, save_list=save_list@entry=0x0, and_father=and_father@entry=0x7f59b1441028, cond=cond@entry=0x7f59b1441028) at /data/src/10.2/sql/sql_select.cc:14157
      #10 0x00007f59bc2ab31e in optimize_cond (join=join@entry=0x7f59b143e968, conds=0x7f59b1441028, join_list=<optimized out>, ignore_on_conds=ignore_on_conds@entry=false, cond_value=cond_value@entry=0x7f59b143ec68, cond_equal=cond_equal@entry=0x7f59b143ed90, flags=1) at /data/src/10.2/sql/sql_select.cc:14973
      #11 0x00007f59bc2d5117 in JOIN::optimize_inner (this=this@entry=0x7f59b143e968) at /data/src/10.2/sql/sql_select.cc:1274
      #12 0x00007f59bc2d7b63 in JOIN::optimize (this=this@entry=0x7f59b143e968) at /data/src/10.2/sql/sql_select.cc:1076
      #13 0x00007f59bc258b75 in mysql_derived_optimize (thd=0x7f59b1412008, lex=0x7f59b157f028, derived=0x7f59b15807f8) at /data/src/10.2/sql/sql_derived.cc:867
      #14 0x00007f59bc2586fc in mysql_handle_single_derived (lex=0x7f59b157f028, derived=derived@entry=0x7f59b15807f8, phases=phases@entry=4) at /data/src/10.2/sql/sql_derived.cc:197
      #15 0x00007f59bc2d51bd in JOIN::optimize_inner (this=this@entry=0x7f59b143e350) at /data/src/10.2/sql/sql_select.cc:1298
      #16 0x00007f59bc2d7b63 in JOIN::optimize (this=0x7f59b143e350) at /data/src/10.2/sql/sql_select.cc:1076
      #17 0x00007f59bc2da281 in mysql_select (thd=thd@entry=0x7f59b1412008, tables=0x7f59b15807f8, wild_num=0, fields=..., conds=0x7f59b143e158, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2416184064, result=0x7f59b15822c8, unit=0x7f59b157f0f0, select_lex=0x7f59b157f820) at /data/src/10.2/sql/sql_select.cc:3570
      #18 0x00007f59bc2da497 in handle_select (thd=thd@entry=0x7f59b1412008, lex=lex@entry=0x7f59b157f028, result=result@entry=0x7f59b15822c8, setup_tables_done_option=setup_tables_done_option@entry=0) at /data/src/10.2/sql/sql_select.cc:373
      #19 0x00007f59bc274d8e in execute_sqlcom_select (thd=thd@entry=0x7f59b1412008, all_tables=0x7f59b15807f8) at /data/src/10.2/sql/sql_parse.cc:6399
      #20 0x00007f59bc28146c in mysql_execute_command (thd=0x7f59b1412008) at /data/src/10.2/sql/sql_parse.cc:3429
      #21 0x00007f59bc29a205 in Prepared_statement::execute (this=this@entry=0x7f59b149d808, expanded_query=expanded_query@entry=0x7f59bd0c06b0, open_cursor=open_cursor@entry=false) at /data/src/10.2/sql/sql_prepare.cc:4645
      #22 0x00007f59bc29a444 in Prepared_statement::execute_loop (this=0x7f59b149d808, expanded_query=0x7f59bd0c06b0, open_cursor=false, packet_end=<optimized out>, packet=<optimized out>) at /data/src/10.2/sql/sql_prepare.cc:4083
      #23 0x00007f59bc29a82e in mysql_sql_stmt_execute (thd=thd@entry=0x7f59b1412008) at /data/src/10.2/sql/sql_prepare.cc:3193
      #24 0x00007f59bc27f71f in mysql_execute_command (thd=thd@entry=0x7f59b1412008) at /data/src/10.2/sql/sql_parse.cc:3445
      #25 0x00007f59bc284b31 in mysql_parse (thd=thd@entry=0x7f59b1412008, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7f59bd0c1db0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.2/sql/sql_parse.cc:7842
      #26 0x00007f59bc28803b in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f59b1412008, packet=packet@entry=0x7f59b1432009 "EXECUTE stmt", packet_length=packet_length@entry=12, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.2/sql/sql_parse.cc:1800
      #27 0x00007f59bc288960 in do_command (thd=0x7f59b1412008) at /data/src/10.2/sql/sql_parse.cc:1360
      #28 0x00007f59bc358c72 in do_handle_one_connection (connect=connect@entry=0x7f59b985b1a8) at /data/src/10.2/sql/sql_connect.cc:1354
      #29 0x00007f59bc358e0d in handle_one_connection (arg=arg@entry=0x7f59b985b1a8) at /data/src/10.2/sql/sql_connect.cc:1260
      #30 0x00007f59bc5c0f01 in pfs_spawn_thread (arg=0x7f59b981b608) at /data/src/10.2/storage/perfschema/pfs.cc:1862
      #31 0x00007f59bb97a0a4 in start_thread (arg=0x7f59bd0c3300) at pthread_create.c:309
      #32 0x00007f59ba5ed87d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

      Attachments

        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.