mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
fix
This commit is contained in:
parent
0ca51ed266
commit
8a64b65e51
@ -88,6 +88,8 @@ BlockIO InterpreterDropQuery::executeToTable(const ASTDropQuery & query)
|
||||
if (query_ptr->as<ASTDropQuery &>().is_view && !table->isView())
|
||||
throw Exception("Table " + table_id.getNameForLogs() + " is not a View", ErrorCodes::LOGICAL_ERROR);
|
||||
|
||||
table_id = table->getStorageID();
|
||||
|
||||
if (query.kind == ASTDropQuery::Kind::Detach)
|
||||
{
|
||||
context.checkAccess(table->isView() ? AccessType::DROP_VIEW : AccessType::DROP_TABLE, table_id);
|
||||
|
@ -12,21 +12,17 @@ function drop_database()
|
||||
|
||||
function drop_table()
|
||||
{
|
||||
${CLICKHOUSE_CLIENT} -nm <<EOL
|
||||
DROP TABLE IF EXISTS db_01516.data3;
|
||||
DROP TABLE IF EXISTS db_01516.data1;
|
||||
DROP TABLE IF EXISTS db_01516.data2;
|
||||
EOL
|
||||
${CLICKHOUSE_CLIENT} -q "DROP TABLE IF EXISTS db_01516.data3;" 2>&1 | grep -F "Code: " | grep -Fv "is currently dropped or renamed"
|
||||
${CLICKHOUSE_CLIENT} -q "DROP TABLE IF EXISTS db_01516.data1;" 2>&1 | grep -F "Code: " | grep -Fv "is currently dropped or renamed"
|
||||
${CLICKHOUSE_CLIENT} -q "DROP TABLE IF EXISTS db_01516.data2;" 2>&1 | grep -F "Code: " | grep -Fv "is currently dropped or renamed"
|
||||
}
|
||||
|
||||
function create()
|
||||
{
|
||||
${CLICKHOUSE_CLIENT} -nm <<EOL
|
||||
CREATE DATABASE IF NOT EXISTS db_01516;
|
||||
CREATE TABLE IF NOT EXISTS db_01516.data1 Engine=MergeTree() ORDER BY number AS SELECT * FROM numbers(1);
|
||||
CREATE TABLE IF NOT EXISTS db_01516.data2 Engine=MergeTree() ORDER BY number AS SELECT * FROM numbers(1);
|
||||
CREATE TABLE IF NOT EXISTS db_01516.data3 Engine=MergeTree() ORDER BY number AS SELECT * FROM numbers(1);
|
||||
EOL
|
||||
${CLICKHOUSE_CLIENT} -q "CREATE DATABASE IF NOT EXISTS db_01516;"
|
||||
${CLICKHOUSE_CLIENT} -q "CREATE TABLE IF NOT EXISTS db_01516.data1 Engine=MergeTree() ORDER BY number AS SELECT * FROM numbers(1);" 2>&1 | grep -F "Code: " | grep -Fv "is currently dropped or renamed"
|
||||
${CLICKHOUSE_CLIENT} -q "CREATE TABLE IF NOT EXISTS db_01516.data2 Engine=MergeTree() ORDER BY number AS SELECT * FROM numbers(1);" 2>&1 | grep -F "Code: " | grep -Fv "is currently dropped or renamed"
|
||||
${CLICKHOUSE_CLIENT} -q "CREATE TABLE IF NOT EXISTS db_01516.data3 Engine=MergeTree() ORDER BY number AS SELECT * FROM numbers(1);" 2>&1 | grep -F "Code: " | grep -Fv "is currently dropped or renamed"
|
||||
}
|
||||
|
||||
for _ in {1..100}; do
|
||||
|
Loading…
Reference in New Issue
Block a user