Commit f9e6ae6f authored by monty@mashka.mysql.fi's avatar monty@mashka.mysql.fi

merge with 3.23

parents c9c7e4d5 9cc2b10b
......@@ -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"
......
......@@ -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.%
......@@ -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)
......
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment