Description:
The UNION and date(some_column) also does not work.
This bug is similar to http://bugs.mysql.com/bug.php?id=8660
How to repeat:
select agent_id, client_id, action_type type, date(timestamp) startDate, agent_comment agentComment
from dt_agent_schedule where client_id = '83228' and agent_comment is not null
union select agent_id, client_id, request_type type, date(start_date) startDate, agent_message agentComment
from dt_client_request_info where client_id = '83228' and agent_message is not null
union select agent_id, client_id, request_type type, date(start_date) startDate, agent_message agentComment
from dt_client_request_show where client_id = '83228' and agent_message is not null
-------------dump -------------------------------
0x808d8d7 handle_segfault + 423
0x82e68d8 pthread_sighandler + 184
0x8088aef Protocol::send_fields(List<Item> *, unsigned int) + 1071
0x8084e53 select_send::send_fields(List<Item> &, unsigned int) + 35
0x80c9eaa do_select(JOIN *, List<Item> *, st_table *, Procedure *) + 58
0x80c0a0a JOIN::exec(void) + 4346
0x80c0ed2 mysql_select__FP3THDPPP4ItemP13st_table_listUiRt4List1Z4ItemP4ItemUiP8st_orderT7T5T7UlP13select_resultP18st_select_lex_unitP13s + 818
0x812f113 st_select_lex_unit::exec(void) + 2339
0x812d700 mysql_union(THD *, st_lex *, select_result *, st_select_lex_unit *) + 48
0x80bdfac handle_select(THD *, st_lex *, select_result *) + 44
0x809dbda mysql_execute_command(THD *) + 1386
0x80a22d9 mysql_parse(THD *, char *, unsigned int) + 169
0x809c7c8 dispatch_command(enum_server_command, THD *, char *, unsigned int) + 1576
0x809c194 do_command(THD *) + 196
0x809b847 handle_one_connection + 615
0x82e408c pthread_start_thread + 220
0x830d95a thread_start + 4
Suggested fix:
don't use date() with union