| Bug #64054 | Double negation (!!) not working in 5.5.19 | ||
|---|---|---|---|
| Submitted: | 17 Jan 2012 20:46 | Modified: | 18 Jan 2012 5:15 |
| Reporter: | Mike Pomraning | Email Updates: | |
| Status: | Duplicate | Impact on me: | |
| Category: | MySQL Server: DML | Severity: | S1 (Critical) |
| Version: | 5.5.19 | OS: | Linux (i686 2.6.18) |
| Assigned to: | CPU Architecture: | Any | |
[17 Jan 2012 21:47]
Peter Laursen
5.1.60 == 5.5.x Peter (not a MySQL person)
[18 Jan 2012 5:15]
Valeriy Kravchuk
This is a duplicate of bug #55477.

Description: Under 5.5.19, "double bang" (!!) produces an incorrect result, equivalent to a single ! operator. By contrast, 5.0 behaves properly. mysql> SELECT VERSION(), CASE !!0 WHEN !(!0) THEN 'Yeah! :)' ELSE 'Oh, no! :(' END AS `Does ``!!0 = !(!0)``?`; +-----------+---------------------+ | VERSION() | Does `!!0 = !(!0)`? | +-----------+---------------------+ | 5.5.19 | Oh, no! :( | +-----------+---------------------+ 1 row in set (0.00 sec) How to repeat: INCORRECT: $ mysql -e 'SELECT VERSION(), !0, !!0, !(!0)\G' *************************** 1. row *************************** VERSION(): 5.5.19 !0: 1 !!0: 1 !(!0): 0 CORRECT: $ mysql -e 'SELECT VERSION(), !0, !!0, !(!0)\G' *************************** 1. row *************************** VERSION(): 5.0.77 !0: 1 !!0: 0 !(!0): 0