Bug #91 Crash with UNION, SUBSELECT and ORDER BY in MySQL-4.1
Submitted: 21 Feb 2003 18:27 Modified: 1 Mar 2003 9:44
Reporter: jocelyn fournier (Silver Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:4.1 OS:Any (all)
Assigned to: Oleksandr Byelkin CPU Architecture:Any

[21 Feb 2003 18:27] jocelyn fournier
Description:
MySQL crashes when using UNION, ORDER BY and a SUBSELECT.

How to repeat:
(SELECT 1) UNION (SELECT 2) ORDER BY (SELECT 3);

Stack trace :

0x80ab6c1 handle_segfault + 481
0x82a6898 pthread_sighandler + 176
0x80d22d3 setup_wild(THD*, st_table_list*, List<Item>&, List<Item>*, unsigned) + 35
0x814ce46 st_select_lex_unit::prepare(THD*, select_result*, bool) + 1798
0x814c42d mysql_union(THD*, st_lex*, select_result*, st_select_lex_unit*, bool) + 45
0x80d7071 handle_select(THD*, st_lex*, select_result*) + 113
0x80b98a4 mysql_execute_command(THD*) + 644
0x80be728 mysql_parse(THD*, char*, unsigned) + 232
0x80b83f3 dispatch_command(enum_server_command, THD*, char*, unsigned) + 867
0x80b8045 do_command(THD*) + 133
0x80b78b1 handle_one_connection + 913
0x82a42ba pthread_start_thread + 218
0x82d880a thread_start + 4
[1 Mar 2003 9:44] Sinisa Milivojevic
a longish patch