summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-11-09 21:45:36 +0200
committerunknown <monty@mysql.com>2004-11-09 21:45:36 +0200
commitba595fbdafbf50d62556ac511c88ac375b04f332 (patch)
tree15db8073ff22de326ff1de286b298b596b2faf3f
parentacb2cbcc1a29f3a8603cac0399260c244047df3b (diff)
parent2430161728279253b6fa32283da716476274a0e5 (diff)
downloadmariadb-git-ba595fbdafbf50d62556ac511c88ac375b04f332.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1 BitKeeper/etc/ignore: added ndb/tools/ndb_test_platform
-rw-r--r--.bzrignore1
-rw-r--r--include/my_global.h6
-rw-r--r--sql/item_timefunc.cc13
3 files changed, 15 insertions, 5 deletions
diff --git a/.bzrignore b/.bzrignore
index 1e89b903ac7..e794d7d51cc 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -923,3 +923,4 @@ Docs/Images/mydsn-trace.txt
Docs/Images/mydsn.txt
Docs/Images/myflowchart.txt
mysql-test/mysql_test_run_new
+ndb/tools/ndb_test_platform
diff --git a/include/my_global.h b/include/my_global.h
index f6200830ee3..07d4d8dc1cc 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -370,6 +370,12 @@ int __void__;
#define LINT_INIT(var)
#endif
+#if defined(_lint) || defined(FORCE_INIT_OF_VARS) || defined(HAVE_purify)
+#define PURIFY_OR_LINT_INIT(var) var=0
+#else
+#define PURIFY_OR_LINT_INIT(var)
+#endif
+
/* Define some useful general macros */
#if defined(__cplusplus) && defined(__GNUC__)
#define max(a, b) ((a) >? (b))
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 41418c0094d..d8142352e70 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -161,21 +161,24 @@ static bool extract_date_time(DATE_TIME_FORMAT *format,
{
int weekday= 0, yearday= 0, daypart= 0;
int week_number= -1;
- CHARSET_INFO *cs= &my_charset_bin;
int error= 0;
- bool usa_time= 0;
- bool sunday_first_n_first_week_non_iso= -2;
- bool strict_week_number;
int strict_week_number_year= -1;
- bool strict_week_number_year_type= -1;
int frac_part;
+ bool usa_time= 0;
+ bool sunday_first_n_first_week_non_iso;
+ bool strict_week_number;
+ bool strict_week_number_year_type;
const char *val_begin= val;
const char *val_end= val + length;
const char *ptr= format->format.str;
const char *end= ptr + format->format.length;
+ CHARSET_INFO *cs= &my_charset_bin;
DBUG_ENTER("extract_date_time");
LINT_INIT(strict_week_number);
+ /* Remove valgrind varnings when using gcc 3.3 and -O1 */
+ PURIFY_OR_LINT_INIT(strict_week_number_year_type);
+ PURIFY_OR_LINT_INIT(sunday_first_n_first_week_non_iso);
if (!sub_pattern_end)
bzero((char*) l_time, sizeof(*l_time));