Subject: Re: mysql NOW() bug on Alpha?
To: Simon Burge <email@example.com>
From: Dave Huang <firstname.lastname@example.org>
Date: 10/06/2000 08:12:18
On Fri, 6 Oct 2000, Dave Huang wrote:
> Hmm, interesting... I bet it has to do with negative timezone offsets...
> if I link /etc/localtime to GMT or Australia, it works, but US doesn't.
Yeah, that does seem to be the problem... when loading in the timezone
info, it's stuffing the GMT offset into a 64-bit long rather than 32-bit
int, so negative offsets are being treated as huge positive offsets. The
patch below seems to fix the problem for me... perhaps the mysql-server
package should be updated to use a more recent pthreads package rather
than the one that comes with mysql? (devel/pth perhaps? or
devel/unproven-pthreads? I dunno what the difference is between 'em :)
--- mit-pthreads/gen/ctime.c.orig Sun Oct 12 07:07:41 1997
+++ mit-pthreads/gen/ctime.c Fri Oct 6 08:07:31 2000
@@ -129,7 +129,7 @@
** Prototypes for static functions.
-static long detzcode __P_((const char *));
+static int32_t detzcode __P_((const char *));
static const char * getnum __P_((const char *, int *, int, int));
static const char * getsecs __P_((const char *, long *));
static const char * getoffset __P_((const char *, long *));
@@ -175,7 +175,7 @@
time_t altzone = 0;
#endif /* defined ALTZONE */
-static long detzcode(const char * codep)
+static int32_t detzcode(const char * codep)
Name: Dave Huang | Mammal, mammal / their names are called /
INet: email@example.com | they raise a paw / the bat, the cat /
FurryMUCK: Dahan | dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 24 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++