List:Internals« Previous MessageNext Message »
From:ahristov Date:August 3 2005 6:18pm
Subject:bk commit into 5.0 tree (andrey:1.1920) BUG#11909
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of andrey. When andrey 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.1920 05/08/03 20:18:46 andrey@lmy004. +3 -0
  fix for bug #11909 (possible #11902)

  sql/sql_select.h
    1.95 05/08/03 20:18:41 andrey@lmy004. +1 -0
    add own protocol to the cursor

  sql/sql_select.cc
    1.346 05/08/03 20:18:41 andrey@lmy004. +1 -0
    init the protocol member on instantiation

  sql/sql_prepare.cc
    1.145 05/08/03 20:18:41 andrey@lmy004. +16 -2
    always init the cursor->protocol before operation

# 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:	andrey
# Host:	lmy004.
# Root:	/home/andrey/mysql-5.0

--- 1.345/sql/sql_select.cc	2005-08-01 14:09:36 +02:00
+++ 1.346/sql/sql_select.cc	2005-08-03 20:18:41 +02:00
@@ -1720,6 +1720,7 @@
   init_sql_alloc(&main_mem_root, ALLOC_ROOT_MIN_BLOCK_SIZE, 0);
   thr_lock_owner_init(&lock_id, &thd->lock_info);
   bzero((void*) ht_info, sizeof(ht_info));
+  protocol.init(thd);
 }
 
 

--- 1.94/sql/sql_select.h	2005-07-20 18:02:26 +02:00
+++ 1.95/sql/sql_select.h	2005-08-03 20:18:41 +02:00
@@ -400,6 +400,7 @@
   select_send result;
   THR_LOCK_OWNER lock_id;
   my_bool close_at_commit;
+  Protocol_prep protocol;
 
   /* Temporary implementation as now we replace THD state by value */
   /* Save THD state into cursor */

--- 1.144/sql/sql_prepare.cc	2005-07-29 16:11:44 +02:00
+++ 1.145/sql/sql_prepare.cc	2005-08-03 20:18:41 +02:00
@@ -2055,12 +2055,20 @@
   }
   mysql_log.write(thd, thd->command, "[%lu] %s", stmt->id, thd->query);
 
-  thd->protocol= &thd->protocol_prep;           // Switch to binary protocol
+  if (cursor)
+  {
+    cursor->protocol.init(thd);
+    thd->protocol= &cursor->protocol;
+  }
+  else 
+    thd->protocol= &thd->protocol_prep;           // Switch to binary protocol
+
   if (!(specialflag & SPECIAL_NO_PRIOR))
     my_pthread_setprio(pthread_self(),QUERY_PRIOR);
   mysql_execute_command(thd);
   if (!(specialflag & SPECIAL_NO_PRIOR))
     my_pthread_setprio(pthread_self(), WAIT_PRIOR);
+  
   thd->protocol= &thd->protocol_simple;         // Use normal protocol
 
   if (cursor && cursor->is_open())
@@ -2247,7 +2255,13 @@
   if (!(specialflag & SPECIAL_NO_PRIOR))
     my_pthread_setprio(pthread_self(), QUERY_PRIOR);
 
-  thd->protocol= &thd->protocol_prep;           // Switch to binary protocol
+  if (cursor)
+  {
+    cursor->protocol.init(thd);
+    thd->protocol= &cursor->protocol;
+  }
+  else 
+    thd->protocol= &thd->protocol_prep;           // Switch to binary protocol
   cursor->fetch(num_rows);
   thd->protocol= &thd->protocol_simple;         // Use normal protocol
 
Thread
bk commit into 5.0 tree (andrey:1.1920) BUG#11909ahristov3 Aug