Build verified: 1.4.3-1 source
server
commit 9bd5e14f4de1402c6cd4a3f81564887c1213c9e1
engine
commit 5efa6a4dc52129be2de49fdfc23e44020401b86b
Test cases:
1.
DROP DATABASE IF EXISTS db1;
CREATE DATABASE db1;
CREATE TABLE db1.t1 (c1 int, c2 int, PRIMARY KEY (c1)) ;
CREATE TABLE db1.t4 ENGINE=columnstore SELECT * FROM db1.t1;
CREATE TABLE db1.t5 ENGINE="columnstore" SELECT * FROM db1.t1;
CREATE TABLE db1.t3 ENGINE=columnstore AS (SELECT * FROM db1.t1);
CREATE TABLE db1.t6 ENGINE=columnstore AS SELECT c1 AS c11 FROM db1.t1;
CREATE TABLE db1.t7 ENGINE=columnstore AS (SELECT c1 AS c11 FROM db1.t1);
CREATE TABLE db1.t8 ENGINE=columnstore SELECT c1 AS c11 FROM db1.t1;
2.
DROP DATABASE IF EXISTS db1;
CREATE DATABASE db1;
USE db1;
CREATE TABLE src (c0 int, c1 int);
INSERT INTO src VALUES (1,1),(1,1),(1,1),(2,2),(2,2),(2,2),(3,3),(3,3),(3,3);
CREATE TABLE tgt2 engine = columnstore AS SELECT c0, c1 FROM src GROUP BY c0 HAVING COUNT
> 1;
CREATE TABLE tgt3 SELECT c0, c1 FROM src order by c0 limit 2 offset 1;
CREATE TABLE tgt4 SELECT distinct c0 FROM src;
CREATE TABLE tgt5 as (SELECT c0 FROM src where c0 > 0);
CREATE TABLE tgt6 (c2 bigint primary key) SELECT distinct c0 as c2 FROM src;
3.
DROP DATABASE IF EXISTS db1;
CREATE DATABASE db1;
USE db1;
CREATE TABLE src (c0 char(20));
INSERT INTO src VALUES ('android'),('iphone');
CREATE TABLE tgt2 (field1 int) engine=columnstore SELECT c0 FROM src;
CREATE TABLE tgt3 (field1 varchar(20), c0 char(20)) engine=columnstore SELECT * FROM src;
CREATE TABLE tgt5 engine = columnstore SELECT c0 FROM src WHERE c0='iphone';
There are some remote cases where the behavior is different from InnoDB. I'll raise tickets separately for those.
Committed along with fixes for
MCOL-128