Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
N/A
-
None
Description
MariaDB [test]> SELECT @@default_week_format; |
+-----------------------+ |
| @@default_week_format |
|
+-----------------------+ |
| 0 |
|
+-----------------------+ |
1 row in set (0.00 sec) |
|
MariaDB [test]> SELECT WEEK('2000-01-01'); |
+--------------------+ |
| WEEK('2000-01-01') | |
+--------------------+ |
| 0 |
|
+--------------------+ |
1 row in set (0.00 sec) |
|
MariaDB [test]> SELECT WEEK('2000-01-01',2); |
+----------------------+ |
| WEEK('2000-01-01',2) | |
+----------------------+ |
| 52 |
|
+----------------------+ |
1 row in set (0.00 sec) |
MariaDB [test]> SET STATEMENT default_week_format = 2 FOR SELECT WEEK('2000-01-01'); |
+--------------------+ |
| WEEK('2000-01-01') | |
+--------------------+ |
| 0 |
|
+--------------------+ |
1 row in set (0.01 sec) |
|
MariaDB [test]> SET default_week_format = 2; |
Query OK, 0 rows affected (0.00 sec) |
|
MariaDB [test]> SELECT WEEK('2000-01-01'); |
+--------------------+ |
| WEEK('2000-01-01') | |
+--------------------+ |
| 52 |
|
+--------------------+ |
1 row in set (0.00 sec) |
All the same in Percona server.