1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-29 03:22:01 +03:00
Files
mariadb-columnstore-engine/mysql-test/columnstore/devregression/t/mcs7126_regression_bug3853.test
Daniel Lee 4c9d6e39ac Dlee mtr restructure (#2494)
* Restructured test suites and added autopilot and extended suites

* Updated autopilot with correct branch - develop

* Moved setup test case to a 'setup' directory, for consistency

* Fixed a path issue

* Updated some tests cases to keep up with development

Co-authored-by: root <root@rocky8.localdomain>
2022-08-09 21:20:56 +03:00

102 lines
2.9 KiB
Plaintext

# -------------------------------------------------------------- #
# Test case migrated from regression test suite: bug3853.sql
#
# Author: Daniel Lee, daniel.lee@mariadb.com
# -------------------------------------------------------------- #
#
--source ../include/have_columnstore.inc
#
USE tpch1;
#
drop table if exists dw_entradas_fact;
drop table if exists dw_entradas_fact_1;
create table dw_entradas_fact (fecha date) engine=columnstore;
create table dw_entradas_fact_1 (fecha date) engine=columnstore;
insert into dw_entradas_fact values ('2010-01-01'), ('2010-02-02'), ('2010-02-27'), ('2010-03-01');
insert into dw_entradas_fact_1 values ('2010-01-01'), ('2010-02-02'), ('2010-02-27'), ('2010-03-01');
SELECT 1 NORMAL, 1 OFERTA
FROM DW_ENTRADAS_FACT a
WHERE a.FECHA BETWEEN '2010-02-01' and '2010-02-28'
union all
SELECT 1 NORMAL, 1 OFERTA
FROM DW_ENTRADAS_FACT_1 a
WHERE a.FECHA BETWEEN '2010-02-01' and '2010-02-28';
SELECT TY.NORMAL NORMAL ,
TY.OFERTA OFERTA
FROM (SELECT 1 NORMAL,
1 OFERTA
FROM DW_ENTRADAS_FACT a
WHERE a.FECHA BETWEEN '2010-02-01' and '2010-02-28') TY
union all
SELECT TY.NORMAL NORMAL ,
TY.OFERTA OFERTA
FROM (SELECT 1 NORMAL,
1 OFERTA
FROM DW_ENTRADAS_FACT_1 a
WHERE a.FECHA BETWEEN '2010-02-01' and '2010-02-28') TY;
SELECT TY.NORMAL NORMAL ,
TY.OFERTA OFERTA
FROM ((SELECT 1 NORMAL,
1 OFERTA
FROM DW_ENTRADAS_FACT
WHERE FECHA BETWEEN '2010-02-01' and '2010-02-28')
union all
(SELECT 1 NORMAL,
1 OFERTA
FROM DW_ENTRADAS_FACT_1
WHERE FECHA BETWEEN '2010-02-01' and '2010-02-28')) AS TY;
SELECT 1 NORMAL, 1 OFERTA
FROM DW_ENTRADAS_FACT a
WHERE a.FECHA BETWEEN '2010-02-01' and '2010-02-28'
union
SELECT 1 NORMAL, 1 OFERTA
FROM DW_ENTRADAS_FACT_1 a
WHERE a.FECHA BETWEEN '2010-02-01' and '2010-02-28';
SELECT TY.NORMAL NORMAL ,
TY.OFERTA OFERTA
FROM (SELECT 1 NORMAL,
1 OFERTA
FROM DW_ENTRADAS_FACT a
WHERE a.FECHA BETWEEN '2010-02-01' and '2010-02-28') TY
union
SELECT TY.NORMAL NORMAL ,
TY.OFERTA OFERTA
FROM (SELECT 1 NORMAL,
1 OFERTA
FROM DW_ENTRADAS_FACT_1 a
WHERE a.FECHA BETWEEN '2010-02-01' and '2010-02-28') TY;
SELECT TY.NORMAL NORMAL ,
TY.OFERTA OFERTA
FROM ((SELECT 1 NORMAL,
1 OFERTA
FROM DW_ENTRADAS_FACT
WHERE FECHA BETWEEN '2010-02-01' and '2010-02-28')
union
(SELECT 1 NORMAL,
1 OFERTA
FROM DW_ENTRADAS_FACT_1
WHERE FECHA BETWEEN '2010-02-01' and '2010-02-28')) AS TY;
drop table if exists dw_entradas_fact;
drop table if exists dw_entradas_fact_1;
select * from region where 2=2 union select n_regionkey, n_nationkey, n_name from nation where 0=1;
#