diff options
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 082ef0006cf..47426d28eb5 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -1640,6 +1640,11 @@ JOIN::reinit() if (join_tab_save) memcpy(join_tab, join_tab_save, sizeof(JOIN_TAB) * tables); + /* need to reset ref access state (see join_read_key) */ + if (join_tab) + for (uint i= 0; i < tables; i++) + join_tab[i].ref.key_err= TRUE; + if (tmp_join) restore_tmp(); |