mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
fix
This commit is contained in:
parent
54fa193ec2
commit
ab93987f7e
@ -340,16 +340,17 @@ StoragePtr InterpreterSystemQuery::tryRestartReplica(const StorageID & replica,
|
|||||||
|
|
||||||
auto columns = InterpreterCreateQuery::getColumnsDescription(*create.columns_list->columns, system_context);
|
auto columns = InterpreterCreateQuery::getColumnsDescription(*create.columns_list->columns, system_context);
|
||||||
auto constraints = InterpreterCreateQuery::getConstraintsDescription(create.columns_list->constraints);
|
auto constraints = InterpreterCreateQuery::getConstraintsDescription(create.columns_list->constraints);
|
||||||
|
auto data_path = database->getTableDataPath(create);
|
||||||
|
|
||||||
table = StorageFactory::instance().get(create,
|
table = StorageFactory::instance().get(create,
|
||||||
database->getTableDataPath(create),
|
data_path,
|
||||||
system_context,
|
system_context,
|
||||||
system_context.getGlobalContext(),
|
system_context.getGlobalContext(),
|
||||||
columns,
|
columns,
|
||||||
constraints,
|
constraints,
|
||||||
false);
|
false);
|
||||||
|
|
||||||
database->createTable(system_context, replica.table_name, table, create_ast);
|
database->attachTable(replica.table_name, table, data_path);
|
||||||
|
|
||||||
table->startup();
|
table->startup();
|
||||||
return table;
|
return table;
|
||||||
|
@ -67,6 +67,7 @@ $CLICKHOUSE_CLIENT -q "SELECT sum(n), count(n) FROM merge(currentDatabase(), '^r
|
|||||||
|
|
||||||
|
|
||||||
for i in `seq 4`; do
|
for i in `seq 4`; do
|
||||||
$CLICKHOUSE_CLIENT -q "DROP TABLE IF EXISTS replica_01108_$i"
|
$CLICKHOUSE_CLIENT -q "DROP TABLE IF EXISTS replica_01108_$i NO DELAY"
|
||||||
$CLICKHOUSE_CLIENT -q "DROP TABLE IF EXISTS replica_01108_${i}_tmp"
|
$CLICKHOUSE_CLIENT -q "DROP TABLE IF EXISTS replica_01108_${i}_tmp NO DELAY"
|
||||||
done
|
done
|
||||||
|
sleep 2
|
||||||
|
Loading…
Reference in New Issue
Block a user