mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 02:21:59 +00:00
Added test #3694
This commit is contained in:
parent
b4d218a890
commit
46d8f2f985
10374
dbms/tests/queries/0_stateless/00763_lock_buffer.reference
Normal file
10374
dbms/tests/queries/0_stateless/00763_lock_buffer.reference
Normal file
File diff suppressed because it is too large
Load Diff
29
dbms/tests/queries/0_stateless/00763_lock_buffer.sh
Executable file
29
dbms/tests/queries/0_stateless/00763_lock_buffer.sh
Executable file
@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
. $CURDIR/../shell_config.sh
|
||||
|
||||
${CLICKHOUSE_CLIENT} --query="DROP TABLE IF EXISTS test.mt"
|
||||
${CLICKHOUSE_CLIENT} --query="DROP TABLE IF EXISTS test.buffer"
|
||||
|
||||
${CLICKHOUSE_CLIENT} --query="CREATE TABLE test.buffer (s String) ENGINE = Buffer(test, mt, 1, 1, 1, 1, 1, 1, 1)"
|
||||
|
||||
|
||||
function thread1()
|
||||
{
|
||||
seq 1 500 | sed -r -e 's/.+/DROP TABLE IF EXISTS test.mt; CREATE TABLE test.mt (s String) ENGINE = MergeTree ORDER BY s; INSERT INTO test.mt SELECT toString(number) FROM numbers(10);/' | ${CLICKHOUSE_CLIENT} --multiquery --ignore-error ||:
|
||||
}
|
||||
|
||||
function thread2()
|
||||
{
|
||||
seq 1 1000 | sed -r -e 's/.+/SELECT count() FROM test.buffer;/' | ${CLICKHOUSE_CLIENT} --multiquery --ignore-error 2>&1 | grep -vP '^0$|^10$|^Received exception|^Code: 60'
|
||||
}
|
||||
|
||||
thread1 &
|
||||
thread2 &
|
||||
|
||||
wait
|
||||
|
||||
${CLICKHOUSE_CLIENT} --query="DROP TABLE test.mt"
|
||||
${CLICKHOUSE_CLIENT} --query="DROP TABLE test.buffer"
|
Loading…
Reference in New Issue
Block a user