truncate command with no binlog files causes segfault
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MySQL patches by Codership |
Fix Released
|
High
|
Seppo Jaakola |
Bug Description
Running 'truncate table' command at a cluster node, when binlog files are not used, will cause a segfault:
Howto reproduce:
1. Start a cluster with no log_bin option set.
2. create just any table, .e.g.: create table a (i int) engine=innodb;
3. issue: truncate table a:
The first node will crash with following stack trace:
{{{
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1496040560 (LWP 30006)]
0x085981a0 in my_b_safe_tell (info=0x881df80) at mf_iocache2.c:116
116 mf_iocache2.c: No such file or directory.
in mf_iocache2.c
Current language: auto; currently c
(gdb) bt
#0 0x085981a0 in my_b_safe_tell (info=0x881df80) at mf_iocache2.c:116
#1 0x08359760 in Log_event:
event_
#2 0x0835a5c7 in Query_log_
at log_event.cc:2233
#3 0x083254e8 in MYSQL_BIN_
at log.cc:4192
#4 0x0822efa8 in THD::binlog_query (this=0xa464cd0,
qtype=
query_len=16, is_trans=false, suppress_use=false,
killed_
#5 0x08316618 in mysql_delete (thd=0xa464cd0, table_list=
conds=0x0, order=0x0, limit=184467440
reset_
#6 0x08316903 in mysql_truncate_
table_
#7 0x08316fce in mysql_truncate (thd=0xa464cd0, table_list=
dont_
#8 0x08262585 in mysql_execute_
#9 0x0826a6de in mysql_parse (thd=0xa464cd0,
inBuf=0xa46f208 "truncate table a", length=16, found_semicolon
at sql_parse.cc:6309
#10 0x0826bcb8 in dispatch_command (command=COM_QUERY, thd=0xa464cd0,
---Type <return> to continue, or q <return> to quit---
packet=
#11 0x0826dcfb in do_command (thd=0xa464cd0) at sql_parse.cc:936
#12 0x0825575d in handle_
#13 0x00c54482 in start_thread () from /lib/i686/
#14 0x00bb0e9e in clone () from /lib/i686/
}}}
Changed in codership-mysql: | |
assignee: | nobody → Seppo Jaakola (seppo-jaakola) |
importance: | Undecided → High |
milestone: | none → 0.6.1 |
status: | New → In Progress |
Changed in codership-mysql: | |
status: | Fix Committed → Fix Released |
Fix committed in development branch. Passes manual regression tests.