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
2be2b6c3
Commit
2be2b6c3
authored
Aug 31, 2010
by
Alexander Nozdrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cherry-pick patch for Bug#56120 from mysql-5.5-bugfixing.
parent
1c967ab3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
4 deletions
+28
-4
mysql-test/r/func_group.result
mysql-test/r/func_group.result
+11
-1
mysql-test/t/func_group.test
mysql-test/t/func_group.test
+10
-1
sql/item.cc
sql/item.cc
+7
-2
No files found.
mysql-test/r/func_group.result
View file @
2be2b6c3
...
...
@@ -1715,7 +1715,7 @@ drop table t1;
#
End of 5.1 tests
#
# Bug#55648: Server crash on MI
X
/MAX on maximum time value
# Bug#55648: Server crash on MI
N
/MAX on maximum time value
#
CREATE TABLE t1(c1 TIME NOT NULL);
INSERT INTO t1 VALUES('837:59:59');
...
...
@@ -1725,3 +1725,13 @@ MAX(c1)
838:59:59
DROP TABLE t1;
# End of the bug#55648
#
# Bug#56120: Failed assertion on MIN/MAX on negative time value
#
CREATE TABLE t1(c1 TIME NOT NULL);
INSERT INTO t1 VALUES('-00:00:01');
SELECT MAX(c1),MIN(c1) FROM t1;
MAX(c1) MIN(c1)
-00:00:01 -00:00:01
DROP TABLE t1;
# End of the bug#56120
mysql-test/t/func_group.test
View file @
2be2b6c3
...
...
@@ -1086,7 +1086,7 @@ drop table t1;
--
echo
End
of
5.1
tests
--
echo
#
--
echo
# Bug#55648: Server crash on MI
X
/MAX on maximum time value
--
echo
# Bug#55648: Server crash on MI
N
/MAX on maximum time value
--
echo
#
CREATE
TABLE
t1
(
c1
TIME
NOT
NULL
);
INSERT
INTO
t1
VALUES
(
'837:59:59'
);
...
...
@@ -1095,3 +1095,12 @@ SELECT MAX(c1) FROM t1;
DROP
TABLE
t1
;
--
echo
# End of the bug#55648
--
echo
#
--
echo
# Bug#56120: Failed assertion on MIN/MAX on negative time value
--
echo
#
CREATE
TABLE
t1
(
c1
TIME
NOT
NULL
);
INSERT
INTO
t1
VALUES
(
'-00:00:01'
);
SELECT
MAX
(
c1
),
MIN
(
c1
)
FROM
t1
;
DROP
TABLE
t1
;
--
echo
# End of the bug#56120
sql/item.cc
View file @
2be2b6c3
...
...
@@ -7510,9 +7510,14 @@ String *Item_cache_datetime::val_str(String *str)
return
NULL
;
if
(
cached_field_type
==
MYSQL_TYPE_TIME
)
{
ulonglong
time
=
int_value
;
DBUG_ASSERT
(
time
<=
TIME_MAX_VALUE
);
longlong
time
=
int_value
;
set_zero_time
(
&
ltime
,
MYSQL_TIMESTAMP_TIME
);
if
(
time
<
0
)
{
time
=
-
time
;
ltime
.
neg
=
TRUE
;
}
DBUG_ASSERT
(
time
<=
TIME_MAX_VALUE
);
ltime
.
second
=
time
%
100
;
time
/=
100
;
ltime
.
minute
=
time
%
100
;
...
...
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