Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
711b6a63
Commit
711b6a63
authored
Nov 22, 2006
by
ramil/ram@mysql.com/myoffice.izhnet.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into mysql.com:/usr/home/ram/work/bug22029/my50-bug22029
parents
e2a6759c
b1a423d9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
3 deletions
+21
-3
mysql-test/r/date_formats.result
mysql-test/r/date_formats.result
+9
-0
mysql-test/t/date_formats.test
mysql-test/t/date_formats.test
+8
-0
sql/item_timefunc.cc
sql/item_timefunc.cc
+4
-3
No files found.
mysql-test/r/date_formats.result
View file @
711b6a63
...
...
@@ -571,4 +571,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"
mysql-test/t/date_formats.test
View file @
711b6a63
...
...
@@ -326,4 +326,12 @@ SELECT TIME_FORMAT("25:00:00", '%l %p');
#
SELECT
DATE_FORMAT
(
'%Y-%m-%d %H:%i:%s'
,
1151414896
);
#
# Bug #22029: str_to_date returning NULL
#
select
str_to_date
(
'04 /30/2004'
,
'%m /%d/%Y'
);
select
str_to_date
(
'04/30 /2004'
,
'%m /%d /%Y'
);
select
str_to_date
(
'04/30/2004 '
,
'%m/%d/%Y '
);
--
echo
"End of 4.1 tests"
sql/item_timefunc.cc
View file @
711b6a63
...
...
@@ -290,15 +290,16 @@ static bool extract_date_time(DATE_TIME_FORMAT *format,
for
(;
ptr
!=
end
&&
val
!=
val_end
;
ptr
++
)
{
/* Skip pre-space between each argument */
while
(
val
!=
val_end
&&
my_isspace
(
cs
,
*
val
))
val
++
;
if
(
*
ptr
==
'%'
&&
ptr
+
1
!=
end
)
{
int
val_len
;
char
*
tmp
;
error
=
0
;
/* Skip pre-space between each argument */
while
(
val
!=
val_end
&&
my_isspace
(
cs
,
*
val
))
val
++
;
val_len
=
(
uint
)
(
val_end
-
val
);
switch
(
*++
ptr
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment