Also extract SQL from COM_STMT_PREPARE

COM_STMT_PREPARE contains the plain-text prepared statement so it can be
extracted as if it were a COM_QUERY command.
This commit is contained in:
Markus Mäkelä 2017-09-22 12:23:40 +03:00
parent 2d590308b6
commit 7082edc4ed

View File

@ -108,7 +108,7 @@ modutil_extract_SQL(GWBUF *buf, char **sql, int *length)
{
unsigned char *ptr;
if (!modutil_is_SQL(buf))
if (!modutil_is_SQL(buf) && !modutil_is_SQL_prepare(buf))
{
return 0;
}