Log the use of prepared statements

If cache decisions should be logged, we log the presence of
prepared statements as they currently are the primary source
for the cache not caching.
This commit is contained in:
Johan Wikman
2017-03-07 15:45:29 +02:00
parent e1da03ff21
commit b1521e0545

View File

@ -232,6 +232,20 @@ int CacheFilterSession::routeQuery(GWBUF* pPacket)
} }
break; break;
case MYSQL_COM_STMT_PREPARE:
if (log_decisions())
{
MXS_NOTICE("MYSQL_COM_STMT_PREPARE, ignoring.");
}
break;
case MYSQL_COM_STMT_EXECUTE:
if (log_decisions())
{
MXS_NOTICE("MYSQL_COM_STMT_EXECUTE, ignoring.");
}
break;
case MYSQL_COM_QUERY: case MYSQL_COM_QUERY:
if (should_consult_cache(pPacket)) if (should_consult_cache(pPacket))
{ {