Bug #59343 | year(4): incorrect result and valgrind warnings with min/max, union | ||
---|---|---|---|
Submitted: | 7 Jan 2011 5:11 | Modified: | 27 Apr 2011 18:54 |
Reporter: | Shane Bester (Platinum Quality Contributor) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Data Types | Severity: | S1 (Critical) |
Version: | 4.1.25,5.0.92,5.1.55,5.5.9,5.6.2 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[7 Jan 2011 5:11]
Shane Bester
[7 Jan 2011 5:13]
MySQL Verification Team
full outputs from valgrind
Attachment: bug59343_mysql-trunk_valgrind_output.txt (text/plain), 17.87 KiB.
[7 Jan 2011 9:16]
Valeriy Kravchuk
This is how it looks: macbook-pro:5.5 openxs$ bin/mysql -uroot test Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 Server version: 5.1.55-debug Source distribution Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> set names utf8; Query OK, 0 rows affected (0.00 sec) mysql> drop table if exists t1; Query OK, 0 rows affected (0.59 sec) mysql> create table t1(a year(4))engine=myisam; Query OK, 0 rows affected (0.08 sec) mysql> insert into t1 values (0000),(2001); Query OK, 2 rows affected (0.00 sec) Records: 2 Duplicates: 0 Warnings: 0 mysql> (select max(`a`) from t1) union (select max(`a`) from t1); +----------------------+ | max(`a`) | +----------------------+ | 0001 iBY C | +----------------------+ 1 row in set (0.07 sec)
[27 Apr 2011 18:54]
Paul DuBois
Noted in 5.1.58, 5.5.13, 5.6.3 changelogs. The incorrect max_length value for YEAR values could be used in temporary result tables for UNION, leading to incorrect results. The incorrect max_length value for YEAR values could be used in temporary result tables for UNION, leading to incorrect results.