summaryrefslogtreecommitdiff
path: root/sql/time.cc
diff options
context:
space:
mode:
authorsasha@mysql.sashanet.com <>2001-04-05 19:04:34 -0600
committersasha@mysql.sashanet.com <>2001-04-05 19:04:34 -0600
commitfdf19ea879259526b952ff97ad22375b6ab8a966 (patch)
tree6d93316a19092ccce1647ddfbb727d57b84ee96a /sql/time.cc
parent671a63f5da5e1fc16ba8ef661bfd3fa35459718f (diff)
downloadmariadb-git-fdf19ea879259526b952ff97ad22375b6ab8a966.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
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);
/*