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
6f541851
Commit
6f541851
authored
Nov 04, 2009
by
Magne Mahre
Browse files
Options
Browse Files
Download
Plain Diff
Backport to 5.6.0
parents
9c5a8637
2e17ce5d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
24 deletions
+26
-24
mysql-test/r/func_sapdb.result
mysql-test/r/func_sapdb.result
+16
-16
mysql-test/t/func_sapdb.test
mysql-test/t/func_sapdb.test
+10
-8
No files found.
mysql-test/r/func_sapdb.result
View file @
6f541851
...
...
@@ -282,33 +282,33 @@ 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
SELECT sec_to_time(3020399)=
time
('838:59:59');
sec_to_time(3020399)=
time
('838:59:59')
SELECT sec_to_time(3020399)=
TIME
('838:59:59');
sec_to_time(3020399)=
TIME
('838:59:59')
1
SELECT sec_to_time(-3020399)=
time
('-838:59:59');
sec_to_time(-3020399)=
time
('-838:59:59')
SELECT sec_to_time(-3020399)=
TIME
('-838:59:59');
sec_to_time(-3020399)=
TIME
('-838:59:59')
1
SELECT sec_to_time(-3020399)='-838:59:59';
sec_to_time(-3020399)='-838:59:59'
1
SELECT time(sec_to_time(-3020399))=
time
('-838:59:59');
time(sec_to_time(-3020399))=
time
('-838:59:59')
SELECT time(sec_to_time(-3020399))=
TIME
('-838:59:59');
time(sec_to_time(-3020399))=
TIME
('-838:59:59')
1
SELECT time(sec_to_time(-3020399))=
time
('-838:59:58');
time(sec_to_time(-3020399))=
time
('-838:59:58')
SELECT time(sec_to_time(-3020399))=
TIME
('-838:59:58');
time(sec_to_time(-3020399))=
TIME
('-838:59:58')
0
SELECT maketime(-1,0,1)='-01:00:01';
maketime(-1,0,1)='-01:00:01'
1
SELECT TIME(maketime(-1,0,1))=
TIME('-01:00:01'
);
TIME(maketime(-1,0,1))=
TIME('-01:00:01'
)
SELECT TIME(maketime(-1,0,1))=
CAST('-01:00:01' AS TIME
);
TIME(maketime(-1,0,1))=
CAST('-01:00:01' AS TIME
)
1
SELECT maketime(-1,0,1)=
TIME('-01:00:01'
);
maketime(-1,0,1)=
TIME('-01:00:01'
)
SELECT maketime(-1,0,1)=
CAST('-01:00:01' AS TIME
);
maketime(-1,0,1)=
CAST('-01:00:01' AS TIME
)
1
SELECT maketime(1,0,1)=
TIME('01:00:01'
);
maketime(1,0,1)=
TIME('01:00:01'
)
SELECT maketime(1,0,1)=
CAST('01:00:01' AS TIME
);
maketime(1,0,1)=
CAST('01:00:01' AS TIME
)
1
SELECT maketime(1,0,1)=
TIME('01:00:02'
);
maketime(1,0,1)=
TIME('01:00:02'
)
SELECT maketime(1,0,1)=
CAST('01:00:02' AS TIME
);
maketime(1,0,1)=
CAST('01:00:02' AS TIME
)
0
mysql-test/t/func_sapdb.test
View file @
6f541851
...
...
@@ -173,20 +173,22 @@ SELECT TIMEDIFF(TIME('17:00:00'),TIME('17:00:00'))=TIME('00:00:00') AS 1Eq,
# Bug#42661 - sec_to_time() and signedness
#
SELECT
sec_to_time
(
3020399
)
=
time
(
'838:59:59'
);
SELECT
sec_to_time
(
-
3020399
)
=
time
(
'-838:59:59'
);
SELECT
sec_to_time
(
3020399
)
=
TIME
(
'838:59:59'
);
SELECT
sec_to_time
(
-
3020399
)
=
TIME
(
'-838:59:59'
);
SELECT
sec_to_time
(
-
3020399
)
=
'-838:59:59'
;
SELECT
time
(
sec_to_time
(
-
3020399
))
=
time
(
'-838:59:59'
);
SELECT
time
(
sec_to_time
(
-
3020399
))
=
time
(
'-838:59:58'
);
SELECT
time
(
sec_to_time
(
-
3020399
))
=
TIME
(
'-838:59:59'
);
SELECT
time
(
sec_to_time
(
-
3020399
))
=
TIME
(
'-838:59:58'
);
#
# Bug#42662 - maketime() and signedness
#
# TIME(...) and CAST(... AS TIME) go through the same code-path here,
# but we'll explicitly show show that both work in case the ever changes.
SELECT
maketime
(
-
1
,
0
,
1
)
=
'-01:00:01'
;
SELECT
TIME
(
maketime
(
-
1
,
0
,
1
))
=
TIME
(
'-01:00:01'
);
SELECT
maketime
(
-
1
,
0
,
1
)
=
TIME
(
'-01:00:01'
);
SELECT
maketime
(
1
,
0
,
1
)
=
TIME
(
'01:00:01'
);
SELECT
maketime
(
1
,
0
,
1
)
=
TIME
(
'01:00:02'
);
SELECT
TIME
(
maketime
(
-
1
,
0
,
1
))
=
CAST
(
'-01:00:01'
AS
TIME
);
SELECT
maketime
(
-
1
,
0
,
1
)
=
CAST
(
'-01:00:01'
AS
TIME
);
SELECT
maketime
(
1
,
0
,
1
)
=
CAST
(
'01:00:01'
AS
TIME
);
SELECT
maketime
(
1
,
0
,
1
)
=
CAST
(
'01:00:02'
AS
TIME
);
# End of 5.0 tests
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