MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:msvensson Date:September 5 2005 10:09am
Subject:bk commit into 5.0 tree (msvensson:1.1958) BUG#12983
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson 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.1958 05/09/05 12:09:35 msvensson@neptunus.(none) +1 -0
  BUG#12983
  TRASH macro confliciting with TRASH in my_sys.h

  mysys/my_alloc.c
    1.31 05/09/05 12:09:31 msvensson@neptunus.(none) +4 -8
    Rename TRASH to TRASH_MEM and use the TRASH macro from my_sys.h

# 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:	msvensson
# Host:	neptunus.(none)
# Root:	/home/msvensson/mysql/mysql-5.0

--- 1.30/mysys/my_alloc.c	2005-08-26 10:49:14 +02:00
+++ 1.31/mysys/my_alloc.c	2005-09-05 12:09:31 +02:00
@@ -221,11 +221,7 @@
 #endif
 }
 
-#ifdef SAFEMALLOC
-#define TRASH(X) bfill(((char*)(X) + ((X)->size-(X)->left)), (X)->left, 0xa5)
-#else
-#define TRASH /* no-op */
-#endif
+#define TRASH_MEM(X) TRASH(((char*)(X) + ((X)->size-(X)->left)), (X)->left)
 
 /* Mark all data in blocks free for reusage */
 
@@ -239,7 +235,7 @@
   for (next= root->free; next; next= *(last= &next->next))
   {
     next->left= next->size - ALIGN_SIZE(sizeof(USED_MEM));
-    TRASH(next);
+    TRASH_MEM(next);
   }
 
   /* Combine the free and the used list */
@@ -249,7 +245,7 @@
   for (; next; next= next->next)
   {
     next->left= next->size - ALIGN_SIZE(sizeof(USED_MEM));
-    TRASH(next);
+    TRASH_MEM(next);
   }
 
   /* Now everything is set; Indicate that nothing is used anymore */
@@ -310,7 +306,7 @@
   {
     root->free=root->pre_alloc;
     root->free->left=root->pre_alloc->size-ALIGN_SIZE(sizeof(USED_MEM));
-    TRASH(root->pre_alloc);
+    TRASH_MEM(root->pre_alloc);
     root->free->next=0;
   }
   root->block_num= 4;
Thread
bk commit into 5.0 tree (msvensson:1.1958) BUG#12983msvensson5 Sep