Bug #42744 | crash in JOIN_CACHE::write_record_data, Field::is_null | ||
---|---|---|---|
Submitted: | 10 Feb 2009 23:02 | Modified: | 16 Nov 2010 3:54 |
Reporter: | Shane Bester (Platinum Quality Contributor) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S1 (Critical) |
Version: | 6.0.10-debug | OS: | Windows |
Assigned to: | Igor Babaev | CPU Architecture: | Any |
[10 Feb 2009 23:02]
Shane Bester
[10 Feb 2009 23:27]
MySQL Verification Team
Verified as described.
[12 Feb 2009 1:53]
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/65978 2693 Igor Babaev 2009-02-11 Fixed bug #42744. When processing a query the function calc_used_field_length was called only once for each joined table tab. The function sets some field counters in the JOIN_TAB structure for tab and their values depend on the value of tab->read_set. The value of tab->read_set may change between the first call of calc_used_field_length and the last call of this function in JOIN_CACHE::calc_record_fields. Yet the method did not recalculate the value of the counters. As a result the function could allocate less memory than it was needed for the descriptors of fields stored in join caches. In some situations it could lead to memory corruption and crashes.
[12 Feb 2009 18:22]
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/66080 2695 Igor Babaev 2009-02-12 Fixed bug #42744. When processing a query the function calc_used_field_length was called only once for each joined table tab. The function sets some field counters in the JOIN_TAB structure for tab and their values depend on the value of tab->read_set. The value of tab->read_set may change between the first call of calc_used_field_length and the last call of this function in JOIN_CACHE::calc_record_fields. Yet the method did not recalculate the value of the counters. As a result the function could allocate less memory than it was needed for the descriptors of fields stored in join caches. In some situations it could lead to memory corruption and crashes.
[16 Feb 2009 18:08]
Bugs System
Pushed into 6.0.10-alpha (revid:alik@sun.com-20090216180446-dl1xovi02kbd2fgn) (version source revid:igor@mysql.com-20090212182705-z6mk4dvgdby69bkh) (merge vers: 6.0.10-alpha) (pib:6)
[27 Feb 2009 20:42]
Paul DuBois
Noted in 6.0.10 changelog. The optimizer could underestimate the memory required for column descriptors during join processing and cause memory corruption or a server crash.
[16 Aug 2010 6:33]
Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100816062819-bluwgdq8q4xysmlg) (version source revid:alik@sun.com-20100816062612-enatdwnv809iw3s9) (pib:20)
[13 Nov 2010 16:24]
Bugs System
Pushed into mysql-trunk 5.6.99-m5 (revid:alexander.nozdrin@oracle.com-20101113155825-czmva9kg4n31anmu) (version source revid:vasil.dimov@oracle.com-20100629074804-359l9m9gniauxr94) (merge vers: 5.6.99-m4) (pib:21)
[16 Nov 2010 3:54]
Paul DuBois
Noted in 5.6.1 changelog.