From 42eeb557a6baceef59a25e774e31bb12fb9d7af9 Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Wed, 12 Oct 2011 14:23:42 +0400 Subject: [PATCH] =?UTF-8?q?Fix=20compile=20error:=20=E2=80=98cond=5Fcopy?= =?UTF-8?q?=E2=80=99=20may=20be=20used=20uninitialized=20in=20this=20funct?= =?UTF-8?q?ion.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/sql_select.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index d056c809360..4b4daae3d2d 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -19916,10 +19916,11 @@ static bool add_ref_to_table_cond(THD *thd, JOIN_TAB *join_tab) cond->fix_fields(thd, &tmp_item); DBUG_ASSERT(cond == tmp_item); } - if (join_tab->select->pre_idx_push_select_cond) - cond_copy= cond->copy_andor_structure(thd); if (join_tab->select) { + UNINIT_VAR(cond_copy); // used when pre_idx_push_select_cond!=NULL + if (join_tab->select->pre_idx_push_select_cond) + cond_copy= cond->copy_andor_structure(thd); if (join_tab->select->cond) error=(int) cond->add(join_tab->select->cond); join_tab->select->cond= cond;