Skip to content

Commit c5dd2ab

Browse files
sjaakolaJan Lindström
authored andcommitted
Refs MW-245 - logic was wrong in detecting if queries are allowed in non primary node. it allowed select with no table list to execute even if dirty reads was not specified
1 parent 84d4ab5 commit c5dd2ab

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sql/sql_parse.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2686,7 +2686,8 @@ mysql_execute_command(THD *thd)
26862686
!(wsrep_ready && wsrep_reject_queries == WSREP_REJECT_NONE) &&
26872687
!(thd->variables.wsrep_dirty_reads &&
26882688
(sql_command_flags[lex->sql_command] & CF_CHANGES_DATA) == 0) &&
2689-
!wsrep_tables_accessible_when_detached(all_tables) &&
2689+
!(thd->variables.wsrep_dirty_reads &&
2690+
wsrep_tables_accessible_when_detached(all_tables)) &&
26902691
lex->sql_command != SQLCOM_SET_OPTION &&
26912692
!wsrep_is_show_query(lex->sql_command))
26922693
{

0 commit comments

Comments
 (0)