summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorGeorgi Kodinov <joro@sun.com>2009-12-15 19:10:06 +0200
committerGeorgi Kodinov <joro@sun.com>2009-12-15 19:10:06 +0200
commitb72f27895826552f0bfe5019559f35cf634e0ffe (patch)
treeefd2859e76b9f9c813b19d21baf0f2e8d60c1b1f /sql/sql_select.cc
parentefc5e0a8a6df0b7d02bcd5d3e646dd7ccebd021e (diff)
downloadmariadb-git-b72f27895826552f0bfe5019559f35cf634e0ffe.tar.gz
Bug #48709: Assertion failed in sql_select.cc:11782:
int join_read_key(JOIN_TAB*) The eq_ref access method TABLE_REF (accessed through JOIN_TAB) to save state and to track if this is the first row it finds or not. This state was not reset on subquery re-execution causing an assert. Fixed by resetting the state before the subquery re-execution.
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index f655db0fc32..d22a23a10d4 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -1553,6 +1553,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();