List:Commits« Previous MessageNext Message »
From:georg Date:August 6 2006 5:17pm
Subject:bk commit into 5.0 tree (georg:1.2235)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of georg. When georg does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-08-06 17:17:45+02:00, georg@stripped +34 -0
  Added Cmake support for Windows builds

  CMakeLists.txt@stripped, 2006-08-06 17:17:39+02:00, georg@stripped +137 -0
    New BitKeeper file ``CMakeLists.txt''

  CMakeLists.txt@stripped, 2006-08-06 17:17:39+02:00, georg@stripped +0 -0

  bdb/CMakeLists.txt@stripped, 2006-08-06 17:17:39+02:00, georg@stripped +44 -0
    New BitKeeper file ``bdb/CMakeLists.txt''

  bdb/CMakeLists.txt@stripped, 2006-08-06 17:17:39+02:00, georg@stripped +0 -0

  client/CMakeLists.txt@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +79 -0
    New BitKeeper file ``client/CMakeLists.txt''

  client/CMakeLists.txt@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +0 -0

  client/mysqlbinlog.cc@stripped, 2006-08-06 17:17:36+02:00, georg@stripped +2 -3
    fixed include directives for CMAKE_BUILD

  dbug/CMakeLists.txt@stripped, 2006-08-06 17:17:39+02:00, georg@stripped +5 -0
    New BitKeeper file ``dbug/CMakeLists.txt''

  dbug/CMakeLists.txt@stripped, 2006-08-06 17:17:39+02:00, georg@stripped +0 -0

  extra/CMakeLists.txt@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +32 -0
    New BitKeeper file ``extra/CMakeLists.txt''

  extra/CMakeLists.txt@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +0 -0

  extra/comp_err.c@stripped, 2006-08-06 17:17:36+02:00, georg@stripped +2 -1
    Fixed crash (WinDebug): Calling DBUG_RETURN after my_end fails, therefore we
    have to call DBUG_LEAVE before my_end.

  extra/yassl/CMakeLists.txt@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +6
-0
    New BitKeeper file ``extra/yassl/CMakeLists.txt''

  extra/yassl/CMakeLists.txt@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +0
-0

  extra/yassl/taocrypt/CMakeLists.txt@stripped, 2006-08-06 17:17:38+02:00,
georg@stripped +10 -0
    New BitKeeper file ``extra/yassl/taocrypt/CMakeLists.txt''

  extra/yassl/taocrypt/CMakeLists.txt@stripped, 2006-08-06 17:17:38+02:00,
georg@stripped +0 -0

  heap/CMakeLists.txt@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +8 -0
    New BitKeeper file ``heap/CMakeLists.txt''

  heap/CMakeLists.txt@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +0 -0

  include/my_dbug.h@stripped, 2006-08-06 17:17:36+02:00, georg@stripped +1 -0
    dummy define of DBUB_LEAVE if DBUG_OFF is defined.

  innobase/CMakeLists.txt@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +35 -0
    New BitKeeper file ``innobase/CMakeLists.txt''

  innobase/CMakeLists.txt@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +0 -0

  libmysql/CMakeLists.txt@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +54 -0
    New BitKeeper file ``libmysql/CMakeLists.txt''

  libmysql/CMakeLists.txt@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +0 -0

  myisam/CMakeLists.txt@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +26 -0
    New BitKeeper file ``myisam/CMakeLists.txt''

  myisam/CMakeLists.txt@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +0 -0

  myisammrg/CMakeLists.txt@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +9 -0
    New BitKeeper file ``myisammrg/CMakeLists.txt''

  myisammrg/CMakeLists.txt@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +0 -0

  mysql-test/mysql-test-run.pl@stripped, 2006-08-06 17:17:36+02:00, georg@stripped
+25 -43
    added support for cmake build directories

  mysys/CMakeLists.txt@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +29 -0
    New BitKeeper file ``mysys/CMakeLists.txt''

  mysys/CMakeLists.txt@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +0 -0

  mysys/my_seek.c@stripped, 2006-08-06 17:17:36+02:00, georg@stripped +2 -1
    Windows crashes when assigning an invalid file pointer - so we have to
    validate pointer before.

  regex/CMakeLists.txt@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +5 -0
    New BitKeeper file ``regex/CMakeLists.txt''

  regex/CMakeLists.txt@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +0 -0

  server-tools/CMakeLists.txt@stripped, 2006-08-06 17:17:38+02:00, georg@stripped
+18 -0
    New BitKeeper file ``server-tools/CMakeLists.txt''

  server-tools/CMakeLists.txt@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +0
-0

  server-tools/instance-manager/CMakeLists.txt@stripped, 2006-08-06 17:17:38+02:00,
georg@stripped +17 -0
    New BitKeeper file ``server-tools/instance-manager/CMakeLists.txt''

  server-tools/instance-manager/CMakeLists.txt@stripped, 2006-08-06 17:17:38+02:00,
georg@stripped +0 -0

  sql/CMakeLists.txt@stripped, 2006-08-06 17:17:37+02:00, georg@stripped +116 -0
    New BitKeeper file ``sql/CMakeLists.txt''

  sql/CMakeLists.txt@stripped, 2006-08-06 17:17:37+02:00, georg@stripped +0 -0

  sql/examples/CmakeLists.txt@stripped, 2006-08-06 17:17:37+02:00, georg@stripped
+16 -0
    New BitKeeper file ``sql/examples/CmakeLists.txt''

  sql/examples/CmakeLists.txt@stripped, 2006-08-06 17:17:37+02:00, georg@stripped +0
-0

  sql/ha_archive.cc@stripped, 2006-08-06 17:17:37+02:00, georg@stripped +2 -1
    Windows fix: We need dup(filehandle) in gzdopen to keep the handle open - otherwise
    my_close will fail.

  strings/CMakeLists.txt@stripped, 2006-08-06 17:17:37+02:00, georg@stripped +12 -0
    New BitKeeper file ``strings/CMakeLists.txt''

  strings/CMakeLists.txt@stripped, 2006-08-06 17:17:37+02:00, georg@stripped +0 -0

  tests/CMakeLists.txt@stripped, 2006-08-06 17:17:37+02:00, georg@stripped +9 -0
    New BitKeeper file ``tests/CMakeLists.txt''

  tests/CMakeLists.txt@stripped, 2006-08-06 17:17:37+02:00, georg@stripped +0 -0

  vio/CMakeLists.txt@stripped, 2006-08-06 17:17:37+02:00, georg@stripped +6 -0
    New BitKeeper file ``vio/CMakeLists.txt''

  vio/CMakeLists.txt@stripped, 2006-08-06 17:17:37+02:00, georg@stripped +0 -0

  win/Makefile.am@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +21 -0
    New BitKeeper file ``win/Makefile.am''

  win/Makefile.am@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +0 -0

  win/build-vs71.bat@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +7 -0
    New BitKeeper file ``win/build-vs71.bat''

  win/build-vs71.bat@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +0 -0

  win/build-vs8.bat@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +6 -0
    New BitKeeper file ``win/build-vs8.bat''

  win/build-vs8.bat@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +0 -0

  win/build-vs8_x64.bat@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +6 -0
    New BitKeeper file ``win/build-vs8_x64.bat''

  win/build-vs8_x64.bat@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +0 -0

  win/configure.data@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +9 -0
    New BitKeeper file ``win/configure.data''

  win/configure.data@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +0 -0

  win/configure.js@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +167 -0
    New BitKeeper file ``win/configure.js''

  win/configure.js@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +0 -0

  zlib/CMakeLists.txt@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +8 -0
    New BitKeeper file ``zlib/CMakeLists.txt''

  zlib/CMakeLists.txt@stripped, 2006-08-06 17:17:38+02:00, georg@stripped +0 -0

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	georg
# Host:	lmy002.wdf.sap.corp
# Root:	/home/georg/work/mysql/prod/mysql-5.0-cmake

--- 1.23/extra/comp_err.c	2006-08-06 17:17:54 +02:00
+++ 1.24/extra/comp_err.c	2006-08-06 17:17:54 +02:00
@@ -188,8 +188,9 @@
       DBUG_RETURN(1);
     }
     clean_up(lang_head, error_head);
+	DBUG_LEAVE; /* we can't use dbug after my_end */
     my_end(info_flag ? MY_CHECK_ERROR | MY_GIVE_INFO : 0);
-    DBUG_RETURN(0);
+    return 0;
   }
 }
 

--- 1.17/include/my_dbug.h	2006-08-06 17:17:54 +02:00
+++ 1.18/include/my_dbug.h	2006-08-06 17:17:54 +02:00
@@ -97,6 +97,7 @@
 #define DBUG_UNLOCK_FILE
 #define DBUG_OUTPUT(A)
 #define DBUG_ASSERT(A) {}
+#define DBUG_LEAVE
 #endif
 #ifdef	__cplusplus
 }

