List:Commits« Previous MessageNext Message »
From:Stewart Smith Date:October 20 2006 2:47pm
Subject:bk commit into 5.1 tree (stewart:1.2308) BUG#20839
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of stewart. When stewart 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-10-20 22:47:28+10:00, stewart@willster.(none) +3 -0
  BUG#20839 Illegal error code: 155 returned downgrading from 5.1.12-> 5.1.11
  
  post-review fixups - magnus suggested creating dynstr_trunc instead of doing
  it manually.

  client/mysqldump.c@stripped, 2006-10-20 22:47:24+10:00, stewart@willster.(none) +2 -2
    use dynstr_trunc instead of manually fiddling with the string

  include/my_sys.h@stripped, 2006-10-20 22:47:24+10:00, stewart@willster.(none) +1 -0
    add dynstr_trunc

  mysys/string.c@stripped, 2006-10-20 22:47:24+10:00, stewart@willster.(none) +6 -0
    add dynstr_trunc

# 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:	stewart
# Host:	willster.(none)
# Root:	/home/stewart/Documents/MySQL/5.1/bug20839

--- 1.255/client/mysqldump.c	2006-10-20 22:47:35 +10:00
+++ 1.256/client/mysqldump.c	2006-10-20 22:47:35 +10:00
@@ -2783,7 +2783,7 @@
     dynstr_append(&where, name_buff);
     dynstr_append(&where, "',");
   }
-  where.str[--where.length]= '\0';
+  dynstr_trunc(&where, 1);
   dynstr_append(&where,"))");
 
   DBUG_PRINT("info",("Dump TS for Tables where: %s",where));
@@ -2813,7 +2813,7 @@
     dynstr_append(&where, db_name_buff);
     dynstr_append(&where, "',");
   }
-  where.str[--where.length]='\0';
+  dynstr_trunc(&where, 1);
   dynstr_append(&where,"))");
 
   DBUG_PRINT("info",("Dump TS for DBs where: %s",where));

--- 1.206/include/my_sys.h	2006-10-20 22:47:35 +10:00
+++ 1.207/include/my_sys.h	2006-10-20 22:47:35 +10:00
@@ -778,6 +778,7 @@
 			  uint length);
 extern my_bool dynstr_set(DYNAMIC_STRING *str, const char *init_str);
 extern my_bool dynstr_realloc(DYNAMIC_STRING *str, ulong additional_size);
+extern my_bool dynstr_trunc(DYNAMIC_STRING *str, int n);
 extern void dynstr_free(DYNAMIC_STRING *str);
 #ifdef HAVE_MLOCK
 extern byte *my_malloc_lock(uint length,myf flags);

--- 1.8/mysys/string.c	2006-10-20 22:47:35 +10:00
+++ 1.9/mysys/string.c	2006-10-20 22:47:35 +10:00
@@ -115,6 +115,12 @@
   return FALSE;
 }
 
+my_bool dynstr_trunc(DYNAMIC_STRING *str, int n)
+{
+  str->length-=n;
+  str->str[str->length]= '\0';
+  return FALSE;
+}
 
 void dynstr_free(DYNAMIC_STRING *str)
 {
Thread
bk commit into 5.1 tree (stewart:1.2308) BUG#20839Stewart Smith20 Oct