mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-12 09:22:05 +00:00
add a test
This commit is contained in:
parent
4ca3d0d5c4
commit
2c86b251de
@ -0,0 +1,6 @@
|
||||
OK
|
||||
OK
|
||||
OK
|
||||
OK
|
||||
OK
|
||||
OK
|
19
tests/queries/0_stateless/02931_better_hint_when_table_doesnt_exist.sh
Executable file
19
tests/queries/0_stateless/02931_better_hint_when_table_doesnt_exist.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
# shellcheck source=../shell_config.sh
|
||||
. "$CURDIR"/../shell_config.sh
|
||||
|
||||
$CLICKHOUSE_CLIENT -q "DROP DATABASE IF EXISTS test_02931;"
|
||||
$CLICKHOUSE_CLIENT -q "CREATE DATABASE test_02931;"
|
||||
$CLICKHOUSE_CLIENT -q "SELECT * FROM test_02931.query_log;" 2>&1 | grep -q "Table test_02931.query_log does not exist" && echo 'OK' || echo 'FAIL'
|
||||
$CLICKHOUSE_CLIENT -q "SELECT * FROM test_02931.query_log;" 2>&1 | grep -q " Maybe you meant system.query_log?" && echo 'OK' || echo 'FAIL'
|
||||
|
||||
$CLICKHOUSE_CLIENT -q "SELECT * FROM test_02931.foo_bar;" 2>&1 | grep -q "Table test_02931.foo_bar does not exist" && echo 'OK' || echo 'FAIL'
|
||||
$CLICKHOUSE_CLIENT -q "SELECT * FROM test_02931.foo_bar;" 2>&1 | grep " Maybe you meant system.foo_bar?" && echo 'FAIL' || echo 'OK'
|
||||
|
||||
$CLICKHOUSE_CLIENT -q "SELECT * FROM system.querylog;" 2>&1 | grep -q " Maybe you meant system.query_log?" && echo 'OK' || echo 'FAIL'
|
||||
$CLICKHOUSE_CLIENT -q "SELECT * FROM querylog;" 2>&1 | grep -q " Maybe you meant system.query_log?" && echo 'OK' || echo 'FAIL'
|
||||
|
||||
|
||||
$CLICKHOUSE_CLIENT -q "DROP DATABASE test_02931;"
|
Loading…
Reference in New Issue
Block a user