You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-4674 Fix ColumnStore to run MTR tests in a build directory
This commit is contained in:
40
mysql-test/columnstore/basic/r/func_period_diff.result
Normal file
40
mysql-test/columnstore/basic/r/func_period_diff.result
Normal file
@ -0,0 +1,40 @@
|
||||
#
|
||||
# MCOL-4668 PERIOD_DIFF(dec_or_double1,dec_or_double2) is not as in InnoDB
|
||||
#
|
||||
# Narrow decimal rounding
|
||||
CREATE TABLE t1 (a DECIMAL(18,1));
|
||||
INSERT INTO t1 VALUES (200101.9);
|
||||
SELECT PERIOD_DIFF(a, 200101) FROM t1;
|
||||
PERIOD_DIFF(a, 200101)
|
||||
1
|
||||
DROP TABLE t1;
|
||||
# Wide decimal rounding
|
||||
CREATE TABLE t1 (a DECIMAL(30,1));
|
||||
INSERT INTO t1 VALUES (200101.9);
|
||||
SELECT PERIOD_DIFF(a, 200101) FROM t1;
|
||||
PERIOD_DIFF(a, 200101)
|
||||
1
|
||||
DROP TABLE t1;
|
||||
# Huge narrow decimal
|
||||
CREATE TABLE t1 (a DECIMAL(18,0));
|
||||
INSERT INTO t1 VALUES (999999999999999999);
|
||||
SELECT a, PERIOD_DIFF(200101,a) FROM t1;
|
||||
a PERIOD_DIFF(200101,a)
|
||||
999999999999999999 24012
|
||||
DROP TABLE t1;
|
||||
# Huge wide decimal
|
||||
CREATE TABLE t1 (a DECIMAL(30,0));
|
||||
INSERT INTO t1 VALUES (9223372036854775807);
|
||||
SELECT a, PERIOD_DIFF(200101,a) FROM t1;
|
||||
a PERIOD_DIFF(200101,a)
|
||||
9223372036854775807 24012
|
||||
DROP TABLE t1;
|
||||
# Huge double
|
||||
CREATE TABLE t1 (a DOUBLE);
|
||||
INSERT INTO t1 VALUES (9223372036854775807.0-1000);
|
||||
INSERT INTO t1 VALUES (9223372036854775807.0+1000);
|
||||
SELECT a, PERIOD_DIFF(200101,a) FROM t1 ORDER BY 2;
|
||||
a PERIOD_DIFF(200101,a)
|
||||
9.223372036854775e18 24012
|
||||
9.223372036854776e18 24012
|
||||
DROP TABLE t1;
|
Reference in New Issue
Block a user