diff options
author | unknown <dlenev@brandersnatch.localdomain> | 2004-12-22 18:58:25 +0300 |
---|---|---|
committer | unknown <dlenev@brandersnatch.localdomain> | 2004-12-22 18:58:25 +0300 |
commit | 0ed3eb41a0db444896a5dd26e814b8f0f630957b (patch) | |
tree | d57706867d87609f0c34d809f0d981f8eedf267c /mysql-test/r/date_formats.result | |
parent | cb6007ceb61a3733af011b1f0ff96e3951155f5b (diff) | |
download | mariadb-git-0ed3eb41a0db444896a5dd26e814b8f0f630957b.tar.gz |
Fix for bug #7458 "Microseconds are gobbled from the string result of
STR_TO_DATE() function if there is another format specifier after %f
in format string". Also small cleanup of STR_TO_DATE() implementation.
(After review version.)
mysql-test/r/date_formats.result:
Added test for small bug in STR_TO_DATE() implementation which caused
microseconds to be gobbled from string result of this function, if
there was another specifier after %f in format string.
mysql-test/t/date_formats.test:
Added test for small bug in STR_TO_DATE() implementation which caused
microseconds to be gobbled from string result of this function, if
there was another specifier after %f in format string.
sql/item_timefunc.cc:
Small cleanup of str_to_date() implementation.
Renamed check_result_type() to less ambigous get_date_time_result_type()
and made it static. Also added handling of %X,%x,%V,%v to this function.
Fixed small bug in it which caused microseconds to be gobbled if there
was some other specifiers after %f.
Cleaned up comments a bit.
Diffstat (limited to 'mysql-test/r/date_formats.result')
-rw-r--r-- | mysql-test/r/date_formats.result | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mysql-test/r/date_formats.result b/mysql-test/r/date_formats.result index 758a83defed..2db014c4a52 100644 --- a/mysql-test/r/date_formats.result +++ b/mysql-test/r/date_formats.result @@ -296,6 +296,9 @@ Tuesday 52 2001 %W %V %X 00:00:00 15-01-2001 %d-%m-%Y %H:%i:%S 00:00:00 15-01-20 %d-%m-%y 00:00:00 15-2001-1 %d-%Y-%c 00:00:00 +select concat('',str_to_date('8:11:2.123456 03-01-02','%H:%i:%S.%f %y-%m-%d')); +concat('',str_to_date('8:11:2.123456 03-01-02','%H:%i:%S.%f %y-%m-%d')) +2003-01-02 08:11:02.123456 truncate table t1; insert into t1 values ('2003-01-02 10:11:12 PM', '%Y-%m-%d %H:%i:%S %p'), |