mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 09:02:00 +00:00
16 lines
530 B
Bash
Executable File
16 lines
530 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Tags: no-fasttest
|
|
# Tag no-fasttest: Fast tests don't build external libraries (SQLite)
|
|
|
|
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
# shellcheck source=../shell_config.sh
|
|
. "$CUR_DIR"/../shell_config.sh
|
|
|
|
function get_exception_message()
|
|
{
|
|
$CLICKHOUSE_CLIENT --query "$1" |& head -n1 | sed 's/.*DB::Exception: \(.*\) (version.*/\1/g'
|
|
}
|
|
|
|
get_exception_message "Select * from sqlite('/etc/passwd', 'something');"
|
|
get_exception_message "Select * from sqlite('../../../../etc/passwd', 'something');"
|