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
726af26a
Commit
726af26a
authored
Nov 29, 2006
by
ramil/ram@myoffice.izhnet.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/usr/home/ram/work/bug22229/my50-bug22229
into mysql.com:/usr/home/ram/work/bug22229/my51-bug22229
parents
0d9046ca
d39a0124
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
mysql-test/r/func_time.result
mysql-test/r/func_time.result
+3
-0
mysql-test/t/func_time.test
mysql-test/t/func_time.test
+6
-0
sql/item_timefunc.cc
sql/item_timefunc.cc
+3
-1
No files found.
mysql-test/r/func_time.result
View file @
726af26a
...
@@ -1151,6 +1151,9 @@ id day id day
...
@@ -1151,6 +1151,9 @@ id day id day
3 2005-07-01 3 2005-07-15
3 2005-07-01 3 2005-07-15
DROP TABLE t1,t2;
DROP TABLE t1,t2;
set time_zone= @@global.time_zone;
set time_zone= @@global.time_zone;
select str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE;
str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE
NULL
End of 5.0 tests
End of 5.0 tests
select date_sub("0050-01-01 00:00:01",INTERVAL 2 SECOND);
select date_sub("0050-01-01 00:00:01",INTERVAL 2 SECOND);
date_sub("0050-01-01 00:00:01",INTERVAL 2 SECOND)
date_sub("0050-01-01 00:00:01",INTERVAL 2 SECOND)
...
...
mysql-test/t/func_time.test
View file @
726af26a
...
@@ -653,6 +653,12 @@ DROP TABLE t1,t2;
...
@@ -653,6 +653,12 @@ DROP TABLE t1,t2;
# Restore timezone to default
# Restore timezone to default
set
time_zone
=
@@
global
.
time_zone
;
set
time_zone
=
@@
global
.
time_zone
;
#
# Bug #22229: bug in DATE_ADD()
#
select
str_to_date
(
'10:00 PM'
,
'%h:%i %p'
)
+
INTERVAL
10
MINUTE
;
--
echo
End
of
5.0
tests
--
echo
End
of
5.0
tests
#
#
...
...
sql/item_timefunc.cc
View file @
726af26a
...
@@ -3202,7 +3202,9 @@ bool Item_func_str_to_date::get_date(TIME *ltime, uint fuzzy_date)
...
@@ -3202,7 +3202,9 @@ bool Item_func_str_to_date::get_date(TIME *ltime, uint fuzzy_date)
date_time_format
.
format
.
str
=
(
char
*
)
format
->
ptr
();
date_time_format
.
format
.
str
=
(
char
*
)
format
->
ptr
();
date_time_format
.
format
.
length
=
format
->
length
();
date_time_format
.
format
.
length
=
format
->
length
();
if
(
extract_date_time
(
&
date_time_format
,
val
->
ptr
(),
val
->
length
(),
if
(
extract_date_time
(
&
date_time_format
,
val
->
ptr
(),
val
->
length
(),
ltime
,
cached_timestamp_type
,
0
,
"datetime"
))
ltime
,
cached_timestamp_type
,
0
,
"datetime"
)
||
((
fuzzy_date
&
TIME_NO_ZERO_DATE
)
&&
(
ltime
->
year
==
0
||
ltime
->
month
==
0
||
ltime
->
day
==
0
)))
goto
null_date
;
goto
null_date
;
if
(
cached_timestamp_type
==
MYSQL_TIMESTAMP_TIME
&&
ltime
->
day
)
if
(
cached_timestamp_type
==
MYSQL_TIMESTAMP_TIME
&&
ltime
->
day
)
{
{
...
...
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