[EMAIL PROTECTED] wrote:
> 
> 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.

1. You can set up default_week_format only sice 4.1
2. SET GLOBAL default_week_format=3 does not affect the session variable of the 
current connection. Open new connection after SET GLOBAL and your SELECT query should 
give you correct result.


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to