Description:
When log-long-format and log-slow-queries are enabled, mysqld crashes when attempt to write
to slow-query.log
How to repeat:
~/my.cnf:
[server]
datadir=.
tmpdir=./tmp
skip-innodb
log-slow-queries
log-long-format
testcase:
CREATE TABLE a (name varchar(20))
INSERT into a VALUES ('this is a bug')
UPDATE a SET name='this is bug #1366' WHERE name='this is a bug'
Backtrace:
#0 0x081c04e7 in my_b_vprintf (info=0x83dc520, fmt=0x82aed2e "s[%s] @ %s [%s]\n",
args=0xbfffeb0c "") at mf_iocache2.c:275
#1 0x081c03f4 in my_b_printf (info=0x0, fmt=0x0) at mf_iocache2.c:240
#2 0x0809d3d6 in MYSQL_LOG::write(THD*, char const*, unsigned, long) (this=0x83dc460,
thd=0x84329d0, query=0x8433818 "UPDATE a SET name='this is bug #1344' WHERE
name='this is a bug'", query_length=64, query_start_arg=1064258442) at log.cc:1583
#3 0x080d3eb9 in dispatch_command(enum_server_command, THD*, char*, unsigned)
(command=138265696, thd=0x84329d0, packet=0xbfffedf0 "UPDATE a SET name='this is bug
#1344' WHERE name='this is a bug'\n", packet_length=66) at sql_parse.cc:1547
#4 0x08050658 in emb_advanced_command (mysql=0x8432618, command=COM_SLEEP,
header=0x0, header_length=0, arg=0xbfffedf0 "UPDATE a SET name='this is bug #1344'
WHERE name='this is a bug'\n", arg_length=65, skip_check=1 '\001') at lib_sql.cc:89
#5 0x0805c7e7 in mysql_send_query (mysql=0x84329d0, query=0xbfffedf0 "UPDATE a SET
name='this is bug #1366' WHERE name='this is a bug'\n", length=138618392) at client.c:2313
#6 0x0805c8a5 in mysql_real_query (mysql=0x8432618, query=0xbfffedf0 "UPDATE a SET
name='this is bug #1344' WHERE name='this is a bug'\n", length=0) at client.c:2324
#7 0x080539a4 in mysql_query (mysql=0x0, query=0x73 <Address 0x73 out of bounds>) at
libmysql.c:805
#8 0x0804b7ea in test_commands (mysql=0x8432618) at test_embedded.c:122
#9 0x0804b9af in main () at test_embedded.c:167
#10 0x401128ae in __libc_start_main () from /lib/libc.so.6
(gdb)