--- 1.11/mysys/my_seek.c	2006-08-06 17:17:54 +02:00
+++ 1.12/mysys/my_seek.c	2006-08-06 17:17:54 +02:00
@@ -29,7 +29,8 @@
 		   whence, MyFlags));
   DBUG_ASSERT(pos != MY_FILEPOS_ERROR);		/* safety check */
 
-  newpos=lseek(fd, pos, whence);
+  if (-1 != fd)
+    newpos=lseek(fd, pos, whence);
   if (newpos == (os_off_t) -1)
   {
     my_errno=errno;

--- 1.128/client/mysqlbinlog.cc	2006-08-06 17:17:54 +02:00
+++ 1.129/client/mysqlbinlog.cc	2006-08-06 17:17:54 +02:00
@@ -1490,14 +1490,13 @@
   the server
 */
 
-#ifdef __WIN__
 #include "my_decimal.h"
 #include "decimal.c"
+
+#if defined(__WIN__) && !defined(CMAKE_BUILD)
 #include "my_decimal.cpp"
 #include "log_event.cpp"
 #else
-#include "my_decimal.h"
-#include "decimal.c"
 #include "my_decimal.cc"
 #include "log_event.cc"
 #endif

--- 1.70/sql/ha_archive.cc	2006-08-06 17:17:54 +02:00
+++ 1.71/sql/ha_archive.cc	2006-08-06 17:17:54 +02:00
@@ -614,7 +614,8 @@
     error= my_errno;
     goto error;
   }
-  if ((archive= gzdopen(create_file, "wb")) == NULL)
+
+  if ((archive= gzdopen(dup(create_file), "wb")) == NULL)
   {
     error= errno;
     goto error2;
--- New file ---
+++ CMakeLists.txt	06/08/06 17:17:39
PROJECT(MySql)

# This reads user configuration, generated by configure.js.
INCLUDE(win/configure.data)

# Hardcode support for CSV storage engine
SET(WITH_CSV_STORAGE_ENGINE TRUE)

# Set backwards compatibility for cmake downto version 2.2
SET(CMAKE_BACKWARDS_COMPATIBILITY 2.2)

ADD_DEFINITIONS(-D CMAKE_BUILD)

CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/mysql_version.h.in
               ${CMAKE_SOURCE_DIR}/include/mysql_version.h @ONLY)

# Set standard options
ADD_DEFINITIONS(-D WITH_MYISAM_STORAGE_ENGINE)
SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_myisam_plugin")


IF(WITH_ARCHIVE_STORAGE_ENGINE)
  ADD_DEFINITIONS(-D HAVE_ARCHIVE_DB)
ENDIF(WITH_ARCHIVE_STORAGE_ENGINE)

IF (WITH_HEAP_STORAGE_ENGINE)
  ADD_DEFINITIONS(-D WITH_HEAP_STORAGE_ENGINE)
  SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_heap_plugin")
ENDIF (WITH_HEAP_STORAGE_ENGINE)

IF (WITH_MYISAMMRG_STORAGE_ENGINE)
  ADD_DEFINITIONS(-D WITH_MYISAMMRG_STORAGE_ENGINE)
  SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_myisammrg_plugin")
ENDIF (WITH_MYISAMMRG_STORAGE_ENGINE)

IF(WITH_INNOBASE_STORAGE_ENGINE)
  CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/innobase/ib_config.h.in
               ${CMAKE_SOURCE_DIR}/innobase/ib_config.h @ONLY)
  ADD_DEFINITIONS(-D HAVE_INNOBASE_DB)
  ADD_DEFINITIONS(-D WITH_INNOBASE_STORAGE_ENGINE)
  SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_innobase_plugin")
ENDIF(WITH_INNOBASE_STORAGE_ENGINE)

IF(WITH_FEDERATED_STORAGE_ENGINE)
  ADD_DEFINITIONS(-D HAVE_FEDERATED_DB)
  ADD_DEFINITIONS(-D WITH_FEDERATED_STORAGE_ENGINE)
  SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_federated_plugin")
ENDIF(WITH_FEDERATED_STORAGE_ENGINE)

IF(WITH_BERKELEY_STORAGE_ENGINE)
  ADD_DEFINITIONS(-D HAVE_BERKELEY_DB)
  ADD_DEFINITIONS(-D WITH_BERKELEY_STORAGE_ENGINE)
  SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_berkeley_plugin")
ENDIF(WITH_BERKELEY_STORAGE_ENGINE)

IF (WITH_BLACKHOLE_STORAGE_ENGINE)
  ADD_DEFINITIONS(-D HAVE_BLACKHOLE_DB)
ENDIF (WITH_BLACKHOLE_STORAGE_ENGINE)

SET(localstatedir "C:\\mysql\\data")
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/support-files/my-huge.cnf.sh
               ${CMAKE_SOURCE_DIR}/support-files/my-huge.ini @ONLY)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/support-files/my-innodb-heavy-4G.cnf.sh
               ${CMAKE_SOURCE_DIR}/support-files/my-innodb-heavy-4G.ini @ONLY)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/support-files/my-large.cnf.sh
               ${CMAKE_SOURCE_DIR}/support-files/my-large.ini @ONLY)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/support-files/my-medium.cnf.sh
               ${CMAKE_SOURCE_DIR}/support-files/my-medium.ini @ONLY)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/support-files/my-small.cnf.sh
               ${CMAKE_SOURCE_DIR}/support-files/my-small.ini @ONLY)

IF(__NT__)
  ADD_DEFINITIONS(-D __NT__)
ENDIF(__NT__)
IF(CYBOZU)
  ADD_DEFINITIONS(-D CYBOZU)
ENDIF(CYBOZU)

# in some places we use DBUG_OFF
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -D DBUG_OFF")
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -D DBUG_OFF")

IF(CMAKE_GENERATOR MATCHES "Visual Studio 8")
    SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /wd4996")
    SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /wd4996")
    SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /wd4996")
    SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /wd4996")
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 8")

IF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR 
   CMAKE_GENERATOR MATCHES "Visual Studio 8")
	# replace /MDd with /MTd
	STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG_INIT 
	       ${CMAKE_CXX_FLAGS_DEBUG_INIT})
	STRING(REPLACE "/MDd" "/MTd" CMAKE_C_FLAGS_DEBUG_INIT 
	       ${CMAKE_C_FLAGS_DEBUG_INIT})
	STRING(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELEASE 
	       ${CMAKE_C_FLAGS_RELEASE})
	STRING(REPLACE "/MDd" "/MTd" CMAKE_C_FLAGS_DEBUG 
	       ${CMAKE_C_FLAGS_DEBUG})
	STRING(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASE 
	       ${CMAKE_CXX_FLAGS_RELEASE})
	STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG 
	       ${CMAKE_CXX_FLAGS_DEBUG})

	# remove support for Exception handling
	STRING(REPLACE "/GX" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
	STRING(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
	STRING(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS_INIT 
	       ${CMAKE_CXX_FLAGS_INIT})
	STRING(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS_DEBUG_INIT 
	       ${CMAKE_CXX_FLAGS_DEBUG_INIT})
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR 
      CMAKE_GENERATOR MATCHES "Visual Studio 8")

ADD_DEFINITIONS("-D_WINDOWS -D__WIN__ -D _CRT_SECURE_NO_DEPRECATE")

ADD_SUBDIRECTORY(vio)
ADD_SUBDIRECTORY(dbug)
ADD_SUBDIRECTORY(strings)
ADD_SUBDIRECTORY(regex)
ADD_SUBDIRECTORY(mysys)
ADD_SUBDIRECTORY(extra/yassl)
ADD_SUBDIRECTORY(extra/yassl/taocrypt)
ADD_SUBDIRECTORY(extra)
ADD_SUBDIRECTORY(zlib)
ADD_SUBDIRECTORY(heap)
ADD_SUBDIRECTORY(myisam)
ADD_SUBDIRECTORY(myisammrg)
ADD_SUBDIRECTORY(client)
ADD_SUBDIRECTORY(bdb)
ADD_SUBDIRECTORY(innobase)
ADD_SUBDIRECTORY(sql)
ADD_SUBDIRECTORY(sql/examples)
ADD_SUBDIRECTORY(server-tools/instance-manager)
ADD_SUBDIRECTORY(libmysql)
ADD_SUBDIRECTORY(tests)

--- New file ---
+++ bdb/CMakeLists.txt	06/08/06 17:17:39
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/bdb/build_win32
                    ${CMAKE_SOURCE_DIR}/bdb/dbinc
                    ${CMAKE_SOURCE_DIR}/bdb)

