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
b20deca6
Commit
b20deca6
authored
Sep 16, 2013
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Plain Diff
Merge from 5.3
parents
6a5f07ee
5464e904
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
0 deletions
+41
-0
mysql-test/r/func_time.result
mysql-test/r/func_time.result
+23
-0
mysql-test/t/func_time.test
mysql-test/t/func_time.test
+18
-0
No files found.
mysql-test/r/func_time.result
View file @
b20deca6
...
...
@@ -2255,6 +2255,29 @@ SELECT CONVERT_TZ('2001-01-01 10:20:30.12','+00:00','+01:00');
CONVERT_TZ('2001-01-01 10:20:30.12','+00:00','+01:00')
2001-01-01 11:20:30.12
#
# MDEV-4861 TIME/DATETIME arithmetics does not preserve INTERVAL precision
#
CREATE TABLE t1 (t0 TIME);
INSERT INTO t1 VALUES ('00:00:00');
SELECT t0 + INTERVAL 1.1 SECOND FROM t1;
t0 + INTERVAL 1.1 SECOND
00:00:01.1
CREATE TABLE t2 AS SELECT t0 + INTERVAL 1.1 SECOND FROM t1;
SHOW COLUMNS FROM t2;
Field Type Null Key Default Extra
t0 + INTERVAL 1.1 SECOND time(1) YES NULL
DROP TABLE t1,t2;
CREATE TABLE t1 (t0 DATETIME);
INSERT INTO t1 VALUES ('2001-01-01 00:00:00');
SELECT t0 + INTERVAL 1.1 SECOND FROM t1;
t0 + INTERVAL 1.1 SECOND
2001-01-01 00:00:01.1
CREATE TABLE t2 AS SELECT t0 + INTERVAL 1.1 SECOND FROM t1;
SHOW COLUMNS FROM t2;
Field Type Null Key Default Extra
t0 + INTERVAL 1.1 SECOND datetime(1) YES NULL
DROP TABLE t1, t2;
#
# MDEV-4843 Wrong data type for TIMESTAMP('2001-01-01','10:10:10')
#
CREATE TABLE t1 AS SELECT
...
...
mysql-test/t/func_time.test
View file @
b20deca6
...
...
@@ -1376,6 +1376,24 @@ SELECT DATE_ADD('2001-01-01 00:00:00', INTERVAL -1.123456 SECOND);
SELECT
DATE_ADD
(
'2001-01-01 00:00:00'
,
INTERVAL
'xxx'
SECOND
);
SELECT
CONVERT_TZ
(
'2001-01-01 10:20:30.12'
,
'+00:00'
,
'+01:00'
);
--
echo
#
--
echo
# MDEV-4861 TIME/DATETIME arithmetics does not preserve INTERVAL precision
--
echo
#
CREATE
TABLE
t1
(
t0
TIME
);
INSERT
INTO
t1
VALUES
(
'00:00:00'
);
SELECT
t0
+
INTERVAL
1.1
SECOND
FROM
t1
;
CREATE
TABLE
t2
AS
SELECT
t0
+
INTERVAL
1.1
SECOND
FROM
t1
;
SHOW
COLUMNS
FROM
t2
;
DROP
TABLE
t1
,
t2
;
CREATE
TABLE
t1
(
t0
DATETIME
);
INSERT
INTO
t1
VALUES
(
'2001-01-01 00:00:00'
);
SELECT
t0
+
INTERVAL
1.1
SECOND
FROM
t1
;
CREATE
TABLE
t2
AS
SELECT
t0
+
INTERVAL
1.1
SECOND
FROM
t1
;
SHOW
COLUMNS
FROM
t2
;
DROP
TABLE
t1
,
t2
;
--
echo
#
--
echo
# MDEV-4843 Wrong data type for TIMESTAMP('2001-01-01','10:10:10')
--
echo
#
...
...
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