Description:
Server is acting as a slave to a 4.1.12 master. A query came through the replication log with the following:
thd->query at 0x95753de = UPDATE scan s, package p
SET
bincode = 'DQF8215',
destination = 'FRA'
WHERE
s.barcode = p.barcode
AND
bincode = '1264T'
AND
s.carrier = 'US'
AND
location = 'PHL'
AND
itsDate between assignment_date and assignment_date + interval 6 day
AND
assignment_date = '2005/08/22'
AND
type in ('P', 'C')
AND
flight = 894
AND NOT
(load1_city <=> 'PHL' or load2_city <=> 'PHL' or load3_city <=> 'PHL' or load4_city <=> 'PHL' or load5_city <=> 'PHL' or load6_city <=> 'PHL')
Obviously the "assignment_date" is not the proper format. Upon executing this query, the mysql 5.0.11 slave crashes with repeated attempts to restart itself. Stack trace is as follows:
0x809b352 handle_segfault + 430
0x82cece8 pthread_sighandler + 184
0x8292c92 hp_movelink + 18
0x829134a hp_write_key + 654
0x8290e8d heap_write + 93
0x812aecb write_row__7ha_heapPc + 95
0x80fb1ae send_data__12multi_updateRt4List1Z4Item + 754
0x80e8ed6 end_send__FP4JOINP13st_join_tableb + 122
0x80e7ca9 evaluate_join_record__FP4JOINP13st_join_tableiPc + 377
0x80e7afc sub_select__FP4JOINP13st_join_tableb + 212
0x80e7ca9 evaluate_join_record__FP4JOINP13st_join_tableiPc + 377
0x80e7afc sub_select__FP4JOINP13st_join_tableb + 212
0x80e77e0 do_select__FP4JOINPt4List1Z4ItemP8st_tableP9Procedure + 492
0x80d9461 exec__4JOIN + 4805
0x80d9fa5 mysql_select__FP3THDPPP4ItemP13st_table_listUiRt4List1Z4ItemP4ItemUiP8st_orderT7T5T7UlP13select_resultP18st_select_lex_unitP13s + 797
0x80fa4e0 mysql_multi_update__FP3THDP13st_table_listPt4List1Z4ItemT2P4ItemUl15enum_duplicatesbP18st_select_lex_unitP13st_select_lex + 212
0x80adbb8 mysql_execute_command__FP3THD + 7940
0x80b261c mysql_parse__FP3THDPcUi + 248
0x81051a6 exec_event__15Query_log_eventP17st_relay_log_infoPCcUi + 834
0x8104e5f exec_event__15Query_log_eventP17st_relay_log_info + 27
0x815dc6a exec_relay_log_event__FP3THDP17st_relay_log_info + 682
0x815ea3a handle_slave_sql + 794
0x82cc49c pthread_start_thread + 220
0x82f5eaa thread_start + 4
How to repeat:
Cannot repeat outside of my tables with test situation. I'm unsure of what combination of factors was causing the crash in addition to the date column.
Suggested fix:
Editing the relay-log to repair the date formatting in the query to show:
'2005-08-22' rather than '2005/08/22'
resolved the problem. Note, assignment_date is a 'date' column type. Also, both scan and package are innodb.