ClickHouse/tests/queries/0_stateless/00984_parser_stack_overflow.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
965 B
Bash
Raw Normal View History

2019-08-10 16:40:57 +00:00
#!/usr/bin/env bash
2022-09-05 16:21:16 +00:00
# Tags: no-asan
2019-08-10 16:40:57 +00:00
# Such a huge timeout mostly for debug build.
CLICKHOUSE_CURL_TIMEOUT=60
2019-08-10 16:40:57 +00:00
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
2020-12-28 11:46:53 +00:00
# shellcheck source=../shell_config.sh
2020-08-01 00:51:12 +00:00
. "$CURDIR"/../shell_config.sh
2019-08-10 16:40:57 +00:00
2019-08-10 16:47:59 +00:00
# Too deep recursion
2019-08-10 16:51:09 +00:00
perl -e 'print "(" x 10000' | $CLICKHOUSE_CURL -sS "$CLICKHOUSE_URL" --data-binary @- | grep -oF 'exceeded'
perl -e 'print "SELECT " . ("[" x 10000)' | $CLICKHOUSE_CURL -sS "$CLICKHOUSE_URL" --data-binary @- | grep -oF 'exceeded'
perl -e 'print "SELECT " . ("([" x 5000)' | $CLICKHOUSE_CURL -sS "$CLICKHOUSE_URL" --data-binary @- | grep -oF 'exceeded'
2019-08-10 17:08:14 +00:00
perl -e 'print "SELECT 1" . ("+1" x 10000)' | $CLICKHOUSE_CURL -sS "$CLICKHOUSE_URL" --data-binary @- | grep -oF 'exceeded'
2019-08-10 16:47:59 +00:00
# But this is Ok
2019-08-10 16:51:09 +00:00
perl -e 'print "SELECT 1" . (",1" x 10000)' | $CLICKHOUSE_CURL -sS "$CLICKHOUSE_URL" --data-binary @- | wc -c
2019-08-10 17:08:14 +00:00
perl -e 'print "SELECT 1" . (" OR 1" x 10000)' | $CLICKHOUSE_CURL -sS "$CLICKHOUSE_URL" --data-binary @-