Below is the list of changes that have just been committed into a local
5.0 repository of guilhem. When guilhem 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.2045 05/10/13 00:24:14 guilhem@stripped +2 -0
Building with compile-pentium-valgrind-max (without safemalloc) defines my_free()
without flags,
so a typo on flags will go unnoticed; I put flags in this my_free() definition (as a
no-op which
will still make the compiler check correctness of the flags). Applied: this caught a
typo in my_realloc.c. Kindly approved by Konstantin and Mats.
mysys/my_realloc.c
1.8 05/10/13 00:24:10 guilhem@stripped +1 -1
typo found by the change in my_sys.h :)
include/my_sys.h
1.175 05/10/13 00:24:10 guilhem@stripped +2 -1
When we define my_free(PTR,FG) to be my_no_flags_free(PTR) we don't make the compiler
check
correctness of FG, which can hurt if another person build with a different definition
of my_free;
so I add FG in the expression.
# 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: guilhem
# Host: gbichot3.local
# Root: /home/mysql_src/mysql-5.0
--- 1.174/include/my_sys.h 2005-10-08 01:48:54 +02:00
+++ 1.175/include/my_sys.h 2005-10-13 00:24:10 +02:00
@@ -158,7 +158,8 @@
extern char *my_strdup(const char *from,myf MyFlags);
extern char *my_strdup_with_length(const byte *from, uint length,
myf MyFlags);
-#define my_free(PTR,FG) my_no_flags_free(PTR)
+/* we do use FG (as a no-op) in below so that a typo on FG is caught */
+#define my_free(PTR,FG) ((void)FG,my_no_flags_free(PTR))
#define CALLER_INFO_PROTO /* nothing */
#define CALLER_INFO /* nothing */
#define ORIG_CALLER_INFO /* nothing */
--- 1.7/mysys/my_realloc.c 2004-08-23 12:46:49 +02:00
+++ 1.8/mysys/my_realloc.c 2005-10-13 00:24:10 +02:00
@@ -52,7 +52,7 @@
if ((point = (char*)realloc(oldpoint,size)) == NULL)
{
if (my_flags & MY_FREE_ON_ERROR)
- my_free(oldpoint,MyFLAGS);
+ my_free(oldpoint, my_flags);
if (my_flags & MY_HOLD_ON_ERROR)
DBUG_RETURN(oldpoint);
my_errno=errno;
| Thread |
|---|
| • bk commit into 5.0 tree (guilhem:1.2045) | guilhem | 13 Oct |