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:
32
mysql-test/columnstore/basic/t/mcs284_hour_function.test
Normal file
32
mysql-test/columnstore/basic/t/mcs284_hour_function.test
Normal file
@ -0,0 +1,32 @@
|
||||
#
|
||||
# HOUR() function
|
||||
# Author: Bharath, bharath.bokka@mariadb.com
|
||||
#
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS mcs284_db;
|
||||
--enable_warnings
|
||||
|
||||
CREATE DATABASE mcs284_db;
|
||||
USE mcs284_db;
|
||||
|
||||
CREATE TABLE t1
|
||||
(
|
||||
t1_DATE DATE,
|
||||
t1_TIME TIME,
|
||||
t1_DATETIME DATETIME
|
||||
)ENGINE=Columnstore;
|
||||
INSERT INTO t1 VALUES('1991-05-30', '01:00:50', '2020-12-11 06:08:59');
|
||||
INSERT INTO t1 VALUES('2991-10-13', '21:19:52', '1987-01-01 17:28:37');
|
||||
|
||||
SELECT HOUR('2020-02-21') FROM t1 LIMIT 1;
|
||||
SELECT HOUR('11:12:13') FROM t1 LIMIT 1;
|
||||
SELECT HOUR('2020/02/11 13:12:13') FROM t1 LIMIT 1;
|
||||
|
||||
SELECT t1_DATE, HOUR(t1_DATE) FROM t1 ORDER BY 1;
|
||||
SELECT t1_DATETIME, HOUR(t1_DATETIME) FROM t1 ORDER BY 1;
|
||||
SELECT t1_TIME, HOUR(t1_TIME) FROM t1 ORDER BY 1;
|
||||
|
||||
# Clean UP
|
||||
DROP DATABASE mcs284_db;
|
Reference in New Issue
Block a user