From 5d00bf6dca5519eaa5d3635c76ade97eae1a4c6f Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 3 Nov 2003 13:44:23 +0200 Subject: [PATCH] after review fix --- sql/sql_select.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index f209bf886ff..d192ab1fb0e 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -982,7 +982,7 @@ JOIN::optimize() } } - if (select_lex->master_unit()->dependent) + if (select_lex->master_unit()->uncacheable) { if (!(tmp_join= (JOIN*)thd->alloc(sizeof(JOIN)))) DBUG_RETURN(-1); @@ -1053,11 +1053,11 @@ JOIN::reinit() bool JOIN::save_join_tab() { - if (!join_tab_save && select_lex->master_unit()->dependent) + if (!join_tab_save && select_lex->master_unit()->uncacheable) { - if (!(join_tab_save= (JOIN_TAB*) thd->alloc(sizeof(JOIN_TAB) * tables))) + if (!(join_tab_save= (JOIN_TAB*)thd->memdup((gptr) join_tab, + sizeof(JOIN_TAB) * tables))) return 1; - memcpy(join_tab_save, join_tab, sizeof(JOIN_TAB) * tables); } return 0; }