Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dbms/src/Storages/LiveView/StorageLiveView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ void registerStorageLiveView(StorageFactory & factory)
{
factory.registerStorage("LiveView", [](const StorageFactory::Arguments & args)
{
if (!args.local_context.getSettingsRef().allow_experimental_live_view)
if (!args.attach && !args.local_context.getSettingsRef().allow_experimental_live_view)
throw Exception("Experimental LIVE VIEW feature is not enabled (the setting 'allow_experimental_live_view')", ErrorCodes::SUPPORT_IS_DISABLED);

return StorageLiveView::create(args.table_name, args.database_name, args.local_context, args.query, args.columns);
Expand Down
23 changes: 23 additions & 0 deletions dbms/tests/stress
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash

# https://stackoverflow.com/questions/360201/how-do-i-kill-background-processes-jobs-when-my-shell-script-exits
trap 'kill -9 $(jobs -p)' EXIT

function thread()
{
while true; do
./clickhouse-test --order random 2>&1 | awk '{ printf "'$1' " }'
done
}

# https://stackoverflow.com/questions/9954794/execute-a-shell-function-with-timeout
export -f thread;

NUM_THREADS=16
TIMEOUT=300

for i in $(seq 1 $NUM_THREADS); do
timeout $TIMEOUT bash -c "thread $i" 2> /dev/null &
done

wait