mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
test with sleep
This commit is contained in:
parent
c5087219c4
commit
71a2002417
54
dbms/tests/queries/0_stateless/01014_lazy_database_basic.sh
Executable file
54
dbms/tests/queries/0_stateless/01014_lazy_database_basic.sh
Executable file
@ -0,0 +1,54 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
. $CURDIR/../shell_config.sh
|
||||
|
||||
|
||||
${CLICKHOUSE_CLIENT} -n -q "
|
||||
CREATE DATABASE testlazy ENGINE = Lazy(1);
|
||||
CREATE TABLE testlazy.log (a UInt64, b UInt64) ENGINE = Log;
|
||||
CREATE TABLE testlazy.slog (a UInt64, b UInt64) ENGINE = StripeLog;
|
||||
CREATE TABLE testlazy.tlog (a UInt64, b UInt64) ENGINE = TinyLog;
|
||||
"
|
||||
|
||||
sleep 2
|
||||
|
||||
${CLICKHOUSE_CLIENT} -q "
|
||||
SELECT * FROM system.tables WHERE database = 'testlazy';
|
||||
"
|
||||
|
||||
sleep 2
|
||||
|
||||
${CLICKHOUSE_CLIENT} -q "
|
||||
SELECT database, name, metadata_modification_time FROM system.tables WHERE database = 'testlazy';
|
||||
"
|
||||
|
||||
sleep 2
|
||||
|
||||
${CLICKHOUSE_CLIENT} -n -q "
|
||||
INSERT INTO testlazy.log VALUES (1, 1);
|
||||
INSERT INTO testlazy.slog VALUES (2, 2);
|
||||
INSERT INTO testlazy.tlog VALUES (3, 3);
|
||||
SELECT * FROM testlazy.log;
|
||||
SELECT * FROM testlazy.slog;
|
||||
SELECT * FROM testlazy.tlog;
|
||||
"
|
||||
|
||||
sleep 2
|
||||
|
||||
${CLICKHOUSE_CLIENT} -q "
|
||||
DROP TABLE testlazy.log;
|
||||
"
|
||||
|
||||
sleep 2
|
||||
|
||||
${CLICKHOUSE_CLIENT} -n -q "
|
||||
SELECT * FROM testlazy.slog;
|
||||
SELECT * FROM testlazy.tlog;
|
||||
"
|
||||
|
||||
sleep 2
|
||||
|
||||
${CLICKHOUSE_CLIENT} -q "
|
||||
DROP DATABASE testlazy;
|
||||
"
|
@ -1,22 +0,0 @@
|
||||
CREATE DATABASE testlazy ENGINE = Lazy(30);
|
||||
CREATE TABLE testlazy.log (a UInt64, b UInt64) ENGINE = Log;
|
||||
CREATE TABLE testlazy.slog (a UInt64, b UInt64) ENGINE = StripeLog;
|
||||
CREATE TABLE testlazy.tlog (a UInt64, b UInt64) ENGINE = TinyLog;
|
||||
|
||||
SELECT * FROM system.tables WHERE database = 'testlazy';
|
||||
SELECT database, name, metadata_modification_time FROM system.tables WHERE database = 'testlazy';
|
||||
|
||||
INSERT INTO testlazy.log VALUES (1, 1);
|
||||
INSERT INTO testlazy.slog VALUES (2, 2);
|
||||
INSERT INTO testlazy.tlog VALUES (3, 3);
|
||||
SELECT * FROM testlazy.log;
|
||||
SELECT * FROM testlazy.slog;
|
||||
SELECT * FROM testlazy.tlog;
|
||||
|
||||
|
||||
DROP TABLE testlazy.log;
|
||||
|
||||
SELECT * FROM testlazy.slog;
|
||||
SELECT * FROM testlazy.tlog;
|
||||
|
||||
DROP DATABASE testlazy;
|
Loading…
Reference in New Issue
Block a user