Skip to content

Commit

Permalink
MDEV-21612 Remove COM_MULTI.
Browse files Browse the repository at this point in the history
The server command code 254 is now reserved,
as well as corresponding protocol flag.

Do not reuse them.
  • Loading branch information
vaintroub committed Sep 22, 2020
1 parent aa65bd1 commit c0837c3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions include/mariadb_com.h
Expand Up @@ -94,7 +94,7 @@ enum enum_server_command
COM_UNSUPPORTED= 30,
COM_RESET_CONNECTION = 31,
COM_STMT_BULK_EXECUTE = 250,
COM_MULTI = 254,
COM_RESERVED_1 = 254, /* former COM_MULTI, now removed */
COM_END
};

Expand Down Expand Up @@ -168,7 +168,7 @@ enum enum_server_command
/* MariaDB specific capabilities */
#define MARIADB_CLIENT_FLAGS 0xFFFFFFFF00000000ULL
#define MARIADB_CLIENT_PROGRESS (1ULL << 32)
#define MARIADB_CLIENT_COM_MULTI (1ULL << 33)
#define MARIADB_CLIENT_RESERVED_1 (1ULL << 33) /* Former COM_MULTI, don't use */
#define MARIADB_CLIENT_STMT_BULK_OPERATIONS (1ULL << 34)
/* support of extended data type/format information, since 10.5.0 */
#define MARIADB_CLIENT_EXTENDED_METADATA (1ULL << 35)
Expand All @@ -177,7 +177,6 @@ enum enum_server_command
(!(mysql->server_capabilities & CLIENT_MYSQL))

#define MARIADB_CLIENT_SUPPORTED_FLAGS (MARIADB_CLIENT_PROGRESS |\
MARIADB_CLIENT_COM_MULTI |\
MARIADB_CLIENT_STMT_BULK_OPERATIONS|\
MARIADB_CLIENT_EXTENDED_METADATA)

Expand Down
2 changes: 1 addition & 1 deletion libmariadb/ma_net.c
Expand Up @@ -157,7 +157,7 @@ int ma_net_flush(NET *net)
{
int error=0;

/* don't flush if com_multi is in progress */
/* don't flush if pipelined query is in progress */
if (net->extension->multi_status > COM_MULTI_OFF)
return 0;

Expand Down
2 changes: 1 addition & 1 deletion libmariadb/mariadb_lib.c
Expand Up @@ -470,7 +470,7 @@ int ma_multi_command(MYSQL *mysql, enum enum_multi_status status)
{
size_t len= net->write_pos - net->buff - NET_HEADER_SIZE;

if (len < NET_HEADER_SIZE) /* don't send empty COM_MULTI */
if (len < NET_HEADER_SIZE) /* don't send empty request */
{
ma_net_clear(net);
return 1;
Expand Down
1 change: 0 additions & 1 deletion plugins/trace/trace_example.c
Expand Up @@ -94,7 +94,6 @@ static const char *commands[]= {
"COM_SET_OPTION",
"COM_STMT_FETCH",
"COM_DAEMON",
"COM_MULTI",
"COM_END"
};

Expand Down

0 comments on commit c0837c3

Please sign in to comment.