mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-17 03:42:48 +00:00
a7cc4815e6
It is pretty general use case to use --pager=less and do not look through all rows in the output. Before this patch after first EPIPE the output of queries will not be printed anymore, instead it will try to finalize the output format again and again and obviously will fail: Code: 75. DB::ErrnoException: Cannot write to file (fd = 16), errno: 32, strerror: Broken pipe. (CANNOT_WRITE_TO_FILE_DESCRIPTOR), Stack trace (when copying this message, always include the lines below): Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
16 lines
615 B
Bash
Executable File
16 lines
615 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
# shellcheck source=../shell_config.sh
|
|
. "$CUR_DIR"/../shell_config.sh
|
|
|
|
# head by default print 10 rows, but it is not enough to query 11 rows, since
|
|
# we need to overflow the default pipe size, hence just 1 million of rows (it
|
|
# should be around 6 MiB in text representation, should be definitelly enough).
|
|
$CLICKHOUSE_CLIENT --ignore-error -nm --pager head -q "
|
|
select * from numbers(1e6); -- { clientError CANNOT_WRITE_TO_FILE_DESCRIPTOR }
|
|
select * from numbers(1e6); -- { clientError CANNOT_WRITE_TO_FILE_DESCRIPTOR }
|
|
"
|
|
|
|
exit 0
|