From b61fe56bd7766a03d43fc3e4ec1918f110fb9ed8 Mon Sep 17 00:00:00 2001 From: Joerg Bruehe Date: Mon, 22 Mar 2010 16:19:39 +0100 Subject: [PATCH] Fixes related to bug#46587: archive storage engine headers don't include my_global.h first During the build of 5.5.3-m3 on older Linux platforms (kernels 2.4 or early 2.6), the symptom described in the bug report occurred both in the "archive" and in the "innobase" storage engine. This change is the patch proposed in that bug report, and a similar one in innobase, that latter is aligned with Vasil Dimov of Innobase, the original author. --- storage/archive/azlib.h | 8 ++++++-- storage/innobase/trx/trx0i_s.c | 9 ++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/storage/archive/azlib.h b/storage/archive/azlib.h index d7abb40b2ae..2bfc22c6b2b 100644 --- a/storage/archive/azlib.h +++ b/storage/archive/azlib.h @@ -33,11 +33,15 @@ (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format). */ -#include - #include "../../mysys/mysys_priv.h" #include +/* See bug#46587: + As described in the bug report, this placement is a fix. + It is needed to build 5.5.3-m3 on Linux 2.4 and early 2.6 kernels. +*/ +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/storage/innobase/trx/trx0i_s.c b/storage/innobase/trx/trx0i_s.c index 1b20eaabf42..a3f73e0c9e8 100644 --- a/storage/innobase/trx/trx0i_s.c +++ b/storage/innobase/trx/trx0i_s.c @@ -28,11 +28,18 @@ table cache" for later retrieval. Created July 17, 2007 Vasil Dimov *******************************************************/ +/* Found during the build of 5.5.3 on Linux 2.4 and early 2.6 kernels: + The includes "univ.i" -> "my_global.h" cause a different path + to be taken further down with pthread functions and types, + so they must come first. + From the symptoms, this is related to bug#46587 in the MySQL bug DB. +*/ +#include "univ.i" + #include #include "mysql_addons.h" -#include "univ.i" #include "buf0buf.h" #include "dict0dict.h" #include "ha0storage.h"