SQL fuzz test (#3442)

* Sql fuzzy test

* wip

* wip

* wip

* wip

* wip
This commit is contained in:
proller 2018-10-23 23:14:43 +03:00 committed by alexey-milovidov
parent 949ff9e346
commit 0a9d6f91d2
4 changed files with 179 additions and 0 deletions

View File

@ -0,0 +1 @@
Still alive

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,22 @@
#!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
. $CURDIR/../shell_config.sh
export SQL_FUZZY_FILE_FUNCTIONS=${CLICKHOUSE_TMP}/clickhouse-functions
$CLICKHOUSE_CLIENT -q "select name from system.functions format TSV;" > $SQL_FUZZY_FILE_FUNCTIONS
export SQL_FUZZY_FILE_TABLE_FUNCTIONS=${CLICKHOUSE_TMP}/clickhouse-table_functions
$CLICKHOUSE_CLIENT -q "select name from system.table_functions format TSV;" > $SQL_FUZZY_FILE_TABLE_FUNCTIONS
# This is short run for ordinary tests.
# if you want long run use: env SQL_FUZZY_RUNS=100000 clickhouse-test sql_fuzzy
for SQL_FUZZY_RUN in $(seq ${SQL_FUZZY_RUNS:=100}); do
env SQL_FUZZY_RUN=$SQL_FUZZY_RUN $CURDIR/00746_sql_fuzzy.pl | $CLICKHOUSE_CLIENT -n --ignore-error >/dev/null 2>&1
if [[ `$CLICKHOUSE_CLIENT -q "SELECT 'Still alive'"` != 'Still alive' ]]; then
break
fi
done
$CLICKHOUSE_CLIENT -q "SELECT 'Still alive'"

View File

@ -0,0 +1,5 @@
SELECT __inner_restore_projection__(2.0885, -66.72488);
SELECT __inner_restore_projection__(-4, '');
SELECT __inner_restore_projection__(067274, 'vb\s');
SELECT sequenceCount((CAST((( SELECT NULL ) AS rg, ( SELECT ( SELECT [], '<e', caseWithExpr([NULL], -588755.149, []), retention(addWeeks((CAST((-7644612.39732) AS DateTime)), -23578040.02833), (CAST(([]) AS DateTime)), (CAST(([010977.08]) AS String))), emptyArrayToSingle('') ) , '\0', toUInt64([], 't3hw@'), '\0', toStartOfQuarter(-4230.1872, []) ) ) AS Date)));
SELECT extractURLParameter('?_', '\0');