Fixes to Coverity cases 72678 (retry), 72693
This commit is contained in:
@ -1241,7 +1241,7 @@ static route_target_t get_route_target (
|
||||
target_t use_sql_variables_in,
|
||||
HINT* hint)
|
||||
{
|
||||
route_target_t target;
|
||||
route_target_t target = TARGET_UNDEFINED;
|
||||
/**
|
||||
* These queries are not affected by hints
|
||||
*/
|
||||
@ -1355,6 +1355,11 @@ static route_target_t get_route_target (
|
||||
}
|
||||
hint = hint->next;
|
||||
} /*< while (hint != NULL) */
|
||||
/** If nothing matches then choose the master */
|
||||
if ((target & (TARGET_ALL|TARGET_SLAVE|TARGET_MASTER)) == target)
|
||||
{
|
||||
target = TARGET_MASTER;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user