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
80b443f3
Commit
80b443f3
authored
Feb 06, 2009
by
Timothy Smith
Browse files
Options
Browse Files
Download
Plain Diff
Auto merge fix for Bug 42525 from 5.0-bugteam
parents
41ce20ad
0eca4824
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
0 deletions
+33
-0
mysql-test/r/func_sapdb.result
mysql-test/r/func_sapdb.result
+14
-0
mysql-test/t/func_sapdb.test
mysql-test/t/func_sapdb.test
+18
-0
sql/item_timefunc.h
sql/item_timefunc.h
+1
-0
No files found.
mysql-test/r/func_sapdb.result
View file @
80b443f3
...
@@ -268,3 +268,17 @@ timediff('2008-09-29 20:10:10','2008-09-30 20:10:10')<time('00:00:00')
...
@@ -268,3 +268,17 @@ timediff('2008-09-29 20:10:10','2008-09-30 20:10:10')<time('00:00:00')
SELECT CAST(time('-73:42:12') AS DECIMAL);
SELECT CAST(time('-73:42:12') AS DECIMAL);
CAST(time('-73:42:12') AS DECIMAL)
CAST(time('-73:42:12') AS DECIMAL)
-734212
-734212
SELECT TIMEDIFF(TIME('17:00:00'),TIME('17:00:00'))=TIME('00:00:00') AS 1Eq,
TIMEDIFF(TIME('17:59:00'),TIME('17:00:00'))=TIME('00:00:00') AS 1NEq1,
TIMEDIFF(TIME('18:00:00'),TIME('17:00:00'))=TIME('00:00:00') AS 1NEq2,
TIMEDIFF(TIME('17:00:00'),TIME('17:00:00'))= '00:00:00' AS 2Eq,
TIMEDIFF(TIME('17:59:00'),TIME('17:00:00'))= '00:00:00' AS 2NEq1,
TIMEDIFF(TIME('18:00:00'),TIME('17:00:00'))= '00:00:00' AS 2NEq2,
TIMEDIFF(TIME('17:00:00'),TIME('17:00:00'))=TIME(0) AS 3Eq,
TIMEDIFF(TIME('17:59:00'),TIME('17:00:00'))=TIME(0) AS 3NEq1,
TIMEDIFF(TIME('18:00:00'),TIME('17:00:00'))=TIME(0) AS 3NEq2,
TIME(0) AS Time0, TIME('00:00:00') AS Time00, '00:00:00' AS Literal0000,
TIMEDIFF(TIME('17:59:00'),TIME('17:00:00')),
TIMEDIFF(TIME('17:00:00'),TIME('17:59:00'));
1Eq 1NEq1 1NEq2 2Eq 2NEq1 2NEq2 3Eq 3NEq1 3NEq2 Time0 Time00 Literal0000 TIMEDIFF(TIME('17:59:00'),TIME('17:00:00')) TIMEDIFF(TIME('17:00:00'),TIME('17:59:00'))
1 0 0 1 0 0 1 0 0 00:00:00 00:00:00 00:00:00 00:59:00 -00:59:00
mysql-test/t/func_sapdb.test
View file @
80b443f3
...
@@ -151,4 +151,22 @@ select timediff('2008-09-29 20:10:10','2008-09-30 20:10:10')<time('00:00:00');
...
@@ -151,4 +151,22 @@ select timediff('2008-09-29 20:10:10','2008-09-30 20:10:10')<time('00:00:00');
SELECT
CAST
(
time
(
'-73:42:12'
)
AS
DECIMAL
);
SELECT
CAST
(
time
(
'-73:42:12'
)
AS
DECIMAL
);
#
# Bug#42525 - TIMEDIFF function
#
SELECT
TIMEDIFF
(
TIME
(
'17:00:00'
),
TIME
(
'17:00:00'
))
=
TIME
(
'00:00:00'
)
AS
1
Eq
,
TIMEDIFF
(
TIME
(
'17:59:00'
),
TIME
(
'17:00:00'
))
=
TIME
(
'00:00:00'
)
AS
1
NEq1
,
TIMEDIFF
(
TIME
(
'18:00:00'
),
TIME
(
'17:00:00'
))
=
TIME
(
'00:00:00'
)
AS
1
NEq2
,
TIMEDIFF
(
TIME
(
'17:00:00'
),
TIME
(
'17:00:00'
))
=
'00:00:00'
AS
2
Eq
,
TIMEDIFF
(
TIME
(
'17:59:00'
),
TIME
(
'17:00:00'
))
=
'00:00:00'
AS
2
NEq1
,
TIMEDIFF
(
TIME
(
'18:00:00'
),
TIME
(
'17:00:00'
))
=
'00:00:00'
AS
2
NEq2
,
TIMEDIFF
(
TIME
(
'17:00:00'
),
TIME
(
'17:00:00'
))
=
TIME
(
0
)
AS
3
Eq
,
TIMEDIFF
(
TIME
(
'17:59:00'
),
TIME
(
'17:00:00'
))
=
TIME
(
0
)
AS
3
NEq1
,
TIMEDIFF
(
TIME
(
'18:00:00'
),
TIME
(
'17:00:00'
))
=
TIME
(
0
)
AS
3
NEq2
,
TIME
(
0
)
AS
Time0
,
TIME
(
'00:00:00'
)
AS
Time00
,
'00:00:00'
AS
Literal0000
,
TIMEDIFF
(
TIME
(
'17:59:00'
),
TIME
(
'17:00:00'
)),
TIMEDIFF
(
TIME
(
'17:00:00'
),
TIME
(
'17:59:00'
));
# End of 5.0 tests
# End of 5.0 tests
sql/item_timefunc.h
View file @
80b443f3
...
@@ -398,6 +398,7 @@ public:
...
@@ -398,6 +398,7 @@ public:
{
{
return
save_time_in_field
(
field
);
return
save_time_in_field
(
field
);
}
}
longlong
val_int
()
{
return
val_int_from_decimal
();
}
bool
result_as_longlong
()
{
return
TRUE
;
}
bool
result_as_longlong
()
{
return
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