List:Internals« Previous MessageNext Message »
From:konstantin Date:March 21 2005 9:57am
Subject:bk commit into 5.0 tree (konstantin:1.1830)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of kostja. When kostja 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.1830 05/03/21 12:57:42 konstantin@stripped +2 -0
  Fix a valgrind warning in decimal.c:sanity()

  strings/decimal.c
    1.41 05/03/21 12:57:37 konstantin@stripped +4 -0
    Fix sanity() to not look into possibly uninitialized memory if
    HAVE_purify.

  sql/my_decimal.h
    1.6 05/03/21 12:57:37 konstantin@stripped +1 -1
    Refixing the valgrind warning in decimal.c:sanity() in a different way
    (as requested by Monty): we want to let valgrind see uninitialized
    memory whenever it's possible.

# 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:	konstantin
# Host:	dragonfly.local
# Root:	/home/kostja/work/mysql-5.0-root

--- 1.5/sql/my_decimal.h	2005-03-19 18:39:20 +03:00
+++ 1.6/sql/my_decimal.h	2005-03-21 12:57:37 +03:00
@@ -85,7 +85,7 @@
   {
     len= DECIMAL_BUFF_LENGTH;
     buf= buffer;
-#if !defined(DBUG_OFF)
+#if !defined (HAVE_purify) && !defined(DBUG_OFF)
     /* Set buffer to 'random' value to find wrong buffer usage */
     for (uint i= 0; i < DECIMAL_BUFF_LENGTH; i++)
       buffer[i]= i;

--- 1.40/strings/decimal.c	2005-03-07 15:07:15 +03:00
+++ 1.41/strings/decimal.c	2005-03-21 12:57:37 +03:00
@@ -139,8 +139,12 @@
   999900000, 999990000, 999999000,
   999999900, 999999990 };
 
+#ifdef HAVE_purify
+#define sanity(d) DBUG_ASSERT((d)->len > 0)
+#else
 #define sanity(d) DBUG_ASSERT((d)->len >0 && ((d)->buf[0] | \
                               (d)->buf[(d)->len-1] | 1))
+#endif
 
 #define FIX_INTG_FRAC_ERROR(len, intg1, frac1, error)                   \
         do                                                              \
Thread
bk commit into 5.0 tree (konstantin:1.1830)konstantin21 Mar