qc: Add minimal support for qc_get_prepare_name

If the query is a PREPARE or EXECUTE statement, then qc_get_prepare_name
will return the name of the prepared statement.
This commit is contained in:
Johan Wikman
2016-10-26 12:48:48 +03:00
parent 19e017e499
commit 7499c1e1bf
5 changed files with 104 additions and 1 deletions

View File

@ -1904,6 +1904,21 @@ qc_query_op_t qc_get_operation(GWBUF* querybuf)
return operation;
}
char* qc_get_prepare_name(GWBUF* stmt)
{
char* name = NULL;
if (stmt)
{
if (ensure_query_is_parsed(stmt))
{
MXS_WARNING("qc_get_prepare_name not implemented yet.");
}
}
return name;
}
namespace
{
@ -2048,6 +2063,7 @@ static QUERY_CLASSIFIER qc =
qc_query_has_clause,
qc_get_affected_fields,
qc_get_database_names,
qc_get_prepare_name,
};
/* @see function load_module in load_utils.c for explanation of the following