Bug #21853 | Query with "ALL" keyworkd doesnt return what's expected | ||
---|---|---|---|
Submitted: | 27 Aug 2006 20:36 | Modified: | 5 Oct 2006 16:57 |
Reporter: | Lucas Roman | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S2 (Serious) |
Version: | 5.0 | OS: | Linux (Linux) |
Assigned to: | Igor Babaev | CPU Architecture: | Any |
Tags: | ALL, subquery |
[27 Aug 2006 20:36]
Lucas Roman
[28 Aug 2006 13:06]
Sveta Smirnova
Thank you for the report. Verified as described on Linux using last BK sources build with help of BUILD/compile-pentium script. Debug build crashes (item_subselect.cc:708: virtual String* Item_in_subselect::val_str(String*): Assertion `0' failed.): mysql> SELECT o.field1, o.field2 -> FROM outertable o -> GROUP BY o.field1, o.field2 -> HAVING COUNT(*) >= ALL ( -> SELECT fieldB FROM innertable i WHERE i.fieldA = o.field1 -> ); ERROR 2013 (HY000): Lost connection to MySQL server during query Error log content: mysqld: item_subselect.cc:708: virtual String* Item_in_subselect::val_str(String*): Assertion `0' failed. mysqld got signal 6; 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=16384 read_buffer_size=258048 max_used_connections=1 max_connections=100 threads_connected=1 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 31612 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. thd=0x9d21b00 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=0xb1078b48, backtrace may not be correct. Stack range sanity check OK, backtrace follows: 0x82105fa 0x2ce420 0xb1078f88 0x30e269 0x81d9680 0x81797ca 0x8286292 0x828686c 0x827b942 0x827bcd9 0x827c02f 0x828f8a2 0x828fc1a 0x828ff28 0x822d573 0x823610d 0x8236c38 0x82381f3 0x82385fc 0x45fbd4 0x3b74fe 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 0x9d38428 = SELECT o.field1, o.field2 FROM outertable o GROUP BY o.field1, o.field2 HAVING COUNT(*) >= ALL ( SELECT fieldB FROM innertable i WHERE i.fieldA = o.field1 ) thd->thread_id=1 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.
[25 Sep 2006 12:24]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/12467 ChangeSet@1.2572, 2006-09-25 05:24:07-07:00, igor@rurik.mysql.com +3 -0 Fixed bug #21853: assert failure for a grouping query with an ALL/ANY quantified subquery in HAVING. The Item::split_sum_func2 method should not create Item_ref for objects of any class derived from Item_subselect.
[1 Oct 2006 8:56]
Georgi Kodinov
Pushed in 4.1.22/5.0.26/5.1.12
[5 Oct 2006 16:57]
Paul DuBois
Noted in 4.1.22, 5.0.26, 5.1.12 changelogs. A query that used GROUP BY and an ALL or ANY quantified subquery in a HAVING clause could trigger an assertion failure.