diff --git a/databases/mysql/patches/patch-include_my_global_h b/databases/mysql/patches/patch-include_my_global_h index a4e0baae4fe..96526bd9113 100644 --- a/databases/mysql/patches/patch-include_my_global_h +++ b/databases/mysql/patches/patch-include_my_global_h @@ -1,6 +1,6 @@ -$OpenBSD: patch-include_my_global_h,v 1.1 2004/07/18 11:38:23 espie Exp $ ---- include/my_global.h.orig Sun Jul 18 13:06:35 2004 -+++ include/my_global.h Sun Jul 18 13:07:13 2004 +$OpenBSD: patch-include_my_global_h,v 1.2 2004/10/20 08:09:36 brad Exp $ +--- include/my_global.h.orig Thu May 13 20:53:17 2004 ++++ include/my_global.h Wed Oct 20 04:02:16 2004 @@ -43,6 +43,10 @@ #define HAVE_ERRNO_AS_DEFINE #endif /* __CYGWIN__ */ @@ -12,3 +12,19 @@ $OpenBSD: patch-include_my_global_h,v 1.1 2004/07/18 11:38:23 espie Exp $ #if defined(i386) && !defined(__i386__) #define __i386__ #endif +@@ -891,7 +895,14 @@ typedef char bool; /* Ordinary boolean + (((uint32) ((uchar) (A)[1])) << 8) +\ + (((uint32) ((uchar) (A)[2])) << 16)) + #else +-#define uint3korr(A) (long) (*((unsigned long *) (A)) & 0xFFFFFF) ++ ++/* ++ ATTENTION ! ++ ++ Please, note, uint3korr reads 4 bytes (not 3) ! ++ It means, that you have to provide enough allocated space ! ++*/ ++#define uint3korr(A) (long) (*((unsigned int *) (A)) & 0xFFFFFF) + #endif + #define uint4korr(A) (*((unsigned long *) (A))) + #define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\ diff --git a/databases/mysql/patches/patch-sql_records_cc b/databases/mysql/patches/patch-sql_records_cc new file mode 100644 index 00000000000..114cbbde141 --- /dev/null +++ b/databases/mysql/patches/patch-sql_records_cc @@ -0,0 +1,15 @@ +$OpenBSD: patch-sql_records_cc,v 1.1 2004/10/20 08:09:36 brad Exp $ +--- sql/records.cc.orig Wed Oct 20 04:00:01 2004 ++++ sql/records.cc Wed Oct 20 04:00:44 2004 +@@ -249,9 +249,10 @@ static int init_rr_cache(READ_RECORD *in + rec_cache_size=info->cache_records*info->reclength; + info->rec_cache_size=info->cache_records*info->ref_length; + ++ // We have to allocate one more byte to use uint3korr (see comments for it) + if (info->cache_records <= 2 || + !(info->cache=(byte*) my_malloc_lock(rec_cache_size+info->cache_records* +- info->struct_length, ++ info->struct_length+1, + MYF(0)))) + DBUG_RETURN(1); + #ifdef HAVE_purify