# BDB needs a number of source files that are auto-generated by the unix
# configure. So to build BDB, it is necessary to copy these over to the Windows
# bitkeeper tree, or to use a source .tar.gz package which already has these
# files.
ADD_LIBRARY(bdb btree/bt_compare.c btree/bt_conv.c btree/bt_curadj.c btree/bt_cursor.c
			btree/bt_delete.c btree/bt_method.c btree/bt_open.c btree/bt_put.c btree/bt_rec.c
			btree/bt_reclaim.c btree/bt_recno.c btree/bt_rsearch.c btree/bt_search.c
			btree/bt_split.c btree/bt_stat.c btree/bt_upgrade.c btree/bt_verify.c
btree/btree_auto.c
			db/crdel_auto.c db/crdel_rec.c db/db.c db/db_am.c db/db_auto.c common/db_byteorder.c
			db/db_cam.c db/db_conv.c db/db_dispatch.c db/db_dup.c common/db_err.c
common/db_getlong.c
			common/db_idspace.c db/db_iface.c db/db_join.c common/db_log2.c db/db_meta.c
			db/db_method.c db/db_open.c db/db_overflow.c db/db_pr.c db/db_rec.c db/db_reclaim.c
			db/db_remove.c db/db_rename.c db/db_ret.c env/db_salloc.c env/db_shash.c
db/db_truncate.c
			db/db_upg.c db/db_upg_opd.c db/db_vrfy.c db/db_vrfyutil.c dbm/dbm.c dbreg/dbreg.c
			dbreg/dbreg_auto.c dbreg/dbreg_rec.c dbreg/dbreg_util.c env/env_file.c env/env_method.c
			env/env_open.c env/env_recover.c env/env_region.c fileops/fileops_auto.c
fileops/fop_basic.c
			fileops/fop_rec.c fileops/fop_util.c hash/hash.c hash/hash_auto.c hash/hash_conv.c
			hash/hash_dup.c hash/hash_func.c hash/hash_meta.c hash/hash_method.c hash/hash_open.c
			hash/hash_page.c hash/hash_rec.c  hash/hash_reclaim.c hash/hash_stat.c
hash/hash_upgrade.c
			hash/hash_verify.c hmac/hmac.c hsearch/hsearch.c lock/lock.c lock/lock_deadlock.c
			lock/lock_method.c lock/lock_region.c lock/lock_stat.c lock/lock_util.c log/log.c
			log/log_archive.c log/log_compare.c log/log_get.c log/log_method.c log/log_put.c
			mp/mp_alloc.c mp/mp_bh.c mp/mp_fget.c mp/mp_fopen.c mp/mp_fput.c
			mp/mp_fset.c mp/mp_method.c mp/mp_region.c mp/mp_register.c mp/mp_stat.c mp/mp_sync.c
			mp/mp_trickle.c mutex/mut_tas.c mutex/mut_win32.c mutex/mutex.c os_win32/os_abs.c
			os/os_alloc.c os_win32/os_clock.c os_win32/os_config.c os_win32/os_dir.c
os_win32/os_errno.c
			os_win32/os_fid.c os_win32/os_fsync.c os_win32/os_handle.c os/os_id.c os_win32/os_map.c
			os/os_method.c os/os_oflags.c os_win32/os_open.c os/os_region.c os_win32/os_rename.c
			os/os_root.c os/os_rpath.c os_win32/os_rw.c os_win32/os_seek.c os_win32/os_sleep.c
			os_win32/os_spin.c os_win32/os_stat.c os/os_tmpdir.c os_win32/os_type.c os/os_unlink.c
			qam/qam.c qam/qam_auto.c qam/qam_conv.c qam/qam_files.c qam/qam_method.c qam/qam_open.c
			qam/qam_rec.c qam/qam_stat.c qam/qam_upgrade.c qam/qam_verify.c rep/rep_method.c
			rep/rep_record.c rep/rep_region.c rep/rep_util.c hmac/sha1.c
			clib/strcasecmp.c txn/txn.c txn/txn_auto.c txn/txn_method.c txn/txn_rec.c
			txn/txn_recover.c txn/txn_region.c txn/txn_stat.c txn/txn_util.c common/util_log.c
			common/util_sig.c xa/xa.c xa/xa_db.c xa/xa_map.c)


--- New file ---
+++ client/CMakeLists.txt	06/08/06 17:17:38
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")

# The old Windows build method used renamed (.cc -> .cpp) source files, fails
# in #include in mysqlbinlog.cc. So disable that using the USING_CMAKE define.
ADD_DEFINITIONS(-DUSING_CMAKE)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include 
                    ${CMAKE_SOURCE_DIR}/zlib 
                    ${CMAKE_SOURCE_DIR}/extra/yassl/include 
                    ${CMAKE_SOURCE_DIR}/libmysql
                    ${CMAKE_SOURCE_DIR}/regex
                    ${CMAKE_SOURCE_DIR}/mysys
                    ${CMAKE_SOURCE_DIR}/sql
                    ${CMAKE_SOURCE_DIR}/strings)

ADD_LIBRARY(mysqlclient ../mysys/array.c ../strings/bchange.c ../strings/bmove.c 
                        ../strings/bmove_upp.c ../mysys/charset-def.c ../mysys/charset.c
                        ../sql-common/client.c ../strings/ctype-big5.c
../strings/ctype-bin.c 
                        ../strings/ctype-cp932.c ../strings/ctype-czech.c
../strings/ctype-euc_kr.c 
                        ../strings/ctype-eucjpms.c ../strings/ctype-extra.c
../strings/ctype-gb2312.c
                        ../strings/ctype-gbk.c ../strings/ctype-latin1.c
../strings/ctype-mb.c 
                        ../strings/ctype-simple.c ../strings/ctype-sjis.c
../strings/ctype-tis620.c 
                        ../strings/ctype-uca.c ../strings/ctype-ucs2.c
../strings/ctype-ujis.c 
                        ../strings/ctype-utf8.c ../strings/ctype-win1250ch.c
../strings/ctype.c 
                        ../mysys/default.c ../libmysql/errmsg.c ../mysys/errors.c
                        ../libmysql/get_password.c ../strings/int2str.c
../strings/is_prefix.c 
                        ../libmysql/libmysql.c ../mysys/list.c ../strings/llstr.c
                        ../strings/longlong2str.c ../libmysql/manager.c
../mysys/mf_cache.c 
                        ../mysys/mf_dirname.c ../mysys/mf_fn_ext.c ../mysys/mf_format.c 
                        ../mysys/mf_iocache.c ../mysys/mf_iocache2.c
../mysys/mf_loadpath.c 
                        ../mysys/mf_pack.c ../mysys/mf_path.c ../mysys/mf_tempfile.c
../mysys/mf_unixpath.c 
                        ../mysys/mf_wcomp.c ../mysys/mulalloc.c ../mysys/my_access.c
../mysys/my_alloc.c 
                        ../mysys/my_chsize.c ../mysys/my_compress.c ../mysys/my_create.c
                        ../mysys/my_delete.c ../mysys/my_div.c ../mysys/my_error.c
../mysys/my_file.c 
                        ../mysys/my_fopen.c ../mysys/my_fstream.c 
../mysys/my_gethostbyname.c 
                        ../mysys/my_getopt.c ../mysys/my_getwd.c ../mysys/my_init.c
../mysys/my_lib.c
                        ../mysys/my_malloc.c ../mysys/my_messnc.c ../mysys/my_net.c
../mysys/my_once.c 
                        ../mysys/my_open.c ../mysys/my_pread.c  ../mysys/my_pthread.c
../mysys/my_read.c 
                        ../mysys/my_realloc.c ../mysys/my_rename.c ../mysys/my_seek.c  
                        ../mysys/my_static.c ../strings/my_strtoll10.c
../mysys/my_symlink.c 
                        ../mysys/my_symlink2.c ../mysys/my_thr_init.c 
../sql-common/my_time.c 
                        ../strings/my_vsnprintf.c ../mysys/my_wincond.c
../mysys/my_winthread.c 
                        ../mysys/my_write.c ../sql/net_serv.cc ../sql-common/pack.c
../sql/password.c 
                        ../mysys/safemalloc.c ../mysys/sha1.c ../strings/str2int.c
                        ../strings/str_alloc.c ../strings/strcend.c ../strings/strcont.c
../strings/strend.c 
                        ../strings/strfill.c ../mysys/string.c ../strings/strinstr.c
../strings/strmake.c 
                        ../strings/strmov.c ../strings/strnlen.c ../strings/strnmov.c
../strings/strtod.c
                        ../strings/strtoll.c ../strings/strtoull.c ../strings/strxmov.c
../strings/strxnmov.c 
                        ../mysys/thr_mutex.c ../mysys/typelib.c ../vio/vio.c
../vio/viosocket.c 
                        ../vio/viossl.c ../vio/viosslfactories.c ../strings/xml.c)

ADD_DEPENDENCIES(mysqlclient GenError)
ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc sql_string.cc)
LINK_DIRECTORIES(${MYSQL_BINARY_DIR}/mysys ${MYSQL_BINARY_DIR}/zlib)
TARGET_LINK_LIBRARIES(mysql mysqlclient mysys yassl taocrypt zlib dbug wsock32)

ADD_EXECUTABLE(mysqltest mysqltest.c)
TARGET_LINK_LIBRARIES(mysqltest mysqlclient mysys yassl taocrypt zlib dbug regex wsock32)

