test for no column cause of bug in query optimisation

This commit is contained in:
chertus 2019-04-09 20:43:23 +03:00
parent e53a50e01a
commit 69ed2a5112
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,3 @@
0
0
0

View File

@ -0,0 +1,13 @@
USE test;
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
CREATE TABLE t1 (n Int32) ENGINE = Memory;
CREATE TABLE t2 (a Int32, n Int32) ENGINE = Memory;
SELECT count() FROM t1 WHERE if(1, 1, n = 0);
SELECT count(n) FROM t2 WHERE if(1, 1, n = 0);
SELECT count() FROM t2 WHERE if(1, 1, n = 0);
DROP TABLE t1;
DROP TABLE t2;