>Description:
        Run SELECT WEEK(SUBDATE("2002-01-07 03:30:00", INTERVAL 7 DAY), 1) and it 
wrongly returns 53.
>How-To-Repeat:
        SELECT WEEK(SUBDATE("2002-01-07 03:30:00", INTERVAL 7 DAY), 1);
>Fix:
        Correct result returned by querying the thursday of that week instead, ie.
        SELECT WEEK(SUBDATE("2002-01-07 03:30:00", INTERVAL 4 DAY), 1);

>Submitter-Id:  [EMAIL PROTECTED]
>Originator:    trevor hemsley
>Organization:
 AtosOrigin
>MySQL support: none
>Synopsis:      WEEK() returns wrong week number when run for some days in first week 
>of year
>Severity:      non-critical
>Priority:      low
>Category:      mysql
>Class:         sw-bug
>Release:       mysql-3.23.33 (Source distribution)
>Server: /usr/bin/mysqladmin  Ver 8.15 Distrib 3.23.33, for suse-linux on i686
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version          3.23.33-log
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /var/lib/mysql/mysql.sock
Uptime:                 24 days 22 hours 51 min 14 sec

Threads: 1  Questions: 6696  Slow queries: 1  Opens: 18  Flush tables: 1  Open tables: 
7 Queries per second avg: 0.003
>Environment:
        
System: Linux dhcppc-202-122 2.4.14 #1 Mon Nov 12 18:25:43 GMT 2001 i586 unknown
Architecture: i586

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i486-suse-linux/2.95.2/specs
gcc version 2.95.2 19991024 (release)
Compilation info: CC='gcc'  CFLAGS='-O2 -m486'  CXX='c++'  CXXFLAGS='-O2 -m486'  
LDFLAGS=''
LIBC: 
-rwxr-xr-x    1 root     root      1382179 Jan 19  2001 /lib/libc.so.6
-rw-r--r--    1 root     root      2585872 Jan 19  2001 /usr/lib/libc.a
-rw-r--r--    1 root     root          178 Jan 19  2001 /usr/lib/libc.so
-rw-r--r--    1 root     root       851660 Jan 19  2001 /usr/lib/libc-client.a
lrwxrwxrwx    1 root     root           19 Dec 11 15:24 /usr/lib/libc-client.so -> 
libc-client.so.2000
-rwxr-xr-x    1 root     root       714876 Jan 19  2001 /usr/lib/libc-client.so.2000
Configure command: ./configure  --enable-shared --enable-assembler 
--infodir=/usr/share/info --libdir=/usr/lib --libexecdir=/usr/sbin 
--localstatedir=/var/lib/mysql --mandir=/usr/share/man --prefix=/usr --sysconfdir=/etc 
--with-mysqld-user=mysql --without-debug --datadir=/usr/share 
--includedir=/usr/include --with-extra-charsets=complex 
--with-unix-socket-path=/var/lib/mysql/mysql.sock --without-berkeley-db


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to