ADD_EXECUTABLE(mysqlcheck mysqlcheck.c)
TARGET_LINK_LIBRARIES(mysqlcheck mysqlclient dbug yassl taocrypt zlib wsock32)

ADD_EXECUTABLE(mysqldump mysqldump.c ../sql-common/my_user.c)
TARGET_LINK_LIBRARIES(mysqldump mysqlclient mysys dbug yassl taocrypt zlib wsock32)

ADD_EXECUTABLE(mysqlimport mysqlimport.c)
TARGET_LINK_LIBRARIES(mysqlimport mysqlclient mysys dbug yassl taocrypt zlib wsock32)

ADD_EXECUTABLE(mysqlshow mysqlshow.c)
TARGET_LINK_LIBRARIES(mysqlshow mysqlclient mysys dbug yassl taocrypt zlib wsock32)

ADD_EXECUTABLE(mysqlbinlog mysqlbinlog.cc ../mysys/mf_tempdir.c ../mysys/my_new.cc
                           ../mysys/my_bit.c ../mysys/my_bitmap.c 
                           ../mysys/base64.c)
TARGET_LINK_LIBRARIES(mysqlbinlog mysqlclient dbug yassl taocrypt zlib wsock32)

ADD_EXECUTABLE(mysqladmin mysqladmin.cc)
TARGET_LINK_LIBRARIES(mysqladmin mysqlclient mysys dbug yassl taocrypt zlib wsock32)


--- New file ---
+++ dbug/CMakeLists.txt	06/08/06 17:17:39
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX
-D__WIN32__")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
ADD_LIBRARY(dbug dbug.c factorial.c sanity.c)

--- New file ---
+++ extra/CMakeLists.txt	06/08/06 17:17:38
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)

ADD_EXECUTABLE(comp_err comp_err.c)
TARGET_LINK_LIBRARIES(comp_err dbug mysys strings wsock32)

GET_TARGET_PROPERTY(COMP_ERR_EXE comp_err LOCATION)

ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/include/mysqld_error.h
                   COMMAND ${COMP_ERR_EXE}
                    --charset=${PROJECT_SOURCE_DIR}/sql/share/charsets 
                    --out-dir=${PROJECT_SOURCE_DIR}/sql/share/
                    --header_file=${PROJECT_SOURCE_DIR}/include/mysqld_error.h 
                    --name_file=${PROJECT_SOURCE_DIR}/include/mysqld_ername.h
                    --state_file=${PROJECT_SOURCE_DIR}/include/sql_state.h
                    --in_file=${PROJECT_SOURCE_DIR}/sql/share/errmsg.txt
                   DEPENDS comp_err ${PROJECT_SOURCE_DIR}/sql/share/errmsg.txt)

ADD_CUSTOM_TARGET(GenError
                  ALL
                  DEPENDS ${PROJECT_SOURCE_DIR}/include/mysqld_error.h)

ADD_EXECUTABLE(my_print_defaults my_print_defaults.c)
TARGET_LINK_LIBRARIES(my_print_defaults strings mysys dbug taocrypt odbc32 odbccp32
wsock32)

ADD_EXECUTABLE(perror perror.c)
TARGET_LINK_LIBRARIES(perror strings mysys dbug wsock32)

ADD_EXECUTABLE(replace replace.c)
TARGET_LINK_LIBRARIES(replace strings mysys dbug wsock32)

--- New file ---
+++ extra/yassl/CMakeLists.txt	06/08/06 17:17:38
ADD_DEFINITIONS("-DWIN32 -D_LIB -DYASSL_PREFIX")

INCLUDE_DIRECTORIES(include taocrypt/include mySTL)
ADD_LIBRARY(yassl src/buffer.cpp src/cert_wrapper.cpp src/crypto_wrapper.cpp
src/handshake.cpp src/lock.cpp 
				src/log.cpp src/socket_wrapper.cpp src/ssl.cpp src/timer.cpp src/yassl_error.cpp 
				src/yassl_imp.cpp src/yassl_int.cpp)

--- New file ---
+++ extra/yassl/taocrypt/CMakeLists.txt	06/08/06 17:17:38
INCLUDE_DIRECTORIES(../mySTL include)

ADD_LIBRARY(taocrypt src/aes.cpp src/aestables.cpp src/algebra.cpp src/arc4.cpp
src/asn.cpp src/coding.cpp 
				src/des.cpp src/dh.cpp src/dsa.cpp src/file.cpp src/hash.cpp src/integer.cpp
src/md2.cpp 
				src/md4.cpp src/md5.cpp src/misc.cpp src/random.cpp src/ripemd.cpp src/rsa.cpp
src/sha.cpp
				include/aes.hpp include/algebra.hpp include/arc4.hpp include/asn.hpp include/block.hpp

				include/coding.hpp include/des.hpp include/dh.hpp include/dsa.hpp include/dsa.hpp
				include/error.hpp include/file.hpp include/hash.hpp include/hmac.hpp
include/integer.hpp 
				include/md2.hpp include/md5.hpp include/misc.hpp include/modarith.hpp
include/modes.hpp
				include/random.hpp include/ripemd.hpp include/rsa.hpp include/sha.hpp)

--- New file ---
+++ heap/CMakeLists.txt	06/08/06 17:17:38
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
ADD_LIBRARY(heap _check.c _rectest.c hp_block.c hp_clear.c hp_close.c hp_create.c
				hp_delete.c hp_extra.c hp_hash.c hp_info.c hp_open.c hp_panic.c
				hp_rename.c hp_rfirst.c hp_rkey.c hp_rlast.c hp_rnext.c hp_rprev.c
				hp_rrnd.c hp_rsame.c hp_scan.c hp_static.c hp_update.c hp_write.c)

--- New file ---
+++ innobase/CMakeLists.txt	06/08/06 17:17:38
#SET(CMAKE_CXX_FLAGS_DEBUG "-DSAFEMALLOC -DSAFE_MUTEX")
#SET(CMAKE_C_FLAGS_DEBUG "-DSAFEMALLOC -DSAFE_MUTEX")
ADD_DEFINITIONS(-DMYSQL_SERVER -D_WIN32 -DWIN32 -D_LIB)

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include include)
ADD_LIBRARY(innobase btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c 
					 buf/buf0buf.c buf/buf0flu.c buf/buf0lru.c buf/buf0rea.c 
					 data/data0data.c data/data0type.c 
					 dict/dict0boot.c dict/dict0crea.c dict/dict0dict.c dict/dict0load.c dict/dict0mem.c 
					 dyn/dyn0dyn.c 
					 eval/eval0eval.c eval/eval0proc.c 
					 fil/fil0fil.c 
					 fsp/fsp0fsp.c
					 fut/fut0fut.c fut/fut0lst.c 
					 ha/ha0ha.c ha/hash0hash.c 
					 ibuf/ibuf0ibuf.c 
					 pars/lexyy.c pars/pars0grm.c pars/pars0opt.c pars/pars0pars.c pars/pars0sym.c 
					 lock/lock0lock.c
					 log/log0log.c log/log0recv.c 
					 mach/mach0data.c 
					 mem/mem0mem.c mem/mem0pool.c 
					 mtr/mtr0log.c mtr/mtr0mtr.c 
					 os/os0file.c os/os0proc.c os/os0sync.c os/os0thread.c 
					 page/page0cur.c page/page0page.c 
					 que/que0que.c 
					 read/read0read.c 
					 rem/rem0cmp.c rem/rem0rec.c
					 row/row0ins.c row/row0mysql.c row/row0purge.c row/row0row.c row/row0sel.c
row/row0uins.c 
					 row/row0umod.c row/row0undo.c row/row0upd.c row/row0vers.c 
					 srv/srv0que.c srv/srv0srv.c srv/srv0start.c 
					 sync/sync0arr.c sync/sync0rw.c sync/sync0sync.c 
					 thr/thr0loc.c 
					 trx/trx0purge.c trx/trx0rec.c trx/trx0roll.c trx/trx0rseg.c trx/trx0sys.c
trx/trx0trx.c trx/trx0undo.c 
					 usr/usr0sess.c 
					 ut/ut0byte.c ut/ut0dbg.c ut/ut0mem.c ut/ut0rnd.c ut/ut0ut.c )

--- New file ---
+++ libmysql/CMakeLists.txt	06/08/06 17:17:38
# Need to set USE_TLS, since __declspec(thread) approach to thread local
# storage does not work properly in DLLs.
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_TLS")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_TLS")

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include 
                    ${CMAKE_SOURCE_DIR}/zlib 
                    ${CMAKE_SOURCE_DIR}/extra/yassl/include 
                    ${CMAKE_SOURCE_DIR}/libmysql
                    ${CMAKE_SOURCE_DIR}/regex
                    ${CMAKE_SOURCE_DIR}/sql
                    ${CMAKE_SOURCE_DIR}/strings)

