Changeset: f547e646b65a for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f547e646b65a
Modified Files:
monetdb5/modules/atoms/mtime.c
Branch: default
Log Message:
mtime.c: made code work, again, after recent BAT-split (changeset d3c1ae10f807)
Listening to compilers and (nightly) testing:
Static variable "timezone_def" was declared and set but never used,
which either means that (1) it is correctly not used and thus its
declaration can (and should/must) safely be removed completely,
or that (2) its intended use has not (yet) been added to the code,
and thus the code is incorrect.
In this case, 20+ failing timezone-related tests indicate that
the BAT-split that introduced static variable "timezone_def" (and
"timezone_name"; see changeset 92da8714361d) was not working
correctly, yet, i.e., (2) is likely to be the case.
And indeed, listening to the hints given by compilers and (nightly)
testing, a careful look a the code reveals that "timezone_def"
rather than "timezone_name" has to be used in function "MTIMEtimezone()".
Thus, the "fake use" of variable "timezone_def" is indeed not
the correct solution.
This fixes the 20+ timezone-related tests that have been failing since
changeset d3c1ae10f807 "Split the timezones catalog".
diffs (20 lines):
diff --git a/monetdb5/modules/atoms/mtime.c b/monetdb5/modules/atoms/mtime.c
--- a/monetdb5/modules/atoms/mtime.c
+++ b/monetdb5/modules/atoms/mtime.c
@@ -1898,7 +1898,6 @@ MTIMEprelude(void)
monettime_prelude();
tz = *tzone_nil; /* to ensure initialized
variables */
- (void) timezone_def; /* StM: statically declared, set, but never used
!??? */
/* here we should initialize the time box as well */
box = openBox("time");
if (box == 0)
@@ -1994,7 +1993,7 @@ MTIMEtimezone(tzone *ret, str *name)
if ((p = BUNfnd(BATmirror(timezone_name), s)) == BUN_NONE)
throw(MAL, "mtime.setTimezone", "unknown timezone");
- tzi = bat_iterator(timezone_name);
+ tzi = bat_iterator(timezone_def);
z = (tzone *) BUNtail(tzi, p);
if ((s = tzone_set_local(z)) != MAL_SUCCEED)
return s;
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list