Fix too short exception message test (00002)

This commit is contained in:
Кирилл Гарбар 2024-06-20 02:36:12 +03:00
parent db15f4733e
commit 72a8097929
2 changed files with 4 additions and 4 deletions

View File

@ -1967,10 +1967,10 @@ void InterpreterCreateQuery::convertMergeTreeTableIfPossible(ASTCreateQuery & cr
if (engine_name.starts_with("Replicated")) if (engine_name.starts_with("Replicated"))
{ {
if (to_replicated) if (to_replicated)
throw Exception(ErrorCodes::INCORRECT_QUERY, "Table is already replicated"); throw Exception(ErrorCodes::INCORRECT_QUERY, "Can not attach table as replicated, table is already replicated");
} }
else if (!to_replicated) else if (!to_replicated)
throw Exception(ErrorCodes::INCORRECT_QUERY, "Table is already not replicated"); throw Exception(ErrorCodes::INCORRECT_QUERY, "Can not attach table as not replicated, table is already not replicated");
/// Set new engine /// Set new engine
DatabaseOrdinary::setReplicatedMergeTreeEngine(create, getContext(), to_replicated); DatabaseOrdinary::setReplicatedMergeTreeEngine(create, getContext(), to_replicated);

View File

@ -23,9 +23,9 @@ ${CLICKHOUSE_CLIENT} --allow_deprecated_database_ordinary=1 -n -q "
" "
echo "$(${CLICKHOUSE_CLIENT} --allow_deprecated_database_ordinary=1 --server_logs_file=/dev/null --query="ATTACH TABLE mt AS NOT REPLICATED" 2>&1)" \ echo "$(${CLICKHOUSE_CLIENT} --allow_deprecated_database_ordinary=1 --server_logs_file=/dev/null --query="ATTACH TABLE mt AS NOT REPLICATED" 2>&1)" \
| grep -c 'Table is already not replicated' | grep -c 'Can not attach table as not replicated, table is already not replicated'
echo "$(${CLICKHOUSE_CLIENT} --allow_deprecated_database_ordinary=1 --server_logs_file=/dev/null --query="ATTACH TABLE rmt AS REPLICATED" 2>&1)" \ echo "$(${CLICKHOUSE_CLIENT} --allow_deprecated_database_ordinary=1 --server_logs_file=/dev/null --query="ATTACH TABLE rmt AS REPLICATED" 2>&1)" \
| grep -c 'Table is already replicated' | grep -c 'Can not attach table as replicated, table is already replicated'
echo "$(${CLICKHOUSE_CLIENT} --allow_deprecated_database_ordinary=1 --server_logs_file=/dev/null --query="ATTACH TABLE log AS REPLICATED" 2>&1)" \ echo "$(${CLICKHOUSE_CLIENT} --allow_deprecated_database_ordinary=1 --server_logs_file=/dev/null --query="ATTACH TABLE log AS REPLICATED" 2>&1)" \
| grep -c 'Table engine conversion is supported only for MergeTree family engines' | grep -c 'Table engine conversion is supported only for MergeTree family engines'
echo "$(${CLICKHOUSE_CLIENT} --allow_deprecated_database_ordinary=1 --server_logs_file=/dev/null --query="ATTACH TABLE mt AS REPLICATED ON CLUSTER test_shard_localhost" 2>&1)" \ echo "$(${CLICKHOUSE_CLIENT} --allow_deprecated_database_ordinary=1 --server_logs_file=/dev/null --query="ATTACH TABLE mt AS REPLICATED ON CLUSTER test_shard_localhost" 2>&1)" \