=== modified file 'configure.in'
--- a/configure.in	2008-08-13 10:34:35 +0000
+++ b/configure.in	2008-08-27 14:25:24 +0000
@@ -2810,6 +2810,9 @@
     AC_CONFIG_SUBDIRS(innobase)
   fi
 
+  # "innochecksum" is not in the "innobase/" subdirectory, but should be switched
+  AM_CONDITIONAL([BUILD_INNODB_TOOLS], [test X"$have_innodb" = Xyes])
+
 case $SYSTEM_TYPE-$MACHINE_TYPE-$ac_cv_prog_gcc-$have_ndbcluster in
   *solaris*-i?86-no-yes)
   if $CC -xildon 2>&1 | grep "illegal option" >/dev/null

=== modified file 'extra/Makefile.am'
--- a/extra/Makefile.am	2007-02-22 15:41:51 +0000
+++ b/extra/Makefile.am	2008-08-25 19:07:41 +0000
@@ -45,7 +45,12 @@
 $(top_builddir)/include/sql_state.h: $(top_builddir)/include/mysqld_error.h
 
 bin_PROGRAMS =		replace comp_err perror resolveip my_print_defaults \
-			resolve_stack_dump mysql_waitpid innochecksum
+			resolve_stack_dump mysql_waitpid 
+# "innochecksum" should be switched
+if BUILD_INNODB_TOOLS
+bin_PROGRAMS += innochecksum
+endif
+
 noinst_PROGRAMS =	charset2html
 EXTRA_DIST =	CMakeLists.txt
 

=== modified file 'man/Makefile.am'
--- a/man/Makefile.am	2006-12-31 00:02:27 +0000
+++ b/man/Makefile.am	2008-08-25 19:07:41 +0000
@@ -21,5 +21,11 @@
 man8_MANS =   @man8_files@
 EXTRA_DIST =  $(man1_MANS) $(man8_MANS)
 
+# 1) not needed in Unix binary packages,
+# 2) programs not generated in 5.0:
+install-data-hook:
+	rm -f $(DESTDIR)$(manlibdir)/man1/make_win_*
+	rm -f $(DESTDIR)$(manlibdir)/man1/ndb_print_*
+
 # Don't update the files from bitkeeper
 %::SCCS/s.%

=== modified file 'mysql-test/r/mysqldump.result'
--- a/mysql-test/r/mysqldump.result	2008-03-02 18:20:36 +0000
+++ b/mysql-test/r/mysqldump.result	2008-09-15 19:34:39 +0000
@@ -1,3 +1,8 @@
+Bug#37938 - Test "mysqldump" lacks various insert statements
+Turn off concurrent inserts to avoid random errors
+NOTE:  We reset the variable back to saved value at the end of test
+SET @OLD_CONCURRENT_INSERT = @@GLOBAL.CONCURRENT_INSERT;
+SET @@GLOBAL.CONCURRENT_INSERT = 0;
 DROP TABLE IF EXISTS t1, `"t"1`, t1aa, t2, t2aa, t3;
 drop database if exists mysqldump_test_db;
 drop database if exists db1;
@@ -3565,6 +3570,7 @@
 
 
 -- Dump completed on DATE
+SET @@GLOBAL.CONCURRENT_INSERT = @OLD_CONCURRENT_INSERT;
 #
 # End of 5.0 tests
 #

=== modified file 'mysql-test/t/mysqldump.test'
--- a/mysql-test/t/mysqldump.test	2008-03-02 18:20:36 +0000
+++ b/mysql-test/t/mysqldump.test	2008-09-15 19:34:39 +0000
@@ -5,6 +5,14 @@
 # Binlog is required
 --source include/have_log_bin.inc
 
+
+--echo Bug#37938 - Test "mysqldump" lacks various insert statements
+--echo Turn off concurrent inserts to avoid random errors
+--echo NOTE:  We reset the variable back to saved value at the end of test
+SET @OLD_CONCURRENT_INSERT = @@GLOBAL.CONCURRENT_INSERT;
+SET @@GLOBAL.CONCURRENT_INSERT = 0;
+
+
 --disable_warnings
 DROP TABLE IF EXISTS t1, `"t"1`, t1aa, t2, t2aa, t3;
 drop database if exists mysqldump_test_db;
