Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.5.16, 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11
Description
We get the incorrect result when we let the negative numbers shift left or right by 0 digits.
|
|
mysql> SELECT -1 >> 0;
|
+----------------------+
|
| -1 >> 0 |
|
+----------------------+
|
| 18446744073709551615 |
|
+----------------------+
|
1 row in set (0.00 sec)
|
|
mysql> SELECT -1 << 0;
|
+----------------------+
|
| -1 << 0 |
|
+----------------------+
|
| 18446744073709551615 |
|
+----------------------+
|
1 row in set (0.00 sec)
|
The result is incorrect. It should be -1.