ISSUES-258 add validation test for ISSUES-258

This commit is contained in:
zhang2014 2018-03-08 09:20:07 +08:00
parent 65da2ee15b
commit 21b62eabb6
4 changed files with 18 additions and 1 deletions

View File

@ -2,8 +2,11 @@ DROP TABLE IF EXISTS test.null;
DROP TABLE IF EXISTS test.null_view;
CREATE TABLE test.null (x UInt8) ENGINE = Null;
CREATE VIEW test.null_view AS SELECT * FROM test.null WHERE toUInt64(x) IN (SELECT number FROM system.numbers);
CREATE VIEW test.null_view AS SELECT * FROM test.null;
INSERT INTO test.null VALUES (1);
SELECT * FROM test.null;
SELECT * FROM test.null_view;
DROP TABLE test.null;
DROP TABLE test.null_view;

View File

@ -0,0 +1 @@
CREATE VIEW test.test_view ( id UInt64) AS SELECT * FROM test.test WHERE id = (SELECT 1)

View File

@ -0,0 +1,13 @@
DROP TABLE IF EXISTS test.test;
DROP TABLE IF EXISTS test.test_view;
CREATE TABLE test.test(id UInt64) ENGINE = Log;
CREATE VIEW test.test_view AS SELECT * FROM test.test WHERE id = (SELECT 1);
DETACH TABLE test.test_view;
ATTACH TABLE test.test_view;
SHOW CREATE TABLE test.test_view;
DROP TABLE IF EXISTS test.test;
DROP TABLE IF EXISTS test.test_view;