ADD_LIBRARY(libmysql MODULE dll.c libmysql.def
                     ../mysys/array.c ../strings/bchange.c ../strings/bmove.c 
                     ../strings/bmove_upp.c ../mysys/charset-def.c ../mysys/charset.c
                     ../sql-common/client.c ../strings/ctype-big5.c ../strings/ctype-bin.c

                     ../strings/ctype-cp932.c ../strings/ctype-czech.c
../strings/ctype-euc_kr.c 
                     ../strings/ctype-eucjpms.c ../strings/ctype-extra.c
../strings/ctype-gb2312.c
                     ../strings/ctype-gbk.c ../strings/ctype-latin1.c
../strings/ctype-mb.c 
                     ../strings/ctype-simple.c ../strings/ctype-sjis.c
../strings/ctype-tis620.c 
                     ../strings/ctype-uca.c ../strings/ctype-ucs2.c
../strings/ctype-ujis.c 
                     ../strings/ctype-utf8.c ../strings/ctype-win1250ch.c
../strings/ctype.c 
                     ../mysys/default.c ../libmysql/errmsg.c ../mysys/errors.c
                     ../libmysql/get_password.c ../strings/int2str.c
../strings/is_prefix.c 
                     ../libmysql/libmysql.c ../mysys/list.c ../strings/llstr.c
                     ../strings/longlong2str.c ../libmysql/manager.c ../mysys/mf_cache.c 
                     ../mysys/mf_dirname.c ../mysys/mf_fn_ext.c ../mysys/mf_format.c 
                     ../mysys/mf_iocache.c ../mysys/mf_iocache2.c ../mysys/mf_loadpath.c 
                     ../mysys/mf_pack.c ../mysys/mf_path.c ../mysys/mf_tempfile.c
../mysys/mf_unixpath.c 
                     ../mysys/mf_wcomp.c ../mysys/mulalloc.c ../mysys/my_access.c
../mysys/my_alloc.c 
                     ../mysys/my_chsize.c ../mysys/my_compress.c ../mysys/my_create.c
                     ../mysys/my_delete.c ../mysys/my_div.c ../mysys/my_error.c
../mysys/my_file.c 
                     ../mysys/my_fopen.c ../mysys/my_fstream.c 
../mysys/my_gethostbyname.c 
                     ../mysys/my_getopt.c ../mysys/my_getwd.c ../mysys/my_init.c
../mysys/my_lib.c
                     ../mysys/my_malloc.c ../mysys/my_messnc.c ../mysys/my_net.c
../mysys/my_once.c 
                     ../mysys/my_open.c ../mysys/my_pread.c  ../mysys/my_pthread.c
../mysys/my_read.c 
                     ../mysys/my_realloc.c ../mysys/my_rename.c ../mysys/my_seek.c  
                     ../mysys/my_static.c ../strings/my_strtoll10.c ../mysys/my_symlink.c 
                     ../mysys/my_symlink2.c ../mysys/my_thr_init.c 
../sql-common/my_time.c 
                     ../strings/my_vsnprintf.c ../mysys/my_wincond.c
../mysys/my_winthread.c 
                     ../mysys/my_write.c ../sql/net_serv.cc ../sql-common/pack.c
../sql/password.c 
                     ../mysys/safemalloc.c ../mysys/sha1.c ../strings/str2int.c
                     ../strings/str_alloc.c ../strings/strcend.c ../strings/strcont.c
../strings/strend.c 
                     ../strings/strfill.c ../mysys/string.c ../strings/strinstr.c
../strings/strmake.c 
                     ../strings/strmov.c ../strings/strnlen.c ../strings/strnmov.c
../strings/strtod.c
                     ../strings/strtoll.c ../strings/strtoull.c ../strings/strxmov.c
../strings/strxnmov.c 
                     ../mysys/thr_mutex.c ../mysys/typelib.c ../vio/vio.c
../vio/viosocket.c 
                     ../vio/viossl.c ../vio/viosslfactories.c ../strings/xml.c)
ADD_DEPENDENCIES(libmysql dbug vio mysys strings GenError zlib yassl taocrypt)
TARGET_LINK_LIBRARIES(libmysql mysys strings wsock32)

ADD_EXECUTABLE(myTest ../VC++Files/libmysqltest/mytest.c)
TARGET_LINK_LIBRARIES(myTest libmysql)

--- New file ---
+++ myisam/CMakeLists.txt	06/08/06 17:17:38
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
ADD_LIBRARY(myisam ft_boolean_search.c ft_nlq_search.c ft_parser.c ft_static.c ft_stem.c
				ft_stopwords.c ft_update.c mi_cache.c mi_changed.c mi_check.c
				mi_checksum.c mi_close.c mi_create.c mi_dbug.c mi_delete.c 
				mi_delete_all.c mi_delete_table.c mi_dynrec.c mi_extra.c mi_info.c
				mi_key.c mi_keycache.c mi_locking.c mi_log.c mi_open.c 
				mi_packrec.c mi_page.c mi_panic.c mi_preload.c mi_range.c mi_rename.c
				mi_rfirst.c mi_rlast.c mi_rnext.c mi_rnext_same.c mi_rprev.c mi_rrnd.c
				mi_rsame.c mi_rsamepos.c mi_scan.c mi_search.c mi_static.c mi_statrec.c
				mi_unique.c mi_update.c mi_write.c rt_index.c rt_key.c rt_mbr.c
				rt_split.c sort.c sp_key.c ft_eval.h myisamdef.h rt_index.h mi_rkey.c)

ADD_EXECUTABLE(myisam_ftdump myisam_ftdump.c)
TARGET_LINK_LIBRARIES(myisam_ftdump myisam mysys dbug strings zlib wsock32)

ADD_EXECUTABLE(myisamchk myisamchk.c)
TARGET_LINK_LIBRARIES(myisamchk myisam mysys dbug strings zlib wsock32)

ADD_EXECUTABLE(myisamlog myisamlog.c)
TARGET_LINK_LIBRARIES(myisamlog myisam mysys dbug strings zlib wsock32)

ADD_EXECUTABLE(myisampack myisampack.c)
TARGET_LINK_LIBRARIES(myisampack myisam mysys dbug strings zlib wsock32)

--- New file ---
+++ myisammrg/CMakeLists.txt	06/08/06 17:17:38
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
ADD_LIBRARY(myisammrg myrg_close.c myrg_create.c myrg_delete.c myrg_extra.c myrg_info.c
				myrg_locking.c myrg_open.c myrg_panic.c myrg_queue.c myrg_range.c
				myrg_rfirst.c myrg_rkey.c myrg_rlast.c myrg_rnext.c myrg_rnext_same.c
				myrg_rprev.c myrg_rrnd.c myrg_rsame.c myrg_static.c myrg_update.c
				myrg_write.c)

--- New file ---
+++ mysys/CMakeLists.txt	06/08/06 17:17:38
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")

# Need to set USE_TLS, since mysys is linked into libmysql.dll and
# libmysqld.dll, and __declspec(thread) approach to thread local storage does
# not work properly in DLLs.
# Currently, USE_TLS crashes in Debug builds, so until that is fixed Debug
# .dlls cannot be loaded at runtime.
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DUSE_TLS")
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DUSE_TLS")

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/zlib ${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/mysys )
ADD_LIBRARY(mysys array.c charset-def.c charset.c checksum.c default.c default_modify.c
				errors.c hash.c list.c md5.c mf_brkhant.c mf_cache.c mf_dirname.c mf_fn_ext.c
				mf_format.c mf_getdate.c mf_iocache.c mf_iocache2.c mf_keycache.c 
				mf_keycaches.c mf_loadpath.c mf_pack.c mf_path.c mf_qsort.c mf_qsort2.c
				mf_radix.c mf_same.c mf_sort.c mf_soundex.c mf_strip.c mf_tempdir.c
				mf_tempfile.c mf_unixpath.c mf_wcomp.c mf_wfile.c mulalloc.c my_access.c
				my_aes.c my_alarm.c my_alloc.c my_append.c my_bit.c my_bitmap.c my_chsize.c
				my_clock.c my_compress.c my_conio.c my_copy.c my_crc32.c my_create.c my_delete.c
				my_div.c my_error.c my_file.c my_fopen.c my_fstream.c my_gethostbyname.c 
				my_gethwaddr.c my_getopt.c my_getsystime.c my_getwd.c my_handler.c my_init.c
				my_lib.c my_lock.c my_lockmem.c my_lread.c my_lwrite.c my_malloc.c my_messnc.c
				my_mkdir.c my_mmap.c my_net.c my_once.c my_open.c my_pread.c my_pthread.c 
				my_quick.c my_read.c my_realloc.c my_redel.c my_rename.c my_seek.c my_sleep.c
				my_static.c my_symlink.c my_symlink2.c my_sync.c my_thr_init.c my_wincond.c
				my_windac.c my_winsem.c my_winthread.c my_write.c ptr_cmp.c queues.c
				rijndael.c safemalloc.c sha1.c string.c thr_alarm.c thr_lock.c thr_mutex.c
				thr_rwlock.c tree.c typelib.c base64.c my_memmem.c)