@@ -1594,6 +1602,10 @@
 --replace_regex /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9 :-]+/ on DATE/
 --exec $MYSQL_DUMP test
 
+# We reset concurrent_inserts value to whatever it was at the start of the test
+SET @@GLOBAL.CONCURRENT_INSERT = @OLD_CONCURRENT_INSERT;
+
+
 --echo #
 --echo # End of 5.0 tests
 --echo #

=== modified file 'scripts/make_binary_distribution.sh'
--- a/scripts/make_binary_distribution.sh	2008-06-27 17:12:42 +0000
+++ b/scripts/make_binary_distribution.sh	2008-08-25 19:07:41 +0000
@@ -272,6 +272,8 @@
   if [ -d man ] ; then
     $CP man/*.1 $BASE/man/man1
     $CP man/*.8 $BASE/man/man8
+    # In a Unix binary package, these tools and their manuals are not useful
+    rm -f $BASE/man/man1/make_win_*
   fi
 fi
 
@@ -331,6 +333,7 @@
 
 rm -f $BASE/bin/Makefile* $BASE/bin/*.in $BASE/bin/*.sh \
     $BASE/bin/mysql_install_db $BASE/bin/make_binary_distribution \
+    $BASE/bin/make_win_* \
     $BASE/bin/setsomevars $BASE/support-files/Makefile* \
     $BASE/support-files/*.sh
 

=== modified file 'sql/stacktrace.c'
--- a/sql/stacktrace.c	2008-02-19 11:37:39 +0000
+++ b/sql/stacktrace.c	2008-09-15 12:58:32 +0000
@@ -261,6 +261,7 @@
 #else /* __WIN__*/
 
 #include <dbghelp.h>
+#include <tlhelp32.h>
 
 /*
   Stack tracing on Windows is implemented using Debug Helper library(dbghelp.dll)
@@ -349,6 +350,63 @@
   exception_ptrs = ep;
 }
 
+
+/*
+  Get symbol path - semicolon-separated list of directories to search for debug
+  symbols. We expect PDB in the same directory as corresponding exe or dll,
+  so the path is build from directories of the loaded modules. If environment
+  variable _NT_SYMBOL_PATH is set, it's value appended to the symbol search path
+*/
+static void get_symbol_path(char *path, size_t size)
+{ 
+  HANDLE hSnap; 
+  char *envvar;
+
+  path[0]= '\0';
+  /*
+    Enumerate all modules, and add their directories to the path.
+    Avoid duplicate entries.
+  */
+  hSnap= CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, GetCurrentProcessId());
+  if (hSnap != INVALID_HANDLE_VALUE)
+  {
+    BOOL ret;
+    MODULEENTRY32 mod;
+    mod.dwSize= sizeof(MODULEENTRY32);
+    for (ret= Module32First(hSnap, &mod); ret; ret= Module32Next(hSnap, &mod))
+    {
+      char *module_dir= mod.szExePath;
+      char *p= strrchr(module_dir,'\\');
+      if (!p)
+      {
+        /*
+          Path separator was not found. Not known to happen, if ever happens,
+          will indicate current directory.
+        */
+        module_dir[0]= '.';
+        p= module_dir + 1;
+      }
+      *p++= ';';
+      *p= '\0';
+
+      if (!strstr(path, module_dir))
+      {
+        strncat(path, module_dir, size);
+      }
+    }
+    CloseHandle(hSnap);
+  }
+
+  /* Add _NT_SYMBOL_PATH, if present. */
+  envvar= getenv("_NT_SYMBOL_PATH");
+  if(envvar)
+  {
+    strncat(path, envvar, size);
+  }
+}
+
+#define MAX_SYMBOL_PATH 32768
+
 /* Platform SDK in VS2003 does not have definition for SYMOPT_NO_PROMPTS*/
 #ifndef SYMOPT_NO_PROMPTS
 #define SYMOPT_NO_PROMPTS 0
@@ -365,6 +423,7 @@
   int     i;
   CONTEXT context;
   STACKFRAME64 frame={0};
