create table select with binlog_format MIXED/STATEMENT crashes node
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MySQL patches by Codership |
Confirmed
|
Medium
|
Seppo Jaakola | |||
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC | Status tracked in 5.6 | |||||
5.5 |
Won't Fix
|
Undecided
|
Unassigned | |||
5.6 |
Invalid
|
Undecided
|
Kenn Takara |
Bug Description
The following sequence of commands causes segmentation fault:
create table t1 (a int primary key);
set binlog_
create table t2 select * from t1;
Backtrace:
#0 __pthread_kill (threadid=
#1 0x00000000006a2359 in handle_fatal_signal (sig=11)
at /home/teemu/
#2 <signal handler called>
#3 my_b_safe_tell (info=0x106e558) at /home/teemu/
#4 0x00000000007466d8 in Log_event:
at /home/teemu/
#5 0x00000000007474aa in Query_log_
at /home/teemu/
#6 0x0000000000739b74 in MYSQL_BIN_
at /home/teemu/
#7 0x000000000056f08d in THD::binlog_query (this=0x32ae1b0, qtype=THD:
query_
direct=
at /home/teemu/
#8 0x000000000057acd5 in select_
at /home/teemu/
#9 0x000000000057af2f in select_
at /home/teemu/
#10 0x00000000005c84b8 in do_select (join=0x7f5a640
at /home/teemu/
#11 0x00000000005d5d3d in JOIN::exec (this=0x7f5a640
at /home/teemu/
#12 0x00000000005d7825 in mysql_select (thd=0x32ae1b0, rref_pointer_
wild_
select_
at /home/teemu/
#13 0x00000000005d8295 in handle_select (thd=0x32ae1b0, lex=0x32afc68, result=
at /home/teemu/
#14 0x000000000059990e in mysql_execute_
at /home/teemu/
#15 0x0000000000599aa4 in mysql_parse (thd=0x32ae1b0, parser_
rawbuf=
#16 0x000000000059a3ab in mysql_parse (parser_
rawbuf=
at /home/teemu/
#17 wsrep_mysql_parse (thd=0x32ae1b0, rawbuf=
parser_
#18 0x000000000059bff7 in dispatch_command (command=COM_QUERY, thd=0x32ae1b0, packet=<optimized out>,
packet_
#19 0x000000000059c60d in do_command (thd=0x32ae1b0)
at /home/teemu/
#20 0x000000000063eb95 in do_handle_
at /home/teemu/
#21 0x000000000063edac in handle_
at /home/teemu/
#22 0x00007f5ab0596e9a in start_thread (arg=0x7f5aac04
#23 0x00007f5ab02c3cbd in clone () at ../sysdeps/
#24 0x0000000000000000 in ?? ()
(gdb) f 4
#4 0x00000000007466d8 in Log_event:
at /home/teemu/
1006 log_pos= my_b_safe_
(gdb) p *file
$1 = {pos_in_file = 0, end_of_file = 0, read_pos = 0x0, read_end = 0x0, buffer = 0x0, request_pos = 0x0, write_buffer = 0x0,
append_read_pos = 0x0, write_pos = 0x0, write_end = 0x0, current_pos = 0x0, current_end = 0x0, append_buffer_lock = {
m_mutex = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __list = {__prev = 0x0,
__next = 0x0}}, __size = '\000' <repeats 39 times>, __align = 0}, m_psi = 0x0}, share = 0x0, read_function = 0,
write_function = 0, type = TYPE_NOT_SET, pre_read = 0, post_read = 0, pre_close = 0, disk_writes = 0, arg = 0x0,
file_name = 0x0, dir = 0x0, prefix = 0x0, file = 0, seek_not_done = 0, error = 0, buffer_length = 0, read_length = 0,
myflags = 0, alloced_buffer = 0 '\000'}
IO cache stays empty which causes null pointer dereference in my_b_safe_tell().
Changed in percona-xtradb-cluster: | |
milestone: | none → 5.5.31-24.8 |
tags: | added: ctas |
Changed in percona-xtradb-cluster: | |
milestone: | 5.5.31-23.7.5 → 5.5.31-25 |
Changed in codership-mysql: | |
milestone: | 5.5.31-23.7.5 → 5.5.32-23.7.6 |
Changed in percona-xtradb-cluster: | |
milestone: | 5.5.33-23.7.6 → future-5.5 |
Changed in codership-mysql: | |
milestone: | 5.5.33-23.7.6 → 5.5.34-24.9 |
tags: | added: statement |
Changed in codership-mysql: | |
milestone: | 5.5.34-25.9 → 5.5.34-25.10 |
Changed in codership-mysql: | |
milestone: | 5.5.37-25.10 → 5.5.37-25.11 |
some other people seem to have experienced the same crash. See https:/ /bugs.launchpad .net/percona- xtradb- cluster/ +bug/1126207 and comments in https:/ /bugs.launchpad .net/percona- xtradb- cluster/ +bug/1159837. Looks like binlog_ format= STATEMENT has something to do with it.