mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
Fix invalid characters in replica_name
This commit is contained in:
parent
054b38d4eb
commit
e01a448bcc
@ -538,6 +538,9 @@ static StoragePtr create(const StorageFactory::Arguments & args)
|
|||||||
|
|
||||||
if (replica_name.empty())
|
if (replica_name.empty())
|
||||||
throw Exception(ErrorCodes::NO_REPLICA_NAME_GIVEN, "No replica name in config{}", verbose_help_message);
|
throw Exception(ErrorCodes::NO_REPLICA_NAME_GIVEN, "No replica name in config{}", verbose_help_message);
|
||||||
|
// '\t' and '\n' will interrupt parsing 'source replica' in ReplicatedMergeTreeLogEntryData::readText
|
||||||
|
if (replica_name.find('\t') != String::npos || replica_name.find('\n') != String::npos)
|
||||||
|
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Replica name must not contain '\\t' or '\\n'");
|
||||||
|
|
||||||
arg_cnt = engine_args.size(); /// Update `arg_cnt` here because extractZooKeeperPathAndReplicaNameFromEngineArgs() could add arguments.
|
arg_cnt = engine_args.size(); /// Update `arg_cnt` here because extractZooKeeperPathAndReplicaNameFromEngineArgs() could add arguments.
|
||||||
arg_num = 2; /// zookeeper_path and replica_name together are always two arguments.
|
arg_num = 2; /// zookeeper_path and replica_name together are always two arguments.
|
||||||
|
Loading…
Reference in New Issue
Block a user