MXS-1936 Make qc_mysqlembedded compatible with qc_sqlite

qc_mysqlembedded must also be updated to handle the new type
QUERY_TYPE_DEALLOC_PREPARE. Some adjustements were also needed
elsewhere.
This commit is contained in:
Johan Wikman 2018-06-21 10:39:53 +03:00
parent 9e4b86ff0a
commit 45bda0f72e
3 changed files with 14 additions and 1 deletions

View File

@ -922,7 +922,7 @@ static uint32_t resolve_query_type(parsing_info_t *pi, THD* thd)
break;
case SQLCOM_DEALLOCATE_PREPARE:
type |= QUERY_TYPE_WRITE;
type |= QUERY_TYPE_DEALLOC_PREPARE;
break;
case SQLCOM_SELECT:

View File

@ -140,6 +140,10 @@ char* get_types_as_string(uint32_t types)
{
s = append(s, "QUERY_TYPE_SHOW_TABLES", &len);
}
if (types & QUERY_TYPE_DEALLOC_PREPARE)
{
s = append(s, "QUERY_TYPE_DEALLOC_PREPARE", &len);
}
if (!s)
{

View File

@ -604,6 +604,14 @@ struct type_name_info type_to_type_name_info(qc_query_type_t type)
}
break;
case QUERY_TYPE_DEALLOC_PREPARE:
{
static const char name[] = "QUERY_TYPE_DEALLOC_PREPARE";
info.name = name;
info.name_len = sizeof(name) - 1;
}
break;
default:
{
static const char name[] = "UNKNOWN_QUERY_TYPE";
@ -650,6 +658,7 @@ static const qc_query_type_t QUERY_TYPES[] =
QUERY_TYPE_READ_TMP_TABLE,
QUERY_TYPE_SHOW_DATABASES,
QUERY_TYPE_SHOW_TABLES,
QUERY_TYPE_DEALLOC_PREPARE,
};
static const int N_QUERY_TYPES = sizeof(QUERY_TYPES) / sizeof(QUERY_TYPES[0]);