summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdebian/dist/Debian/rules2
-rw-r--r--sql/item_sum.cc2
-rw-r--r--strings/decimal.c4
3 files changed, 6 insertions, 2 deletions
diff --git a/debian/dist/Debian/rules b/debian/dist/Debian/rules
index 24e9b22132a..457502882c4 100755
--- a/debian/dist/Debian/rules
+++ b/debian/dist/Debian/rules
@@ -66,7 +66,7 @@ endif
( test -d $(builddir) || mkdir $(builddir) ) && cd $(builddir) && \
sh -c 'PATH=$${MYSQL_BUILD_PATH:-"/bin:/usr/bin:/usr/local/bin"} \
CC=$${MYSQL_BUILD_CC:-gcc} \
- CFLAGS=$${MYSQL_BUILD_CFLAGS:-"-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wno-uninitialized"} \
+ CFLAGS=$${MYSQL_BUILD_CFLAGS:-"-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wno-uninitialized $$(case `lsb_release -sc` in (lenny) echo -DWORKAROUND_GCC_4_3_2_BUG ;; esac)"} \
CXX=$${MYSQL_BUILD_CXX:-g++} \
CXXFLAGS=$${MYSQL_BUILD_CXXFLAGS:-"-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wno-uninitialized"} \
cmake .. \
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index c0284e730a8..6e115854f17 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -1647,7 +1647,7 @@ double Item_sum_avg::val_real()
my_decimal *Item_sum_avg::val_decimal(my_decimal *val)
{
- my_decimal sum_buff, cnt;
+ my_decimal cnt;
const my_decimal *sum_dec;
DBUG_ASSERT(fixed == 1);
if (aggr)
diff --git a/strings/decimal.c b/strings/decimal.c
index c0021da6570..1a99816b914 100644
--- a/strings/decimal.c
+++ b/strings/decimal.c
@@ -2293,7 +2293,11 @@ static int do_div_mod(const decimal_t *from1, const decimal_t *from2,
DBUG_ASSERT(buf0 < to->buf + to->len);
*buf0=(dec1)guess;
}
+#ifdef WORKAROUND_GCC_4_3_2_BUG
+ dcarry= *(volatile dec1 *)start1;
+#else
dcarry= *start1;
+#endif
start1++;
}
if (mod)