--- New file ---
+++ regex/CMakeLists.txt	06/08/06 17:17:38
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG -DSAFEMALLOC -DSAFE_MUTEX")

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/mysys})
ADD_LIBRARY(regex debug.c regcomp.c regerror.c regexec.c regfree.c reginit.c split.c)

--- New file ---
+++ server-tools/CMakeLists.txt	06/08/06 17:17:38
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")

ADD_DEFINITIONS(-DMYSQL_SERVER -DMYSQL_INSTANCE_MANAGER)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/sql
                    ${PROJECT_SOURCE_DIR}/extra/yassl/include)
 
ADD_EXECUTABLE(mysqlmanager buffer.cc command.cc commands.cc guardian.cc instance.cc
instance_map.cc
                            instance_options.cc listener.cc log.cc manager.cc messages.cc
mysql_connection.cc
                            mysqlmanager.cc options.cc parse.cc parse_output.cc priv.cc
protocol.cc
                            thread_registry.cc user_map.cc imservice.cpp
windowsservice.cpp
                            user_management_commands.cc
                            ../../sql/net_serv.cc ../../sql-common/pack.c
../../sql/password.c
                            ../../sql/sql_state.c ../../sql-common/client.c
../../libmysql/get_password.c
                            ../../libmysql/errmsg.c)

ADD_DEPENDENCIES(mysqlmanager GenError)
TARGET_LINK_LIBRARIES(mysqlmanager dbug mysys strings taocrypt vio yassl zlib wsock32)

--- New file ---
+++ server-tools/instance-manager/CMakeLists.txt	06/08/06 17:17:38
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")

ADD_DEFINITIONS(-DMYSQL_SERVER -DMYSQL_INSTANCE_MANAGER)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/sql
                    ${PROJECT_SOURCE_DIR}/extra/yassl/include)
 
ADD_EXECUTABLE(mysqlmanager buffer.cc command.cc commands.cc guardian.cc instance.cc
instance_map.cc
                            instance_options.cc listener.cc log.cc manager.cc messages.cc
mysql_connection.cc
                            mysqlmanager.cc options.cc parse.cc parse_output.cc priv.cc
protocol.cc
                            thread_registry.cc user_map.cc imservice.cpp
windowsservice.cpp
                            ../../sql/net_serv.cc ../../sql-common/pack.c
../../sql/password.c
                            ../../sql/sql_state.c ../../sql-common/client.c
../../libmysql/get_password.c
                            ../../libmysql/errmsg.c)

ADD_DEPENDENCIES(mysqlmanager GenError)
TARGET_LINK_LIBRARIES(mysqlmanager dbug mysys strings taocrypt vio yassl zlib wsock32)

--- New file ---
+++ sql/CMakeLists.txt	06/08/06 17:17:37
SET(CMAKE_CXX_FLAGS_DEBUG 
    "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR")
SET(CMAKE_C_FLAGS_DEBUG 
    "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR")

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include 
                    ${CMAKE_SOURCE_DIR}/extra/yassl/include 
                    ${CMAKE_SOURCE_DIR}/sql 
                    ${CMAKE_SOURCE_DIR}/regex 
                    ${CMAKE_SOURCE_DIR}/zlib
                    ${CMAKE_SOURCE_DIR}/bdb/build_win32
                    ${CMAKE_SOURCE_DIR}/bdb/dbinc)

SET_SOURCE_FILES_PROPERTIES(${CMAKE_SOURCE_DIR}/sql/message.rc 
							${CMAKE_SOURCE_DIR}/sql/message.h 
							${CMAKE_SOURCE_DIR}/sql/sql_yacc.h 
							${CMAKE_SOURCE_DIR}/sql/sql_yacc.cc
                            ${CMAKE_SOURCE_DIR}/include/mysql_version.h
                            ${CMAKE_SOURCE_DIR}/sql/lex_hash.h 
                            ${PROJECT_SOURCE_DIR}/include/mysqld_error.h
                            ${PROJECT_SOURCE_DIR}/include/mysqld_ername.h
                            ${PROJECT_SOURCE_DIR}/include/sql_state.h 
                              PROPERTIES GENERATED 1)

ADD_DEFINITIONS(-DHAVE_INNOBASE -DMYSQL_SERVER 
                -D_CONSOLE -DHAVE_DLOPEN)

ADD_EXECUTABLE(mysqld ../sql-common/client.c derror.cc des_key_file.cc
               discover.cc ../libmysql/errmsg.c field.cc field_conv.cc 
               filesort.cc gstream.cc ha_blackhole.cc 
               ha_archive.cc ha_heap.cc ha_myisam.cc ha_myisammrg.cc
               ha_innodb.cc ha_federated.cc ha_berkeley.cc ha_blackhole.cc
               handler.cc hash_filo.cc hash_filo.h 
               hostname.cc init.cc item.cc item_buff.cc item_cmpfunc.cc 
               item_create.cc item_func.cc item_geofunc.cc item_row.cc 
               item_strfunc.cc item_subselect.cc item_sum.cc item_timefunc.cc 
               item_uniq.cc key.cc log.cc lock.cc log_event.cc message.rc 
               message.h mf_iocache.cc my_decimal.cc ../sql-common/my_time.c
               ../myisammrg/myrg_rnext_same.c mysqld.cc net_serv.cc 
               nt_servc.cc nt_servc.h opt_range.cc opt_range.h opt_sum.cc 
               ../sql-common/pack.c parse_file.cc password.c procedure.cc 
               protocol.cc records.cc repl_failsafe.cc set_var.cc 
               slave.cc sp.cc sp_cache.cc sp_head.cc sp_pcontext.cc 
               sp_rcontext.cc spatial.cc sql_acl.cc sql_analyse.cc sql_base.cc 
               sql_cache.cc sql_class.cc sql_client.cc sql_crypt.cc sql_crypt.h 
               sql_cursor.cc sql_db.cc sql_delete.cc sql_derived.cc sql_do.cc 
               sql_error.cc sql_handler.cc sql_help.cc sql_insert.cc sql_lex.cc 
               sql_list.cc sql_load.cc sql_manager.cc sql_map.cc sql_parse.cc 
               sql_prepare.cc sql_rename.cc 
               sql_repl.cc sql_select.cc sql_show.cc sql_state.c sql_string.cc 
               sql_table.cc sql_test.cc sql_trigger.cc sql_udf.cc sql_union.cc
               sql_update.cc sql_view.cc strfunc.cc table.cc thr_malloc.cc 
               time.cc tztime.cc uniques.cc unireg.cc 
               ../sql-common/my_user.c 
               sql_locale.cc
               ${PROJECT_SOURCE_DIR}/sql/sql_yacc.cc
  			   ${PROJECT_SOURCE_DIR}/sql/sql_yacc.h
			   ${PROJECT_SOURCE_DIR}/include/mysqld_error.h
			   ${PROJECT_SOURCE_DIR}/include/mysqld_ername.h 
			   ${PROJECT_SOURCE_DIR}/include/sql_state.h
			   ${PROJECT_SOURCE_DIR}/include/mysql_version.h 
			   ${PROJECT_SOURCE_DIR}/sql/lex_hash.h)

IF(WITH_ARCHIVE_STORAGE_ENGINE)

ENDIF(WITH_ARCHIVE_STORAGE_ENGINE)
TARGET_LINK_LIBRARIES(mysqld heap myisam myisammrg mysys yassl zlib dbug yassl 
                      innobase taocrypt strings vio regex wsock32)

IF(WITH_CSV_STORAGE_ENGINE)
  TARGET_LINK_LIBRARIES(mysqld csv)
ENDIF(WITH_CSV_STORAGE_ENGINE)
IF(WITH_EXAMPLE_STORAGE_ENGINE)
  TARGET_LINK_LIBRARIES(mysqld example)
ENDIF(WITH_EXAMPLE_STORAGE_ENGINE)
IF(WITH_INNOBASE_STORAGE_ENGINE)
  TARGET_LINK_LIBRARIES(mysqld innobase)
ENDIF(WITH_INNOBASE_STORAGE_ENGINE)
IF(WITH_BERKELEY_STORAGE_ENGINE)
  TARGET_LINK_LIBRARIES(mysqld bdb)
ENDIF(WITH_BERKELEY_STORAGE_ENGINE)

ADD_DEPENDENCIES(mysqld GenError)

# Sql Parser custom command
ADD_CUSTOM_COMMAND(
	SOURCE ${PROJECT_SOURCE_DIR}/sql/sql_yacc.yy 
	OUTPUT ${PROJECT_SOURCE_DIR}/sql/sql_yacc.cc
	COMMAND bison.exe ARGS -y -p MYSQL --defines=sql_yacc.h	
	                       --output=sql_yacc.cc sql_yacc.yy
	DEPENDS ${PROJECT_SOURCE_DIR}/sql/sql_yacc.yy)

