summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorGeorgi Kodinov <joro@sun.com>2009-12-15 14:20:29 +0200
committerGeorgi Kodinov <joro@sun.com>2009-12-15 14:20:29 +0200
commit188c6f8c7474a0c23282451c592df66048734c04 (patch)
tree1bc85539fb390643825d37fef23206e72f1bb554 /sql
parentdd5550d39616ba797d2c0e72e1c747f09b8cb446 (diff)
downloadmariadb-git-188c6f8c7474a0c23282451c592df66048734c04.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')
-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 e6980bb2add..cbee09f1fdb 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -1622,6 +1622,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();