WEEKDAY function returns incorrect value
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
InfiniDB Community |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
WEEKDAY function results in incorrect value
mysql> SELECT o_orderdate, weekday(
+------
| o_orderdate | weekday(
+------
| 1992-02-21 | 4 |
| 1992-06-03 | 2 |
| 1993-10-14 | 3 |
| 1993-10-27 | 2 |
| 1994-07-30 | 5 |
| 1995-07-16 | 2147483647 |
| 1995-10-11 | 2 |
| 1995-10-23 | 0 |
| 1995-11-03 | 4 |
| 1996-01-02 | 1 |
| 1996-01-10 | 2 |
| 1996-08-21 | 2 |
| 1996-09-20 | 4 |
| 1996-12-01 | 2147483647 |
| 1998-07-21 | 1 |
+------
15 rows in set (0.21 sec)
Work around is to use the DAYOFWEEK function.
(dayofweek + 5)%7 =>weekday
Changed in infinidb: | |
status: | New → Confirmed |
fix packaged in the 2.2.1 release.