diff options
author | monty@donna.mysql.fi <> | 2001-04-09 21:08:56 +0300 |
---|---|---|
committer | monty@donna.mysql.fi <> | 2001-04-09 21:08:56 +0300 |
commit | 7f21a7a6daff97675749db987b12a080bb4c3799 (patch) | |
tree | 8f547099445a7673d67da016f7a567772cd5552c /sql/time.cc | |
parent | 3d19a5d4bb3bc3ab55574000ee014d3d65d17b12 (diff) | |
download | mariadb-git-7f21a7a6daff97675749db987b12a080bb4c3799.tar.gz |
Fixed INSERT DELAYED with Innobase
Fix for shutdown on NT
Fixed bug when using wrong dates from blob field.
Diffstat (limited to 'sql/time.cc')
-rw-r--r-- | sql/time.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sql/time.cc b/sql/time.cc index b40047cb381..086977af72f 100644 --- a/sql/time.cc +++ b/sql/time.cc @@ -428,15 +428,11 @@ str_to_TIME(const char *str, uint length, TIME *l_time,bool fuzzy_date) uint field_length,year_length,digits,i,number_of_fields,date[7]; bool date_used=0; const char *pos; + const char *end=str+length; DBUG_ENTER("str_to_TIME"); DBUG_PRINT("enter",("str: %.*s",length,str)); - if(!str) - DBUG_RETURN(TIMESTAMP_NONE); - - const char *end=str+length; - - for (; !isdigit(*str) && str != end ; str++) ; // Skip garbage + for (; str != end && !isdigit(*str) ; str++) ; // Skipp garbage if (str == end) DBUG_RETURN(TIMESTAMP_NONE); /* @@ -562,7 +558,7 @@ bool str_to_time(const char *str,uint length,TIME *l_time) uint state; l_time->neg=0; - for (; !isdigit(*str) && *str != '-' && str != end ; str++) + for (; str != end && !isdigit(*str) && *str != '-' ; str++) length--; if (str != end && *str == '-') { |