List:Internals« Previous MessageNext Message »
From:Mats Kindahl Date:April 19 2005 9:41am
Subject:bk commit into 5.1 tree (mats:1.1808)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of mats. When mats 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.1808 05/04/19 09:41:46 mats@stripped +3 -0
  WL#2325: Clearing error code when starting a new transaction.

  sql/sql_class.h
    1.233 05/04/19 09:41:42 mats@stripped +2 -0
    Clearing last error for thread when starting a transaction.

  sql/rpl_injector.cc
    1.11 05/04/19 09:41:42 mats@stripped +0 -14
    Debriding code.

  sql/log_event.cc
    1.178 05/04/19 09:41:41 mats@stripped +16 -8
    Added trace output.

# 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:	mats
# Host:	romeo.kindahl.net
# Root:	/home/bk/w2325-mysql-5.1

--- 1.177/sql/log_event.cc	2005-04-18 12:57:15 +02:00
+++ 1.178/sql/log_event.cc	2005-04-19 09:41:41 +02:00
@@ -999,6 +999,8 @@
 
 bool Query_log_event::write(IO_CACHE* file)
 {
+  DBUG_ENTER("Query_log_event::write(IO_CACHE*)");
+
   uchar buf[QUERY_HEADER_LEN+
             1+4+           // code of flags2 and flags2
             1+8+           // code of sql_mode and sql_mode
@@ -1010,7 +1012,7 @@
   ulong event_length;
 
   if (!query)
-    return 1;                                   // Something wrong with event
+    DBUG_RETURN(1);		// Something wrong with event
 
   /*
     We want to store the thread id:
@@ -1139,13 +1141,13 @@
   */
   event_length= (uint) (start-buf) + get_post_header_size_for_derived() + db_len + 1 + q_len;
 
-  return (write_header(file, event_length) ||
-          my_b_safe_write(file, (byte*) buf, QUERY_HEADER_LEN) ||
-          write_post_header_for_derived(file) ||
-          my_b_safe_write(file, (byte*) start_of_status,
-                          (uint) (start-start_of_status)) ||
-          my_b_safe_write(file, (db) ? (byte*) db : (byte*)"", db_len + 1) ||
-          my_b_safe_write(file, (byte*) query, q_len)) ? 1 : 0;
+  DBUG_RETURN ((write_header(file, event_length) ||
+	       my_b_safe_write(file, (byte*) buf, QUERY_HEADER_LEN) ||
+	       write_post_header_for_derived(file) ||
+	       my_b_safe_write(file, (byte*) start_of_status,
+			       (uint) (start-start_of_status)) ||
+	       my_b_safe_write(file, db ? db : "", db_len + 1) ||
+	       my_b_safe_write(file, (byte*) query, q_len)) ? 1 : 0);
 }
 
 
@@ -1172,6 +1174,11 @@
    auto_increment_increment(thd_arg->variables.auto_increment_increment),
    auto_increment_offset(thd_arg->variables.auto_increment_offset)
 {
+  DBUG_ENTER("Query_log_event::Query_log_event(THD*, ...)");
+  DBUG_PRINT("info", ("thd->net.last_errno=%d, thd->net.last_error='%s'", 
+		      thd->net.last_errno, thd->net.last_error));
+  DBUG_PRINT("info", ("error_code=%d", error_code));
+
   time_t end_time;
   time(&end_time);
   exec_time = (ulong) (end_time  - thd->start_time);
@@ -1205,6 +1212,7 @@
   else
     time_zone_len= 0;
   DBUG_PRINT("info",("Query_log_event has flags2=%lu sql_mode=%lu",flags2,sql_mode));
+  DBUG_VOID_RETURN;
 }
 #endif /* MYSQL_CLIENT */
 

--- 1.232/sql/sql_class.h	2005-04-14 14:19:46 +02:00
+++ 1.233/sql/sql_class.h	2005-04-19 09:41:42 +02:00
@@ -1099,6 +1099,8 @@
 
   int transaction_begin() { 
     this->options |= OPTION_BEGIN;
+    this->net.last_errno= 0;
+    this->net.last_error[0]= '\0';
     return 0;
   }
 

--- 1.10/sql/rpl_injector.cc	2005-04-12 13:44:44 +02:00
+++ 1.11/sql/rpl_injector.cc	2005-04-19 09:41:42 +02:00
@@ -3,20 +3,6 @@
 #include "mysql_priv.h" 
 #include "rpl_injector.h"
 
-// Helper function to open and get the table given a table name and a database
-// name. 
-
-static TABLE* get_table(THD* thd, 
-			injector::transaction::table const& tbl)
-{
-  TABLE_LIST tlist;
-  memset(&tlist, 0, sizeof(tlist));
-  tlist.db = const_cast<char*>(tbl.db_name());
-  tlist.table_name = tlist.alias = const_cast<char*>(tbl.table_name());
-  return open_table(thd, &tlist, thd->mem_root, 0);
-}
-
-
 ////////////////////////////////////////////////////////////////
 // injector::transaction - member definitions
 ////////////////////////////////////////////////////////////////
Thread
bk commit into 5.1 tree (mats:1.1808)Mats Kindahl19 Apr