You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
MCOL-4674 Fix ColumnStore to run MTR tests in a build directory
This commit is contained in:
39
mysql-test/columnstore/basic/t/mcs275_timediff_function.test
Normal file
39
mysql-test/columnstore/basic/t/mcs275_timediff_function.test
Normal file
@ -0,0 +1,39 @@
|
||||
#
|
||||
# TIMEDIFF() function
|
||||
# Author: Bharath, bharath.bokka@mariadb.com
|
||||
#
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS mcs275_db;
|
||||
--enable_warnings
|
||||
|
||||
CREATE DATABASE mcs275_db;
|
||||
USE mcs275_db;
|
||||
|
||||
CREATE TABLE t1
|
||||
(
|
||||
t1_DATE DATE,
|
||||
t1_TIME TIME,
|
||||
t1_DATETIME DATETIME
|
||||
)ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES('2011-08-27', '22:12:02', '1997-12-12 22:12:02');
|
||||
INSERT INTO t1 VALUES('2020-02-19', '23:59:59', '2001-1-1 23:59:59.65');
|
||||
INSERT INTO t1 VALUES('1991-05-30', '01:37:50.871', '09-12-11 01:08:59');
|
||||
|
||||
SELECT TIMEDIFF('2011-3-3 1:12:22', '2011-3-4 3:12:11') FROM t1 LIMIT 1;
|
||||
SELECT TIMEDIFF('20:28:30', '11:22:33.4455') FROM t1 LIMIT 1;
|
||||
|
||||
SELECT t1_DATE, TIMEDIFF(t1_DATE, '2008-02-19 22:22:22') FROM t1 ORDER BY 1;
|
||||
SELECT t1_DATE, TIMEDIFF(t1_DATE, '22:22:22') FROM t1 ORDER BY 1;
|
||||
|
||||
#Bug, function doesn't give expected results
|
||||
SELECT t1_TIME, TIMEDIFF(t1_TIME, '2008-02-19 22:22:22') FROM t1 ORDER BY 1;
|
||||
SELECT t1_TIME, TIMEDIFF(t1_TIME, '23:59:59') FROM t1 ORDER BY 1;
|
||||
|
||||
#Bug, function doesn't give expected results
|
||||
SELECT t1_DATETIME, TIMEDIFF(t1_DATETIME, '2001-02-19 22:22:22') FROM t1 ORDER BY 1;
|
||||
SELECT t1_DATETIME, TIMEDIFF(t1_DATETIME, '22:22:22') FROM t1 ORDER BY 1;
|
||||
|
||||
# Clean UP
|
||||
DROP DATABASE mcs275_db;
|
Reference in New Issue
Block a user