ADD_CUSTOM_COMMAND(
	OUTPUT ${PROJECT_SOURCE_DIR}/sql/sql_yacc.h
	COMMAND echo
	DEPENDS ${PROJECT_SOURCE_DIR}/sql/sql_yacc.cc
)

# Windows message file
ADD_CUSTOM_COMMAND(
	SOURCE ${PROJECT_SOURCE_DIR}/VC++Files/sql/message.mc
	OUTPUT message.rc message.h
	COMMAND mc ARGS ${PROJECT_SOURCE_DIR}/VC++Files/sql/message.mc
	DEPENDS ${PROJECT_SOURCE_DIR}/VC++Files/sql/message.mc)

# Gen_lex_hash
ADD_EXECUTABLE(gen_lex_hash gen_lex_hash.cc)
TARGET_LINK_LIBRARIES(gen_lex_hash dbug mysqlclient wsock32)
GET_TARGET_PROPERTY(GEN_LEX_HASH_EXE gen_lex_hash LOCATION)
ADD_CUSTOM_COMMAND(
	OUTPUT ${PROJECT_SOURCE_DIR}/sql/lex_hash.h
	COMMAND ${GEN_LEX_HASH_EXE} ARGS > lex_hash.h
	DEPENDS ${GEN_LEX_HASH_EXE}
)

ADD_DEPENDENCIES(mysqld gen_lex_hash)

--- New file ---
+++ sql/examples/CmakeLists.txt	06/08/06 17:17:37
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/sql
                    ${CMAKE_SOURCE_DIR}/extra/yassl/include
                    ${CMAKE_SOURCE_DIR}/regex)

IF(WITH_CSV_STORAGE_ENGINE)
ADD_LIBRARY(csv ha_tina.cc ha_tina.h)
ADD_DEPENDENCIES(csv GenError)
ENDIF(WITH_CSV_STORAGE_ENGINE)

IF(WITH_EXAMPLE_STORAGE_ENGINE)
ADD_LIBRARY(example ha_example.cc)
ADD_DEPENDENCIES(example GenError)
ENDIF(WITH_EXAMPLE_STORAGE_ENGINE)

--- New file ---
+++ strings/CMakeLists.txt	06/08/06 17:17:37
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG -DSAFEMALLOC -DSAFE_MUTEX")

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
ADD_LIBRARY(strings bchange.c bcmp.c bfill.c bmove512.c bmove_upp.c ctype-big5.c
ctype-bin.c ctype-cp932.c
                ctype-czech.c ctype-euc_kr.c ctype-eucjpms.c ctype-extra.c ctype-gb2312.c
ctype-gbk.c
                ctype-latin1.c ctype-mb.c ctype-simple.c ctype-sjis.c ctype-tis620.c
ctype-uca.c
                ctype-ucs2.c ctype-ujis.c ctype-utf8.c ctype-win1250ch.c ctype.c decimal.c
int2str.c
                is_prefix.c llstr.c longlong2str.c my_strtoll10.c my_vsnprintf.c
r_strinstr.c
                str2int.c str_alloc.c strcend.c strend.c strfill.c strmake.c strmov.c
strnmov.c 
                strtod.c strtol.c strtoll.c strtoul.c strtoull.c strxmov.c strxnmov.c
xml.c
		strcont.c strinstr.c)

--- New file ---
+++ tests/CMakeLists.txt	06/08/06 17:17:37
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")

ADD_DEFINITIONS("-DMYSQL_CLIENT")

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)

ADD_EXECUTABLE(mysql_client_test mysql_client_test.c)
TARGET_LINK_LIBRARIES(mysql_client_test dbug mysys mysqlclient yassl taocrypt zlib
wsock32)

--- New file ---
+++ vio/CMakeLists.txt	06/08/06 17:17:37
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG -DSAFEMALLOC -DSAFE_MUTEX")

ADD_DEFINITIONS(-DUSE_SYMDIR)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/extra/yassl/include)
ADD_LIBRARY(vio vio.c viosocket.c viossl.c viosslfactories.c)

--- New file ---
+++ win/Makefile.am	06/08/06 17:17:38
# Copyright (C) 2006 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

## Process this file with automake to create Makefile.in
EXTRA_DIST = build-vs71.bat build-vs8.bat build-vs8_x64.bat configure.js README

# Don't update the files from bitkeeper
%::SCCS/s.%

--- New file ---
+++ win/build-vs71.bat	06/08/06 17:17:38
@echo off

if exist cmakecache.txt del cmakecache.txt
copy win\vs71cache.txt cmakecache.txt
cmake -G "Visual Studio 7 .NET 2003"
copy cmakecache.txt win\vs71cache.txt


--- New file ---
+++ win/build-vs8.bat	06/08/06 17:17:38
@echo off

if exist cmakecache.txt del cmakecache.txt
copy win\vs8cache.txt cmakecache.txt
cmake -G "Visual Studio 8 2005"
copy cmakecache.txt win\vs8cache.txt

--- New file ---
+++ win/build-vs8_x64.bat	06/08/06 17:17:38
@echo off

if exist cmakecache.txt del cmakecache.txt
copy win\vs8cache.txt cmakecache.txt
cmake -G "Visual Studio 8 2005 Win64"
copy cmakecache.txt win\vs8cache.txt

--- New file ---
+++ win/configure.data	06/08/06 17:17:38
SET (WITH_INNOBASE_STORAGE_ENGINE TRUE)
SET (COMPILATION_COMMENT "Source distribution")
SET (PROTOCOL_VERSION "10")
SET (DOT_FRM_VERSION "6")
SET (MYSQL_TCP_PORT "3306")
SET (MYSQL_UNIX_ADDR "/tmp/mysql.sock")
SET (VERSION "5.0.25")
SET (MYSQL_BASE_VERSION "5.0")
SET (MYSQL_VERSION_ID "50025")

--- New file ---
+++ win/configure.js	06/08/06 17:17:38
// Configure.js

ForReading = 1;
ForWriting = 2;
ForAppending = 8;

try 
{
    var fso = new ActiveXObject("Scripting.FileSystemObject");

    var args = WScript.Arguments
    
    // read in the Unix configure.in file
    var configureInTS = fso.OpenTextFile("configure.in", ForReading);
    var configureIn = configureInTS.ReadAll();
    configureInTS.Close();
    var default_comment = "Source distribution";
    var default_port = GetValue(configureIn, "MYSQL_TCP_PORT_DEFAULT");

    var configfile = fso.CreateTextFile("win\\configure.data", true);
    for (i=0; i < args.Count(); i++)
    {
        var parts = args.Item(i).split('=');
        switch (parts[0])
        {
            case "WITH_ARCHIVE_STORAGE_ENGINE":
            case "WITH_BERKELEY_STORAGE_ENGINE":
            case "WITH_BLACKHOLE_STORAGE_ENGINE":
            case "WITH_CSV_STORAGE_ENGINE":
            case "WITH_EXAMPLE_STORAGE_ENGINE":
            case "WITH_FEDERATED_STORAGE_ENGINE":
            case "WITH_INNOBASE_STORAGE_ENGINE":
            case "WITH_PARTITION_STORAGE_ENGINE":
            case "__NT__":
            case "CYBOZU":
                    configfile.WriteLine("SET (" + args.Item(i) + " TRUE)");
                    break;
            case "MYSQL_SERVER_SUFFIX":
                    configfile.WriteLine("SET (" + parts[0] + " \""
                                         + parts[1] + "\")");
                    break;
            case "COMPILATION_COMMENT":
                    default_comment = parts[1];
                    break;
            case "MYSQL_TCP_PORT":
                    default_port = parts[1];
                    break;
        }
    }

    configfile.WriteLine("SET (COMPILATION_COMMENT \"" +
                         default_comment + "\")");

    configfile.WriteLine("SET (PROTOCOL_VERSION \"" +
                         GetValue(configureIn, "PROTOCOL_VERSION") + "\")");
    configfile.WriteLine("SET (DOT_FRM_VERSION \"" +
                         GetValue(configureIn, "DOT_FRM_VERSION") + "\")");
    configfile.WriteLine("SET (MYSQL_TCP_PORT \"" + default_port + "\")");
    configfile.WriteLine("SET (MYSQL_UNIX_ADDR \"" +
                         GetValue(configureIn, "MYSQL_UNIX_ADDR_DEFAULT") + "\")");
    var version = GetVersion(configureIn);
    configfile.WriteLine("SET (VERSION \"" + version + "\")");
    configfile.WriteLine("SET (MYSQL_BASE_VERSION \"" +
                         GetBaseVersion(version) + "\")");
    configfile.WriteLine("SET (MYSQL_VERSION_ID \"" +
                         GetVersionId(version) + "\")");

    configfile.Close();
    
    //ConfigureBDB();

    fso = null;

    WScript.Echo("done!");
}
catch (e)
{
    WScript.Echo("Error: " + e.description);
}

