List:Commits« Previous MessageNext Message »
From:guilhem Date:September 28 2006 11:20am
Subject:bk commit into 5.1 tree (gbichot:1.2323)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of gbichot. When gbichot 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@stripped, 2006-09-28 13:19:43+02:00, gbichot@stripped +4 -0
  In the handlerton, cursor creation function don't have an argument
  and so the engine calls current_thd to derive transaction information;
  instead we now pass THD to those functions, it looks more logical
  (it makes the implicit current_thd parameter more visible).
  Approved by Brian and Monty.

  sql/handler.h@stripped, 2006-09-28 13:19:33+02:00, gbichot@stripped +3 -3
    cursor's creation functions in the handlerton need a THD,
    it's better than have the engine call current_thd

  sql/sql_cursor.cc@stripped, 2006-09-28 13:19:34+02:00, gbichot@stripped +4 -4
    pass the THD instead of letting the engine call current_thd

  storage/innobase/handler/ha_innodb.cc@stripped, 2006-09-28 13:19:34+02:00, gbichot@stripped +8 -4
    use the passed THD instead of current_thd

  storage/innobase/handler/ha_innodb.h@stripped, 2006-09-28 13:19:34+02:00, gbichot@stripped +8 -3
    use the passed THD instead of current_thd

# 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:	gbichot
# Host:	dl145h.mysql.com
# Root:	/users/gbichot/mysql-5.1-arch

--- 1.240/sql/handler.h	2006-09-28 13:19:59 +02:00
+++ 1.241/sql/handler.h	2006-09-28 13:19:59 +02:00
@@ -630,9 +630,9 @@ struct handlerton
    int  (*recover)(XID *xid_list, uint len);
    int  (*commit_by_xid)(XID *xid);
    int  (*rollback_by_xid)(XID *xid);
-   void *(*create_cursor_read_view)();
-   void (*set_cursor_read_view)(void *);
-   void (*close_cursor_read_view)(void *);
+   void *(*create_cursor_read_view)(THD *thd);
+   void (*set_cursor_read_view)(THD *thd, void *read_view);
+   void (*close_cursor_read_view)(THD *thd, void *read_view);
    handler *(*create)(TABLE_SHARE *table, MEM_ROOT *mem_root);
    void (*drop_database)(char* path);
    int (*panic)(enum ha_panic_function flag);

--- 1.7/sql/sql_cursor.cc	2006-09-28 13:19:59 +02:00
+++ 1.8/sql/sql_cursor.cc	2006-09-28 13:19:59 +02:00
@@ -323,7 +323,7 @@ Sensitive_cursor::post_open(THD *thd)
     if (ht->create_cursor_read_view)
     {
       info->ht= ht;
-      info->read_view= (ht->create_cursor_read_view)();
+      info->read_view= (ht->create_cursor_read_view)(thd);
       ++info;
     }
   }
@@ -433,7 +433,7 @@ Sensitive_cursor::fetch(ulong num_rows)
   thd->set_n_backup_active_arena(this, &backup_arena);
 
   for (info= ht_info; info->read_view ; info++)
-    (info->ht->set_cursor_read_view)(info->read_view);
+    (info->ht->set_cursor_read_view)(thd, info->read_view);
 
   join->fetch_limit+= num_rows;
 
@@ -454,7 +454,7 @@ Sensitive_cursor::fetch(ulong num_rows)
   reset_thd(thd);
 
   for (info= ht_info; info->read_view; info++)
-    (info->ht->set_cursor_read_view)(0);
+    (info->ht->set_cursor_read_view)(thd, 0);
 
   if (error == NESTED_LOOP_CURSOR_LIMIT)
   {
@@ -487,7 +487,7 @@ Sensitive_cursor::close()
 
   for (Engine_info *info= ht_info; info->read_view; info++)
   {
-    (info->ht->close_cursor_read_view)(info->read_view);
+    (info->ht->close_cursor_read_view)(thd, info->read_view);
     info->read_view= 0;
     info->ht= 0;
   }

--- 1.299/storage/innobase/handler/ha_innodb.cc	2006-09-28 13:19:59 +02:00
+++ 1.300/storage/innobase/handler/ha_innodb.cc	2006-09-28 13:19:59 +02:00
@@ -7529,12 +7529,14 @@ This consistent view is then used inside
 using a cursor. */
 
 void*
-innobase_create_cursor_view(void)
-/*=============================*/
-			/* out: Pointer to cursor view or NULL */
+innobase_create_cursor_view(
+/*========================*/
+						/* out: pointer to cursor
+						view or NULL */
+	THD*			thd)		/* in: user thread handle */
 {
 	return(read_cursor_view_create_for_mysql(
-					check_trx_exists(current_thd)));
+					check_trx_exists(thd)));
 }
 
 /***********************************************************************
@@ -7545,6 +7547,7 @@ corresponding MySQL thread still lacks o
 void
 innobase_close_cursor_view(
 /*=======================*/
+	THD*	thd,	/* in: user thread handle */
 	void*	curview)/* in: Consistent read view to be closed */
 {
 	read_cursor_view_close_for_mysql(check_trx_exists(current_thd),
@@ -7560,6 +7563,7 @@ restored to a transaction read view. */
 void
 innobase_set_cursor_view(
 /*=====================*/
+	THD*	thd,	/* in: user thread handle */
 	void*	curview)/* in: Consistent cursor view to be set */
 {
 	read_cursor_set_for_mysql(check_trx_exists(current_thd),

--- 1.126/storage/innobase/handler/ha_innodb.h	2006-09-28 13:19:59 +02:00
+++ 1.127/storage/innobase/handler/ha_innodb.h	2006-09-28 13:19:59 +02:00
@@ -313,9 +313,11 @@ This consistent view is then used inside
 using a cursor. */
 
 void*
-innobase_create_cursor_view(void);
-/*=============================*/
-				/* out: Pointer to cursor view or NULL */
+innobase_create_cursor_view(
+/*========================*/
+						/* out: pointer to cursor
+						view or NULL */
+	THD*			thd);		/* in: user thread handle */
 
 /***********************************************************************
 Close the given consistent cursor view of a transaction and restore
@@ -325,8 +327,10 @@ corresponding MySQL thread still lacks o
 void
 innobase_close_cursor_view(
 /*=======================*/
+	THD*	thd,		/* in: user thread handle */
 	void*	curview);	/* in: Consistent read view to be closed */
 
+
 /***********************************************************************
 Set the given consistent cursor view to a transaction which is created
 if the corresponding MySQL thread still lacks one. If the given
@@ -336,4 +340,5 @@ restored to a transaction read view. */
 void
 innobase_set_cursor_view(
 /*=====================*/
+	THD*	thd,		/* in: user thread handle */
 	void*	curview);	/* in: Consistent read view to be set */
Thread
bk commit into 5.1 tree (gbichot:1.2323)guilhem28 Sep