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
ea5cda52
Commit
ea5cda52
authored
Apr 02, 2019
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-18402 Assertion `sec.sec() <= 59' failed in Item_func_maketime::get_date
parent
b9ea778f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletion
+18
-1
mysql-test/main/func_time.result
mysql-test/main/func_time.result
+9
-0
mysql-test/main/func_time.test
mysql-test/main/func_time.test
+8
-0
sql/item_timefunc.cc
sql/item_timefunc.cc
+1
-1
No files found.
mysql-test/main/func_time.result
View file @
ea5cda52
...
...
@@ -6336,3 +6336,12 @@ Warnings:
Warning 1292 Truncated incorrect DECIMAL value: 'foo'
Warning 1292 Truncated incorrect DECIMAL value: 'foo'
SET time_zone=DEFAULT;
#
# MDEV-18402 Assertion `sec.sec() <= 59' failed in Item_func_maketime::get_date
#
SELECT MAKETIME('01', '01', LEAST( -100, NULL ));
MAKETIME('01', '01', LEAST( -100, NULL ))
NULL
SELECT CONCAT(MAKETIME('01', '01', LEAST( -100, NULL )));
CONCAT(MAKETIME('01', '01', LEAST( -100, NULL )))
NULL
mysql-test/main/func_time.test
View file @
ea5cda52
...
...
@@ -3162,3 +3162,11 @@ SELECT TIME('- 01:00:00'), TIME('- 1 01:00:00');
SET
time_zone
=
'+00:00'
;
SELECT
NULLIF
(
FROM_UNIXTIME
(
'foo'
),
'2012-12-12 21:10:14'
);
SET
time_zone
=
DEFAULT
;
--
echo
#
--
echo
# MDEV-18402 Assertion `sec.sec() <= 59' failed in Item_func_maketime::get_date
--
echo
#
SELECT
MAKETIME
(
'01'
,
'01'
,
LEAST
(
-
100
,
NULL
));
SELECT
CONCAT
(
MAKETIME
(
'01'
,
'01'
,
LEAST
(
-
100
,
NULL
)));
sql/item_timefunc.cc
View file @
ea5cda52
...
...
@@ -2595,7 +2595,7 @@ bool Item_func_maketime::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzy
longlong
minute
=
args
[
1
]
->
val_int
();
VSec9
sec
(
thd
,
args
[
2
],
"seconds"
,
59
);
DBUG_ASSERT
(
sec
.
sec
()
<=
59
);
DBUG_ASSERT
(
sec
.
is_null
()
||
sec
.
sec
()
<=
59
);
if
(
args
[
0
]
->
null_value
||
args
[
1
]
->
null_value
||
sec
.
is_null
()
||
minute
<
0
||
minute
>
59
||
sec
.
neg
()
||
sec
.
truncated
())
return
(
null_value
=
1
);
...
...
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