function GetValue(str, key)
{
    var pos = str.indexOf(key+'=');
    if (pos == -1) return null;
    pos += key.length + 1;
    var end = str.indexOf("\n", pos);
    if (str.charAt(pos) == "\"")
        pos++;
    if (str.charAt(end-1) == "\"")
        end--;
    return str.substring(pos, end);    
}

function GetVersion(str)
{
    var key = "AM_INIT_AUTOMAKE(mysql, ";
    var pos = str.indexOf(key); //5.0.6-beta)
    if (pos == -1) return null;
    pos += key.length;
    var end = str.indexOf(")", pos);
    if (end == -1) return null;
    return str.substring(pos, end);
}

function GetBaseVersion(version)
{
    var dot = version.indexOf(".");
    if (dot == -1) return null;
    dot = version.indexOf(".", dot+1);
    if (dot == -1) dot = version.length;
    return version.substring(0, dot);
}

function GetVersionId(version)
{
    var dot = version.indexOf(".");
    if (dot == -1) return null;
    var major = parseInt(version.substring(0, dot), 10);
    
    dot++;
    var nextdot = version.indexOf(".", dot);
    if (nextdot == -1) return null;
    var minor = parseInt(version.substring(dot, nextdot), 10);
    dot = nextdot+1;
    
    var stop = version.indexOf("-", dot);
    if (stop == -1) stop = version.length;
    var build = parseInt(version.substring(dot, stop), 10);
    
    var id = major;
    if (minor < 10)
        id += '0';
    id += minor;
    if (build < 10)
        id += '0';
    id += build;
    return id;
}

function ConfigureBDB() 
{
    // read in the Unix configure.in file
    var dbIncTS = fso.OpenTextFile("..\\bdb\\dbinc\\db.in", ForReading);
    var dbIn = dbIncTS.ReadAll();
    dbIncTS.Close();

    dbIn = dbIn.replace("@DB_VERSION_MAJOR@", "$DB_VERSION_MAJOR");
    dbIn = dbIn.replace("@DB_VERSION_MINOR@", "$DB_VERSION_MINOR");
    dbIn = dbIn.replace("@DB_VERSION_PATCH@", "$DB_VERSION_PATCH");
    dbIn = dbIn.replace("@DB_VERSION_STRING@", "$DB_VERSION_STRING");

    dbIn = dbIn.replace("@u_int8_decl@", "typedef unsigned char u_int8_t;");
    dbIn = dbIn.replace("@int16_decl@", "typedef short int16_t;");
    dbIn = dbIn.replace("@u_int16_decl@", "typedef unsigned short u_int16_t;");
    dbIn = dbIn.replace("@int32_decl@", "typedef int int32_t;");
    dbIn = dbIn.replace("@u_int32_decl@", "typedef unsigned int u_int32_t;");

    dbIn = dbIn.replace("@u_char_decl@", "{\r\n#if !defined(_WINSOCKAPI_)\r\n" +
        "typedef unsigned char u_char;");
    dbIn = dbIn.replace("@u_short_decl@", "typedef unsigned short u_short;");
    dbIn = dbIn.replace("@u_int_decl@", "typedef unsigned int u_int;");
    dbIn = dbIn.replace("@u_long_decl@", "typedef unsigned long u_long;");
    
    dbIn = dbIn.replace("@ssize_t_decl@", "#endif\r\n#if defined(_WIN64)\r\n" +
        "typedef __int64 ssize_t;\r\n#else\r\n" +
        "typedef int ssize_t;\r\n#endif");
}

--- New file ---
+++ zlib/CMakeLists.txt	06/08/06 17:17:38
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")

ADD_DEFINITIONS(-DUSE_TLS -DMYSQL_CLIENT -D__WIN32__)
ADD_LIBRARY(zlib adler32.c compress.c crc32.c crc32.h deflate.c deflate.h gzio.c infback.c
inffast.c inffast.h
			inffixed.h inflate.c inflate.h inftrees.c inftrees.h trees.c trees.h uncompr.c zconf.h
zlib.h
			zutil.c zutil.h)
			

--- 1.106/mysql-test/mysql-test-run.pl	2006-08-06 17:17:54 +02:00
+++ 1.107/mysql-test/mysql-test-run.pl	2006-08-06 17:17:54 +02:00
@@ -1037,17 +1037,26 @@
     {
       $path_client_bindir= mtr_path_exists("$glob_basedir/client_release",
 					   "$glob_basedir/client_debug",
-                                           "$glob_basedir/bin",);
+                                           "$glob_basedir/bin",
+                                           "$glob_basedir/client/release",
+										   "$glob_basedir/client/debug");
       $exe_mysqld=         mtr_exe_exists ("$path_client_bindir/mysqld-max-nt",
                                            "$path_client_bindir/mysqld-max",
                                            "$path_client_bindir/mysqld-nt",
                                            "$path_client_bindir/mysqld",
                                            "$path_client_bindir/mysqld-debug",
-                                           "$path_client_bindir/mysqld-max");
-      $path_language=      mtr_path_exists("$glob_basedir/share/english/");
-      $path_charsetsdir=   mtr_path_exists("$glob_basedir/share/charsets");
+                                           "$path_client_bindir/mysqld-max",
+										   "$glob_basedir/sql/release/mysqld",
+										   "$glob_basedir/sql/debug/mysqld");
+      $path_language=      mtr_path_exists("$glob_basedir/share/english/",
+                                           "$glob_basedir/sql/share/english/");
+      $path_charsetsdir=   mtr_path_exists("$glob_basedir/share/charsets",
+                                           "$glob_basedir/sql/share/charsets/");      
       $exe_my_print_defaults=
-	mtr_exe_exists("$path_client_bindir/my_print_defaults");
+	mtr_exe_exists("$path_client_bindir/my_print_defaults",
+                   "$glob_basedir/extra/release/my_print_defaults",
+                   "$glob_basedir/extra/debug/my_print_defaults"); 
+	
     }
     else
     {
@@ -1075,6 +1084,8 @@
       $exe_mysqltest= mtr_exe_exists("$path_client_bindir/mysqltest");
       $exe_mysql_client_test=
         mtr_exe_exists("$glob_basedir/tests/mysql_client_test",
+                       "$glob_basedir/tests/debug/mysql_client_test",
+                       "$glob_basedir/tests/release/mysql_client_test",
                        "$path_client_bindir/mysql_client_test",
 		       "/usr/bin/false");
     }
@@ -2898,16 +2909,12 @@
 
   while (1)
   {
-    # Check that IM-main died.
-
     if (kill (0, $instance_manager->{'pid'}))
     {
       mtr_debug("IM-main is still alive.");
       last;
     }
 
-    # Check that IM-angel died.
-
     if (defined $instance_manager->{'angel_pid'} &&
         kill (0, $instance_manager->{'angel_pid'}))
     {
@@ -2915,39 +2922,21 @@
       last;
     }
 
-    # Check that all guarded mysqld-instances died.
-
-    my $guarded_mysqlds_dead= 1;
-
     foreach my $pid (@mysqld_pids)
     {
       if (kill (0, $pid))
       {
         mtr_debug("Guarded mysqld ($pid) is still alive.");
-        $guarded_mysqlds_dead= 0;
         last;
       }
     }
 
-    last unless $guarded_mysqlds_dead;
-
-    # Ok, all necessary processes are dead.
-
     $clean_shutdown= 1;
     last;
   }
 
   # Kill leftovers (the order is important).
 
-  if ($clean_shutdown)
-  {
-    mtr_debug("IM-shutdown was clean -- all processed died.");
-  }
-  else
-  {
-    mtr_debug("IM failed to shutdown gracefully. We have to clean the mess...");
-  }
-
   unless ($clean_shutdown)
   {
 
@@ -2968,24 +2957,17 @@
     mtr_kill_processes(\@mysqld_pids);
 
     # Complain in error log so that a warning will be shown.
-    # 
-    # TODO: unless BUG#20761 is fixed, we will print the warning
-    # to stdout, so that it can be seen on console and does not
-    # produce pushbuild error.
-
-    # my $errlog= "$opt_vardir/log/mysql-test-run.pl.err";
-    # 
-    # open (ERRLOG, ">>$errlog") ||
-    #   mtr_error("Can not open error log ($errlog)");
-    # 
-    # my $ts= localtime();
-    # print ERRLOG
-    #   "Warning: [$ts] Instance Manager did not shutdown gracefully.\n";
-    # 
-    # close ERRLOG;
+
+    my $errlog= "$opt_vardir/log/mysql-test-run.pl.err";
+
+    open (ERRLOG, ">>$errlog") ||
+      mtr_error("Can not open error log ($errlog)");
 
     my $ts= localtime();
-    print "Warning: [$ts] Instance Manager did not shutdown gracefully.\n";
+    print ERRLOG
+      "Warning: [$ts] Instance Manager did not shutdown gracefully.\n";
+
+    close ERRLOG;
   }
 
   # That's all.
Thread
bk commit into 5.0 tree (georg:1.2235)georg6 Aug