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
07cb53c5
Commit
07cb53c5
authored
Jul 23, 2014
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Plain Diff
Merge 5.3->5.5
parents
be002655
80708da1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
1 deletion
+25
-1
mysql-test/r/func_time.result
mysql-test/r/func_time.result
+15
-0
mysql-test/t/func_time.test
mysql-test/t/func_time.test
+9
-0
sql/item_func.cc
sql/item_func.cc
+1
-1
No files found.
mysql-test/r/func_time.result
View file @
07cb53c5
...
@@ -2416,3 +2416,18 @@ c1 c2
...
@@ -2416,3 +2416,18 @@ c1 c2
9923-03-10 22:47:10.0 NULL
9923-03-10 22:47:10.0 NULL
Warnings:
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: '2000000000000000000.0'
Warning 1292 Truncated incorrect DECIMAL value: '2000000000000000000.0'
#
# MDEV-5750 Assertion `ltime->year == 0' fails on a query with EXTRACT DAY_MINUTE and TIME column
#
CREATE TABLE t1 ( d DATE, t TIME );
INSERT INTO t1 VALUES ('2008-12-05','22:34:09'),('2005-03-27','14:26:02');
SELECT EXTRACT(DAY_MINUTE FROM GREATEST(t,d)), GREATEST(t,d) FROM t1;
EXTRACT(DAY_MINUTE FROM GREATEST(t,d)) GREATEST(t,d)
342259 838:59:59
342259 838:59:59
Warnings:
Warning 1292 Truncated incorrect time value: '9336:00:00'
Warning 1292 Truncated incorrect time value: '9336:00:00'
Warning 1292 Truncated incorrect time value: '2952:00:00'
Warning 1292 Truncated incorrect time value: '2952:00:00'
DROP TABLE t1;
mysql-test/t/func_time.test
View file @
07cb53c5
...
@@ -1472,3 +1472,12 @@ DROP TABLE t1;
...
@@ -1472,3 +1472,12 @@ DROP TABLE t1;
--
echo
# MDEV-6099 Bad results for DATE_ADD(.., INTERVAL 2000000000000000000.0 SECOND)
--
echo
# MDEV-6099 Bad results for DATE_ADD(.., INTERVAL 2000000000000000000.0 SECOND)
--
echo
#
--
echo
#
SELECT
DATE_ADD
(
'2001-01-01 10:20:30'
,
INTERVAL
250000000000.0
SECOND
)
AS
c1
,
DATE_ADD
(
'2001-01-01 10:20:30'
,
INTERVAL
2000000000000000000.0
SECOND
)
AS
c2
;
SELECT
DATE_ADD
(
'2001-01-01 10:20:30'
,
INTERVAL
250000000000.0
SECOND
)
AS
c1
,
DATE_ADD
(
'2001-01-01 10:20:30'
,
INTERVAL
2000000000000000000.0
SECOND
)
AS
c2
;
--
echo
#
--
echo
# MDEV-5750 Assertion `ltime->year == 0' fails on a query with EXTRACT DAY_MINUTE and TIME column
--
echo
#
CREATE
TABLE
t1
(
d
DATE
,
t
TIME
);
INSERT
INTO
t1
VALUES
(
'2008-12-05'
,
'22:34:09'
),(
'2005-03-27'
,
'14:26:02'
);
SELECT
EXTRACT
(
DAY_MINUTE
FROM
GREATEST
(
t
,
d
)),
GREATEST
(
t
,
d
)
FROM
t1
;
DROP
TABLE
t1
;
sql/item_func.cc
View file @
07cb53c5
...
@@ -2960,7 +2960,7 @@ bool Item_func_min_max::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
...
@@ -2960,7 +2960,7 @@ bool Item_func_min_max::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
{
{
ltime
->
time_type
=
MYSQL_TIMESTAMP_TIME
;
ltime
->
time_type
=
MYSQL_TIMESTAMP_TIME
;
ltime
->
hour
+=
(
ltime
->
month
*
32
+
ltime
->
day
)
*
24
;
ltime
->
hour
+=
(
ltime
->
month
*
32
+
ltime
->
day
)
*
24
;
ltime
->
month
=
ltime
->
day
=
0
;
ltime
->
year
=
ltime
->
month
=
ltime
->
day
=
0
;
if
(
adjust_time_range_with_warn
(
ltime
,
if
(
adjust_time_range_with_warn
(
ltime
,
min
(
decimals
,
TIME_SECOND_PART_DIGITS
)))
min
(
decimals
,
TIME_SECOND_PART_DIGITS
)))
return
(
null_value
=
true
);
return
(
null_value
=
true
);
...
...
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