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
1d464591
Commit
1d464591
authored
Feb 07, 2009
by
Timothy Smith
Browse files
Options
Browse Files
Download
Plain Diff
Auto-merge up from 5.0
parents
0b07f61a
8f522189
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
1 deletion
+34
-1
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
netware/Makefile.am
netware/Makefile.am
+1
-1
sql/item_timefunc.h
sql/item_timefunc.h
+1
-0
No files found.
mysql-test/r/func_sapdb.result
View file @
1d464591
...
...
@@ -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);
CAST(time('-73:42:12') AS DECIMAL)
-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 @
1d464591
...
...
@@ -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
);
#
# 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
netware/Makefile.am
View file @
1d464591
...
...
@@ -94,7 +94,7 @@ EXTRA_DIST= $(BUILT_SOURCES) comp_err.def install_test_db.ncf \
BUILD/compile-netware-standard BUILD/create-patch
\
BUILD/cron-build BUILD/crontab BUILD/knetware.imp
\
BUILD/mwasmnlm BUILD/mwccnlm BUILD/mwenv BUILD/mwldnlm
\
BUILD/nwb
ootstrap
BUILD/openssl.imp BUILD/save-patch
BUILD/nwb
uild
BUILD/openssl.imp BUILD/save-patch
endif
...
...
sql/item_timefunc.h
View file @
1d464591
...
...
@@ -419,6 +419,7 @@ class Item_str_timefunc :public Item_str_func
{
return
save_time_in_field
(
field
);
}
longlong
val_int
()
{
return
val_int_from_decimal
();
}
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