1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00
Files
mariadb-columnstore-engine/mysql-test/columnstore/basic/t/mcs184_day_function.test
2022-11-04 03:17:31 +06:00

29 lines
674 B
Plaintext

#
# Test DAY function
# Author: Bharath, bharath.bokka@mariadb.com
#
-- source ../include/have_columnstore.inc
--disable_warnings
DROP DATABASE IF EXISTS mcs184_db;
--enable_warnings
CREATE DATABASE mcs184_db;
USE mcs184_db;
SET default_storage_engine=Columnstore;
CREATE TABLE t1 (a DATE, b DATETIME);
INSERT INTO t1 VALUES ('0-0-0', '0-0-0 0:0:0'), ('1212-12-12', '1111-11-11 11:11:11'), ('3333-03-03', '3333-3-3 3:33:33');
--replace_regex /( COLLATE=latin1_swedish_ci)//
SHOW CREATE TABLE t1;
SELECT DAY('1212-12-12 11:11:11');
SELECT DAY('2020-12-22');
SELECT a, DAY(a) FROM t1 ORDER BY 1;
SELECT b, DAY(b) FROM t1 ORDER BY 1;
# Clean UP
DROP DATABASE mcs184_db;