summaryrefslogtreecommitdiff
path: root/include/my_global.h
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2003-03-18 11:17:48 +0200
committerunknown <monty@narttu.mysql.fi>2003-03-18 11:17:48 +0200
commit2ae89fca8da0b087dee19ea2c83bdda815c01ed2 (patch)
treea7bad6bcbb23f23c615a80983400f8c52ae5b2f3 /include/my_global.h
parentec8e9125e0df422798bdb31ef60d9970de6b0731 (diff)
downloadmariadb-git-2ae89fca8da0b087dee19ea2c83bdda815c01ed2.tar.gz
Fixes to avoid errors from valgrind
Fixed problem with 'wrong packet number' in union include/my_global.h: Fix for valgrind mysql-test/t/rpl_rotate_logs.test: Fix to avoid timeing problem sql/item.h: Indentation change sql/set_var.cc: Fix to avoid reference to uninitialized memory sql/sql_select.cc: More DBUG_PRINT messages Fixed problem with 'wrong packet number' in union (tmp_join.error was not correctly reset) sql/sql_union.cc: Simple code cleanup strings/ctype-simple.c: Fix for valgrind
Diffstat (limited to 'include/my_global.h')
-rw-r--r--include/my_global.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/my_global.h b/include/my_global.h
index 64bfefa16f3..30785d6a9b6 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -870,7 +870,13 @@ typedef char bool; /* Ordinary boolean values 0 1 */
((uint32) (uchar) (A)[0])))
#define sint4korr(A) (*((long *) (A)))
#define uint2korr(A) (*((uint16 *) (A)))
+#ifdef HAVE_purify
+#define uint3korr(A) (uint32) (((uint32) ((uchar) (A)[0])) +\
+ (((uint32) ((uchar) (A)[1])) << 8) +\
+ (((uint32) ((uchar) (A)[2])) << 16))
+#else
#define uint3korr(A) (long) (*((unsigned long *) (A)) & 0xFFFFFF)
+#endif
#define uint4korr(A) (*((unsigned long *) (A)))
#define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\
(((uint32) ((uchar) (A)[1])) << 8) +\