mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-04-18 21:44:02 +03:00
51 lines
1.5 KiB
Plaintext
51 lines
1.5 KiB
Plaintext
# -------------------------------------------------------------- #
|
|
# Test case migrated from regression test suite: bug5319.sql
|
|
#
|
|
# Author: Daniel Lee, daniel.lee@mariadb.com
|
|
# -------------------------------------------------------------- #
|
|
#
|
|
--source ../include/have_columnstore.inc
|
|
#
|
|
USE tpch1;
|
|
#
|
|
--disable_warnings
|
|
DROP TABLE IF EXISTS bug5319_a;
|
|
--enable_warnings
|
|
|
|
CREATE TABLE `bug5319_a` (
|
|
`col1` int(11) DEFAULT NULL,
|
|
`col2` int(11) DEFAULT NULL
|
|
) engine=columnstore;
|
|
insert into bug5319_a values (1,2);
|
|
insert into bug5319_a values (1,2);
|
|
|
|
--disable_warnings
|
|
DROP TABLE IF EXISTS bug5319_b;
|
|
--enable_warnings
|
|
|
|
CREATE TABLE `bug5319_b` (
|
|
`col1` int(11) DEFAULT NULL,
|
|
`col2` int(11) DEFAULT NULL
|
|
) engine=columnstore;
|
|
insert into bug5319_b values (1,2);
|
|
insert into bug5319_b values (1,3);
|
|
insert into bug5319_b values (1,4);
|
|
|
|
--disable_warnings
|
|
DROP VIEW IF EXISTS view_bug5319_b;
|
|
--enable_warnings
|
|
|
|
create view view_bug5319_b as select bug5319_b.col1 AS col1, bug5319_b.col2 AS col2,sum(bug5319_b.col2) AS
|
|
kensyu_gk_total from bug5319_b group by bug5319_b.col1,bug5319_b.col2;
|
|
Select bug5319_a.col1,bv.col2 from bug5319_a left join view_bug5319_b bv on (bug5319_a.col1 = bv.col1) order by 1, 2 ;
|
|
Select bug5319_a.col1,bv.col2 from bug5319_a join view_bug5319_b bv on (bug5319_a.col1 = bv.col1) order by 1, 2;
|
|
Select bug5319_a.col1,bv.col2 from bug5319_a right join view_bug5319_b bv on (bug5319_a.col1 = bv.col1) order by 1, 2;
|
|
|
|
--disable_warnings
|
|
DROP TABLE bug5319_a;
|
|
DROP TABLE bug5319_b;
|
|
DROP VIEW view_bug5319_b;
|
|
--enable_warnings
|
|
#
|
|
|