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:
parent
9e4b86ff0a
commit
45bda0f72e
@ -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:
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user