qc: Remove QUERY_IS_TYPE macro
Explicit call to qc_query_is_type() instead.
This commit is contained in:
@ -408,12 +408,4 @@ const char* qc_type_to_string(qc_query_type_t type);
|
|||||||
*/
|
*/
|
||||||
char* qc_typemask_to_string(uint32_t typemask);
|
char* qc_typemask_to_string(uint32_t typemask);
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
* Synonym for qc_query_is_type().
|
|
||||||
*
|
|
||||||
* @see qc_query_is_type
|
|
||||||
*/
|
|
||||||
#define QUERY_IS_TYPE(typemask, type) qc_query_is_type(typemask, type)
|
|
||||||
|
|
||||||
MXS_END_DECLS
|
MXS_END_DECLS
|
||||||
|
@ -681,12 +681,12 @@ static uint32_t resolve_query_type(THD* thd)
|
|||||||
#endif
|
#endif
|
||||||
// TODO: This test is meaningless, since at this point
|
// TODO: This test is meaningless, since at this point
|
||||||
// TODO: qtype (not type) is QUERY_TYPE_UNKNOWN.
|
// TODO: qtype (not type) is QUERY_TYPE_UNKNOWN.
|
||||||
if (QUERY_IS_TYPE(qtype, QUERY_TYPE_UNKNOWN) ||
|
if (qc_query_is_type(qtype, QUERY_TYPE_UNKNOWN) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_LOCAL_READ) ||
|
qc_query_is_type(qtype, QUERY_TYPE_LOCAL_READ) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_READ) ||
|
qc_query_is_type(qtype, QUERY_TYPE_READ) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_USERVAR_READ) ||
|
qc_query_is_type(qtype, QUERY_TYPE_USERVAR_READ) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_SYSVAR_READ) ||
|
qc_query_is_type(qtype, QUERY_TYPE_SYSVAR_READ) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_GSYSVAR_READ))
|
qc_query_is_type(qtype, QUERY_TYPE_GSYSVAR_READ))
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* These values won't change qtype more restrictive than write.
|
* These values won't change qtype more restrictive than write.
|
||||||
|
@ -84,7 +84,7 @@ bool route_single_stmt(ROUTER_INSTANCE *inst, ROUTER_CLIENT_SES *rses,
|
|||||||
* transaction is committed and autocommit is enabled again.
|
* transaction is committed and autocommit is enabled again.
|
||||||
*/
|
*/
|
||||||
if (rses->rses_autocommit_enabled &&
|
if (rses->rses_autocommit_enabled &&
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_DISABLE_AUTOCOMMIT))
|
qc_query_is_type(qtype, QUERY_TYPE_DISABLE_AUTOCOMMIT))
|
||||||
{
|
{
|
||||||
rses->rses_autocommit_enabled = false;
|
rses->rses_autocommit_enabled = false;
|
||||||
|
|
||||||
@ -94,7 +94,7 @@ bool route_single_stmt(ROUTER_INSTANCE *inst, ROUTER_CLIENT_SES *rses,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!rses->rses_transaction_active &&
|
else if (!rses->rses_transaction_active &&
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_BEGIN_TRX))
|
qc_query_is_type(qtype, QUERY_TYPE_BEGIN_TRX))
|
||||||
{
|
{
|
||||||
rses->rses_transaction_active = true;
|
rses->rses_transaction_active = true;
|
||||||
}
|
}
|
||||||
@ -102,13 +102,13 @@ bool route_single_stmt(ROUTER_INSTANCE *inst, ROUTER_CLIENT_SES *rses,
|
|||||||
* Explicit COMMIT and ROLLBACK, implicit COMMIT.
|
* Explicit COMMIT and ROLLBACK, implicit COMMIT.
|
||||||
*/
|
*/
|
||||||
if (rses->rses_autocommit_enabled && rses->rses_transaction_active &&
|
if (rses->rses_autocommit_enabled && rses->rses_transaction_active &&
|
||||||
(QUERY_IS_TYPE(qtype, QUERY_TYPE_COMMIT) ||
|
(qc_query_is_type(qtype, QUERY_TYPE_COMMIT) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_ROLLBACK)))
|
qc_query_is_type(qtype, QUERY_TYPE_ROLLBACK)))
|
||||||
{
|
{
|
||||||
rses->rses_transaction_active = false;
|
rses->rses_transaction_active = false;
|
||||||
}
|
}
|
||||||
else if (!rses->rses_autocommit_enabled &&
|
else if (!rses->rses_autocommit_enabled &&
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_ENABLE_AUTOCOMMIT))
|
qc_query_is_type(qtype, QUERY_TYPE_ENABLE_AUTOCOMMIT))
|
||||||
{
|
{
|
||||||
rses->rses_autocommit_enabled = true;
|
rses->rses_autocommit_enabled = true;
|
||||||
rses->rses_transaction_active = false;
|
rses->rses_transaction_active = false;
|
||||||
@ -727,13 +727,13 @@ route_target_t get_route_target(ROUTER_CLIENT_SES *rses,
|
|||||||
* These queries are not affected by hints
|
* These queries are not affected by hints
|
||||||
*/
|
*/
|
||||||
else if (!load_active &&
|
else if (!load_active &&
|
||||||
(QUERY_IS_TYPE(qtype, QUERY_TYPE_SESSION_WRITE) ||
|
(qc_query_is_type(qtype, QUERY_TYPE_SESSION_WRITE) ||
|
||||||
/** Configured to allow writing variables to all nodes */
|
/** Configured to allow writing variables to all nodes */
|
||||||
(use_sql_variables_in == TYPE_ALL &&
|
(use_sql_variables_in == TYPE_ALL &&
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_GSYSVAR_WRITE)) ||
|
qc_query_is_type(qtype, QUERY_TYPE_GSYSVAR_WRITE)) ||
|
||||||
/** enable or disable autocommit are always routed to all */
|
/** enable or disable autocommit are always routed to all */
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_ENABLE_AUTOCOMMIT) ||
|
qc_query_is_type(qtype, QUERY_TYPE_ENABLE_AUTOCOMMIT) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_DISABLE_AUTOCOMMIT)))
|
qc_query_is_type(qtype, QUERY_TYPE_DISABLE_AUTOCOMMIT)))
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* This is problematic query because it would be routed to all
|
* This is problematic query because it would be routed to all
|
||||||
@ -750,9 +750,9 @@ route_target_t get_route_target(ROUTER_CLIENT_SES *rses,
|
|||||||
* the execution of the prepared statements to the right server would be
|
* the execution of the prepared statements to the right server would be
|
||||||
* an easy one. Currently this is not supported.
|
* an easy one. Currently this is not supported.
|
||||||
*/
|
*/
|
||||||
if (QUERY_IS_TYPE(qtype, QUERY_TYPE_READ) &&
|
if (qc_query_is_type(qtype, QUERY_TYPE_READ) &&
|
||||||
!(QUERY_IS_TYPE(qtype, QUERY_TYPE_PREPARE_STMT) ||
|
!(qc_query_is_type(qtype, QUERY_TYPE_PREPARE_STMT) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_PREPARE_NAMED_STMT)))
|
qc_query_is_type(qtype, QUERY_TYPE_PREPARE_NAMED_STMT)))
|
||||||
{
|
{
|
||||||
MXS_WARNING("The query can't be routed to all "
|
MXS_WARNING("The query can't be routed to all "
|
||||||
"backend servers because it includes SELECT and "
|
"backend servers because it includes SELECT and "
|
||||||
@ -770,40 +770,40 @@ route_target_t get_route_target(ROUTER_CLIENT_SES *rses,
|
|||||||
* Hints may affect on routing of the following queries
|
* Hints may affect on routing of the following queries
|
||||||
*/
|
*/
|
||||||
else if (!trx_active && !load_active &&
|
else if (!trx_active && !load_active &&
|
||||||
!QUERY_IS_TYPE(qtype, QUERY_TYPE_WRITE) &&
|
!qc_query_is_type(qtype, QUERY_TYPE_WRITE) &&
|
||||||
(QUERY_IS_TYPE(qtype, QUERY_TYPE_READ) || /*< any SELECT */
|
(qc_query_is_type(qtype, QUERY_TYPE_READ) || /*< any SELECT */
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_SHOW_TABLES) || /*< 'SHOW TABLES' */
|
qc_query_is_type(qtype, QUERY_TYPE_SHOW_TABLES) || /*< 'SHOW TABLES' */
|
||||||
QUERY_IS_TYPE(qtype,
|
qc_query_is_type(qtype,
|
||||||
QUERY_TYPE_USERVAR_READ) || /*< read user var */
|
QUERY_TYPE_USERVAR_READ) || /*< read user var */
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_SYSVAR_READ) || /*< read sys var */
|
qc_query_is_type(qtype, QUERY_TYPE_SYSVAR_READ) || /*< read sys var */
|
||||||
QUERY_IS_TYPE(qtype,
|
qc_query_is_type(qtype,
|
||||||
QUERY_TYPE_EXEC_STMT) || /*< prepared stmt exec */
|
QUERY_TYPE_EXEC_STMT) || /*< prepared stmt exec */
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_PREPARE_STMT) ||
|
qc_query_is_type(qtype, QUERY_TYPE_PREPARE_STMT) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_PREPARE_NAMED_STMT) ||
|
qc_query_is_type(qtype, QUERY_TYPE_PREPARE_NAMED_STMT) ||
|
||||||
QUERY_IS_TYPE(qtype,
|
qc_query_is_type(qtype,
|
||||||
QUERY_TYPE_GSYSVAR_READ))) /*< read global sys var */
|
QUERY_TYPE_GSYSVAR_READ))) /*< read global sys var */
|
||||||
{
|
{
|
||||||
/** First set expected targets before evaluating hints */
|
/** First set expected targets before evaluating hints */
|
||||||
if (!QUERY_IS_TYPE(qtype, QUERY_TYPE_MASTER_READ) &&
|
if (!qc_query_is_type(qtype, QUERY_TYPE_MASTER_READ) &&
|
||||||
(QUERY_IS_TYPE(qtype, QUERY_TYPE_READ) ||
|
(qc_query_is_type(qtype, QUERY_TYPE_READ) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_SHOW_TABLES) || /*< 'SHOW TABLES' */
|
qc_query_is_type(qtype, QUERY_TYPE_SHOW_TABLES) || /*< 'SHOW TABLES' */
|
||||||
/** Configured to allow reading variables from slaves */
|
/** Configured to allow reading variables from slaves */
|
||||||
(use_sql_variables_in == TYPE_ALL &&
|
(use_sql_variables_in == TYPE_ALL &&
|
||||||
(QUERY_IS_TYPE(qtype, QUERY_TYPE_USERVAR_READ) ||
|
(qc_query_is_type(qtype, QUERY_TYPE_USERVAR_READ) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_SYSVAR_READ) ||
|
qc_query_is_type(qtype, QUERY_TYPE_SYSVAR_READ) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_GSYSVAR_READ)))))
|
qc_query_is_type(qtype, QUERY_TYPE_GSYSVAR_READ)))))
|
||||||
{
|
{
|
||||||
target = TARGET_SLAVE;
|
target = TARGET_SLAVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (QUERY_IS_TYPE(qtype, QUERY_TYPE_MASTER_READ) ||
|
if (qc_query_is_type(qtype, QUERY_TYPE_MASTER_READ) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_EXEC_STMT) ||
|
qc_query_is_type(qtype, QUERY_TYPE_EXEC_STMT) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_PREPARE_STMT) ||
|
qc_query_is_type(qtype, QUERY_TYPE_PREPARE_STMT) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_PREPARE_NAMED_STMT) ||
|
qc_query_is_type(qtype, QUERY_TYPE_PREPARE_NAMED_STMT) ||
|
||||||
/** Configured not to allow reading variables from slaves */
|
/** Configured not to allow reading variables from slaves */
|
||||||
(use_sql_variables_in == TYPE_MASTER &&
|
(use_sql_variables_in == TYPE_MASTER &&
|
||||||
(QUERY_IS_TYPE(qtype, QUERY_TYPE_USERVAR_READ) ||
|
(qc_query_is_type(qtype, QUERY_TYPE_USERVAR_READ) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_SYSVAR_READ))))
|
qc_query_is_type(qtype, QUERY_TYPE_SYSVAR_READ))))
|
||||||
{
|
{
|
||||||
target = TARGET_MASTER;
|
target = TARGET_MASTER;
|
||||||
}
|
}
|
||||||
@ -818,26 +818,26 @@ route_target_t get_route_target(ROUTER_CLIENT_SES *rses,
|
|||||||
{
|
{
|
||||||
/** hints don't affect on routing */
|
/** hints don't affect on routing */
|
||||||
ss_dassert(trx_active ||
|
ss_dassert(trx_active ||
|
||||||
(QUERY_IS_TYPE(qtype, QUERY_TYPE_WRITE) ||
|
(qc_query_is_type(qtype, QUERY_TYPE_WRITE) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_MASTER_READ) ||
|
qc_query_is_type(qtype, QUERY_TYPE_MASTER_READ) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_SESSION_WRITE) ||
|
qc_query_is_type(qtype, QUERY_TYPE_SESSION_WRITE) ||
|
||||||
(QUERY_IS_TYPE(qtype, QUERY_TYPE_USERVAR_READ) &&
|
(qc_query_is_type(qtype, QUERY_TYPE_USERVAR_READ) &&
|
||||||
use_sql_variables_in == TYPE_MASTER) ||
|
use_sql_variables_in == TYPE_MASTER) ||
|
||||||
(QUERY_IS_TYPE(qtype, QUERY_TYPE_SYSVAR_READ) &&
|
(qc_query_is_type(qtype, QUERY_TYPE_SYSVAR_READ) &&
|
||||||
use_sql_variables_in == TYPE_MASTER) ||
|
use_sql_variables_in == TYPE_MASTER) ||
|
||||||
(QUERY_IS_TYPE(qtype, QUERY_TYPE_GSYSVAR_READ) &&
|
(qc_query_is_type(qtype, QUERY_TYPE_GSYSVAR_READ) &&
|
||||||
use_sql_variables_in == TYPE_MASTER) ||
|
use_sql_variables_in == TYPE_MASTER) ||
|
||||||
(QUERY_IS_TYPE(qtype, QUERY_TYPE_GSYSVAR_WRITE) &&
|
(qc_query_is_type(qtype, QUERY_TYPE_GSYSVAR_WRITE) &&
|
||||||
use_sql_variables_in == TYPE_MASTER) ||
|
use_sql_variables_in == TYPE_MASTER) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_BEGIN_TRX) ||
|
qc_query_is_type(qtype, QUERY_TYPE_BEGIN_TRX) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_ENABLE_AUTOCOMMIT) ||
|
qc_query_is_type(qtype, QUERY_TYPE_ENABLE_AUTOCOMMIT) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_DISABLE_AUTOCOMMIT) ||
|
qc_query_is_type(qtype, QUERY_TYPE_DISABLE_AUTOCOMMIT) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_ROLLBACK) ||
|
qc_query_is_type(qtype, QUERY_TYPE_ROLLBACK) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_COMMIT) ||
|
qc_query_is_type(qtype, QUERY_TYPE_COMMIT) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_EXEC_STMT) ||
|
qc_query_is_type(qtype, QUERY_TYPE_EXEC_STMT) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_CREATE_TMP_TABLE) ||
|
qc_query_is_type(qtype, QUERY_TYPE_CREATE_TMP_TABLE) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_READ_TMP_TABLE) ||
|
qc_query_is_type(qtype, QUERY_TYPE_READ_TMP_TABLE) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_UNKNOWN)));
|
qc_query_is_type(qtype, QUERY_TYPE_UNKNOWN)));
|
||||||
target = TARGET_MASTER;
|
target = TARGET_MASTER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,11 +147,11 @@ qc_query_type_t is_read_tmp_table(ROUTER_CLIENT_SES *router_cli_ses,
|
|||||||
|
|
||||||
dbname = (char *)data->db;
|
dbname = (char *)data->db;
|
||||||
|
|
||||||
if (QUERY_IS_TYPE(qtype, QUERY_TYPE_READ) ||
|
if (qc_query_is_type(qtype, QUERY_TYPE_READ) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_LOCAL_READ) ||
|
qc_query_is_type(qtype, QUERY_TYPE_LOCAL_READ) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_USERVAR_READ) ||
|
qc_query_is_type(qtype, QUERY_TYPE_USERVAR_READ) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_SYSVAR_READ) ||
|
qc_query_is_type(qtype, QUERY_TYPE_SYSVAR_READ) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_GSYSVAR_READ))
|
qc_query_is_type(qtype, QUERY_TYPE_GSYSVAR_READ))
|
||||||
{
|
{
|
||||||
tbl = qc_get_table_names(querybuf, &tsize, false);
|
tbl = qc_get_table_names(querybuf, &tsize, false);
|
||||||
|
|
||||||
@ -199,7 +199,7 @@ qc_query_type_t is_read_tmp_table(ROUTER_CLIENT_SES *router_cli_ses,
|
|||||||
void check_create_tmp_table(ROUTER_CLIENT_SES *router_cli_ses,
|
void check_create_tmp_table(ROUTER_CLIENT_SES *router_cli_ses,
|
||||||
GWBUF *querybuf, qc_query_type_t type)
|
GWBUF *querybuf, qc_query_type_t type)
|
||||||
{
|
{
|
||||||
if (!QUERY_IS_TYPE(type, QUERY_TYPE_CREATE_TMP_TABLE))
|
if (!qc_query_is_type(type, QUERY_TYPE_CREATE_TMP_TABLE))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -524,7 +524,7 @@ char* get_shard_target_name(ROUTER_INSTANCE* router,
|
|||||||
|
|
||||||
/* Check if the query is a show tables query with a specific database */
|
/* Check if the query is a show tables query with a specific database */
|
||||||
|
|
||||||
if (QUERY_IS_TYPE(qtype, QUERY_TYPE_SHOW_TABLES))
|
if (qc_query_is_type(qtype, QUERY_TYPE_SHOW_TABLES))
|
||||||
{
|
{
|
||||||
query = modutil_get_SQL(buffer);
|
query = modutil_get_SQL(buffer);
|
||||||
if ((tmp = strcasestr(query, "from")))
|
if ((tmp = strcasestr(query, "from")))
|
||||||
@ -1457,19 +1457,19 @@ static route_target_t get_shard_route_target(qc_query_type_t qtype,
|
|||||||
/**
|
/**
|
||||||
* These queries are not affected by hints
|
* These queries are not affected by hints
|
||||||
*/
|
*/
|
||||||
if (QUERY_IS_TYPE(qtype, QUERY_TYPE_SESSION_WRITE) ||
|
if (qc_query_is_type(qtype, QUERY_TYPE_SESSION_WRITE) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_PREPARE_STMT) ||
|
qc_query_is_type(qtype, QUERY_TYPE_PREPARE_STMT) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_PREPARE_NAMED_STMT) ||
|
qc_query_is_type(qtype, QUERY_TYPE_PREPARE_NAMED_STMT) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_GSYSVAR_WRITE) ||
|
qc_query_is_type(qtype, QUERY_TYPE_GSYSVAR_WRITE) ||
|
||||||
/** enable or disable autocommit are always routed to all */
|
/** enable or disable autocommit are always routed to all */
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_ENABLE_AUTOCOMMIT) ||
|
qc_query_is_type(qtype, QUERY_TYPE_ENABLE_AUTOCOMMIT) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_DISABLE_AUTOCOMMIT))
|
qc_query_is_type(qtype, QUERY_TYPE_DISABLE_AUTOCOMMIT))
|
||||||
{
|
{
|
||||||
/** hints don't affect on routing */
|
/** hints don't affect on routing */
|
||||||
target = TARGET_ALL;
|
target = TARGET_ALL;
|
||||||
}
|
}
|
||||||
else if (QUERY_IS_TYPE(qtype, QUERY_TYPE_SYSVAR_READ) ||
|
else if (qc_query_is_type(qtype, QUERY_TYPE_SYSVAR_READ) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_GSYSVAR_READ))
|
qc_query_is_type(qtype, QUERY_TYPE_GSYSVAR_READ))
|
||||||
{
|
{
|
||||||
target = TARGET_ANY;
|
target = TARGET_ANY;
|
||||||
}
|
}
|
||||||
@ -1559,11 +1559,11 @@ qc_query_type_t is_read_tmp_table(ROUTER* instance,
|
|||||||
rses_prop_tmp = router_cli_ses->rses_properties[RSES_PROP_TYPE_TMPTABLES];
|
rses_prop_tmp = router_cli_ses->rses_properties[RSES_PROP_TYPE_TMPTABLES];
|
||||||
dbname = router_cli_ses->current_db;
|
dbname = router_cli_ses->current_db;
|
||||||
|
|
||||||
if (QUERY_IS_TYPE(qtype, QUERY_TYPE_READ) ||
|
if (qc_query_is_type(qtype, QUERY_TYPE_READ) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_LOCAL_READ) ||
|
qc_query_is_type(qtype, QUERY_TYPE_LOCAL_READ) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_USERVAR_READ) ||
|
qc_query_is_type(qtype, QUERY_TYPE_USERVAR_READ) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_SYSVAR_READ) ||
|
qc_query_is_type(qtype, QUERY_TYPE_SYSVAR_READ) ||
|
||||||
QUERY_IS_TYPE(qtype, QUERY_TYPE_GSYSVAR_READ))
|
qc_query_is_type(qtype, QUERY_TYPE_GSYSVAR_READ))
|
||||||
{
|
{
|
||||||
tbl = qc_get_table_names(querybuf, &tsize, false);
|
tbl = qc_get_table_names(querybuf, &tsize, false);
|
||||||
|
|
||||||
@ -1633,7 +1633,7 @@ void check_create_tmp_table(ROUTER* instance,
|
|||||||
rses_prop_tmp = router_cli_ses->rses_properties[RSES_PROP_TYPE_TMPTABLES];
|
rses_prop_tmp = router_cli_ses->rses_properties[RSES_PROP_TYPE_TMPTABLES];
|
||||||
dbname = router_cli_ses->current_db;
|
dbname = router_cli_ses->current_db;
|
||||||
|
|
||||||
if (QUERY_IS_TYPE(type, QUERY_TYPE_CREATE_TMP_TABLE))
|
if (qc_query_is_type(type, QUERY_TYPE_CREATE_TMP_TABLE))
|
||||||
{
|
{
|
||||||
bool is_temp = true;
|
bool is_temp = true;
|
||||||
char* tblname = NULL;
|
char* tblname = NULL;
|
||||||
@ -2081,7 +2081,7 @@ static int routeQuery(ROUTER* instance,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Create the response to the SHOW DATABASES from the mapped databases */
|
/** Create the response to the SHOW DATABASES from the mapped databases */
|
||||||
if (QUERY_IS_TYPE(qtype, QUERY_TYPE_SHOW_DATABASES))
|
if (qc_query_is_type(qtype, QUERY_TYPE_SHOW_DATABASES))
|
||||||
{
|
{
|
||||||
if (send_database_list(inst, router_cli_ses))
|
if (send_database_list(inst, router_cli_ses))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user