From 5ae088f8c1732d1b1ba92d63a62edcfa2f573851 Mon Sep 17 00:00:00 2001
From: Sergey Petrunya <psergey@askmonty.org>
Date: Fri, 25 Mar 2011 17:10:16 +0300
Subject: [PATCH] Fix a problem introduced in previous cset

---
 sql/sql_select.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index f24076d99bc..971dcbc700a 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -8500,7 +8500,7 @@ make_join_readinfo(JOIN *join, ulonglong options, uint no_jbuf_after)
   JOIN_TAB *prev_tab= NULL;
   for (tab= first_linear_tab(join, WITHOUT_CONST_TABLES), i= join->const_tables; 
        tab; 
-       tab= next_linear_tab(join, tab, WITH_BUSH_ROOTS))
+       prev_tab=tab, tab= next_linear_tab(join, tab, WITH_BUSH_ROOTS))
   {
     /*
       The approximation below for partial join cardinality is not good because
-- 
2.30.9