← Back to team overview

maria-developers team mailing list archive

Dead code in class sp_head

 

Hi Aleksey,

I found some dead code in sp_head that seem to have appeared
in your patch for "IB: 0.2 part IV".

If you don't mind, I'll remove it.

Please have a look into the attached patch.

Thanks.
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 3a9e83d..b0586ed 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -2736,7 +2736,6 @@ sp_head::restore_thd_mem_root(THD *thd)
   Item *flist= free_list;	// The old list
   set_query_arena(thd);         // Get new free_list and mem_root
   state= STMT_INITIALIZED_FOR_SP;
-  is_stored_procedure= true;
 
   DBUG_PRINT("info", ("mem_root %p returned from thd mem root %p",
                       &mem_root, &thd->mem_root));
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index d2e4f66..718d242 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -3809,7 +3809,6 @@ void Query_arena::set_query_arena(Query_arena *set)
   mem_root=  set->mem_root;
   free_list= set->free_list;
   state= set->state;
-  is_stored_procedure= set->is_stored_procedure;
 }
 
 
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 5adb5bf..ddb1419 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -974,10 +974,6 @@ class Query_arena
 
   enum_state state;
 
-protected:
-  friend class sp_head;
-  bool is_stored_procedure;
-
 public:
   /* We build without RTTI, so dynamic_cast can't be used. */
   enum Type
@@ -986,8 +982,7 @@ class Query_arena
   };
 
   Query_arena(MEM_ROOT *mem_root_arg, enum enum_state state_arg) :
-    free_list(0), mem_root(mem_root_arg), state(state_arg),
-    is_stored_procedure(state_arg == STMT_INITIALIZED_FOR_SP ? true : false)
+    free_list(0), mem_root(mem_root_arg), state(state_arg)
   { INIT_ARENA_DBUG_INFO; }
   /*
     This constructor is used only when Query_arena is created as

Follow ups