mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
fix
This commit is contained in:
parent
41e99cf261
commit
1c37ac7c9d
@ -23,6 +23,7 @@ namespace DB
|
||||
namespace ErrorCodes
|
||||
{
|
||||
extern const int NOT_IMPLEMENTED;
|
||||
extern const int LOGICAL_ERROR;
|
||||
}
|
||||
|
||||
template<>
|
||||
@ -56,7 +57,17 @@ void DatabaseMaterializeMySQL<Base>::rethrowExceptionIfNeed() const
|
||||
|
||||
if (!settings->allows_query_when_mysql_lost && exception)
|
||||
{
|
||||
std::rethrow_exception(exception);
|
||||
try
|
||||
{
|
||||
std::rethrow_exception(exception);
|
||||
}
|
||||
catch (Exception & ex)
|
||||
{
|
||||
/// This method can be called from multiple threads
|
||||
/// and Exception can be modified concurrently by calling addMessage(...),
|
||||
/// so we rethrow a copy.
|
||||
throw Exception(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -161,7 +161,7 @@ BlockIO InterpreterCreateQuery::createDatabase(ASTCreateQuery & create)
|
||||
|
||||
if (create_from_user)
|
||||
{
|
||||
auto & default_engine = context.getSettingsRef().default_database_engine.value;
|
||||
const auto & default_engine = context.getSettingsRef().default_database_engine.value;
|
||||
if (create.uuid == UUIDHelpers::Nil && default_engine == DefaultDatabaseEngine::Atomic)
|
||||
create.uuid = UUIDHelpers::generateV4(); /// Will enable Atomic engine for nested database
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user