1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-04-26 11:48:52 +03:00
mariadb-columnstore-engine/mysql-test/columnstore/basic/r/mcs187_dayofmonth_function.result
mariadb-AlexeyVorovich 64f1d541d0
MCOL-5519: new defaults in columnstore.cnf (#2894)
feat(charset)!: utf8 is a new charset default and utf8_general_ci is a new collation default in the engine configuration file shipped
---------

Co-authored-by: Leonid Fedorov <leonid.fedorov@mariadb.com>
Co-authored-by: mariadb-DanielLee <daniel.lee@mariadb.com>
2023-08-15 18:04:32 +03:00

30 lines
859 B
Plaintext

DROP DATABASE IF EXISTS mcs187_db;
CREATE DATABASE mcs187_db;
USE mcs187_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', '1212-12-11 11:11:11'), ('3333-03-03', '3333-3-4 3:33:33');
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` date DEFAULT NULL,
`b` datetime DEFAULT NULL
) ENGINE=Columnstore DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
SELECT DAYOFMONTH('1212-12-12 11:11:11');
DAYOFMONTH('1212-12-12 11:11:11')
12
SELECT DAYOFMONTH('2020-12-22');
DAYOFMONTH('2020-12-22')
22
SELECT a, DAYOFMONTH(a) FROM t1 ORDER BY 1;
a DAYOFMONTH(a)
0000-00-00 0
1212-12-12 12
3333-03-03 3
SELECT b, DAYOFMONTH(b) FROM t1 ORDER BY 1;
b DAYOFMONTH(b)
0000-00-00 00:00:00 0
1212-12-11 11:11:11 11
3333-03-04 03:33:33 4
DROP DATABASE mcs187_db;