WEEKDAY function returns incorrect value

Bug #807580 reported by Robert Adams
6
This bug affects 1 person
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) FROM orders where o_orderkey < 40;
+-------------+----------------------+
| o_orderdate | weekday(o_orderdate) |
+-------------+----------------------+
| 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
Revision history for this message
Robert Adams (radams-calpont) wrote :

fix packaged in the 2.2.1 release.

Changed in infinidb:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.