Bug #33049 | Assert while running test-as3ap test(mysql-bench suite) | ||
---|---|---|---|
Submitted: | 6 Dec 2007 21:52 | Modified: | 15 Mar 2008 9:14 |
Reporter: | Alexey Stroganov | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Views | Severity: | S3 (Non-critical) |
Version: | 5.0.56-debug, 5.1.24-rc-debug, 6.0.4-debug, 6.0.5pre-DEBUG | OS: | Any |
Assigned to: | Alexey Kopytov | CPU Architecture: | Any |
[6 Dec 2007 21:52]
Alexey Stroganov
[6 Dec 2007 21:54]
Alexey Stroganov
Dataset for issue
Attachment: bug-test-as3ap-falcon.gz (application/x-gzip, text), 88.30 KiB.
[19 Feb 2008 12:31]
Alexey Kopytov
A short testcase that crashes 5.0 and 5.1 as well: CREATE TABLE `t1` ( `id` int(11) NOT NULL auto_increment, `a` int(11) NOT NULL, PRIMARY KEY (`id`); ) CREATE TABLE `t2` ( `id` int(11) NOT NULL auto_increment, `c` char(20) NOT NULL, PRIMARY KEY (`id`) ) insert into t1(a) values (1),(1),(1); insert into t2(c) values('a'),('b'),('c'); CREATE VIEW v1 AS select t1.id as id, t1.a as a, t2.c as c from (t1 join t2) where t1.id = t2.id; select max(a), count(distinct c) from v1 group by c;
[22 Feb 2008 8:34]
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/42804 ChangeSet@1.2607, 2008-02-22 11:34:18+03:00, kaa@kaamos.(none) +3 -0 Fix for bug #33049: Assert while running test-as3ap test(mysql-bench suite) Under some circumstances a combination of aggregate functions and GROUP BY in a SELECT query over a VIEW could lead to incorrect calculation of the result type of the aggregate function. This in turn could result in incorrect results, or assertion failures on debug builds. Fixed by changing the logic in Item_sum_hybrid::fix_fields() so that the argument's item is dereferenced before calling its type() method.
[13 Mar 2008 19:28]
Bugs System
Pushed into 6.0.5-alpha
[13 Mar 2008 19:35]
Bugs System
Pushed into 5.1.24-rc
[13 Mar 2008 19:42]
Bugs System
Pushed into 5.0.60
[15 Mar 2008 9:14]
Jon Stephens
Documented bugfix in the 5.0.60, 5.1.24, and 6.0.5 changelogs as follows: Under some circumstances a combination of aggregate functions and GROUP BY in a SELECT query over a view could lead to incorrect calculation of the result type of the aggregate function. This in turn could lead to incorrect results, or to crashes on debug builds of the server.
[31 Mar 2008 19:58]
Jon Stephens
Pushed to 5.1-telco-6.3. Documented in the 5.1.23-ndb-6.3.11 changelog.