+  static char symbol_path[MAX_SYMBOL_PATH+1];
 
   if(!exception_ptrs || !init_dbghelp_functions())
     return;
@@ -373,7 +432,8 @@
   context = *(exception_ptrs->ContextRecord);
   /*Initialize symbols.*/
   pSymSetOptions(SYMOPT_LOAD_LINES|SYMOPT_NO_PROMPTS|SYMOPT_DEFERRED_LOADS|SYMOPT_DEBUG);
-  pSymInitialize(hProcess,NULL,TRUE);
+  get_symbol_path(symbol_path, MAX_SYMBOL_PATH);
+  pSymInitialize(hProcess, symbol_path, TRUE);
 
   /*Prepare stackframe for the first StackWalk64 call*/
   frame.AddrFrame.Mode= frame.AddrPC.Mode= frame.AddrStack.Mode= AddrModeFlat;

=== modified file 'support-files/mysql.spec.sh'
--- a/support-files/mysql.spec.sh	2008-03-22 00:43:13 +0000
+++ b/support-files/mysql.spec.sh	2008-08-25 19:07:41 +0000
@@ -591,6 +591,7 @@
 
 %doc %attr(644, root, root) %{_infodir}/mysql.info*
 
+%doc %attr(644, root, man) %{_mandir}/man1/innochecksum.1*
 %doc %attr(644, root, man) %{_mandir}/man1/my_print_defaults.1*
 %doc %attr(644, root, man) %{_mandir}/man1/myisam_ftdump.1*
 %doc %attr(644, root, man) %{_mandir}/man1/myisamchk.1*
@@ -610,6 +611,7 @@
 %doc %attr(644, root, man) %{_mandir}/man1/mysqltest.1*
 %doc %attr(644, root, man) %{_mandir}/man1/mysql_tzinfo_to_sql.1*
 %doc %attr(644, root, man) %{_mandir}/man1/mysql_zap.1*
+%doc %attr(644, root, man) %{_mandir}/man1/mysqlbug.1*
 %doc %attr(644, root, man) %{_mandir}/man1/perror.1*
 %doc %attr(644, root, man) %{_mandir}/man1/replace.1*
 %doc %attr(644, root, man) %{_mandir}/man1/safe_mysqld.1*
@@ -617,6 +619,7 @@
 %ghost %config(noreplace,missingok) %{_sysconfdir}/my.cnf
 %ghost %config(noreplace,missingok) %{_sysconfdir}/mysqlmanager.passwd
 
+%attr(755, root, root) %{_bindir}/innochecksum
 %attr(755, root, root) %{_bindir}/my_print_defaults
 %attr(755, root, root) %{_bindir}/myisam_ftdump
 %attr(755, root, root) %{_bindir}/myisamchk
@@ -661,6 +664,7 @@
 %attr(755, root, root) %{_bindir}/mysql
 %attr(755, root, root) %{_bindir}/mysql_find_rows
 %attr(755, root, root) %{_bindir}/mysql_tableinfo
+%attr(755, root, root) %{_bindir}/mysql_upgrade_shell
 %attr(755, root, root) %{_bindir}/mysql_waitpid
 %attr(755, root, root) %{_bindir}/mysqlaccess
 %attr(755, root, root) %{_bindir}/mysqladmin
@@ -672,6 +676,8 @@
 
 %doc %attr(644, root, man) %{_mandir}/man1/msql2mysql.1*
 %doc %attr(644, root, man) %{_mandir}/man1/mysql.1*
+%doc %attr(644, root, man) %{_mandir}/man1/mysql_find_rows.1*
+%doc %attr(644, root, man) %{_mandir}/man1/mysql_tableinfo.1*
 %doc %attr(644, root, man) %{_mandir}/man1/mysqlaccess.1*
 %doc %attr(644, root, man) %{_mandir}/man1/mysqladmin.1*
 %doc %attr(644, root, man) %{_mandir}/man1/mysqlbinlog.1*
@@ -713,6 +719,8 @@
 %doc %attr(644, root, man) %{_mandir}/man1/ndb_config.1*
 %doc %attr(644, root, man) %{_mandir}/man1/ndb_desc.1*
 %doc %attr(644, root, man) %{_mandir}/man1/ndb_error_reporter.1*
