Skip to content
Snippets Groups Projects
Commit ddaa5a32 authored by Sergey Ostanevich's avatar Sergey Ostanevich Committed by Serge Petrenko
Browse files

replication: relax rules box.cfg.*_name

We decided to allow underscore in names to provide easier support
for many existent installations.

Closes #9148

NO_CHANGELOG=no updates to the feature description
NO_DOC=update existent doc tickets 3466, 3467, 3468
parent 9e918278
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@ node_name_is_valid_n(const char *name, size_t len)
const char *end = name + len;
while (name < end) {
char c = *(name++);
if (!isalnum(c) && c != '-')
if (!isalnum(c) && c != '-' && c != '_')
return false;
if (tolower(c) != c)
return false;
......
......@@ -15,7 +15,7 @@ test_node_name_is_valid(void)
"1",
"1abc",
"*",
"a_b",
"a+b",
"aBcD",
"a~b",
"{ab}",
......@@ -28,7 +28,7 @@ test_node_name_is_valid(void)
}
const char *good_names[] = {
"a",
"a-b-c",
"a_b-c",
"abc",
"a1b2c3-d4-e5-",
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment