By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,990 Members | 1,741 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,990 IT Pros & Developers. It's quick & easy.

mysql 4.x week function fails

P: n/a
Hi all,

I think there is a bug in mysql 4:

select week("2003-08-15") from po.orders limit 1;

produces: 32

after:

set session default_week_format=3;

it produces: 33 (which is correct in the Netherlands)

The documentation states:

set global default_week_format=3; (As root!)

This command should set the default_week_format. This command fails:

mysql> set global default_week_format=3;
Query OK, 0 rows affected (0.00 sec)

mysql> select week('2003-08-14');
+--------------------+
| week('2003-08-14') |
+--------------------+
| 32 |
+--------------------+
1 row in set (0.00 sec)

This result is incorrect. It should be 33.

If I use:

mysql> set session default_week_format=3;
Query OK, 0 rows affected (0.00 sec)

mysql> select week('2003-08-14');
+--------------------+
| week('2003-08-14') |
+--------------------+
| 33 |
+--------------------+
1 row in set (0.00 sec)

This is result is correct...

I use mysql 4.0.14. I also did the same test on mysql 4.1 alpha, which has
the same results.

Can somebody help?

Thanks,

Harm de Laat
Informatiefabriek
The Netherlands
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/my***********...ie.nctu.edu.tw

Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.