List:Internals« Previous MessageNext Message »
From:konstantin Date:July 15 2005 9:21am
Subject:bk commit into 5.0 tree (konstantin:1.1939)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of kostja. When kostja does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.1939 05/07/15 13:21:08 konstantin@stripped +1 -0
  Improve a comment.

  sql/sql_class.h
    1.248 05/07/15 13:21:01 konstantin@stripped +12 -2
    Improve a comment.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	konstantin
# Host:	dragonfly.local
# Root:	/opt/local/work/mysql-5.0-root

--- 1.247/sql/sql_class.h	2005-07-13 13:48:03 +04:00
+++ 1.248/sql/sql_class.h	2005-07-15 13:21:01 +04:00
@@ -1162,12 +1162,22 @@
     This is to track items changed during execution of a prepared
     statement/stored procedure. It's created by
     register_item_tree_change() in memory root of THD, and freed in
-    rollback_item_tree_changes(). For conventional execution it's always 0.
+    rollback_item_tree_changes(). For conventional execution it's always
+    empty.
   */
   Item_change_list change_list;
 
   /*
-    Current prepared Query_arena if there one, or 0
+    A permanent memory area of the statement. For conventional
+    execution, the parsed tree and execution runtime reside in the same
+    memory root. In this case current_arena points to THD. In case of
+    a prepared statement or a stored procedure statement, thd->mem_root
+    conventionally points to runtime memory, and thd->current_arena
+    points to the memory of the PS/SP, where the parsed tree of the
+    statement resides. Whenever you need to perform a permanent
+    transformation of a parsed tree, you should allocate new memory in
+    current_arena, to allow correct re-execution of PS/SP.
+    Note: in the parser, current_arena == thd, even for PS/SP.
   */
   Query_arena *current_arena;
   /*
Thread
bk commit into 5.0 tree (konstantin:1.1939)konstantin15 Jul