ClickHouse/dbms/tests/queries/0_stateless/00531_functions_bad_arguments.sh
proller e7f82b6a8c
Allow run test without package install and on custom ports. (#1643)
* ExtractFromConfig --try

* Add symlinks to package

* clickhouse-test --order option
2017-12-15 22:34:19 +03:00

12 lines
559 B
Bash
Executable File

#!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
. $CURDIR/../shell_config.sh
# Server should not crash on any function trash calls
# todo: maybe add more strange usages
perl -E "say \$_ for map {chomp; (qq{SELECT \$_;}, qq{SELECT \$_();}, qq{SELECT \$_(NULL);}, qq{SELECT \$_([]);}, qq{SELECT \$_([NULL]);}, qq{SELECT \$_(-1);}, qq{SELECT \$_('');},)} qx{$CLICKHOUSE_CLIENT -q 'SELECT name FROM system.functions ORDER BY name;'}" | $CLICKHOUSE_CLIENT -n --ignore-error >/dev/null 2>&1
$CLICKHOUSE_CLIENT -q "SELECT 'Still alive'"