Bug #38199 | Wrong result: HAVING not observed when date key is compared to integer | ||
---|---|---|---|
Submitted: | 17 Jul 2008 14:41 | Modified: | 7 Sep 2008 22:10 |
Reporter: | Philip Stoev | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S2 (Serious) |
Version: | 6.0 | OS: | Any |
Assigned to: | Assigned Account | CPU Architecture: | Any |
Tags: | regression, regression |
[17 Jul 2008 14:41]
Philip Stoev
[17 Jul 2008 15:08]
MySQL Verification Team
Thank you for the bug report. Repeatable only with 6.0.6 source tree server. Not repeatable with 5.1 and 6.0.4 released version. mysql 6.0 > mysql 6.0 > SELECT pk -> FROM t1 -> WHERE date_key <> 1 -> HAVING pk <= 0 -> ORDER BY varchar_key; +----+ | pk | +----+ | 2 | | 1 | +----+ 2 rows in set, 3 warnings (0.11 sec) mysql 6.0 > alter table t1 engine MyISAM; Query OK, 2 rows affected (0.31 sec) Records: 2 Duplicates: 0 Warnings: 0 mysql 6.0 > SELECT pk -> FROM t1 -> WHERE date_key <> 1 -> HAVING pk <= 0 -> ORDER BY varchar_key; Empty set, 3 warnings (0.03 sec) mysql 6.0 > show variables like "%version%"; +-------------------------+--------------------------+ | Variable_name | Value | +-------------------------+--------------------------+ | protocol_version | 10 | | version | 6.0.6-alpha-nt-debug-log | | version_comment | Source distribution | | version_compile_machine | ia32 | | version_compile_os | Win32 | +-------------------------+--------------------------+ 5 rows in set (0.05 sec) mysql 6.0 > mysql> mysql> SELECT pk -> FROM t1 -> WHERE date_key <> 1 -> HAVING pk <= 0 -> ORDER BY varchar_key; Empty set, 3 warnings (0.06 sec) mysql> show variables like "%version%"; +-------------------------+------------------------------+ | Variable_name | Value | +-------------------------+------------------------------+ | protocol_version | 10 | | version | 6.0.4-alpha-community | | version_comment | MySQL Community Server (GPL) | | version_compile_machine | ia32 | | version_compile_os | Win32 | +-------------------------+------------------------------+ 5 rows in set (0.08 sec) mysql>