+%doc %attr(644, root, man) %{_mandir}/man1/ndb_mgm.1*
+%doc %attr(644, root, man) %{_mandir}/man1/ndb_restore.1*
 %doc %attr(644, root, man) %{_mandir}/man1/ndb_select_all.1*
 %doc %attr(644, root, man) %{_mandir}/man1/ndb_select_count.1*
 %doc %attr(644, root, man) %{_mandir}/man1/ndb_show_tables.1*
@@ -724,13 +732,16 @@
 %attr(755, root, root) %{_bindir}/ndb_delete_all
 %attr(755, root, root) %{_bindir}/ndb_drop_index
 %attr(755, root, root) %{_bindir}/ndb_drop_table
+%attr(755, root, root) %{_sbindir}/ndb_cpcd
 %doc %attr(644, root, man) %{_mandir}/man1/ndb_delete_all.1*
 %doc %attr(644, root, man) %{_mandir}/man1/ndb_drop_index.1*
 %doc %attr(644, root, man) %{_mandir}/man1/ndb_drop_table.1*
+%doc %attr(644, root, man) %{_mandir}/man1/ndb_cpcd.1*
 
 %files devel
 %defattr(-, root, root, 0755)
 %doc EXCEPTIONS-CLIENT
+%doc %attr(644, root, man) %{_mandir}/man1/comp_err.1*
 %doc %attr(644, root, man) %{_mandir}/man1/mysql_config.1*
 %attr(755, root, root) %{_bindir}/comp_err
 %attr(755, root, root) %{_bindir}/mysql_config
@@ -784,6 +795,18 @@
 # itself - note that they must be ordered by date (important when
 # merging BK trees)
 %changelog
+* Mon Aug 18 2008 Joerg Bruehe <joerg@mysql.com>
+
+- Get rid of the "warning: Installed (but unpackaged) file(s) found:"
+  Some files were missing:
+  - Manual "mysqlbug" ("server" subpackage)
+  - Program "innochecksum" and its manual ("server" subpackage)
+  - Manuals "mysql_find_rows" + "mysql_tableinfo" ("client" subpackage)
+  - Script "mysql_upgrade_shell" ("client" subpackage)
+  - Manual "comp_err" ("devel" subpackage)
+  - Program "ndb_cpcd" and its manual ("ndb-extra" subpackage)
+  - Manuals "ndb_mgm" + "ndb_restore" ("ndb-tools" subpackage)
+
 * Wed Mar 19 2008 Joerg Bruehe <joerg@mysql.com>
 
 - Add the man pages for "ndbd" and "ndb_mgmd".

=== modified file 'win/create_manifest.js'
--- a/win/create_manifest.js	2007-07-25 17:18:12 +0000
+++ b/win/create_manifest.js	2008-08-29 15:30:41 +0000
@@ -31,7 +31,17 @@
            var end= supp_version.indexOf("-");
            if (end == -1) end= supp_version.length;
            var app_version= supp_version.substring(0, end);
-           app_version+= ".0";
+           var fourth_element= 0;
+           if(app_version.match(/[a-z]$/)) {
+               fourth_element+= (1 + app_version.charCodeAt(end-1) - "a".charCodeAt(0));
+               app_version= app_version.substring(0,--end);
+           }
+           if(app_version.match(/sp[1-9]$/)) {
+               fourth_element+= 100*(app_version.charCodeAt(end-1) - "0".charCodeAt(0));
+               app_version= app_version.substring(0, end-3);
+               end-= 3;
+           }
+           app_version+= "." + fourth_element;
            break;
       case "arch":
            var app_arch= parts[1];

=== modified file 'zlib/gzio.c'
--- a/zlib/gzio.c	2006-01-12 14:32:39 +0000
+++ b/zlib/gzio.c	2008-08-13 16:44:05 +0000
@@ -7,10 +7,10 @@
 
 /* @(#) $Id$ */
 
+#include <stdio.h>
+
 #include "zutil.h"
 
-#include <stdio.h>
-
 #ifdef NO_DEFLATE       /* for compatibility with old definition */
 #  define NO_GZCOMPRESS
 #endif



