diff --git a/include/maxscale/protocol/mysql.h b/include/maxscale/protocol/mysql.h index b5baedf00..454280b73 100644 --- a/include/maxscale/protocol/mysql.h +++ b/include/maxscale/protocol/mysql.h @@ -272,6 +272,9 @@ typedef enum #define MXS_MARIA_CAP_COM_MULTI (1 << 1) #define MXS_MARIA_CAP_STMT_BULK_OPERATIONS (1 << 2) +// Only bulk operations are supported +#define MXS_MARIADB_CAP_SERVER MXS_MARIA_CAP_STMT_BULK_OPERATIONS + typedef enum { MXS_COM_SLEEP = 0, diff --git a/server/modules/protocol/MySQL/mariadbclient/mysql_client.cc b/server/modules/protocol/MySQL/mariadbclient/mysql_client.cc index f8c3b51a5..763f1de2f 100644 --- a/server/modules/protocol/MySQL/mariadbclient/mysql_client.cc +++ b/server/modules/protocol/MySQL/mariadbclient/mysql_client.cc @@ -661,7 +661,8 @@ static void store_client_information(DCB* dcb, GWBUF* buffer) * there are extra capabilities stored in the last 4 bytes of the 23 byte filler. */ if ((proto->client_capabilities & GW_MYSQL_CAPABILITIES_CLIENT_MYSQL) == 0) { - proto->extra_capabilities = gw_mysql_get_byte4(data + MARIADB_CAP_OFFSET); + uint32_t caps = gw_mysql_get_byte4(data + MARIADB_CAP_OFFSET); + proto->extra_capabilities = caps & MXS_MARIADB_CAP_SERVER; } if (len > MYSQL_AUTH_PACKET_BASE_SIZE)