Expect at least two arguments for create server

When a server is created in server_create, it sets the port to the default
of 3306 if no explicit port is defined. The code that called this function
still expected a minimum of three arguments: name, address and port.
This commit is contained in:
Markus Makela
2016-11-12 23:49:26 +02:00
parent 878d01e276
commit a5bb02bd14

View File

@ -984,9 +984,9 @@ static void createServer(DCB *dcb, char *name, char *address, char *port,
struct subcommand createoptions[] =
{
{
"server", 3, 6, createServer,
"server", 2, 6, createServer,
"Create a new server",
"Usage: create server NAME HOST PORT [PROTOCOL] [AUTHENTICATOR] [OPTIONS]\n"
"Usage: create server NAME HOST [PORT] [PROTOCOL] [AUTHENTICATOR] [OPTIONS]\n"
"Create a new server from the following parameters.\n"
"NAME Server name\n"
"HOST Server host address\n"