Add a test for #10735

This commit is contained in:
Alexey Milovidov 2021-08-14 23:34:47 +03:00
parent 9ea4bea8f9
commit e64c973308
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,4 @@
x
1
i
3

View File

@ -0,0 +1,21 @@
#!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
${MYSQL_CLIENT} --batch --execute 'SELECT 1 AS x'
${MYSQL_CLIENT} --batch --execute 'SELECT 1 AS x WHERE 0'
${MYSQL_CLIENT} <<<"
DROP TABLE IF EXISTS b;
CREATE TABLE b (i UInt8) ENGINE=MergeTree() PRIMARY KEY(i) ORDER BY (i);
INSERT INTO b VALUES (1), (2), (3);
"
${MYSQL_CLIENT} --batch --execute 'SELECT * FROM default.b WHERE i>=3;'
${MYSQL_CLIENT} --batch --execute 'SELECT * FROM default.b WHERE i>=300;'
${MYSQL_CLIENT} <<<"
DROP TABLE b;
"