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/mcs7076_regression_bug3398.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

30 lines
1.2 KiB
Plaintext

# -------------------------------------------------------------- #
# Test case migrated from regression test suite: bug3398.sql
#
# Author: Daniel Lee, daniel.lee@mariadb.com
# -------------------------------------------------------------- #
#
--source ../include/have_columnstore.inc
#
USE tpch1;
#
DROP TABLE IF EXISTS bug3398_1;
DROP TABLE IF EXISTS bug3398_2;
CREATE TABLE bug3398_1 (lid int, name char(10)) engine=columnstore;
INSERT INTO bug3398_1 (lid, name) VALUES (1, 'YES'), (2, 'NO');
CREATE TABLE bug3398_2 ( id int, gid int, lid int, dt date) engine=columnstore;
INSERT INTO bug3398_2 (id, gid, lid, dt) VALUES
(1, 1, 1, '2007-01-01'),(2, 1, 2, '2007-01-02'),
(3, 2, 2, '2007-02-01'),(4, 2, 1, '2007-02-02');
SELECT DISTINCT tt.gid AS lgid, (SELECT bug3398_1.name FROM bug3398_1, bug3398_2 WHERE bug3398_1.lid = bug3398_2.lid AND bug3398_2.gid = lgid and bug3398_1.name > 'NO' ORDER BY bug3398_2.dt) as clid FROM bug3398_2 tt ORDER BY 1;
SELECT DISTINCT bug3398_2.gid AS lgid, (SELECT bug3398_1.name FROM bug3398_1, bug3398_2 WHERE bug3398_1.lid = bug3398_2.lid AND bug3398_2.gid = lgid and bug3398_1.name > 'NO' ORDER BY bug3398_2.dt) as clid FROM bug3398_2 ORDER BY 1;
DROP TABLE bug3398_1;
DROP TABLE bug3398_2;
#