summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2003-12-16 14:40:57 +0200
committerunknown <monty@mysql.com>2003-12-16 14:40:57 +0200
commit4bdfe0fb0107f2fb3e9cfb1c8a417e1028c67dcc (patch)
tree9947668df465fad2040a8da10a11efe0028ae01e
parentbfb6add213921f9077d712b6dc772a27ccb60e23 (diff)
downloadmariadb-git-4bdfe0fb0107f2fb3e9cfb1c8a417e1028c67dcc.tar.gz
Fixes for last pull
libmysqld/lib_sql.cc: Fixed compilation error in embedded library (from last pull) sql/field.cc: Safer timestamp year checking (as 1969 can be in timestamp)
-rw-r--r--libmysqld/lib_sql.cc6
-rw-r--r--sql/field.cc2
2 files changed, 7 insertions, 1 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index 91a308ecb21..2c54603ea7a 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -277,6 +277,12 @@ static bool check_user(THD *thd,enum_server_command command, const char *user,
}
+void THD::clear_error()
+{
+ net.last_error[0]= 0;
+ net.last_errno= 0;
+}
+
/*
Make a copy of array and the strings array points to
*/
diff --git a/sql/field.cc b/sql/field.cc
index 05779a312d8..feab607400c 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -2589,7 +2589,7 @@ void Field_timestamp::store(longlong nr)
{
long not_used;
- if (l_time.year >= TIMESTAMP_MAX_YEAR || l_time.year < 1900+YY_PART_YEAR)
+ if (l_time.year >= TIMESTAMP_MAX_YEAR || l_time.year < 1900+YY_PART_YEAR-1)
{
current_thd->cuted_fields++;
timestamp=0;