2023-03-21 06:54:05 +00:00
|
|
|
#!/usr/bin/env bash
|
2024-09-26 08:27:37 +00:00
|
|
|
# Tags: no-parallel, long, no-fasttest
|
2023-03-21 06:54:05 +00:00
|
|
|
|
|
|
|
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
|
|
# shellcheck source=../shell_config.sh
|
|
|
|
. "$CUR_DIR"/../shell_config.sh
|
|
|
|
|
|
|
|
# Regression test for crash in case of part exceeds INT_MAX
|
|
|
|
#
|
|
|
|
# NOTE: .sh test is used over .sql because it needs $CLICKHOUSE_DATABASE to
|
|
|
|
# avoid truncation, since seems that the version of MinIO that is used on CI
|
|
|
|
# too slow with this.
|
2024-07-24 02:27:11 +00:00
|
|
|
#
|
|
|
|
# Unfortunately, the test has to buffer it in memory.
|
2024-09-07 16:20:20 +00:00
|
|
|
$CLICKHOUSE_CLIENT --max_memory_usage 16G -m -q "
|
2023-03-21 06:54:05 +00:00
|
|
|
INSERT INTO FUNCTION s3('http://localhost:11111/test/$CLICKHOUSE_DATABASE/test_INT_MAX.tsv', '', '', 'TSV')
|
|
|
|
SELECT repeat('a', 1024) FROM numbers((pow(2, 30) * 2) / 1024)
|
2024-09-26 08:27:37 +00:00
|
|
|
SETTINGS s3_max_single_part_upload_size = '5Gi', s3_retry_attempts=5;
|
2023-03-21 06:54:05 +00:00
|
|
|
|
2024-09-26 08:27:37 +00:00
|
|
|
SELECT count() FROM s3('http://localhost:11111/test/$CLICKHOUSE_DATABASE/test_INT_MAX.tsv')
|
|
|
|
SETTINGS s3_retry_attempts=5;
|
2023-03-21 06:54:05 +00:00
|
|
|
"
|