summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.in3
-rw-r--r--extra/Makefile.am2
-rw-r--r--mysys/Makefile.am2
-rw-r--r--mysys/mf_keycache.c11
4 files changed, 10 insertions, 8 deletions
diff --git a/configure.in b/configure.in
index 4f574f30f97..cc9e9f772b4 100644
--- a/configure.in
+++ b/configure.in
@@ -972,7 +972,8 @@ case $SYSTEM_TYPE in
;;
*freebsd*)
echo "Adding fix for interrupted reads"
- CXXFLAGS="$CXXFLAGS -DMYSQLD_NET_RETRY_COUNT=1000000"
+ CFLAGS="$CFLAGS -DHAVE_BROKEN_REALPATH"
+ CXXFLAGS="$CXXFLAGS -DMYSQLD_NET_RETRY_COUNT=1000000 -DHAVE_BROKEN_REALPATH"
;;
*netbsd*)
echo "Adding flag -Dunix"
diff --git a/extra/Makefile.am b/extra/Makefile.am
index 58776144489..2d7dc95f616 100644
--- a/extra/Makefile.am
+++ b/extra/Makefile.am
@@ -18,7 +18,7 @@ INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include -I..
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../mysys/libmysys.a \
../dbug/libdbug.a ../strings/libmystrings.a
bin_PROGRAMS = replace comp_err perror resolveip my_print_defaults \
-resolve_stack_dump mysql_install
+ resolve_stack_dump mysql_install
# Don't update the files from bitkeeper
%::SCCS/s.%
diff --git a/mysys/Makefile.am b/mysys/Makefile.am
index 9fea00e23e8..6047debcaf5 100644
--- a/mysys/Makefile.am
+++ b/mysys/Makefile.am
@@ -100,7 +100,7 @@ test_io_cache: mf_iocache.c $(LIBRARIES)
test_dir: test_dir.c $(LIBRARIES)
$(LINK) $(FLAGS) -DMAIN $(srcdir)/test_dir.c $(LDADD) $(LIBS)
-test_charset: test_charset.c $(LIBRARIES)
+test_charset$(EXEEXT): test_charset.c $(LIBRARIES)
$(LINK) $(FLAGS) -DMAIN $(srcdir)/test_charset.c $(LDADD) $(LIBS)
testhash: testhash.c $(LIBRARIES)
diff --git a/mysys/mf_keycache.c b/mysys/mf_keycache.c
index 5a573bff0f7..6a037f13f05 100644
--- a/mysys/mf_keycache.c
+++ b/mysys/mf_keycache.c
@@ -595,13 +595,14 @@ static int flush_key_blocks_int(File file, enum flush_type type)
count++;
}
/* Only allocate a new buffer if its bigger than the one we have */
- if (count <= FLUSH_CACHE ||
- !(cache=(SEC_LINK**) my_malloc(sizeof(SEC_LINK*)*count,MYF(0))))
+ if (count > FLUSH_CACHE)
{
- cache=cache_buff; /* Fall back to safe buffer */
- count=FLUSH_CACHE;
+ if (!(cache=(SEC_LINK**) my_malloc(sizeof(SEC_LINK*)*count,MYF(0))))
+ {
+ cache=cache_buff; /* Fall back to safe buffer */
+ count=FLUSH_CACHE;
+ }
}
- end=cache+count;
}
/* Go through the keys and write them to buffer to be flushed */