Fix to Coverity issue 72741
This commit is contained in:
@ -470,11 +470,12 @@ static skygw_query_type_t resolve_query_type(
|
|||||||
* When force_data_modify_op_replication is TRUE, gateway distributes
|
* When force_data_modify_op_replication is TRUE, gateway distributes
|
||||||
* all write operations to all nodes.
|
* all write operations to all nodes.
|
||||||
*/
|
*/
|
||||||
|
#if defined(NOT_IN_USE)
|
||||||
bool force_data_modify_op_replication;
|
bool force_data_modify_op_replication;
|
||||||
|
force_data_modify_op_replication = FALSE;
|
||||||
|
#endif /* NOT_IN_USE */
|
||||||
ss_info_dassert(thd != NULL, ("thd is NULL\n"));
|
ss_info_dassert(thd != NULL, ("thd is NULL\n"));
|
||||||
|
|
||||||
force_data_modify_op_replication = FALSE;
|
|
||||||
lex = thd->lex;
|
lex = thd->lex;
|
||||||
|
|
||||||
/** SELECT ..INTO variable|OUTFILE|DUMPFILE */
|
/** SELECT ..INTO variable|OUTFILE|DUMPFILE */
|
||||||
@ -584,6 +585,7 @@ static skygw_query_type_t resolve_query_type(
|
|||||||
if (is_log_table_write_query(lex->sql_command) ||
|
if (is_log_table_write_query(lex->sql_command) ||
|
||||||
is_update_query(lex->sql_command))
|
is_update_query(lex->sql_command))
|
||||||
{
|
{
|
||||||
|
#if defined(NOT_IN_USE)
|
||||||
if (thd->variables.sql_log_bin == 0 &&
|
if (thd->variables.sql_log_bin == 0 &&
|
||||||
force_data_modify_op_replication)
|
force_data_modify_op_replication)
|
||||||
{
|
{
|
||||||
@ -591,6 +593,7 @@ static skygw_query_type_t resolve_query_type(
|
|||||||
type |= QUERY_TYPE_SESSION_WRITE;
|
type |= QUERY_TYPE_SESSION_WRITE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif /* NOT_IN_USE */
|
||||||
{
|
{
|
||||||
/** Written to binlog, that is, replicated except tmp tables */
|
/** Written to binlog, that is, replicated except tmp tables */
|
||||||
type |= QUERY_TYPE_WRITE; /*< to master */
|
type |= QUERY_TYPE_WRITE; /*< to master */
|
||||||
|
Reference in New Issue
Block a user