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
c6e856de
Commit
c6e856de
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-4.1-maint
into mysql.com:/usr/home/ram/work/bug22029/my41-bug22029
parents
611540db
5df9ec9a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
4 deletions
+21
-4
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
-4
No files found.
mysql-test/r/date_formats.result
View file @
c6e856de
...
...
@@ -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"
mysql-test/t/date_formats.test
View file @
c6e856de
...
...
@@ -317,4 +317,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 @
c6e856de
...
...
@@ -289,15 +289,15 @@ 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
;
/* Skip pre-space between each argument */
while
(
val
!=
val_end
&&
my_isspace
(
cs
,
*
val
))
val
++
;
val_len
=
(
uint
)
(
val_end
-
val
);
switch
(
*++
ptr
)
{
/* Year */
...
...
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