diff options
author | unknown <ramil/ram@mysql.com/myoffice.izhnet.ru> | 2006-10-05 15:29:00 +0500 |
---|---|---|
committer | unknown <ramil/ram@mysql.com/myoffice.izhnet.ru> | 2006-10-05 15:29:00 +0500 |
commit | 89a4a3e92c91a403740f1f2cdd057ab63afeef46 (patch) | |
tree | 01e23ee67e9e0f6fe3075028754bdbbcdda3aebe /mysql-test/r/date_formats.result | |
parent | 78f47b1b1080833241860c6213854fe04487ff12 (diff) | |
download | mariadb-git-89a4a3e92c91a403740f1f2cdd057ab63afeef46.tar.gz |
Fix for bug #22029: str_to_date returning NULL, while date_format works using identical format.
The problem appears when we have a space followed by a non-format symbol.
Fix: properly skip spaces.
mysql-test/r/date_formats.result:
Fix for bug #22029: str_to_date returning NULL, while date_format works using identical format.
- test result.
mysql-test/t/date_formats.test:
Fix for bug #22029: str_to_date returning NULL, while date_format works using identical format.
- test case.
sql/item_timefunc.cc:
Fix for bug #22029: str_to_date returning NULL, while date_format works using identical format.
- skipping pre-spaces between each argument moved.
Diffstat (limited to 'mysql-test/r/date_formats.result')
-rw-r--r-- | mysql-test/r/date_formats.result | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/r/date_formats.result b/mysql-test/r/date_formats.result index 035d98d2b74..07cc37fe6bc 100644 --- a/mysql-test/r/date_formats.result +++ b/mysql-test/r/date_formats.result @@ -530,4 +530,13 @@ DATE_FORMAT('%Y-%m-%d %H:%i:%s', 1151414896) NULL Warnings: Warning 1292 Truncated incorrect datetime value: '%Y-%m-%d %H:%i:%s' +select str_to_date('04 /30/2004', '%m /%d/%Y'); +str_to_date('04 /30/2004', '%m /%d/%Y') +2004-04-30 +select str_to_date('04/30 /2004', '%m /%d /%Y'); +str_to_date('04/30 /2004', '%m /%d /%Y') +2004-04-30 +select str_to_date('04/30/2004 ', '%m/%d/%Y '); +str_to_date('04/30/2004 ', '%m/%d/%Y ') +2004-04-30 "End of 4.1 tests" |