diff options
author | acurtis@xiphis.org <> | 2005-08-11 12:18:53 +0100 |
---|---|---|
committer | acurtis@xiphis.org <> | 2005-08-11 12:18:53 +0100 |
commit | b9476f7d50e9911ea83f304351e5cab7a3880089 (patch) | |
tree | 7e424eae0123e35fa5eec3670a550a310c6e1916 /sql-common | |
parent | 0f75d647349694d820923342325440e9abdd49a6 (diff) | |
parent | 3b64651683a6f8d9276fd49843832f672312f880 (diff) | |
download | mariadb-git-b9476f7d50e9911ea83f304351e5cab7a3880089.tar.gz |
Merge xiphis.org:/usr/home/antony/work2/mysql-4.1
into xiphis.org:/usr/home/antony/work2/merge-5.0
Diffstat (limited to 'sql-common')
-rw-r--r-- | sql-common/my_time.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sql-common/my_time.c b/sql-common/my_time.c index 95ac779e0cd..72809ee9b4b 100644 --- a/sql-common/my_time.c +++ b/sql-common/my_time.c @@ -197,7 +197,9 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time, If length= 8 or >= 14 then year is of format YYYY. (YYYY-MM-DD, YYYYMMDD, YYYYYMMDDHHMMSS) */ - for (pos=str; pos != end && my_isdigit(&my_charset_latin1,*pos) ; pos++) + for (pos=str; + pos != end && (my_isdigit(&my_charset_latin1,*pos) || *pos == 'T'); + pos++) ; digits= (uint) (pos-str); @@ -263,7 +265,7 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time, const char *start= str; ulong tmp_value= (uint) (uchar) (*str++ - '0'); while (str != end && my_isdigit(&my_charset_latin1,str[0]) && - --field_length) + (!is_internal_format || --field_length)) { tmp_value=tmp_value*10 + (ulong) (uchar) (*str - '0'); str++; |