diff --git a/configure.in b/configure.in
index 0889e9a3257f8807dfc4f87f5d698379bf637fc7..e86baf9d0df442c4b199e107e18b7cc3f2d49156 100644
--- a/configure.in
+++ b/configure.in
@@ -5,7 +5,7 @@ AC_INIT(sql/mysqld.cc)
 AC_CANONICAL_SYSTEM
 # The Docs Makefile.am parses this line!
 # remember to also change ndb version below and update version.c in ndb
-AM_INIT_AUTOMAKE(mysql, 4.1.13)
+AM_INIT_AUTOMAKE(mysql, 4.1.13a)
 AM_CONFIG_HEADER(config.h)
 
 PROTOCOL_VERSION=10
diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh
index 7dc04c392254abbbdf5faf2115deb73e72c412c5..e4cd3027b8a5332114eb27505cf87fb9ee144ef1 100644
--- a/support-files/mysql.spec.sh
+++ b/support-files/mysql.spec.sh
@@ -348,6 +348,7 @@ BuildMySQL "--disable-shared \
 %if %{STATIC_BUILD}
 		--with-mysqld-ldflags='-all-static' \
 		--with-client-ldflags='-all-static' \
+		--with-zlib-dir=bundled \
 		$USE_OTHER_LIBC_DIR \
 %endif
 		--with-comment=\"MySQL Community Edition - Standard (GPL)\" \
diff --git a/zlib/inftrees.h b/zlib/inftrees.h
index 82d365a7e901c749e7181527b62330c11c255695..b1104c87e76907a2105183fa8a904f01de8356c6 100644
--- a/zlib/inftrees.h
+++ b/zlib/inftrees.h
@@ -1,5 +1,5 @@
 /* inftrees.h -- header to use inftrees.c
- * Copyright (C) 1995-2003 Mark Adler
+ * Copyright (C) 1995-2005 Mark Adler
  * For conditions of distribution and use, see copyright notice in zlib.h
  */
 
@@ -36,12 +36,12 @@ typedef struct {
  */
 
 /* Maximum size of dynamic tree.  The maximum found in a long but non-
-   exhaustive search was 1004 code structures (850 for length/literals
-   and 154 for distances, the latter actually the result of an
+   exhaustive search was 1444 code structures (852 for length/literals
+   and 592 for distances, the latter actually the result of an
    exhaustive search).  The true maximum is not known, but the value
    below is more than safe. */
-#define ENOUGH 1440
-#define MAXD 154
+#define ENOUGH 2048
+#define MAXD 592
 
 /* Type of code to build for inftable() */
 typedef enum {