Bug #14627 INSERT DELEAYED crashes the daemon
Submitted: 4 Nov 2005 8:51 Modified: 4 Nov 2005 9:08
Reporter: Matthias Boldt Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.15 Standard OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[4 Nov 2005 8:51] Matthias Boldt
Description:
Hello,

I've found the following repeatable bug within mysql 5.0.15 (official binary version
for Linux from your server):

Every time, I'm sending a query with "INSERT DELAYED ...", the database-
daemon crashes. The same query without the DELAYED-statement is working
correctly.

It's possible, that this is similar to bug #13707. The MYISAM-table was upgraded
from 4.1...

The part from the daemon-error-log and the stackdump are included. If you
need more help, write to me please.

I want to thank you for the great work with mysql and I hope to help you
improving this great software further...

Greetings from Berlin,
    Matthias

Logfile:
-------------------------------------

051103 21:39:15 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.0.15-standard-log'  socket: '/tmp/mysql.sock'  port: 3306  MySQL Community Edition - Standard (GPL)
mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=8388600
read_buffer_size=131072
max_used_connections=5
max_connections=500
threads_connected=7
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 1096188 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=0x85659d0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
Cannot determine thread, fp=0xbf3fe958, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x814e7f8
0x4005bfe1
0x4017291f
0x813931a
0x80ea307
0x81853c1
0x8185418
0x81a8a0d
0x8164068
0x8168d82
0x8160aa6
0x81605d1
0x815fab1
0x40054f3c
0x401c38ba
New value of fp=(nil) failed sanity check, terminating stack trace!
Please read http://dev.mysql.com/doc/mysql/en/Using_stack_trace.html and follow instructions on how to resolve the stack trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please do 
resolve it
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x8639ef8 = INSERT DELAYED INTO Kontobewegung VALUES(0,7,6,'20051103215707','84.50E','0',0,'2996838','84.50E','n')
thd->thread_id=34
The manual page at http://www.mysql.com/doc/en/Crashing.html contains
information that should help you find out what is causing the crash.

Number of processes running now: 0
051103 21:57:08  mysqld restarted
051103 21:57:08 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.0.15-standard-log'  socket: '/tmp/mysql.sock'  port: 3306  MySQL Community Edition - Standard (GPL)

Stackdump:
-------------------------------------

0x814e7f8 handle_segfault + 356
0x4005bfe1 _end + 934442385
0x4017291f _end + 935583439
0x813931a _ZN15Field_varstring5storeEPKcjP15charset_info_st + 174
0x80ea307 _ZN11Item_string13save_in_fieldEP5Fieldb + 63
0x81853c1 _Z11fill_recordP3THDPP5FieldR4ListI4ItemEb + 73
0x8185418 _Z36fill_record_n_invoke_before_triggersP3THDPP5FieldR4ListI4ItemEbP19Table_triggers_list14trg_event_type + 32
0x81a8a0d _Z12mysql_insertP3THDP13st_table_listR4ListI4ItemERS3_IS5_ES6_S6_15enum_duplicatesb + 2985
0x8164068 _Z21mysql_execute_commandP3THD + 8536
0x8168d82 _Z11mysql_parseP3THDPcj + 306
0x8160aa6 _Z16dispatch_command19enum_server_commandP3THDPcj + 1178
0x81605d1 _Z10do_commandP3THD + 129
0x815fab1 handle_one_connection + 569
0x40054f3c _end + 934413548
0x401c38ba _end + 935915114

How to repeat:
INSERT DELAYED INTO Kontobewegung VALUES(0,7,6,'20051103215707','84.50E','0',0,'2996838','84.50E','n');

table-structure:

mysql> desc Kontobewegung;
+----------------+------------------+------+-----+---------+----------------+
| Field          | Type             | Null | Key | Default | Extra          |
+----------------+------------------+------+-----+---------+----------------+
| tid            | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| soll_konto_id  | int(10) unsigned | NO   | MUL | 0       |                |
| haben_konto_id | int(10) unsigned | NO   | MUL | 0       |                |
| timestamp      | varchar(14)      | NO   | MUL | 0       |                |
| wert           | varchar(14)      | NO   |     | 0.00D   |                |
| vat            | double(8,4)      | NO   |     | 0.1600  |                |
| journal_id     | int(10) unsigned | NO   | MUL | 0       |                |
| rechnung_id    | varchar(20)      | NO   | MUL |         |                |
| brutto         | varchar(14)      | NO   |     | 0.00_   |                |
| zahlart        | char(1)          | NO   |     |         |                |
+----------------+------------------+------+-----+---------+----------------+
[4 Nov 2005 9:08] Valeriy Kravchuk
Thank you for a bug report. Because you performed an upgrade from 4.1.x and your table has varchar columns, I believe, it is a duplicate of http://bugs.mysql.com/bug.php?id=13707 really. Please, check once more as soon as the fix to that bug will be released.