Loading sql/sql_select.cc +8 −8 Original line number Diff line number Diff line Loading @@ -4956,23 +4956,23 @@ make_simple_join(JOIN *join,TABLE *tmp_table) Reuse TABLE * and JOIN_TAB if already allocated by a previous call to this function through JOIN::exec (may happen for sub-queries). */ if (!join->table_cache) if (!join->table_reexec) { if (!(join->table_cache= (TABLE**) join->thd->alloc(sizeof(TABLE*)))) if (!(join->table_reexec= (TABLE**) join->thd->alloc(sizeof(TABLE*)))) DBUG_RETURN(TRUE); /* purecov: inspected */ if (join->tmp_join) join->tmp_join->table_cache= join->table_cache; join->tmp_join->table_reexec= join->table_reexec; } if (!join->join_tab_cache) if (!join->join_tab_reexec) { if (!(join->join_tab_cache= if (!(join->join_tab_reexec= (JOIN_TAB*) join->thd->alloc(sizeof(JOIN_TAB)))) DBUG_RETURN(TRUE); /* purecov: inspected */ if (join->tmp_join) join->tmp_join->join_tab_cache= join->join_tab_cache; join->tmp_join->join_tab_reexec= join->join_tab_reexec; } tableptr= join->table_cache; join_tab= join->join_tab_cache; tableptr= join->table_reexec; join_tab= join->join_tab_reexec; join->join_tab=join_tab; join->table=tableptr; tableptr[0]=tmp_table; Loading sql/sql_select.h +4 −4 Original line number Diff line number Diff line Loading @@ -290,8 +290,8 @@ class JOIN :public Sql_alloc excessive memory usage. */ SORT_FIELD *sortorder; // make_unireg_sortorder() TABLE **table_cache; // make_simple_join() JOIN_TAB *join_tab_cache; // make_simple_join() TABLE **table_reexec; // make_simple_join() JOIN_TAB *join_tab_reexec; // make_simple_join() /* end of allocation caching storage */ JOIN(THD *thd_arg, List<Item> &fields_arg, ulonglong select_options_arg, Loading Loading @@ -320,8 +320,8 @@ class JOIN :public Sql_alloc exec_tmp_table1= 0; exec_tmp_table2= 0; sortorder= 0; table_cache= 0; join_tab_cache= 0; table_reexec= 0; join_tab_reexec= 0; thd= thd_arg; sum_funcs= sum_funcs2= 0; procedure= 0; Loading Loading
sql/sql_select.cc +8 −8 Original line number Diff line number Diff line Loading @@ -4956,23 +4956,23 @@ make_simple_join(JOIN *join,TABLE *tmp_table) Reuse TABLE * and JOIN_TAB if already allocated by a previous call to this function through JOIN::exec (may happen for sub-queries). */ if (!join->table_cache) if (!join->table_reexec) { if (!(join->table_cache= (TABLE**) join->thd->alloc(sizeof(TABLE*)))) if (!(join->table_reexec= (TABLE**) join->thd->alloc(sizeof(TABLE*)))) DBUG_RETURN(TRUE); /* purecov: inspected */ if (join->tmp_join) join->tmp_join->table_cache= join->table_cache; join->tmp_join->table_reexec= join->table_reexec; } if (!join->join_tab_cache) if (!join->join_tab_reexec) { if (!(join->join_tab_cache= if (!(join->join_tab_reexec= (JOIN_TAB*) join->thd->alloc(sizeof(JOIN_TAB)))) DBUG_RETURN(TRUE); /* purecov: inspected */ if (join->tmp_join) join->tmp_join->join_tab_cache= join->join_tab_cache; join->tmp_join->join_tab_reexec= join->join_tab_reexec; } tableptr= join->table_cache; join_tab= join->join_tab_cache; tableptr= join->table_reexec; join_tab= join->join_tab_reexec; join->join_tab=join_tab; join->table=tableptr; tableptr[0]=tmp_table; Loading
sql/sql_select.h +4 −4 Original line number Diff line number Diff line Loading @@ -290,8 +290,8 @@ class JOIN :public Sql_alloc excessive memory usage. */ SORT_FIELD *sortorder; // make_unireg_sortorder() TABLE **table_cache; // make_simple_join() JOIN_TAB *join_tab_cache; // make_simple_join() TABLE **table_reexec; // make_simple_join() JOIN_TAB *join_tab_reexec; // make_simple_join() /* end of allocation caching storage */ JOIN(THD *thd_arg, List<Item> &fields_arg, ulonglong select_options_arg, Loading Loading @@ -320,8 +320,8 @@ class JOIN :public Sql_alloc exec_tmp_table1= 0; exec_tmp_table2= 0; sortorder= 0; table_cache= 0; join_tab_cache= 0; table_reexec= 0; join_tab_reexec= 0; thd= thd_arg; sum_funcs= sum_funcs2= 0; procedure= 0; Loading