Bug #1727 | EXPLAIN on subquery+union crashes server | ||
---|---|---|---|
Submitted: | 31 Oct 2003 15:28 | Modified: | 24 Nov 2003 3:00 |
Reporter: | Giovanni MC | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S1 (Critical) |
Version: | 4.1.1 BK | OS: | Any (any) |
Assigned to: | Alexey Botchkov | CPU Architecture: | Any |
[31 Oct 2003 15:28]
Giovanni MC
[3 Nov 2003 13:36]
Indrek Siitan
Test case: create table a ( a int ); explain select * from ( select * from a union select * from a ) a, (select * from a union select * from a ) b; Stack trace: Program received signal SIGSEGV, Segmentation fault. 0x808c8c3 in get_lock_data (thd=0xa99a018, table_ptr=0xaa2eef0, count=3, get_old_locks=false, write_lock_used=0xaa1ea58) at lock.cc:406 406 tables+=table_ptr[i]->file->lock_count(); (gdb) bt #0 0x808c8c3 in get_lock_data (thd=0xa99a018, table_ptr=0xaa2eef0, count=3, get_old_locks=false, write_lock_used=0xaa1ea58) at lock.cc:406 #1 0x808c118 in mysql_lock_tables (thd=0xa99a018, tables=0xaa2eef0, count=3) at lock.cc:93 #2 0x80b80c9 in lock_tables (thd=0xa99a018, tables=0xaa2ede8) at sql_base.cc:1557 #3 0x80b801d in open_and_lock_tables (thd=0xa99a018, tables=0xaa2ede8) at sql_base.cc:1516 #4 0x8143797 in mysql_derived (thd=0xa99a018, lex=0xa99a290, unit=0xaa248d0, org_table_list=0xaa24de8) at sql_derived.cc:101 #5 0x809e3f3 in mysql_execute_command (thd=0xa99a018) at sql_parse.cc:1705 #6 0x80a3515 in mysql_parse (thd=0xa99a018, inBuf=0xaa24028 "explain select * from ( select * from a union select * from a ) a, (select * from a union select * from a ) b", length=109) at sql_parse.cc:3768 #7 0x809d57b in dispatch_command (command=COM_QUERY, thd=0xa99a018, packet=0xa9ea019 "explain select * from ( select * from a union select * from a ) a, (select * from a union select * from a ) b", packet_length=110) at sql_parse.cc:1295 #8 0x809cf83 in do_command (thd=0xa99a018) at sql_parse.cc:1129 #9 0x809c638 in handle_one_connection (arg=0xa99a018) at sql_parse.cc:899 #10 0x2852241f in _thread_start () from /usr/lib/libc_r.so.4 #11 0x0 in ?? ()
[8 Nov 2003 3:52]
Alexey Botchkov
changeset 1.1624 (08 Now 2003)
[24 Nov 2003 3:00]
Alexey Botchkov
Thank you for your bug report. This issue has already been fixed in the latest released version of that product, which you can download at http://www.mysql.com/downloads/