Bug #29417 | debug asser on decimal | ||
---|---|---|---|
Submitted: | 28 Jun 2007 11:19 | Modified: | 9 Jul 2007 15:22 |
Reporter: | Martin Friebe (Gold Quality Contributor) (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.1.20 5.0.44/5.1.21 | OS: | FreeBSD |
Assigned to: | Igor Babaev | CPU Architecture: | Any |
Tags: | assert, debug, decimal |
[28 Jun 2007 11:19]
Martin Friebe
[28 Jun 2007 12:53]
MySQL Verification Team
Thank you for the bug report. Verified as described. 070628 9:51:14 [Note] libexec/mysqld: ready for connections. Version: '5.1.21-beta-debug' socket: '/tmp/mysql.sock' port: 3306 Source distribution mysqld: field.cc:2336: Field_new_decimal::Field_new_decimal(uint32, bool, const char*, uint8, bool): Assertion `(precision <= ((9 * 9) - 8*2)) && (dec <= 30)' failed. 070628 9:51:52 - mysqld got signal 6;
[7 Jul 2007 5:06]
Igor Babaev
This problem can be demonstrated with the following query: mysql> select a+cast(1 as decimal(66,60)) as aa, sum(b) from t1 group by aa; ERROR 2013 (HY000): Lost connection to MySQL server during query having on the server side: Version: '5.0.46-debug' socket: '/tmp/mysql.sock' port: 3306 Source distribution [New Thread -1257141344 (LWP 5033)] mysqld: field.cc:2290: Field_new_decimal::Field_new_decimal(uint32, bool, const char*, st_table*, uint8, bool): Assertion `(precision <= ((9 * 9) - 8*2)) && (dec <= 30)' failed.
[7 Jul 2007 19:27]
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/30481 ChangeSet@1.2521, 2007-07-07 12:31:55-07:00, igor@olga.mysql.com +3 -0 Fixed bug #29417. An assertion abort could occur for some grouping queries that employed decimal user variables with assignments to them. The problem appeared the constructors of the class Field_new_decimal because the function my_decimal_length_to_precision did not guarantee returning decimal precision not greater than DECIMAL_MAX_PRECISION.
[8 Jul 2007 17:28]
Bugs System
Pushed into 5.1.21-beta
[8 Jul 2007 17:30]
Bugs System
Pushed into 5.0.46
[9 Jul 2007 15:22]
Paul DuBois
Noted in 5.0.46, 5.1.21 changelogs. Assertion failure could occur for grouping queries that employed DECIMAL user variables with assignments to them.