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

Server crashes in String::append on selecting sql_mode inside anonymous block

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • N/A
    • 10.1.1
    • None
    • None

    Description

      --delimiter |
      BEGIN NOT ATOMIC SELECT @@sql_mode; END |
      --delimiter ;

      #3  <signal handler called>
      #4  __strlen_sse2 () at ../sysdeps/x86_64/multiarch/../strlen.S:32
      #5  0x00007fb006f20c02 in String::append (this=0x7fb0069a0ce0, s=0x0) at sql/sql_string.cc:479
      #6  0x00007fb006f58123 in set_to_string (thd=0x7fafff7ec070, result=0x7fb0069a0cd0, set=2779096485, lib=0x7fb007f2e7e0) at sql/strfunc.cc:362
      #7  0x00007fb006fcdc2a in Sys_var_set::session_value_ptr (this=0x7fb00810ab20, thd=0x7fafff7ec070, base=0x7faffc4e8158) at sql/sys_vars.h:1290
      #8  0x00007fb006dd6a22 in sys_var::value_ptr (this=0x7fb00810ab20, thd=0x7fafff7ec070, type=OPT_DEFAULT, base=0x7faffc4e8158) at sql/set_var.cc:250
      #9  0x00007fb0070ef4f5 in Item_func_get_system_var::fix_length_and_dec (this=0x7faffc4e8088) at sql/item_func.cc:5854
      #10 0x00007fb0070dc6c4 in Item_func::fix_fields (this=0x7faffc4e8088, thd=0x7fafff7ec070, ref=0x7faffc4e81b8) at sql/item_func.cc:229
      #11 0x00007fb006e23dda in setup_fields (thd=0x7fafff7ec070, ref_pointer_array=0x7faffc4e82b8, fields=..., mark_used_columns=MARK_COLUMNS_READ, sum_func_list=0x7faffc4eb4e0, allow_sum_func=true) at sql/sql_base.cc:7790
      #12 0x00007fb006eb1494 in JOIN::prepare (this=0x7faffc4eb1a8, rref_pointer_array=0x7faffc45c660, tables_init=0x0, wild_num=0, conds_init=0x0, og_num=0, order_init=0x0, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x7faffc45c3e8, unit_arg=0x7faffc45bd00) at sql/sql_select.cc:785
      #13 0x00007fb006eba747 in mysql_select (thd=0x7fafff7ec070, rref_pointer_array=0x7faffc45c660, tables=0x0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147749632, result=0x7faffc4eb188, unit=0x7faffc45bd00, select_lex=0x7faffc45c3e8) at sql/sql_select.cc:3298
      #14 0x00007fb006eb076e in handle_select (thd=0x7fafff7ec070, lex=0x7faffc45bc38, result=0x7faffc4eb188, setup_tables_done_option=0) at sql/sql_select.cc:372
      #15 0x00007fb006e835b1 in execute_sqlcom_select (thd=0x7fafff7ec070, all_tables=0x0) at sql/sql_parse.cc:5313
      #16 0x00007fb006e7b55b in mysql_execute_command (thd=0x7fafff7ec070) at sql/sql_parse.cc:2599
      #17 0x00007fb0071c3f78 in sp_instr_stmt::exec_core (this=0x7faffc4e81e0, thd=0x7fafff7ec070, nextp=0x7fb0069a25c0) at sql/sp_head.cc:3193
      #18 0x00007fb0071c36d1 in sp_lex_keeper::reset_lex_and_exec_core (this=0x7faffc4e8220, thd=0x7fafff7ec070, nextp=0x7fb0069a25c0, open_tables=false, instr=0x7faffc4e81e0) at sql/sp_head.cc:2963
      #19 0x00007fb0071c3c8a in sp_instr_stmt::execute (this=0x7faffc4e81e0, thd=0x7fafff7ec070, nextp=0x7fb0069a25c0) at sql/sp_head.cc:3112
      #20 0x00007fb0071bf764 in sp_head::execute (this=0x7faffc45b088, thd=0x7fafff7ec070, merge_da_on_success=true) at sql/sp_head.cc:1364
      #21 0x00007fb0071c162a in sp_head::execute_procedure (this=0x7faffc45b088, thd=0x7fafff7ec070, args=0x7fafff7f0a28) at sql/sp_head.cc:2153
      #22 0x00007fb006e7a992 in do_execute_sp (thd=0x7fafff7ec070, sp=0x7faffc45b088) at sql/sql_parse.cc:2213
      #23 0x00007fb006e818ba in mysql_execute_command (thd=0x7fafff7ec070) at sql/sql_parse.cc:4740
      #24 0x00007fb006e85ec6 in mysql_parse (thd=0x7fafff7ec070, rawbuf=0x7faffc456088 "BEGIN NOT ATOMIC SELECT @@sql_mode; END", length=39, parser_state=0x7fb0069a35e0) at sql/sql_parse.cc:6466
      #25 0x00007fb006e7857b in dispatch_command (command=COM_QUERY, thd=0x7fafff7ec070, packet=0x7fb0003f9071 "BEGIN NOT ATOMIC SELECT @@sql_mode; END ", packet_length=40) at sql/sql_parse.cc:1310
      #26 0x00007fb006e778c0 in do_command (thd=0x7fafff7ec070) at sql/sql_parse.cc:1007
      #27 0x00007fb006fa083d in do_handle_one_connection (thd_arg=0x7fafff7ec070) at sql/sql_connect.cc:1379
      #28 0x00007fb006fa0590 in handle_one_connection (arg=0x7fafff7ec070) at sql/sql_connect.cc:1293
      #29 0x00007fb007504ba6 in pfs_spawn_thread (arg=0x7faffdaae970) at storage/perfschema/pfs.cc:1860
      #30 0x00007fb00658fb50 in start_thread (arg=<optimized out>) at pthread_create.c:304
      #31 0x00007fb00486720d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

      Stack trace from:

      commit 6502f42f679e605fcdbd6c8b49d2813f553001b0
      Author: Sergei Golubchik <serg@mariadb.org>
      Date:   Mon Aug 18 14:28:48 2014 +0200

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.