You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-10-31 18:30:33 +03:00
131 lines
3.6 KiB
Plaintext
131 lines
3.6 KiB
Plaintext
DROP DATABASE IF EXISTS mcol5963;
|
|
CREATE DATABASE mcol5963;
|
|
USE mcol5963;
|
|
create table FOO(foo datetime) engine = columnstore;
|
|
insert into FOO(foo) values ('2025-08-27 15:26:25');
|
|
select if(0 = 1, '2025-08-27 15:26:25', foo) from FOO;
|
|
if(0 = 1, '2025-08-27 15:26:25', foo)
|
|
2025-08-27 15:26:25
|
|
select if(0 = 1, null, foo) from FOO;
|
|
if(0 = 1, null, foo)
|
|
2025-08-27 15:26:25
|
|
select if(0 = 1, true, foo) from FOO;
|
|
if(0 = 1, true, foo)
|
|
2025-08-27 15:26:25
|
|
select if(0 = 1, 5, foo) from FOO;
|
|
if(0 = 1, 5, foo)
|
|
2025-08-27 15:26:25
|
|
select if(0 = 1, null, "text");
|
|
if(0 = 1, null, "text")
|
|
text
|
|
drop table FOO;
|
|
create table FOO(foo datetime) engine = innodb;
|
|
insert into FOO(foo) values ('2025-08-27 15:26:25');
|
|
select if(0 = 1, '2025-08-27 15:26:25', foo) from FOO;
|
|
if(0 = 1, '2025-08-27 15:26:25', foo)
|
|
2025-08-27 15:26:25
|
|
select if(0 = 1, null, foo) from FOO;
|
|
if(0 = 1, null, foo)
|
|
2025-08-27 15:26:25
|
|
select if(0 = 1, true, foo) from FOO;
|
|
if(0 = 1, true, foo)
|
|
2025-08-27 15:26:25
|
|
select if(0 = 1, 5, foo) from FOO;
|
|
if(0 = 1, 5, foo)
|
|
2025-08-27 15:26:25
|
|
select if(0 = 1, null, "text");
|
|
if(0 = 1, null, "text")
|
|
text
|
|
drop table FOO;
|
|
create table FOO_DATE(foo date) engine = columnstore;
|
|
insert into FOO_DATE(foo) values ('2025-08-27');
|
|
select if(0 = 1, true, foo) from FOO_DATE;
|
|
if(0 = 1, true, foo)
|
|
2025-08-27
|
|
select if(0 = 1, 5, foo) from FOO_DATE;
|
|
if(0 = 1, 5, foo)
|
|
2025-08-27
|
|
select if(0 = 1, null, foo) from FOO_DATE;
|
|
if(0 = 1, null, foo)
|
|
2025-08-27
|
|
drop table FOO_DATE;
|
|
create table FOO_DATE(foo date) engine = innodb;
|
|
insert into FOO_DATE(foo) values ('2025-08-27');
|
|
select if(0 = 1, true, foo) from FOO_DATE;
|
|
if(0 = 1, true, foo)
|
|
2025-08-27
|
|
select if(0 = 1, 5, foo) from FOO_DATE;
|
|
if(0 = 1, 5, foo)
|
|
2025-08-27
|
|
select if(0 = 1, null, foo) from FOO_DATE;
|
|
if(0 = 1, null, foo)
|
|
2025-08-27
|
|
drop table FOO_DATE;
|
|
create table FOO_TIME(foo time) engine = columnstore;
|
|
insert into FOO_TIME(foo) values ('15:26:25');
|
|
select if(0 = 1, true, foo) from FOO_TIME;
|
|
if(0 = 1, true, foo)
|
|
15:26:25
|
|
select if(0 = 1, 5, foo) from FOO_TIME;
|
|
if(0 = 1, 5, foo)
|
|
15:26:25
|
|
select if(0 = 1, null, foo) from FOO_TIME;
|
|
if(0 = 1, null, foo)
|
|
15:26:25
|
|
drop table FOO_TIME;
|
|
create table FOO_TIME(foo time) engine = innodb;
|
|
insert into FOO_TIME(foo) values ('15:26:25');
|
|
select if(0 = 1, true, foo) from FOO_TIME;
|
|
if(0 = 1, true, foo)
|
|
15:26:25
|
|
select if(0 = 1, 5, foo) from FOO_TIME;
|
|
if(0 = 1, 5, foo)
|
|
15:26:25
|
|
select if(0 = 1, null, foo) from FOO_TIME;
|
|
if(0 = 1, null, foo)
|
|
15:26:25
|
|
drop table FOO_TIME;
|
|
create table FOO_TS(foo timestamp) engine = columnstore;
|
|
insert into FOO_TS(foo) values ('2025-08-27 15:26:25');
|
|
select if(0 = 1, true, foo) from FOO_TS;
|
|
if(0 = 1, true, foo)
|
|
2025-08-27 15:26:25
|
|
select if(0 = 1, 5, foo) from FOO_TS;
|
|
if(0 = 1, 5, foo)
|
|
2025-08-27 15:26:25
|
|
select if(0 = 1, null, foo) from FOO_TS;
|
|
if(0 = 1, null, foo)
|
|
2025-08-27 15:26:25
|
|
drop table FOO_TS;
|
|
create table FOO_TS(foo timestamp) engine = innodb;
|
|
insert into FOO_TS(foo) values ('2025-08-27 15:26:25');
|
|
select if(0 = 1, true, foo) from FOO_TS;
|
|
if(0 = 1, true, foo)
|
|
2025-08-27 15:26:25
|
|
select if(0 = 1, 5, foo) from FOO_TS;
|
|
if(0 = 1, 5, foo)
|
|
2025-08-27 15:26:25
|
|
select if(0 = 1, null, foo) from FOO_TS;
|
|
if(0 = 1, null, foo)
|
|
2025-08-27 15:26:25
|
|
drop table FOO_TS;
|
|
create table FOO(foo varchar(30)) engine = columnstore;
|
|
insert into FOO(foo) values ("text1");
|
|
select if(0 = 1, true, foo) from FOO;
|
|
if(0 = 1, true, foo)
|
|
text1
|
|
select if(0 = 1, NULL, foo) from FOO;
|
|
if(0 = 1, NULL, foo)
|
|
text1
|
|
drop table FOO;
|
|
create table FOO(foo int) engine = columnstore;
|
|
insert into FOO(foo) values (123);
|
|
select if(0 = 1, true, foo) from FOO;
|
|
if(0 = 1, true, foo)
|
|
123
|
|
select if(0 = 1, NULL, foo) from FOO;
|
|
if(0 = 1, NULL, foo)
|
|
123
|
|
drop table FOO;
|
|
DROP DATABASE mcol5963;
|