1
0
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:
Alexander Barkov
2021-04-13 11:25:25 +04:00
parent d8b473329f
commit 75e3bbc31e
1874 changed files with 1 additions and 0 deletions

View File

@ -0,0 +1,32 @@
#
# WEEKDAY() function
# Author: Bharath, bharath.bokka@mariadb.com
#
-- source ../include/have_columnstore.inc
--disable_warnings
DROP DATABASE IF EXISTS mcs278_db;
--enable_warnings
CREATE DATABASE mcs278_db;
USE mcs278_db;
CREATE TABLE t1
(
t1_DATE DATE,
t1_TIMESTAMP TIMESTAMP,
t1_DATETIME DATETIME
)ENGINE=Columnstore;
INSERT INTO t1 VALUES('1991-05-30', '1999-10-28 01:00:50', '2020-12-11 01:08:59');
INSERT INTO t1 VALUES('2991-10-13', '1972-11-22 11:19:52', '2002-02-21 05:28:37');
SELECT WEEKDAY('2020-10-12') FROM t1 LIMIT 1;
SELECT WEEKDAY('2020-10-13 12:13:14') FROM t1 LIMIT 1;
SELECT WEEKDAY('12:13:14') FROM t1 LIMIT 1;
SELECT t1_DATE, WEEKDAY(t1_DATE) FROM t1 ORDER BY 1;
SELECT t1_DATETIME, WEEKDAY(t1_DATETIME) FROM t1 ORDER BY 1;
SELECT t1_TIMESTAMP, WEEKDAY(t1_TIMESTAMP) FROM t1 ORDER BY 1;
# Clean UP
DROP DATABASE mcs278_db;