summaryrefslogtreecommitdiff
path: root/sql/time.cc
diff options
context:
space:
mode:
authorunknown <sasha@mysql.sashanet.com>2001-04-05 19:04:34 -0600
committerunknown <sasha@mysql.sashanet.com>2001-04-05 19:04:34 -0600
commit96c3bd94327cd920985724c8d2799a952ea4bf57 (patch)
tree6d93316a19092ccce1647ddfbb727d57b84ee96a /sql/time.cc
parent3b91fce6b897ede7f43daec50433559c9a3eac51 (diff)
downloadmariadb-git-96c3bd94327cd920985724c8d2799a952ea4bf57.tar.gz
moved bdb/innobase to compile-pentium-debug-max
fixed bug in variable assignment in mysqltest fixed coredump on conversion from empty blob/text to date added test case for empty blob conversion to date BUILD/compile-pentium-debug: move bdb/innobase to compile-pentium-debug-max client/mysqltest.c: fixed bug in variable assignment sql/time.cc: fixed coredump on conversion from empty blob/text to date
Diffstat (limited to 'sql/time.cc')
-rw-r--r--sql/time.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/time.cc b/sql/time.cc
index ce4b5b0e30c..b40047cb381 100644
--- a/sql/time.cc
+++ b/sql/time.cc
@@ -428,11 +428,15 @@ 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));
- for (; !isdigit(*str) && str != end ; str++) ; // Skipp garbage
+ if(!str)
+ DBUG_RETURN(TIMESTAMP_NONE);
+
+ const char *end=str+length;
+
+ for (; !isdigit(*str) && str != end ; str++) ; // Skip garbage
if (str == end)
DBUG_RETURN(TIMESTAMP_NONE);
/*