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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
e9db0da7
Commit
e9db0da7
authored
Aug 08, 2013
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-4653 Wrong result for CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5')
parent
e6a6f653
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
2 deletions
+41
-2
mysql-test/r/timezone2.result
mysql-test/r/timezone2.result
+19
-0
mysql-test/t/timezone2.test
mysql-test/t/timezone2.test
+16
-0
sql/item_timefunc.cc
sql/item_timefunc.cc
+6
-2
No files found.
mysql-test/r/timezone2.result
View file @
e9db0da7
...
@@ -309,3 +309,22 @@ CONVERT_TZ(1, 1, a)
...
@@ -309,3 +309,22 @@ CONVERT_TZ(1, 1, a)
NULL
NULL
DROP TABLE t1;
DROP TABLE t1;
End of 5.1 tests
End of 5.1 tests
#
# Start of 5.3 tests
#
#
# MDEV-4653 Wrong result for CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5')
#
SELECT CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5');
CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5')
NULL
Warnings:
Warning 1292 Incorrect datetime value: '00:00:00'
SELECT CONVERT_TZ(TIME('2010-01-01 00:00:00'),'+00:00','+7:5');
CONVERT_TZ(TIME('2010-01-01 00:00:00'),'+00:00','+7:5')
NULL
Warnings:
Warning 1292 Incorrect datetime value: '00:00:00'
#
# End of 5.3 tests
#
mysql-test/t/timezone2.test
View file @
e9db0da7
...
@@ -284,3 +284,19 @@ SELECT CONVERT_TZ(1, 1, a) FROM t1;
...
@@ -284,3 +284,19 @@ SELECT CONVERT_TZ(1, 1, a) FROM t1;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
--
echo
End
of
5.1
tests
--
echo
End
of
5.1
tests
--
echo
#
--
echo
# Start of 5.3 tests
--
echo
#
--
echo
#
--
echo
# MDEV-4653 Wrong result for CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5')
--
echo
#
SELECT
CONVERT_TZ
(
TIME
(
'00:00:00'
),
'+00:00'
,
'+7:5'
);
SELECT
CONVERT_TZ
(
TIME
(
'2010-01-01 00:00:00'
),
'+00:00'
,
'+7:5'
);
--
echo
#
--
echo
# End of 5.3 tests
--
echo
#
sql/item_timefunc.cc
View file @
e9db0da7
...
@@ -1923,7 +1923,9 @@ bool Item_date_add_interval::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
...
@@ -1923,7 +1923,9 @@ bool Item_date_add_interval::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
{
{
INTERVAL
interval
;
INTERVAL
interval
;
if
(
args
[
0
]
->
get_date
(
ltime
,
0
)
||
if
(
args
[
0
]
->
get_date
(
ltime
,
cached_field_type
==
MYSQL_TYPE_TIME
?
TIME_TIME_ONLY
:
0
)
||
get_interval_value
(
args
[
1
],
int_type
,
&
value
,
&
interval
))
get_interval_value
(
args
[
1
],
int_type
,
&
value
,
&
interval
))
return
(
null_value
=
1
);
return
(
null_value
=
1
);
...
@@ -2301,7 +2303,9 @@ bool Item_time_typecast::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
...
@@ -2301,7 +2303,9 @@ bool Item_time_typecast::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
if
(
ltime
->
time_type
!=
MYSQL_TIMESTAMP_TIME
)
if
(
ltime
->
time_type
!=
MYSQL_TIMESTAMP_TIME
)
ltime
->
year
=
ltime
->
month
=
ltime
->
day
=
0
;
ltime
->
year
=
ltime
->
month
=
ltime
->
day
=
0
;
ltime
->
time_type
=
MYSQL_TIMESTAMP_TIME
;
ltime
->
time_type
=
MYSQL_TIMESTAMP_TIME
;
return
0
;
return
(
fuzzy_date
&
TIME_TIME_ONLY
)
?
0
:
(
null_value
=
check_date_with_warn
(
ltime
,
fuzzy_date
,
MYSQL_TIMESTAMP_ERROR
));
}
}
...
...
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