Make MXS_COM_UNDEFINED a part of the enum

This way it is a valid enum value and it prevents UBSAN from complaining
about it.
This commit is contained in:
Markus Mäkelä
2019-05-29 19:08:21 +03:00
parent 4e6ca33053
commit 47ae75c6a5

View File

@ -307,11 +307,10 @@ typedef enum
MXS_COM_RESET_CONNECTION = 31, MXS_COM_RESET_CONNECTION = 31,
MXS_COM_STMT_BULK_EXECUTE = 0xfa, MXS_COM_STMT_BULK_EXECUTE = 0xfa,
MXS_COM_MULTI = 0xfe, MXS_COM_MULTI = 0xfe,
MXS_COM_END MXS_COM_END,
MXS_COM_UNDEFINED = -1
} mxs_mysql_cmd_t; } mxs_mysql_cmd_t;
static const mxs_mysql_cmd_t MXS_COM_UNDEFINED = (mxs_mysql_cmd_t) -1;
/** /**
* A GWBUF property with this name will contain the latest GTID in string form. * A GWBUF property with this name will contain the latest GTID in string form.
* This information is only available in OK packets. * This information is only available in OK packets.