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
5060fa10
Commit
5060fa10
authored
Nov 22, 2006
by
ramil/ram@myoffice.izhnet.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/usr/home/ram/work/bug22029/my50-bug22029
into mysql.com:/usr/home/ram/work/bug22029/my51-bug22029
parents
6ff8998d
0a415e36
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 @
5060fa10
...
@@ -574,4 +574,13 @@ DATE_FORMAT('%Y-%m-%d %H:%i:%s', 1151414896)
...
@@ -574,4 +574,13 @@ DATE_FORMAT('%Y-%m-%d %H:%i:%s', 1151414896)
NULL
NULL
Warnings:
Warnings:
Warning 1292 Incorrect datetime value: '%Y-%m-%d %H:%i:%s'
Warning 1292 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"
"End of 4.1 tests"
mysql-test/t/date_formats.test
View file @
5060fa10
...
@@ -329,4 +329,12 @@ SELECT TIME_FORMAT("25:00:00", '%l %p');
...
@@ -329,4 +329,12 @@ SELECT TIME_FORMAT("25:00:00", '%l %p');
#
#
SELECT
DATE_FORMAT
(
'%Y-%m-%d %H:%i:%s'
,
1151414896
);
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"
--
echo
"End of 4.1 tests"
sql/item_timefunc.cc
View file @
5060fa10
...
@@ -171,15 +171,16 @@ static bool extract_date_time(DATE_TIME_FORMAT *format,
...
@@ -171,15 +171,16 @@ static bool extract_date_time(DATE_TIME_FORMAT *format,
for
(;
ptr
!=
end
&&
val
!=
val_end
;
ptr
++
)
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
)
if
(
*
ptr
==
'%'
&&
ptr
+
1
!=
end
)
{
{
int
val_len
;
int
val_len
;
char
*
tmp
;
char
*
tmp
;
error
=
0
;
error
=
0
;
/* Skip pre-space between each argument */
while
(
val
!=
val_end
&&
my_isspace
(
cs
,
*
val
))
val
++
;
val_len
=
(
uint
)
(
val_end
-
val
);
val_len
=
(
uint
)
(
val_end
-
val
);
switch
(
*++
ptr
)
{
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