diff options
author | unknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru> | 2006-12-26 15:08:41 +0400 |
---|---|---|
committer | unknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru> | 2006-12-26 15:08:41 +0400 |
commit | 33b6bab87177851b134da6b0c0596fdba2a906e8 (patch) | |
tree | 291b92310a0fa724b2ded79707e9dad6e56adc04 /sql-common | |
parent | 0f462179dba195519661d91e49b76d65cb1ba618 (diff) | |
download | mariadb-git-33b6bab87177851b134da6b0c0596fdba2a906e8.tar.gz |
Fix for bug #23616: Week() changed behaviour between 5.0.22 and 5.0.24
Consider double values as legal date{time} function's arguments
(i.e. allow dates in internal format YYYYMMDDHHMMSS.XXXXXX).
mysql-test/r/func_sapdb.result:
Fix for bug #23616: Week() changed behaviour between 5.0.22 and 5.0.24
- result adjusted.
mysql-test/r/func_time.result:
Fix for bug #23616: Week() changed behaviour between 5.0.22 and 5.0.24
- test result.
mysql-test/t/func_time.test:
Fix for bug #23616: Week() changed behaviour between 5.0.22 and 5.0.24
- test case.
sql-common/my_time.c:
Fix for bug #23616: Week() changed behaviour between 5.0.22 and 5.0.24
- consider '.' as an acceptable separator for dates like YYYYYMMDDHHMMSS.XXXXXX
Diffstat (limited to 'sql-common')
-rw-r--r-- | sql-common/my_time.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql-common/my_time.c b/sql-common/my_time.c index 2d3d71e646c..77226da3dc8 100644 --- a/sql-common/my_time.c +++ b/sql-common/my_time.c @@ -145,7 +145,7 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time, digits= (uint) (pos-str); start_loop= 0; /* Start of scan loop */ date_len[format_position[0]]= 0; /* Length of year field */ - if (pos == end) + if (pos == end || *pos == '.') { /* Found date in internal format (only numbers like YYYYMMDD) */ year_length= (digits == 4 || digits == 8 || digits >= 14) ? 4 : 2; |