Commit 4bdfe0fb authored by unknown's avatar unknown

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)
parent bfb6add2
...@@ -277,6 +277,12 @@ static bool check_user(THD *thd,enum_server_command command, const char *user, ...@@ -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 Make a copy of array and the strings array points to
*/ */
......
...@@ -2589,7 +2589,7 @@ void Field_timestamp::store(longlong nr) ...@@ -2589,7 +2589,7 @@ void Field_timestamp::store(longlong nr)
{ {
long not_used; 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++; current_thd->cuted_fields++;
timestamp=0; timestamp=0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment