Bug #12704 | Server crashes during trigger execution | ||
---|---|---|---|
Submitted: | 21 Aug 2005 17:15 | Modified: | 15 Sep 2005 17:27 |
Reporter: | Alexey Stroganov | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | the latest 5.0.13pre | OS: | Linux (Linux) |
Assigned to: | Dmitry Lenev | CPU Architecture: | Any |
[21 Aug 2005 17:15]
Alexey Stroganov
[24 Aug 2005 22:08]
Alexey Stroganov
During further testing I found that several similar test cases lead to crashes of server in many various places. Below is backtrace for one that have load data infile instead of insert: 0x0810d419 in Item_trigger_field::fix_fields (this=0x8cadcd0, thd=0x4292dcb8, items=0x0) at item.cc:5025 5025 field= (row_version == OLD_ROW) ? triggers->old_field[field_idx] : (gdb) bt #0 0x0810d419 in Item_trigger_field::fix_fields (this=0x8cadcd0, thd=0x4292dcb8, items=0x0) at item.cc:5025 #1 0x082e44cc in sp_instr_set_trigger_field::exec_core (this=0x8cadd68, thd=0x4292dcb8, nextp=0x42cab580) at sp_head.cc:1740 #2 0x082e3f30 in sp_lex_keeper::reset_lex_and_exec_core (this=0x8cadd90, thd=0x4292dcb8, nextp=0x42cab580, open_tables=true, instr=0x8cadd68) at sp_head.cc:1586 #3 0x082e446c in sp_instr_set_trigger_field::execute (this=0x8cadd68, thd=0x4292dcb8, nextp=0x42cab580) at sp_head.cc:1731 #4 0x082e1a6d in sp_head::execute (this=0x8cad4f8, thd=0x4292dcb8) at sp_head.cc:715 #5 0x082e20bf in sp_head::execute_function (this=0x8cad4f8, thd=0x4292dcb8, argp=0x0, argcount=0, resp=0x0) at sp_head.cc:858 #6 0x082f0bd6 in Table_triggers_list::process_triggers (this=0x8c827f0, thd=0x4292dcb8, event=TRG_EVENT_INSERT, time_type=TRG_ACTION_BEFORE, old_row_is_record1=true) at sql_trigger.cc:902 #7 0x081dce01 in fill_record_n_invoke_before_triggers (thd=0x4292dcb8, fields=@0x4292e140, values=@0x4292e134, ignore_errors=false, triggers=0x8c827f0, event=TRG_EVENT_INSERT) at sql_base.cc:4679 #8 0x082906ef in read_sep_field (thd=0x4292dcb8, info=@0x42cab9b0, table_list=0x8c98560, fields_vars=@0x4292e128, set_fields=@0x4292e140, set_values=@0x4292e134, read_info=@0x42cab880, enclosed=@0x86015c0, skip_lines=0, ignore_check_option_errors=false) at sql_load.cc:743 #9 0x0828f898 in mysql_load (thd=0x4292dcb8, ex=0x8c98518, table_list=0x8c98560, fields_vars=@0x4292e128, set_fields=@0x4292e140, set_values=@0x4292e134, handle_duplicates=DUP_ERROR, ignore=false, read_file_from_client=false) at sql_load.cc:370 #10 0x081ad5b2 in mysql_execute_command (thd=0x4292dcb8) at sql_parse.cc:3462 #11 0x081b3269 in mysql_parse (thd=0x4292dcb8, inBuf=0x8c98368 "load data infile '/data0/ranger/stress/mysql-test//suite/funcs_1/data/myisam_tb3.txt' into table tb3", length=100) at sql_parse.cc:5445 #12 0x081a8859 in dispatch_command (command=COM_QUERY, thd=0x4292dcb8, packet=0x42968319 "load data infile '/data0/ranger/stress/mysql-test//suite/funcs_1/data/myisam_tb3.txt' into table tb3 ", packet_length=102) at sql_parse.cc:1665 #13 0x081a8026 in do_command (thd=0x4292dcb8) at sql_parse.cc:1464 #14 0x081a7106 in handle_one_connection (arg=0x4292dcb8) at sql_parse.cc:1116 #15 0x4004aaa7 in start_thread () from /lib/tls/libpthread.so.0 #16 0x4017bc2e in clone () from /lib/tls/libc.so.6 Also I would note that problems above arised only for trigger with BEFORE INSERT clause. For other clauses test cases passed ok for me.
[13 Sep 2005 22:26]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/internals/29773
[14 Sep 2005 17:47]
Michael Widenius
Patch approved. Ok to push after some minor changes is done (as dicussed on IRC)
[14 Sep 2005 23:55]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/internals/29874
[15 Sep 2005 1:10]
Dmitry Lenev
Fixed in 5.0.13 Simultaneous execution of DML statements and CREATE TRIGGER/DROP TRIGGER statements on the same table may cause crashes or errors.
[15 Sep 2005 17:27]
Paul DuBois
Noted in 5.0.13 changelog.