diff --git a/.bzrignore b/.bzrignore
index 746f141bd425c5a9ca5212858feccfd04f11a2e4..24ac6e22c45ed6cef0c24e975984446d7de1fdf6 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -357,6 +357,7 @@ innobase/conftest.s1
 innobase/conftest.subs
 innobase/ib_config.h
 innobase/ib_config.h.in
+innobase/mkinstalldirs
 innobase/stamp-h1
 insert_test
 install
@@ -537,6 +538,7 @@ mit-pthreads/machdep.c
 mit-pthreads/pg++
 mit-pthreads/pgcc
 mit-pthreads/syscall.S
+mkinstalldirs
 myisam/FT1.MYD
 myisam/FT1.MYI
 myisam/ft_dump
@@ -639,6 +641,7 @@ mysql-test/r/slave-stopped.eval
 mysql-test/share/mysql
 mysql-test/std_data/*.pem
 mysql-test/t/index_merge.load
+mysql-test/var
 mysql-test/var/*
 mysql.kdevprj
 mysql.proj
@@ -793,6 +796,7 @@ ndb/src/common/portlib/libportlib.dsp
 ndb/src/common/transporter/libtransporter.dsp
 ndb/src/common/util/libgeneral.dsp
 ndb/src/cw/cpcd/ndb_cpcd
+ndb/src/dummy.cpp
 ndb/src/kernel/blocks/backup/libbackup.dsp
 ndb/src/kernel/blocks/backup/restore/ndb_restore
 ndb/src/kernel/blocks/cmvmi/libcmvmi.dsp
@@ -879,6 +883,7 @@ ndb/test/tools/hugoScanUpdate
 ndb/test/tools/ndb_cpcc
 ndb/test/tools/restart
 ndb/test/tools/verify_index
+ndb/tools/ndb_config
 ndb/tools/ndb_delete_all
 ndb/tools/ndb_delete_all.dsp
 ndb/tools/ndb_desc
@@ -1116,7 +1121,5 @@ vio/test-ssl
 vio/test-sslclient
 vio/test-sslserver
 vio/viotest-ssl
-ndb/src/dummy.cpp
-innobase/mkinstalldirs
-mkinstalldirs
-mysql-test/var
+support-files/MacOSX/postflight
+support-files/MacOSX/preflight
diff --git a/BUILD/check-cpu b/BUILD/check-cpu
index b970a4b9a5b102459458a5fe1af9ccb79afbc5fa..dc894c91cbd70ae173111ce127975c19f4fdd21e 100755
--- a/BUILD/check-cpu
+++ b/BUILD/check-cpu
@@ -90,6 +90,9 @@ case "$cpu_family--$model_name" in
   *Athlon*)
     cpu_arg="athlon";
     ;;
+  *Opteron*)
+    cpu_arg="opteron";
+    ;;
 
   # Intel ia64
   *Itanium*)
@@ -147,6 +150,9 @@ case "$cc_ver--$cc_verno" in
         ppc-*)
 		  check_cpu_args='-mcpu=$cpu_arg -mtune=$cpu_arg'
           ;;
+        x86_64-*)
+		  check_cpu_args='-mtune=$cpu_arg'
+          ;;
         *)
           check_cpu_cflags=""
           return
diff --git a/VC++Files/bdb/bdb.vcproj b/VC++Files/bdb/bdb.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..6258da3cb3affca6bfe5b6ced6fbabb3128455e5
--- /dev/null
+++ b/VC++Files/bdb/bdb.vcproj
@@ -0,0 +1,3227 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="bdb"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Max|Win32"
+			OutputDirectory=".\max"
+			IntermediateDirectory=".\max"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="/D MYSQL_SERVER_SUFFIX=-max"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../bdb/build_win32,../bdb"
+				PreprocessorDefinitions="NDEBUG;DBUG_OFF;_WINDOWS"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\max/bdb.pch"
+				AssemblerListingLocation=".\max/"
+				ObjectFile="max/"
+				ProgramDataBaseFileName="max/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_release\bdb.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Debug"
+			IntermediateDirectory=".\Debug"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../bdb/build_win32,../bdb,../bdb/dbinc"
+				PreprocessorDefinitions="__WIN32__;_DEBUG;SAFEMALLOC;SAFE_MUTEX;_WINDOWS"
+				StringPooling="TRUE"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\Debug/bdb.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_debug\bdb.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="btree\bt_compare.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="btree\bt_conv.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="btree\bt_curadj.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="btree\bt_cursor.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="btree\bt_delete.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="btree\bt_method.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="btree\bt_open.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="btree\bt_put.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="btree\bt_rec.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="btree\bt_reclaim.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="btree\bt_recno.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="btree\bt_rsearch.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="btree\bt_search.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="btree\bt_split.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="btree\bt_stat.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="btree\bt_upgrade.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="btree\bt_verify.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="btree\btree_auto.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="db\crdel_auto.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="db\crdel_rec.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="db\db.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="db\db_am.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="db\db_auto.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="common\db_byteorder.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="db\db_cam.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="db\db_conv.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="db\db_dispatch.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="db\db_dup.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="common\db_err.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="common\db_getlong.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="common\db_idspace.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="db\db_iface.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="db\db_join.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="common\db_log2.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="db\db_meta.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="db\db_method.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="db\db_open.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="db\db_overflow.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="db\db_pr.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="db\db_rec.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="db\db_reclaim.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="db\db_remove.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="db\db_rename.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="db\db_ret.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="env\db_salloc.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="env\db_shash.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="db\db_truncate.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="db\db_upg.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="db\db_upg_opd.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="db\db_vrfy.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="db\db_vrfyutil.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="dbm\dbm.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="dbreg\dbreg.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="dbreg\dbreg_auto.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="dbreg\dbreg_rec.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="dbreg\dbreg_util.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="env\env_file.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="env\env_method.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="env\env_open.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="env\env_recover.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="env\env_region.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="fileops\fileops_auto.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="fileops\fop_basic.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="fileops\fop_rec.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="fileops\fop_util.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="hash\hash.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="hash\hash_auto.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="hash\hash_conv.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="hash\hash_dup.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="hash\hash_func.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="hash\hash_meta.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="hash\hash_method.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="hash\hash_open.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="hash\hash_page.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="hash\hash_rec.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="hash\hash_reclaim.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="hash\hash_stat.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="hash\hash_upgrade.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="hash\hash_verify.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="hmac\hmac.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="hsearch\hsearch.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="lock\lock.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="lock\lock_deadlock.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="lock\lock_method.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="lock\lock_region.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="lock\lock_stat.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="lock\lock_util.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="log\log.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="log\log_archive.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="log\log_compare.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="log\log_get.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="log\log_method.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="log\log_put.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mp\mp_alloc.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mp\mp_bh.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mp\mp_fget.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mp\mp_fopen.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mp\mp_fput.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mp\mp_fset.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mp\mp_method.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mp\mp_region.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mp\mp_register.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mp\mp_stat.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mp\mp_sync.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mp\mp_trickle.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mutex\mut_tas.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mutex\mut_win32.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mutex\mutex.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="os_win32\os_abs.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="os\os_alloc.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="os_win32\os_clock.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="os_win32\os_config.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="os_win32\os_dir.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="os_win32\os_errno.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="os_win32\os_fid.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="os_win32\os_fsync.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="os_win32\os_handle.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="os\os_id.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="os_win32\os_map.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="os\os_method.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="os\os_oflags.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="os_win32\os_open.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="os\os_region.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="os_win32\os_rename.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="os\os_root.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="os\os_rpath.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="os_win32\os_rw.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="os_win32\os_seek.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="os_win32\os_sleep.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="os_win32\os_spin.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="os_win32\os_stat.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="os\os_tmpdir.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="os_win32\os_type.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="os\os_unlink.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="qam\qam.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="qam\qam_auto.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="qam\qam_conv.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="qam\qam_files.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="qam\qam_method.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="qam\qam_open.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="qam\qam_rec.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="qam\qam_stat.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="qam\qam_upgrade.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="qam\qam_verify.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="rep\rep_method.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="rep\rep_record.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="rep\rep_region.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="rep\rep_util.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="hmac\sha1.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="clib\strcasecmp.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="txn\txn.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="txn\txn_auto.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="txn\txn_method.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="txn\txn_rec.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="txn\txn_recover.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="txn\txn_region.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="txn\txn_stat.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="txn\txn_util.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="common\util_log.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="common\util_sig.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="xa\xa.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="xa\xa_db.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="xa\xa_map.c">
+				<FileConfiguration
+					Name="Max|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/client/mysql.vcproj b/VC++Files/client/mysql.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..72cc4ba6b8945cad6d538834340343ad90010ecc
--- /dev/null
+++ b/VC++Files/client/mysql.vcproj
@@ -0,0 +1,318 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="mysql"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="classic|Win32"
+			OutputDirectory=".\classic"
+			IntermediateDirectory=".\classic"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../,../extra/yassl/include"
+				PreprocessorDefinitions="_CONSOLE;_WINDOWS;LICENSE=Commercial;DBUG_OFF;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\classic/mysql.pch"
+				AssemblerListingLocation=".\classic/"
+				ObjectFile=".\classic/"
+				ProgramDataBaseFileName=".\classic/"
+				WarningLevel="3"
+				WarnAsError="TRUE"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib"
+				OutputFile="../client_classic/mysql.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\classic/mysql.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\classic/mysql.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../,../extra/yassl/include"
+				PreprocessorDefinitions="NDEBUG;DBUG_OFF;_CONSOLE;_WINDOWS"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/mysql.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib"
+				OutputFile="../client_release/mysql.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\release/mysql.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\release/mysql.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\debug"
+			IntermediateDirectory=".\debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../,../extra/yassl/include"
+				PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_CONSOLE;_WINDOWS"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\debug/mysql.pch"
+				AssemblerListingLocation=".\debug/"
+				ObjectFile=".\debug/"
+				ProgramDataBaseFileName=".\debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib"
+				OutputFile="../client_debug/mysql.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\debug/mysql.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\debug/mysql.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="completion_hash.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mysql.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					DebugInformationFormat="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					DebugInformationFormat="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="readline.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_string.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/client/mysqladmin.vcproj b/VC++Files/client/mysqladmin.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..188bf61dff7bd64b9c0ebb50678c658cfcd5ada7
--- /dev/null
+++ b/VC++Files/client/mysqladmin.vcproj
@@ -0,0 +1,232 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="mysqladmin"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="classic|Win32"
+			OutputDirectory=".\classic"
+			IntermediateDirectory=".\classic"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../"
+				PreprocessorDefinitions="_CONSOLE;_WINDOWS;LICENSE=Commercial;DBUG_OFF;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\classic/mysqladmin.pch"
+				AssemblerListingLocation=".\classic/"
+				ObjectFile=".\classic/"
+				ProgramDataBaseFileName=".\classic/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib"
+				OutputFile="../client_classic/mysqladmin.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				ProgramDatabaseFile=".\classic/mysqladmin.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\classic/mysqladmin.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../"
+				PreprocessorDefinitions="DBUG_OFF;_CONSOLE;_WINDOWS;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/mysqladmin.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib"
+				OutputFile="../client_release/mysqladmin.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				ProgramDatabaseFile=".\release/mysqladmin.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\release/mysqladmin.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\debug"
+			IntermediateDirectory=".\debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../"
+				PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_CONSOLE;_WINDOWS"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\debug/mysqladmin.pch"
+				AssemblerListingLocation=".\debug/"
+				ObjectFile=".\debug/"
+				ProgramDataBaseFileName=".\debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib"
+				OutputFile="../client_debug/mysqladmin.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\debug/mysqladmin.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\debug/mysqladmin.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="mysqladmin.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/client/mysqlclient.dsp b/VC++Files/client/mysqlclient.dsp
index 5499379be8d365b2f5daf481e3ffb64085c12aa0..c14fc31ab8d460f30c55f5e2dbeab6f34cb3ae5f 100644
--- a/VC++Files/client/mysqlclient.dsp
+++ b/VC++Files/client/mysqlclient.dsp
@@ -567,6 +567,10 @@ SOURCE=..\strings\strxnmov.c
 # End Source File
 # Begin Source File
 
+SOURCE=..\strings\str_alloc.c
+# End Source File
+# Begin Source File
+
 SOURCE=..\mysys\thr_mutex.c
 # End Source File
 # Begin Source File
diff --git a/VC++Files/client/mysqlclient.vcproj b/VC++Files/client/mysqlclient.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..eebba9ebe0e0319c7b8ccb51b71fdbe569d84172
--- /dev/null
+++ b/VC++Files/client/mysqlclient.vcproj
@@ -0,0 +1,3333 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="mysqlclient"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../,../extra/yassl/include"
+				PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;MYSQL_CLIENT;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/mysqlclient.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_release\mysqlclient.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="authent|Win32"
+			OutputDirectory=".\authent"
+			IntermediateDirectory=".\authent"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../,../extra/yassl/include"
+				PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;MYSQL_CLIENT;NDEBUG;CHECK_LICENSE;LICENSE=Commercial"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\authent/mysqlclient.pch"
+				AssemblerListingLocation=".\authent/"
+				ObjectFile=".\authent/"
+				ProgramDataBaseFileName=".\authent/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_authent\mysqlclient.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\debug"
+			IntermediateDirectory=".\debug"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../,../extra/yassl/include"
+				PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_WINDOWS;USE_TLS;MYSQL_CLIENT"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\debug/mysqlclient.pch"
+				AssemblerListingLocation=".\debug/"
+				ObjectFile=".\debug/"
+				ProgramDataBaseFileName=".\debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_debug\mysqlclient.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\mysys\array.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\bchange.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\bmove.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\bmove_upp.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\charset-def.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\charset.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\libmysql\client.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-big5.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-bin.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-cp932.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-czech.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-euc_kr.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-eucjpms.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-extra.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-gb2312.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-gbk.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-latin1.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-mb.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-simple.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-sjis.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-tis620.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-uca.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-ucs2.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-ujis.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-utf8.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-win1250ch.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\dbug\dbug.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\default.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\libmysql\errmsg.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\errors.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\libmysql\get_password.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\int2str.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\is_prefix.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\libmysql\libmysql.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\list.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\llstr.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\longlong2str.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\libmysql\manager.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\mf_cache.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\mf_dirname.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\mf_fn_ext.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\mf_format.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\mf_iocache.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\mf_iocache2.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\mf_loadpath.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\mf_pack.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\mf_path.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\mf_tempfile.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\mf_unixpath.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\mf_wcomp.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\mulalloc.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_access.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_alloc.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_chsize.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_compress.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories="../zlib"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories="../zlib"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories="../zlib"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_create.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_delete.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_div.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_error.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_file.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_fopen.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_fstream.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_gethostbyname.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_getopt.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_getwd.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_init.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_lib.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_malloc.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_messnc.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_net.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_once.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_open.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_pread.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_pthread.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_read.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_realloc.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_rename.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_seek.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_static.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\my_strtoll10.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_symlink.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_symlink2.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_thr_init.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\libmysql\my_time.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\my_vsnprintf.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_wincond.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_winthread.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_write.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mysys_priv.h">
+		</File>
+		<File
+			RelativePath="..\sql\net_serv.cpp">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\libmysql\pack.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\libmysql\password.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\safemalloc.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\sha1.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\str2int.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\str_alloc.c">
+		</File>
+		<File
+			RelativePath="..\strings\strcend.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strcont.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strend.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strfill.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\string.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strinstr.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strmake.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strmov.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strnlen.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strnmov.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strtod.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strtoll.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strtoull.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strxmov.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strxnmov.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\thr_mutex.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\typelib.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\vio\vio.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\vio\viosocket.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\vio\viossl.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\vio\viosslfactories.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\xml.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/client/mysqlclient_ia64.dsp b/VC++Files/client/mysqlclient_ia64.dsp
index b982b3b281c9926103475bfe818049f8e2c62ec0..1aa6836ca586bfee3d16ec30a9748b8b76a6c241 100644
--- a/VC++Files/client/mysqlclient_ia64.dsp
+++ b/VC++Files/client/mysqlclient_ia64.dsp
@@ -155,7 +155,7 @@ SOURCE="..\strings\ctype-czech.c"
 # End Source File
 # Begin Source File
 
-SOURCE="..\strings\ctype-cp963.c"
+SOURCE="..\strings\ctype-cp932.c"
 # End Source File
 # Begin Source File
 
@@ -548,6 +548,10 @@ SOURCE=..\strings\strxnmov.c
 # End Source File
 # Begin Source File
 
+SOURCE=..\strings\str_alloc.c
+# End Source File
+# Begin Source File
+
 SOURCE=..\mysys\thr_mutex.c
 # End Source File
 # Begin Source File
diff --git a/VC++Files/client/mysqldump.vcproj b/VC++Files/client/mysqldump.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..b6a33596083d5802e066a9a39534855ec9c475b4
--- /dev/null
+++ b/VC++Files/client/mysqldump.vcproj
@@ -0,0 +1,232 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="mysqldump"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\debug"
+			IntermediateDirectory=".\debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../"
+				PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_CONSOLE;_WINDOWS"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\debug/mysqldump.pch"
+				AssemblerListingLocation=".\debug/"
+				ObjectFile=".\debug/"
+				ProgramDataBaseFileName=".\debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib"
+				OutputFile="../client_debug/mysqldump.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\debug/mysqldump.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\debug/mysqldump.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../"
+				PreprocessorDefinitions="DBUG_OFF;_CONSOLE;_WINDOWS;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/mysqldump.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib"
+				OutputFile="../client_release/mysqldump.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				ProgramDatabaseFile=".\release/mysqldump.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\release/mysqldump.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="classic|Win32"
+			OutputDirectory=".\classic"
+			IntermediateDirectory=".\classic"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../"
+				PreprocessorDefinitions="_CONSOLE;_WINDOWS;LICENSE=Commercial;DBUG_OFF;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\classic/mysqldump.pch"
+				AssemblerListingLocation=".\classic/"
+				ObjectFile=".\classic/"
+				ProgramDataBaseFileName=".\classic/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib"
+				OutputFile="../client_classic/mysqldump.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				ProgramDatabaseFile=".\classic/mysqldump.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\classic/mysqldump.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="mysqldump.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/client/mysqlimport.vcproj b/VC++Files/client/mysqlimport.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..ef440c2fe5ad7dbe6060be9c27341baaf486db2e
--- /dev/null
+++ b/VC++Files/client/mysqlimport.vcproj
@@ -0,0 +1,232 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="mysqlimport"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\debug"
+			IntermediateDirectory=".\debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../"
+				PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_CONSOLE;_WINDOWS"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\debug/mysqlimport.pch"
+				AssemblerListingLocation=".\debug/"
+				ObjectFile=".\debug/"
+				ProgramDataBaseFileName=".\debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib setargv.obj"
+				OutputFile="../client_debug/mysqlimport.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\debug/mysqlimport.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\debug/mysqlimport.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../"
+				PreprocessorDefinitions="DBUG_OFF;_CONSOLE;_WINDOWS;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/mysqlimport.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib"
+				OutputFile="../client_release/mysqlimport.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				ProgramDatabaseFile=".\release/mysqlimport.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\release/mysqlimport.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="classic|Win32"
+			OutputDirectory=".\classic"
+			IntermediateDirectory=".\classic"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../"
+				PreprocessorDefinitions="_CONSOLE;_WINDOWS;LICENSE=Commercial;DBUG_OFF;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\classic/mysqlimport.pch"
+				AssemblerListingLocation=".\classic/"
+				ObjectFile=".\classic/"
+				ProgramDataBaseFileName=".\classic/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib"
+				OutputFile="../client_classic/mysqlimport.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				ProgramDatabaseFile=".\classic/mysqlimport.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\classic/mysqlimport.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="mysqlimport.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/client/mysqlshow.vcproj b/VC++Files/client/mysqlshow.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..a070768072802c71fb627f8cbef996e6d767503f
--- /dev/null
+++ b/VC++Files/client/mysqlshow.vcproj
@@ -0,0 +1,232 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="mysqlshow"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../"
+				PreprocessorDefinitions="DBUG_OFF;_CONSOLE;_WINDOWS;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/mysqlshow.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib"
+				OutputFile="../client_release/mysqlshow.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				ProgramDatabaseFile=".\release/mysqlshow.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\release/mysqlshow.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="classic|Win32"
+			OutputDirectory=".\classic"
+			IntermediateDirectory=".\classic"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../"
+				PreprocessorDefinitions="_CONSOLE;_WINDOWS;LICENSE=Commercial;DBUG_OFF;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\classic/mysqlshow.pch"
+				AssemblerListingLocation=".\classic/"
+				ObjectFile=".\classic/"
+				ProgramDataBaseFileName=".\classic/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib"
+				OutputFile="../client_classic/mysqlshow.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				ProgramDatabaseFile=".\classic/mysqlshow.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\classic/mysqlshow.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\debug"
+			IntermediateDirectory=".\debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../"
+				PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_CONSOLE;_WINDOWS"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\debug/mysqlshow.pch"
+				AssemblerListingLocation=".\debug/"
+				ObjectFile=".\debug/"
+				ProgramDataBaseFileName=".\debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib"
+				OutputFile="../client_debug/mysqlshow.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\debug/mysqlshow.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\debug/mysqlshow.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="mysqlshow.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/client/mysqltest.vcproj b/VC++Files/client/mysqltest.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..5c075740fbddcf1752f128a1bd1cafce6419b2cf
--- /dev/null
+++ b/VC++Files/client/mysqltest.vcproj
@@ -0,0 +1,264 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="mysqltest"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="4"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../extra,../include,../regex,../extra/yassl/include,../"
+				PreprocessorDefinitions="DBUG_OFF;_CONSOLE;_WINDOWS;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/mysqltest.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="odbc32.lib odbccp32.lib wsock32.lib"
+				OutputFile="..\client_release\mysqltest.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				ProgramDatabaseFile=".\release/mysqltest.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				SuppressStartupBanner="TRUE"
+				TargetEnvironment="1"
+				TypeLibraryName=".\release/mysqltest.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="classic|Win32"
+			OutputDirectory=".\classic"
+			IntermediateDirectory=".\classic"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="4"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../extra,../include,../regex,../extra/yassl/include,../"
+				PreprocessorDefinitions="_CONSOLE;_WINDOWS;LICENSE=Commercial;DBUG_OFF;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\classic/mysqltest.pch"
+				AssemblerListingLocation=".\classic/"
+				ObjectFile=".\classic/"
+				ProgramDataBaseFileName=".\classic/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="odbc32.lib odbccp32.lib wsock32.lib"
+				OutputFile="..\client_classic\mysqltest.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				ProgramDatabaseFile=".\classic/mysqltest.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				SuppressStartupBanner="TRUE"
+				TargetEnvironment="1"
+				TypeLibraryName=".\classic/mysqltest.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\debug"
+			IntermediateDirectory=".\debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../extra,../include,../regex,../extra/yassl/include,../"
+				PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_CONSOLE;_WINDOWS"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\debug/mysqltest.pch"
+				AssemblerListingLocation=".\debug/"
+				ObjectFile=".\debug/"
+				ProgramDataBaseFileName=".\debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="odbc32.lib odbccp32.lib wsock32.lib"
+				OutputFile="..\client_debug\mysqltest.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\debug/mysqltest.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				SuppressStartupBanner="TRUE"
+				TargetEnvironment="1"
+				TypeLibraryName=".\debug/mysqltest.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\libmysql\manager.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mysqltest.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/comp_err/comp_err.vcproj b/VC++Files/comp_err/comp_err.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..b12ef8b0af16c3f15806ba69576d2f66c77f7402
--- /dev/null
+++ b/VC++Files/comp_err/comp_err.vcproj
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="comp_err"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="..\include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_MBCSN;DBUG_OFF;_WINDOWS;__WIN__;_MT"
+				StringPooling="TRUE"
+				RuntimeLibrary="4"
+				EnableFunctionLevelLinking="TRUE"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderFile=".\release/comp_err.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="odbc32.lib odbccp32.lib wsock32.lib"
+				OutputFile="../client_release/comp-err.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames="LIBC.lib"
+				ProgramDatabaseFile=".\release/comp-err.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\release/comp_err.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\extra\comp_err.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/dbug/dbug.vcproj b/VC++Files/dbug/dbug.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..57257451aea63326bdf447fc7b6e3c85803a81b7
--- /dev/null
+++ b/VC++Files/dbug/dbug.vcproj
@@ -0,0 +1,249 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="dbug"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="TLS_DEBUG|Win32"
+			OutputDirectory=".\dbug___Win32_TLS_DEBUG"
+			IntermediateDirectory=".\dbug___Win32_TLS_DEBUG"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="__WIN32__;_DEBUG;SAFEMALLOC;SAFE_MUTEX;_WINDOWS;USE_TLS"
+				StringPooling="TRUE"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\dbug___Win32_TLS_DEBUG/dbug.pch"
+				AssemblerListingLocation=".\dbug___Win32_TLS_DEBUG/"
+				ObjectFile=".\dbug___Win32_TLS_DEBUG/"
+				ProgramDataBaseFileName=".\dbug___Win32_TLS_DEBUG/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_debug\dbug_tls.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="DBUG_OFF;_WINDOWS;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/dbug.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_release\dbug.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\debug"
+			IntermediateDirectory=".\debug"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="__WIN32__;_DEBUG;SAFEMALLOC;SAFE_MUTEX;_WINDOWS"
+				StringPooling="TRUE"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\debug/dbug.pch"
+				AssemblerListingLocation=".\debug/"
+				ObjectFile=".\debug/"
+				ProgramDataBaseFileName=".\debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_debug\dbug.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="dbug.c">
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="factorial.c">
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sanity.c">
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/heap/heap.vcproj b/VC++Files/heap/heap.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..b2afd752acf43fadc3bd745c93d5203ba79534be
--- /dev/null
+++ b/VC++Files/heap/heap.vcproj
@@ -0,0 +1,1061 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="heap"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="DBUG_OFF;_WINDOWS;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/heap.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_release\heap.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="TLS_DEBUG|Win32"
+			OutputDirectory=".\heap___Win32_TLS_DEBUG"
+			IntermediateDirectory=".\heap___Win32_TLS_DEBUG"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_WINDOWS;USE_TLS"
+				StringPooling="TRUE"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\heap___Win32_TLS_DEBUG/heap.pch"
+				AssemblerListingLocation=".\heap___Win32_TLS_DEBUG/"
+				ObjectFile=".\heap___Win32_TLS_DEBUG/"
+				ProgramDataBaseFileName=".\heap___Win32_TLS_DEBUG/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_debug\heap_tls.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="TLS|Win32"
+			OutputDirectory=".\heap___Win32_TLS"
+			IntermediateDirectory=".\heap___Win32_TLS"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="DBUG_OFF;_WINDOWS;NDEBUG;USE_TLS"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\heap___Win32_TLS/heap.pch"
+				AssemblerListingLocation=".\heap___Win32_TLS/"
+				ObjectFile=".\heap___Win32_TLS/"
+				ProgramDataBaseFileName=".\heap___Win32_TLS/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_release\heap_tls.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\debug"
+			IntermediateDirectory=".\debug"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_WINDOWS"
+				StringPooling="TRUE"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\debug/heap.pch"
+				AssemblerListingLocation=".\debug/"
+				ObjectFile=".\debug/"
+				ProgramDataBaseFileName=".\debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_debug\heap.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="_check.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="_rectest.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="heapdef.h">
+		</File>
+		<File
+			RelativePath="hp_block.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="hp_clear.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="hp_close.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="hp_create.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="hp_delete.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="hp_extra.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="hp_hash.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="hp_info.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="hp_open.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="hp_panic.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="hp_rename.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="hp_rfirst.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="hp_rkey.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="hp_rlast.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="hp_rnext.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="hp_rprev.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="hp_rrnd.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="hp_rsame.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="hp_scan.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="hp_static.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="hp_update.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="hp_write.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/innobase/innobase.vcproj b/VC++Files/innobase/innobase.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..9d97236644000d9104fba7e330d2eb0435151a13
--- /dev/null
+++ b/VC++Files/innobase/innobase.vcproj
@@ -0,0 +1,2958 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="innobase"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Max nt|Win32"
+			OutputDirectory=".\max_nt"
+			IntermediateDirectory=".\max_nt"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="/D MYSQL_SERVER_SUFFIX=-nt-max"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../innobase/include,../include"
+				PreprocessorDefinitions="_LIB;_WIN32;WIN32;NDEBUG;MYSQL_SERVER"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\max_nt/innobase.pch"
+				AssemblerListingLocation=".\max_nt/"
+				ObjectFile=".\max_nt/"
+				ProgramDataBaseFileName=".\max_nt/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_release\innodb.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\debug"
+			IntermediateDirectory=".\debug"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../innobase/include,../include"
+				PreprocessorDefinitions="NDEBUG;_LIB;_WIN32;WIN32;MYSQL_SERVER"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\debug/innobase.pch"
+				AssemblerListingLocation=".\debug/"
+				ObjectFile=".\debug/"
+				ProgramDataBaseFileName=".\debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_debug\innodb.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../innobase/include,../include"
+				PreprocessorDefinitions="_LIB;_WIN32;WIN32;MYSQL_SERVER;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/innobase.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_release\innodb.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="nt|Win32"
+			OutputDirectory=".\nt"
+			IntermediateDirectory=".\nt"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="/D MYSQL_SERVER_SUFFIX=-nt"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../innobase/include,../include"
+				PreprocessorDefinitions="_LIB;_WIN32;WIN32;NDEBUG;MYSQL_SERVER"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\nt/innobase.pch"
+				AssemblerListingLocation=".\nt/"
+				ObjectFile=".\nt/"
+				ProgramDataBaseFileName=".\nt/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_release\innodb.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="btr\btr0btr.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="btr\btr0cur.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="btr\btr0pcur.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="btr\btr0sea.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="buf\buf0buf.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="buf\buf0flu.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="buf\buf0lru.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="buf\buf0rea.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="data\data0data.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="data\data0type.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="dict\dict0boot.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="dict\dict0crea.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="dict\dict0dict.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="dict\dict0load.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="dict\dict0mem.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="dyn\dyn0dyn.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="eval\eval0eval.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="eval\eval0proc.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="fil\fil0fil.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="fsp\fsp0fsp.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="fut\fut0fut.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="fut\fut0lst.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ha\ha0ha.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ha\hash0hash.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ibuf\ibuf0ibuf.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="pars\lexyy.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="lock\lock0lock.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="log\log0log.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="log\log0recv.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mach\mach0data.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mem\mem0mem.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mem\mem0pool.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mtr\mtr0log.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mtr\mtr0mtr.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="os\os0file.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="os\os0proc.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="os\os0sync.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="os\os0thread.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="page\page0cur.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="page\page0page.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="pars\pars0grm.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="pars\pars0opt.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="pars\pars0pars.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="pars\pars0sym.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="que\que0que.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="read\read0read.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="rem\rem0cmp.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="rem\rem0rec.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="row\row0ins.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="row\row0mysql.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="row\row0purge.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="row\row0row.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="row\row0sel.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="row\row0uins.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="row\row0umod.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="row\row0undo.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="row\row0upd.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="row\row0vers.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="srv\srv0que.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="srv\srv0srv.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="srv\srv0start.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sync\sync0arr.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sync\sync0rw.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sync\sync0sync.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="thr\thr0loc.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="trx\trx0purge.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="trx\trx0rec.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="trx\trx0roll.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="trx\trx0rseg.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="trx\trx0sys.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="trx\trx0trx.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="trx\trx0undo.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="usr\usr0sess.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ut\ut0byte.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ut\ut0dbg.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ut\ut0mem.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ut\ut0rnd.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ut\ut0ut.c">
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/libmysql/libmysql.dsp b/VC++Files/libmysql/libmysql.dsp
index 883557e7b63a87d1935ad7d75b68f32e8968634c..e17bee12d1b26d39b92c6a4bd009d0fb39419b97 100644
--- a/VC++Files/libmysql/libmysql.dsp
+++ b/VC++Files/libmysql/libmysql.dsp
@@ -535,6 +535,10 @@ SOURCE=..\strings\strxnmov.c
 # End Source File
 # Begin Source File
 
+SOURCE=..\strings\str_alloc.c
+# End Source File
+# Begin Source File
+
 SOURCE=..\mysys\thr_mutex.c
 # End Source File
 # Begin Source File
diff --git a/VC++Files/libmysql/libmysql.vcproj b/VC++Files/libmysql/libmysql.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..9ba877e0520edf3dca4cea84dc199ede347b34d4
--- /dev/null
+++ b/VC++Files/libmysql/libmysql.vcproj
@@ -0,0 +1,2298 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="libmysql"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\debug"
+			IntermediateDirectory=".\debug"
+			ConfigurationType="2"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories=".,..\include,../zlib,../extra/yassl/include"
+				PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\debug/libmysql.pch"
+				AssemblerListingLocation=".\debug/"
+				ObjectFile=".\debug/"
+				ProgramDataBaseFileName=".\debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib"
+				OutputFile="..\lib_debug\libmysql.dll"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				ModuleDefinitionFile=".\Libmysql.def"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\debug/libmysql.pdb"
+				GenerateMapFile="TRUE"
+				MapFileName=".\debug/libmysql.map"
+				SubSystem="2"
+				ImportLibrary=".\debug/libmysql.lib"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="TRUE"
+				SuppressStartupBanner="TRUE"
+				TargetEnvironment="1"
+				TypeLibraryName=".\debug/libmysql.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Move DLL export lib"
+				CommandLine="xcopy ..\lib_debug\libmysql.dll %windir%\system32\ /y
+xcopy     debug\libmysql.lib ..\lib_debug\ /y
+"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="2"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories=".,..\include,../zlib,../extra/yassl/include"
+				PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/libmysql.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib"
+				OutputFile="..\lib_release\libmysql.dll"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				ModuleDefinitionFile=".\Libmysql.def"
+				ProgramDatabaseFile=".\release/libmysql.pdb"
+				SubSystem="2"
+				ImportLibrary=".\release/libmysql.lib"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="TRUE"
+				SuppressStartupBanner="TRUE"
+				TargetEnvironment="1"
+				TypeLibraryName=".\release/libmysql.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Move DLL export lib"
+				CommandLine="xcopy release\libmysql.lib ..\lib_release /y"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\mysys\array.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\bchange.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\bmove.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\bmove_upp.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\charset-def.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\charset.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="client.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-big5.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-bin.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-cp932.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-czech.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-euc_kr.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-eucjpms.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-extra.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-gb2312.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-gbk.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-latin1.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-mb.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-simple.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-sjis.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-tis620.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-uca.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-ucs2.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-ujis.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-utf8.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-win1250ch.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\dbug\dbug.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\default.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\default_modify.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="dll.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="errmsg.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\errors.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="get_password.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\int2str.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\is_prefix.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="libmysql.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="Libmysql.def">
+		</File>
+		<File
+			RelativePath="..\mysys\list.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\llstr.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\longlong2str.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\mf_dirname.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\mf_fn_ext.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\mf_format.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\mf_loadpath.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\mf_pack.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\mf_path.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\mf_unixpath.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\mf_wcomp.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\mulalloc.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_access.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_alloc.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_chsize.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_compress.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_create.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_delete.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_div.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_error.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_fopen.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_fstream.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_gethostbyname.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_getopt.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_getwd.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_init.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_lib.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_malloc.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_messnc.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_net.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_once.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_open.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_pthread.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_read.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_realloc.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_rename.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_seek.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_static.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\my_strtoll10.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_symlink.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_symlink2.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_thr_init.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_time.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\my_vsnprintf.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_wincond.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_winthread.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_write.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\client\mysys_priv.h">
+		</File>
+		<File
+			RelativePath="..\sql\net_serv.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="pack.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="password.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\safemalloc.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\sha1.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\client\sql_string.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\client\sql_string.h">
+		</File>
+		<File
+			RelativePath="..\strings\str2int.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strcend.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strcont.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strend.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strfill.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\string.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strinstr.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strmake.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strmov.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strnlen.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strnmov.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strtod.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strtoll.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strxmov.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strxnmov.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\thr_mutex.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\typelib.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\vio\vio.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\vio\viosocket.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\vio\viossl.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\vio\viosslfactories.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\xml.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="DBUG_OFF;_WINDOWS;USE_TLS;NDEBUG;MYSQL_CLIENT;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/libmysql/libmysql_ia64.dsp b/VC++Files/libmysql/libmysql_ia64.dsp
index 717125d54971d2bbf0cd1fafbde69deeb17c2e6a..dc8778cfe23c2361c930edaba8469606883071c7 100644
--- a/VC++Files/libmysql/libmysql_ia64.dsp
+++ b/VC++Files/libmysql/libmysql_ia64.dsp
@@ -522,6 +522,10 @@ SOURCE=..\strings\strxnmov.c
 # End Source File
 # Begin Source File
 
+SOURCE=..\strings\str_alloc.c
+# End Source File
+# Begin Source File
+
 SOURCE=..\mysys\thr_mutex.c
 # End Source File
 # Begin Source File
diff --git a/VC++Files/libmysqld/examples/test_libmysqld.vcproj b/VC++Files/libmysqld/examples/test_libmysqld.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..bf26fbd658868abfd096aa642f50e706ed525da4
--- /dev/null
+++ b/VC++Files/libmysqld/examples/test_libmysqld.vcproj
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="test_libmysqld"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Release"
+			IntermediateDirectory=".\Release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\include,../include,../../extra/yassl/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;DBUG_OFF"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderFile=".\Release/test_libmysqld.pch"
+				AssemblerListingLocation=".\Release/"
+				ObjectFile=".\Release/"
+				ProgramDataBaseFileName=".\Release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="odbc32.lib odbccp32.lib Wsock32.lib ..\..\extra\yassl\Release\yassl.lib"
+				OutputFile="..\test_libmysqld.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames="LIBCMTD"
+				ProgramDatabaseFile=".\Release/test_libmysqld.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\Release/test_libmysqld.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="..\..\client\completion_hash.cpp">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\client\mysql.cpp">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\client\readline.cpp">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\client\sql_string.cpp">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/libmysqld/libmysqld.dsp b/VC++Files/libmysqld/libmysqld.dsp
index 49ecedfa055c4c16a185166aff834b7f4258a913..0fb3a645a489438969a116102acacb433cb908f4 100644
--- a/VC++Files/libmysqld/libmysqld.dsp
+++ b/VC++Files/libmysqld/libmysqld.dsp
@@ -600,6 +600,10 @@ SOURCE=..\strings\strxnmov.c
 # End Source File
 # Begin Source File
 
+SOURCE=..\strings\str_alloc.c
+# End Source File
+# Begin Source File
+
 SOURCE=..\sql\table.cpp
 # End Source File
 # Begin Source File
diff --git a/VC++Files/libmysqld/libmysqld.vcproj b/VC++Files/libmysqld/libmysqld.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..6d75a2c34cd943240575a23cf1bf7663ba63873a
--- /dev/null
+++ b/VC++Files/libmysqld/libmysqld.vcproj
@@ -0,0 +1,4500 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="libmysqld"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\debug"
+			IntermediateDirectory=".\debug"
+			ConfigurationType="2"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../include,../libmysqld,../sql,../regex,../extra/yassl/include,../bdb/build_win32,../zlib"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="0"
+				PrecompiledHeaderFile=".\debug/libmysqld.pch"
+				AssemblerListingLocation=".\debug/"
+				ObjectFile=".\debug/"
+				ProgramDataBaseFileName=".\debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="odbc32.lib odbccp32.lib Wsock32.lib ..\lib_debug\dbug_tls.lib ..\lib_debug\mysys_tls.lib ..\lib_debug\strings.lib ..\lib_debug\regex.lib ..\lib_debug\heap_tls.lib ..\lib_debug\innodb.lib ..\extra\yassl\Debug\yassl.lib"
+				OutputFile="../lib_debug/libmysqld.dll"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames="LIBCMTD"
+				ModuleDefinitionFile=".\libmysqld.def"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\debug/libmysqld.pdb"
+				ImportLibrary="../lib_debug/libmysqld.lib"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="TRUE"
+				SuppressStartupBanner="TRUE"
+				TargetEnvironment="1"
+				TypeLibraryName=".\debug/libmysqld.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="pro|Win32"
+			OutputDirectory=".\pro"
+			IntermediateDirectory=".\pro"
+			ConfigurationType="2"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="/D MYSQL_SERVER_SUFFIX=-pro"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../regex,../extra/yassl/include,../libmysqld,../sql,../zlib"
+				PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\pro/libmysqld.pch"
+				AssemblerListingLocation=".\pro/"
+				ObjectFile=".\pro/"
+				ProgramDataBaseFileName=".\pro/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="odbc32.lib odbccp32.lib Wsock32.lib ..\lib_release\myisam_tls.lib ..\lib_release\myisammrg_tls.lib ..\lib_release\mysys_tls.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap_tls.lib ..\lib_release\innodb.lib ..\lib_release\zlib.lib ..\extra\yassl\Release\yassl.lib"
+				OutputFile="../lib_pro/libmysqld.dll"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				ModuleDefinitionFile=".\libmysqld.def"
+				ProgramDatabaseFile=".\pro/libmysqld.pdb"
+				ImportLibrary="../lib_release/libmysqld.lib"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="TRUE"
+				SuppressStartupBanner="TRUE"
+				TargetEnvironment="1"
+				TypeLibraryName=".\pro/libmysqld.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="2"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../libmysqld,../sql,../regex,../extra/yassl/include,../bdb/build_win32,../zlib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/libmysqld.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="odbc32.lib odbccp32.lib Wsock32.lib ..\lib_release\myisam_tls.lib ..\lib_release\myisammrg_tls.lib ..\lib_release\mysys_tls.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap_tls.lib ..\lib_release\innodb.lib ..\lib_release\bdb.lib ..\lib_release\zlib.lib ..\extra\yassl\Release\yassl.lib"
+				OutputFile="../lib_release/libmysqld.dll"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				ModuleDefinitionFile=".\libmysqld.def"
+				ProgramDatabaseFile=".\release/libmysqld.pdb"
+				ImportLibrary="../lib_release/libmysqld.lib"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="TRUE"
+				SuppressStartupBanner="TRUE"
+				TargetEnvironment="1"
+				TypeLibraryName=".\release/libmysqld.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="classic|Win32"
+			OutputDirectory=".\classic"
+			IntermediateDirectory=".\classic"
+			ConfigurationType="2"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../regex,../extra/yassl/include,../libmysqld,../sql,../zlib"
+				PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\classic/libmysqld.pch"
+				AssemblerListingLocation=".\classic/"
+				ObjectFile=".\classic/"
+				ProgramDataBaseFileName=".\classic/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="odbc32.lib odbccp32.lib Wsock32.lib ..\lib_release\myisam_tls.lib ..\lib_release\myisammrg_tls.lib ..\lib_release\mysys_tls.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap_tls.lib ..\lib_release\zlib.lib ..\extra\yassl\Release\yassl.lib"
+				OutputFile="../lib_classic/libmysqld.dll"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				ModuleDefinitionFile=".\libmysqld.def"
+				ProgramDatabaseFile=".\classic/libmysqld.pdb"
+				ImportLibrary="../lib_release/libmysqld.lib"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="TRUE"
+				SuppressStartupBanner="TRUE"
+				TargetEnvironment="1"
+				TypeLibraryName=".\classic/libmysqld.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\mysys\charset.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql-common\client.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\ctype-latin1.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\default.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\default_modify.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\derror.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\discover.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="emb_qcache.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\libmysql\errmsg.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\field.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\field_conv.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\filesort.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\client\get_password.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\gstream.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\ha_berkeley.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\ha_heap.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\ha_innodb.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\ha_myisam.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\ha_myisammrg.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\handler.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\hash_filo.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\hostname.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\init.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\int2str.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\item.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\item_buff.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\item_cmpfunc.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\item_create.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\item_func.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\item_geofunc.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\item_row.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\item_strfunc.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\item_subselect.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\item_sum.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\item_timefunc.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\item_uniq.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\key.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="lib_sql.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\libmysql\libmysql.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="libmysqld.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="libmysqld.def">
+		</File>
+		<File
+			RelativePath="..\sql\lock.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\log.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\log_event.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\mf_iocache.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_alloc.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\my_decimal.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\mysys\my_getopt.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql-common\my_time.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\net_serv.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\opt_range.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\opt_sum.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql-common\pack.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\parse_file.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\libmysql\password.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\procedure.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\protocol.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\protocol_cursor.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\records.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\repl_failsafe.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\set_var.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sp.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sp_cache.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sp_head.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sp_pcontext.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sp_rcontext.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\spatial.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_acl.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_analyse.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_base.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_cache.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_class.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_crypt.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_db.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_delete.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_derived.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_do.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_error.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_handler.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_help.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_insert.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_lex.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_list.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_load.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_manager.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_map.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_parse.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_prepare.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_rename.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_repl.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_select.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_show.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_state.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_string.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_table.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_test.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_trigger.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_udf.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_union.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_update.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_view.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_yacc.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\str2int.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strcend.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strcont.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\strfunc.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strinstr.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\strings\strxnmov.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\table.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\thr_malloc.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\time.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\tztime.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\uniques.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\unireg.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\vio\vio.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\vio\viosocket.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\vio\viossl.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\vio\viosslfactories.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__;$(NoInherit)"
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;MYSQL_SERVER;LICENSE=Commercial;_MBCS;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__;$(NoInherit)"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="WIN32;_WINDOWS;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;USE_TLS;__WIN__;LICENSE=Commerical;DBUG_OFF;_MBCS;NDEBUG;$(NoInherit)"/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/libmysqld/libmysqld_ia64.dsp b/VC++Files/libmysqld/libmysqld_ia64.dsp
index fe99ea480c7fdce5ce737438d0d4b8dd3cfa3d00..b5223e38f2d2d618d8102a59b2c9d03222987918 100644
--- a/VC++Files/libmysqld/libmysqld_ia64.dsp
+++ b/VC++Files/libmysqld/libmysqld_ia64.dsp
@@ -538,6 +538,10 @@ SOURCE=..\strings\strxnmov.c
 # End Source File
 # Begin Source File
 
+SOURCE=..\strings\str_alloc.c
+# End Source File
+# Begin Source File
+
 SOURCE=..\sql\table.cpp
 # End Source File
 # Begin Source File
diff --git a/VC++Files/libmysqltest/myTest.vcproj b/VC++Files/libmysqltest/myTest.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..06ce20bf021384d2f191d2ebee17e14363903b61
--- /dev/null
+++ b/VC++Files/libmysqltest/myTest.vcproj
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="myTest"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="..\include"
+				PreprocessorDefinitions="DBUG_UFF;_CONSOLE;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="4"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/myTest.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libmysql.lib odbc32.lib odbccp32.lib"
+				OutputFile=".\release/myTest.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories="..\lib_release"
+				ProgramDatabaseFile=".\release/myTest.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\release/myTest.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\debug"
+			IntermediateDirectory=".\debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="..\include"
+				PreprocessorDefinitions="_DEBUG;_CONSOLE"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\debug/myTest.pch"
+				AssemblerListingLocation=".\debug/"
+				ObjectFile=".\debug/"
+				ProgramDataBaseFileName=".\debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libmysql.lib odbc32.lib odbccp32.lib"
+				OutputFile=".\debug/myTest.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories="..\lib_debug"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\debug/myTest.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\debug/myTest.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="Mytest.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/my_print_defaults/my_print_defaults.vcproj b/VC++Files/my_print_defaults/my_print_defaults.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..e49039b6a1e3948a9bc57885fd8fe59f60292a42
--- /dev/null
+++ b/VC++Files/my_print_defaults/my_print_defaults.vcproj
@@ -0,0 +1,245 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="my_print_defaults"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="WIN32;_CONSOLE;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderFile=".\release/my_print_defaults.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="odbc32.lib odbccp32.lib wsock32.lib"
+				OutputFile="../client_release/my_print_defaults.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				ProgramDatabaseFile=".\release/my_print_defaults.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\release/my_print_defaults.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="classic|Win32"
+			OutputDirectory=".\classic"
+			IntermediateDirectory=".\classic"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="WIN32;_CONSOLE;LICENSE=Commercial;DBUG_OFF;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderFile=".\classic/my_print_defaults.pch"
+				AssemblerListingLocation=".\classic/"
+				ObjectFile=".\classic/"
+				ProgramDataBaseFileName=".\classic/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="odbc32.lib odbccp32.lib wsock32.lib"
+				OutputFile="../client_classic/my_print_defaults.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				ProgramDatabaseFile=".\classic/my_print_defaults.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\classic/my_print_defaults.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Debug"
+			IntermediateDirectory=".\Debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="0"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderFile=".\Debug/my_print_defaults.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="odbc32.lib odbccp32.lib wsock32.lib"
+				OutputFile="../client_debug/my_print_defaults.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames="LIBCMTD.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\Debug/my_print_defaults.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\Debug/my_print_defaults.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="..\extra\my_print_defaults.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="classic|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/myisam/myisam.vcproj b/VC++Files/myisam/myisam.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..b63b7ffaccc0f8eae42905b8cdc1a17e7726c533
--- /dev/null
+++ b/VC++Files/myisam/myisam.vcproj
@@ -0,0 +1,2094 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="myisam"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\debug"
+			IntermediateDirectory=".\debug"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_WINDOWS"
+				StringPooling="TRUE"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\debug/myisam.pch"
+				AssemblerListingLocation=".\debug/"
+				ObjectFile=".\debug/"
+				ProgramDataBaseFileName=".\debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_Debug\myisam.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="DBUG_OFF;_WINDOWS;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/myisam.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_release\myisam.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="TLS|Win32"
+			OutputDirectory=".\myisam___Win32_TLS"
+			IntermediateDirectory=".\myisam___Win32_TLS"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="DBUG_OFF;_WINDOWS;NDEBUG;USE_TLS"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\myisam___Win32_TLS/myisam.pch"
+				AssemblerListingLocation=".\myisam___Win32_TLS/"
+				ObjectFile=".\myisam___Win32_TLS/"
+				ProgramDataBaseFileName=".\myisam___Win32_TLS/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_release\myisam_tls.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="TLS_DEBUG|Win32"
+			OutputDirectory=".\myisam___Win32_TLS_DEBUG"
+			IntermediateDirectory=".\myisam___Win32_TLS_DEBUG"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_WINDOWS;USE_TLS"
+				StringPooling="TRUE"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\myisam___Win32_TLS_DEBUG/myisam.pch"
+				AssemblerListingLocation=".\myisam___Win32_TLS_DEBUG/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_Debug\myisam_tls.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="ft_boolean_search.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="ft_nlq_search.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="ft_parser.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="ft_static.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="ft_stem.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="ft_stopwords.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="ft_update.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_cache.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_changed.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_check.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_checksum.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_close.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_create.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_dbug.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_delete.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_delete_all.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_delete_table.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_dynrec.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_extra.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_info.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_key.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_keycache.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_locking.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_log.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_open.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_packrec.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_page.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_panic.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_preload.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_range.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_rename.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_rfirst.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_rkey.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_rlast.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_rnext.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_rnext_same.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_rprev.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_rrnd.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_rsame.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_rsamepos.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_scan.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_search.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_static.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_statrec.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_unique.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_update.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="mi_write.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="rt_index.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="rt_key.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="rt_mbr.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="rt_split.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="sort.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="sp_key.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="ft_eval.h">
+			</File>
+			<File
+				RelativePath="myisamdef.h">
+			</File>
+			<File
+				RelativePath="rt_index.h">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/myisam_ftdump/myisam_ftdump.vcproj b/VC++Files/myisam_ftdump/myisam_ftdump.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..4d1013775fae4daa3e77032a6f50560a020b143c
--- /dev/null
+++ b/VC++Files/myisam_ftdump/myisam_ftdump.vcproj
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="myisam_ftdump"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\debug"
+			IntermediateDirectory=".\debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../myisam"
+				PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_CONSOLE;_WINDOWS"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\debug/myisam_ftdump.pch"
+				AssemblerListingLocation=".\debug/"
+				ObjectFile=".\debug/"
+				ProgramDataBaseFileName=".\debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib setargv.obj ..\lib_debug\zlib.lib"
+				OutputFile="../client_debug/myisam_ftdump.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\debug/myisam_ftdump.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\debug/myisam_ftdump.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../myisam"
+				PreprocessorDefinitions="DBUG_OFF;_CONSOLE;_WINDOWS;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/myisam_ftdump.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				BrowseInformation="1"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib setargv.obj ..\lib_release\zlib.lib"
+				OutputFile="../client_release/myisam_ftdump.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				ProgramDatabaseFile=".\release/myisam_ftdump.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\release/myisam_ftdump.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="..\myisam\myisam_ftdump.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BrowseInformation="1"/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/myisamchk/myisamchk.vcproj b/VC++Files/myisamchk/myisamchk.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..ce2435bc34acf4629f2670b36bc5a5eb73bdcd9b
--- /dev/null
+++ b/VC++Files/myisamchk/myisamchk.vcproj
@@ -0,0 +1,244 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="myisamchk"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../myisam"
+				PreprocessorDefinitions="NDEBUG;DBUG_OFF;_CONSOLE;_WINDOWS"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/myisamchk.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib setargv.obj"
+				OutputFile="../client_release/myisamchk.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				ProgramDatabaseFile=".\release/myisamchk.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\release/myisamchk.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="classic|Win32"
+			OutputDirectory=".\classic"
+			IntermediateDirectory=".\classic"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../myisam"
+				PreprocessorDefinitions="_CONSOLE;_WINDOWS;LICENSE=Commercial;DBUG_OFF;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\classic/myisamchk.pch"
+				AssemblerListingLocation=".\classic/"
+				ObjectFile=".\classic/"
+				ProgramDataBaseFileName=".\classic/"
+				BrowseInformation="1"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib setargv.obj ..\lib_release\myisam.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\zlib.lib"
+				OutputFile="../client_classic/myisamchk.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories="..\lib_release\"
+				ProgramDatabaseFile=".\classic/myisamchk.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\classic/myisamchk.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\debug"
+			IntermediateDirectory=".\debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../myisam"
+				PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_CONSOLE;_WINDOWS"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\debug/myisamchk.pch"
+				AssemblerListingLocation=".\debug/"
+				ObjectFile=".\debug/"
+				ProgramDataBaseFileName=".\debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib setargv.obj"
+				OutputFile="../client_debug/myisamchk.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\debug/myisamchk.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\debug/myisamchk.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="..\myisam\myisamchk.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="classic|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/myisamlog/myisamlog.vcproj b/VC++Files/myisamlog/myisamlog.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..6189a54d33b4cd608edeacf8741556e08750d2db
--- /dev/null
+++ b/VC++Files/myisamlog/myisamlog.vcproj
@@ -0,0 +1,244 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="myisamlog"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Debug"
+			IntermediateDirectory=".\Debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../myisam"
+				PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_CONSOLE;_WINDOWS"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\Debug/myisamlog.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib setargv.obj"
+				OutputFile="../client_debug/myisamlog.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile="debug/myisamchk.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\Debug/myisamlog.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="classic|Win32"
+			OutputDirectory=".\classic"
+			IntermediateDirectory=".\classic"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../myisam"
+				PreprocessorDefinitions="_CONSOLE;_WINDOWS;LICENSE=Commercial;DBUG_OFF;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\classic/myisamlog.pch"
+				AssemblerListingLocation=".\classic/"
+				ObjectFile=".\classic/"
+				ProgramDataBaseFileName=".\classic/"
+				BrowseInformation="1"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib setargv.obj"
+				OutputFile="../client_classic/myisamlog.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				ProgramDatabaseFile="release/myisamchk.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\classic/myisamlog.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../myisam"
+				PreprocessorDefinitions="NDEBUG;DBUG_OFF;_CONSOLE;_WINDOWS"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/myisamlog.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib setargv.obj"
+				OutputFile="../client_release/myisamlog.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				ProgramDatabaseFile="release/myisamchk.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\release/myisamlog.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="..\myisam\myisamlog.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="classic|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/myisammrg/myisammrg.vcproj b/VC++Files/myisammrg/myisammrg.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..3075f8ef9f64e730b0503cbb45bcaac1babdc11d
--- /dev/null
+++ b/VC++Files/myisammrg/myisammrg.vcproj
@@ -0,0 +1,968 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="myisammrg"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="DBUG_OFF;_WINDOWS;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/myisammrg.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_release\myisammrg.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="TLS_DEBUG|Win32"
+			OutputDirectory=".\myisammrg___Win32_TLS_DEBUG"
+			IntermediateDirectory=".\myisammrg___Win32_TLS_DEBUG"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_WINDOWS;USE_TLS"
+				StringPooling="TRUE"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\myisammrg___Win32_TLS_DEBUG/myisammrg.pch"
+				AssemblerListingLocation=".\myisammrg___Win32_TLS_DEBUG/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_Debug\myisammrg_tls.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="TLS|Win32"
+			OutputDirectory=".\myisammrg___Win32_TLS"
+			IntermediateDirectory=".\myisammrg___Win32_TLS"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="DBUG_OFF;_WINDOWS;NDEBUG;USE_TLS"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\myisammrg___Win32_TLS/myisammrg.pch"
+				AssemblerListingLocation=".\myisammrg___Win32_TLS/"
+				ObjectFile=".\myisammrg___Win32_TLS/"
+				ProgramDataBaseFileName=".\myisammrg___Win32_TLS/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_release\myisammrg_tls.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\debug"
+			IntermediateDirectory=".\debug"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_WINDOWS"
+				StringPooling="TRUE"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\debug/myisammrg.pch"
+				AssemblerListingLocation=".\debug/"
+				ObjectFile=".\debug/"
+				ProgramDataBaseFileName=".\debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_Debug\myisammrg.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="myrg_close.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="myrg_create.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="myrg_delete.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="myrg_extra.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="myrg_info.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="myrg_locking.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="myrg_open.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="myrg_panic.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="myrg_queue.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="myrg_range.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="myrg_rfirst.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="myrg_rkey.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="myrg_rlast.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="myrg_rnext.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="myrg_rnext_same.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="myrg_rprev.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="myrg_rrnd.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="myrg_rsame.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="myrg_static.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="myrg_update.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="myrg_write.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS_DEBUG|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="TLS|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="mymrgdef.h">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/myisampack/myisampack.vcproj b/VC++Files/myisampack/myisampack.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..27a8653cc5a349aa83ca9a32798240fbfbd4ed42
--- /dev/null
+++ b/VC++Files/myisampack/myisampack.vcproj
@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="myisampack"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\debug"
+			IntermediateDirectory=".\debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../myisam"
+				PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_CONSOLE;_WINDOWS"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\debug/myisampack.pch"
+				AssemblerListingLocation=".\debug/"
+				ObjectFile=".\debug/"
+				ProgramDataBaseFileName=".\debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib setargv.obj"
+				OutputFile="../client_debug/myisampack.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\debug/myisampack.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\debug/myisampack.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../myisam"
+				PreprocessorDefinitions="NDEBUG;DBUG_OFF;_CONSOLE;_WINDOWS"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/myisampack.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib setargv.obj"
+				OutputFile="../client_release/myisampack.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				ProgramDatabaseFile=".\release/myisampack.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\release/myisampack.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="classic|Win32"
+			OutputDirectory=".\classic"
+			IntermediateDirectory=".\classic"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../myisam"
+				PreprocessorDefinitions="_CONSOLE;_WINDOWS;LICENSE=Commercial;DBUG_OFF;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\classic/myisampack.pch"
+				AssemblerListingLocation=".\classic/"
+				ObjectFile=".\classic/"
+				ProgramDataBaseFileName=".\classic/"
+				BrowseInformation="1"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib setargv.obj"
+				OutputFile="../client_classic/myisampack.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				ProgramDatabaseFile=".\classic/myisampack.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\classic/myisampack.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="..\myisam\myisampack.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="classic|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BrowseInformation="1"/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="myisampack.h">
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/mysql-test/mysql_test_run_new.vcproj b/VC++Files/mysql-test/mysql_test_run_new.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..12d502e576856c9f6689e8868a827495a5b69e56
--- /dev/null
+++ b/VC++Files/mysql-test/mysql_test_run_new.vcproj
@@ -0,0 +1,204 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="mysql_test_run_new"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Debug"
+			IntermediateDirectory=".\Debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../"
+				PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;__WIN__;_WIN32"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\Debug/mysql_test_run_new.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="odbc32.lib odbccp32.lib Ws2_32.lib zlib.lib"
+				OutputFile="..\mysql-test\mysql_test_run_new.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories="..\lib_debug\"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\Debug/mysql_test_run_new.pdb"
+				GenerateMapFile="TRUE"
+				MapFileName=".\Debug/mysql_test_run_new.map"
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				SuppressStartupBanner="TRUE"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Debug/mysql_test_run_new.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Release"
+			IntermediateDirectory=".\Release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="4"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../"
+				PreprocessorDefinitions="DBUG_OFF;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;__WIN__;_WIN32"
+				StringPooling="TRUE"
+				RuntimeLibrary="1"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\Release/mysql_test_run_new.pch"
+				AssemblerListingLocation=".\Release/"
+				ObjectFile=".\Release/"
+				ProgramDataBaseFileName=".\Release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="odbc32.lib odbccp32.lib Ws2_32.lib zlib.lib"
+				OutputFile="..\mysql-test\mysql_test_run_new.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories="..\lib_release\"
+				ProgramDatabaseFile=".\Release/mysql_test_run_new.pdb"
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				SuppressStartupBanner="TRUE"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Release/mysql_test_run_new.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="my_create_tables.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_manage.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_manage.h">
+		</File>
+		<File
+			RelativePath="mysql_test_run_new.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/mysql.sln b/VC++Files/mysql.sln
new file mode 100755
index 0000000000000000000000000000000000000000..fc75dc2472331364786097799d9589c6d9c2f824
--- /dev/null
+++ b/VC++Files/mysql.sln
@@ -0,0 +1,1212 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bdb", "bdb\bdb.vcproj", "{6EEF697A-3772-48D8-A5BA-EF11B9AC46E3}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "comp_err", "comp_err\comp_err.vcproj", "{1FD8A136-B86A-4B54-95B0-FA4E2EE2CCBC}"
+	ProjectSection(ProjectDependencies) = postProject
+		{EEC1300B-85A5-497C-B3E1-F708021DF859} = {EEC1300B-85A5-497C-B3E1-F708021DF859}
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF} = {44D9C7DC-6636-4B82-BD01-6876C64017DF}
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE} = {FC369DF4-AEB7-4531-BF34-A638C4363BFE}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dbug", "dbug\dbug.vcproj", "{FC369DF4-AEB7-4531-BF34-A638C4363BFE}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "heap", "heap\heap.vcproj", "{C70A6DC7-7D45-4C16-8654-7E57713A4C04}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "innobase", "innobase\innobase.vcproj", "{13D37150-54D0-46C5-9519-03923243C7C7}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmysql", "libmysql\libmysql.vcproj", "{1FC6EB72-1D0F-4E40-8851-1CC5DEB94F0F}"
+	ProjectSection(ProjectDependencies) = postProject
+		{EEC1300B-85A5-497C-B3E1-F708021DF859} = {EEC1300B-85A5-497C-B3E1-F708021DF859}
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB} = {BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF} = {8762A9B8-72A9-462E-A9A2-F3265081F8AF}
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF} = {44D9C7DC-6636-4B82-BD01-6876C64017DF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmysqld", "libmysqld\libmysqld.vcproj", "{93CA92A0-D7B8-4FAE-9EBB-D92EFBF631C9}"
+	ProjectSection(ProjectDependencies) = postProject
+		{EEC1300B-85A5-497C-B3E1-F708021DF859} = {EEC1300B-85A5-497C-B3E1-F708021DF859}
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113} = {207E9014-C4D1-4F6D-B76F-BC7DD7E31113}
+		{13D37150-54D0-46C5-9519-03923243C7C7} = {13D37150-54D0-46C5-9519-03923243C7C7}
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB} = {BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}
+		{6EEF697A-3772-48D8-A5BA-EF11B9AC46E3} = {6EEF697A-3772-48D8-A5BA-EF11B9AC46E3}
+		{D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0} = {D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0}
+		{262280A8-37D5-4037-BDFB-242468DFB3D2} = {262280A8-37D5-4037-BDFB-242468DFB3D2}
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF} = {8762A9B8-72A9-462E-A9A2-F3265081F8AF}
+		{C70A6DC7-7D45-4C16-8654-7E57713A4C04} = {C70A6DC7-7D45-4C16-8654-7E57713A4C04}
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF} = {44D9C7DC-6636-4B82-BD01-6876C64017DF}
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE} = {FC369DF4-AEB7-4531-BF34-A638C4363BFE}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "myTest", "libmysqltest\myTest.vcproj", "{2794E434-7CCE-44DB-B2FB-789ABE53D6B9}"
+	ProjectSection(ProjectDependencies) = postProject
+		{1FC6EB72-1D0F-4E40-8851-1CC5DEB94F0F} = {1FC6EB72-1D0F-4E40-8851-1CC5DEB94F0F}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "my_print_defaults", "my_print_defaults\my_print_defaults.vcproj", "{B0EC3594-CD67-4364-826E-BA75EF2050F8}"
+	ProjectSection(ProjectDependencies) = postProject
+		{EEC1300B-85A5-497C-B3E1-F708021DF859} = {EEC1300B-85A5-497C-B3E1-F708021DF859}
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF} = {44D9C7DC-6636-4B82-BD01-6876C64017DF}
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE} = {FC369DF4-AEB7-4531-BF34-A638C4363BFE}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "myisam", "myisam\myisam.vcproj", "{262280A8-37D5-4037-BDFB-242468DFB3D2}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "myisam_ftdump", "myisam_ftdump\myisam_ftdump.vcproj", "{4C5D0EB1-B953-4BE9-A48B-4F3A874E6635}"
+	ProjectSection(ProjectDependencies) = postProject
+		{EEC1300B-85A5-497C-B3E1-F708021DF859} = {EEC1300B-85A5-497C-B3E1-F708021DF859}
+		{262280A8-37D5-4037-BDFB-242468DFB3D2} = {262280A8-37D5-4037-BDFB-242468DFB3D2}
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF} = {44D9C7DC-6636-4B82-BD01-6876C64017DF}
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE} = {FC369DF4-AEB7-4531-BF34-A638C4363BFE}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "myisamchk", "myisamchk\myisamchk.vcproj", "{87CD9881-D234-4306-BBC6-0668C6168C0F}"
+	ProjectSection(ProjectDependencies) = postProject
+		{EEC1300B-85A5-497C-B3E1-F708021DF859} = {EEC1300B-85A5-497C-B3E1-F708021DF859}
+		{262280A8-37D5-4037-BDFB-242468DFB3D2} = {262280A8-37D5-4037-BDFB-242468DFB3D2}
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF} = {8762A9B8-72A9-462E-A9A2-F3265081F8AF}
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF} = {44D9C7DC-6636-4B82-BD01-6876C64017DF}
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE} = {FC369DF4-AEB7-4531-BF34-A638C4363BFE}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "myisamlog", "myisamlog\myisamlog.vcproj", "{194F5EE6-9440-4298-A6FE-A9B4B480B44C}"
+	ProjectSection(ProjectDependencies) = postProject
+		{EEC1300B-85A5-497C-B3E1-F708021DF859} = {EEC1300B-85A5-497C-B3E1-F708021DF859}
+		{262280A8-37D5-4037-BDFB-242468DFB3D2} = {262280A8-37D5-4037-BDFB-242468DFB3D2}
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF} = {8762A9B8-72A9-462E-A9A2-F3265081F8AF}
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF} = {44D9C7DC-6636-4B82-BD01-6876C64017DF}
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE} = {FC369DF4-AEB7-4531-BF34-A638C4363BFE}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "myisammrg", "myisammrg\myisammrg.vcproj", "{D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "myisampack", "myisampack\myisampack.vcproj", "{EF833A1E-E358-4B6C-9C27-9489E85041CC}"
+	ProjectSection(ProjectDependencies) = postProject
+		{EEC1300B-85A5-497C-B3E1-F708021DF859} = {EEC1300B-85A5-497C-B3E1-F708021DF859}
+		{262280A8-37D5-4037-BDFB-242468DFB3D2} = {262280A8-37D5-4037-BDFB-242468DFB3D2}
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF} = {8762A9B8-72A9-462E-A9A2-F3265081F8AF}
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF} = {44D9C7DC-6636-4B82-BD01-6876C64017DF}
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE} = {FC369DF4-AEB7-4531-BF34-A638C4363BFE}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mysql", "client\mysql.vcproj", "{F9868FD3-7AE2-486D-BAB3-A299E11F6AC1}"
+	ProjectSection(ProjectDependencies) = postProject
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB} = {BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}
+		{26383276-4843-494B-8BE0-8936ED3EBAAB} = {26383276-4843-494B-8BE0-8936ED3EBAAB}
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF} = {8762A9B8-72A9-462E-A9A2-F3265081F8AF}
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF} = {44D9C7DC-6636-4B82-BD01-6876C64017DF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mysqladmin", "client\mysqladmin.vcproj", "{D2B00DE0-F6E9-40AF-B90D-A257D014F098}"
+	ProjectSection(ProjectDependencies) = postProject
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB} = {BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}
+		{26383276-4843-494B-8BE0-8936ED3EBAAB} = {26383276-4843-494B-8BE0-8936ED3EBAAB}
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF} = {8762A9B8-72A9-462E-A9A2-F3265081F8AF}
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF} = {44D9C7DC-6636-4B82-BD01-6876C64017DF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mysqlbinlog", "mysqlbinlog\mysqlbinlog.vcproj", "{DC3A4D26-B533-465B-A3C7-9DBBC06DC8BB}"
+	ProjectSection(ProjectDependencies) = postProject
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB} = {BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}
+		{26383276-4843-494B-8BE0-8936ED3EBAAB} = {26383276-4843-494B-8BE0-8936ED3EBAAB}
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF} = {8762A9B8-72A9-462E-A9A2-F3265081F8AF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mysqlcheck", "mysqlcheck\mysqlcheck.vcproj", "{67154F28-D076-419E-B149-819EF548E670}"
+	ProjectSection(ProjectDependencies) = postProject
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB} = {BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}
+		{26383276-4843-494B-8BE0-8936ED3EBAAB} = {26383276-4843-494B-8BE0-8936ED3EBAAB}
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF} = {8762A9B8-72A9-462E-A9A2-F3265081F8AF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mysqlclient", "client\mysqlclient.vcproj", "{26383276-4843-494B-8BE0-8936ED3EBAAB}"
+	ProjectSection(ProjectDependencies) = postProject
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB} = {BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF} = {8762A9B8-72A9-462E-A9A2-F3265081F8AF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mysqld", "sql\mysqld.vcproj", "{62E85884-3ACF-4F4C-873B-60B878147890}"
+	ProjectSection(ProjectDependencies) = postProject
+		{EEC1300B-85A5-497C-B3E1-F708021DF859} = {EEC1300B-85A5-497C-B3E1-F708021DF859}
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113} = {207E9014-C4D1-4F6D-B76F-BC7DD7E31113}
+		{13D37150-54D0-46C5-9519-03923243C7C7} = {13D37150-54D0-46C5-9519-03923243C7C7}
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB} = {BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}
+		{6EEF697A-3772-48D8-A5BA-EF11B9AC46E3} = {6EEF697A-3772-48D8-A5BA-EF11B9AC46E3}
+		{DB28DE80-837F-4497-9AA9-CC0A20584C98} = {DB28DE80-837F-4497-9AA9-CC0A20584C98}
+		{D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0} = {D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0}
+		{262280A8-37D5-4037-BDFB-242468DFB3D2} = {262280A8-37D5-4037-BDFB-242468DFB3D2}
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF} = {8762A9B8-72A9-462E-A9A2-F3265081F8AF}
+		{F74653C4-8003-4A79-8F53-FC69E0AD7A9B} = {F74653C4-8003-4A79-8F53-FC69E0AD7A9B}
+		{C70A6DC7-7D45-4C16-8654-7E57713A4C04} = {C70A6DC7-7D45-4C16-8654-7E57713A4C04}
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF} = {44D9C7DC-6636-4B82-BD01-6876C64017DF}
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE} = {FC369DF4-AEB7-4531-BF34-A638C4363BFE}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mysqldemb", "mysqldemb\mysqldemb.vcproj", "{37D9BA79-302E-4582-A545-CB5FF7982EA3}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mysqldump", "client\mysqldump.vcproj", "{89F24ECE-9953-40EF-BDF4-B41F5631E92B}"
+	ProjectSection(ProjectDependencies) = postProject
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB} = {BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}
+		{26383276-4843-494B-8BE0-8936ED3EBAAB} = {26383276-4843-494B-8BE0-8936ED3EBAAB}
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF} = {8762A9B8-72A9-462E-A9A2-F3265081F8AF}
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF} = {44D9C7DC-6636-4B82-BD01-6876C64017DF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mysqlimport", "client\mysqlimport.vcproj", "{AD95DAD3-6DB9-4F8B-A345-7A39A83AAD3D}"
+	ProjectSection(ProjectDependencies) = postProject
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB} = {BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}
+		{26383276-4843-494B-8BE0-8936ED3EBAAB} = {26383276-4843-494B-8BE0-8936ED3EBAAB}
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF} = {8762A9B8-72A9-462E-A9A2-F3265081F8AF}
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF} = {44D9C7DC-6636-4B82-BD01-6876C64017DF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mysqlserver", "mysqlserver\mysqlserver.vcproj", "{94B86159-C581-42CD-825D-C69CBC237E5C}"
+	ProjectSection(ProjectDependencies) = postProject
+		{EEC1300B-85A5-497C-B3E1-F708021DF859} = {EEC1300B-85A5-497C-B3E1-F708021DF859}
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113} = {207E9014-C4D1-4F6D-B76F-BC7DD7E31113}
+		{13D37150-54D0-46C5-9519-03923243C7C7} = {13D37150-54D0-46C5-9519-03923243C7C7}
+		{37D9BA79-302E-4582-A545-CB5FF7982EA3} = {37D9BA79-302E-4582-A545-CB5FF7982EA3}
+		{D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0} = {D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0}
+		{262280A8-37D5-4037-BDFB-242468DFB3D2} = {262280A8-37D5-4037-BDFB-242468DFB3D2}
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF} = {8762A9B8-72A9-462E-A9A2-F3265081F8AF}
+		{C70A6DC7-7D45-4C16-8654-7E57713A4C04} = {C70A6DC7-7D45-4C16-8654-7E57713A4C04}
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF} = {44D9C7DC-6636-4B82-BD01-6876C64017DF}
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE} = {FC369DF4-AEB7-4531-BF34-A638C4363BFE}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mysqlshow", "client\mysqlshow.vcproj", "{3737BFE2-EF25-464F-994D-BD28A9F84528}"
+	ProjectSection(ProjectDependencies) = postProject
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB} = {BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}
+		{26383276-4843-494B-8BE0-8936ED3EBAAB} = {26383276-4843-494B-8BE0-8936ED3EBAAB}
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF} = {8762A9B8-72A9-462E-A9A2-F3265081F8AF}
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF} = {44D9C7DC-6636-4B82-BD01-6876C64017DF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "yassl", "extra\yassl\yassl.vcproj", "{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}"
+	ProjectSection(ProjectDependencies) = postProject
+		{DB28DE80-837F-4497-9AA9-CC0A20584C98} = {DB28DE80-837F-4497-9AA9-CC0A20584C98}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "taocrypt", "extra\yassl\taocrypt\taocrypt.vcproj", "{DB28DE80-837F-4497-9AA9-CC0A20584C98}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mysys", "mysys\mysys.vcproj", "{44D9C7DC-6636-4B82-BD01-6876C64017DF}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "perror", "perror\perror.vcproj", "{AC47623D-933C-4A80-83BB-B6AF7CB28B4B}"
+	ProjectSection(ProjectDependencies) = postProject
+		{EEC1300B-85A5-497C-B3E1-F708021DF859} = {EEC1300B-85A5-497C-B3E1-F708021DF859}
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF} = {44D9C7DC-6636-4B82-BD01-6876C64017DF}
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE} = {FC369DF4-AEB7-4531-BF34-A638C4363BFE}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "regex", "regex\regex.vcproj", "{207E9014-C4D1-4F6D-B76F-BC7DD7E31113}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "replace", "replace\replace.vcproj", "{16699B52-ECC6-4A96-A99F-A043059BA2E7}"
+	ProjectSection(ProjectDependencies) = postProject
+		{EEC1300B-85A5-497C-B3E1-F708021DF859} = {EEC1300B-85A5-497C-B3E1-F708021DF859}
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF} = {44D9C7DC-6636-4B82-BD01-6876C64017DF}
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE} = {FC369DF4-AEB7-4531-BF34-A638C4363BFE}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "strings", "strings\strings.vcproj", "{EEC1300B-85A5-497C-B3E1-F708021DF859}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test1", "test1\test1.vcproj", "{8CB5AB80-05DA-49DA-BC9F-EAC20667E0D0}"
+	ProjectSection(ProjectDependencies) = postProject
+		{1FC6EB72-1D0F-4E40-8851-1CC5DEB94F0F} = {1FC6EB72-1D0F-4E40-8851-1CC5DEB94F0F}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_libmysqld", "libmysqld\examples\test_libmysqld.vcproj", "{6F01B69C-B1A5-4C45-B3A9-744E1EB0BED5}"
+	ProjectSection(ProjectDependencies) = postProject
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB} = {BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}
+		{93CA92A0-D7B8-4FAE-9EBB-D92EFBF631C9} = {93CA92A0-D7B8-4FAE-9EBB-D92EFBF631C9}
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF} = {8762A9B8-72A9-462E-A9A2-F3265081F8AF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "thr_test", "thr_test\thr_test.vcproj", "{7FFA3009-E0E1-4E4E-9CDF-F408AA108CC8}"
+	ProjectSection(ProjectDependencies) = postProject
+		{EEC1300B-85A5-497C-B3E1-F708021DF859} = {EEC1300B-85A5-497C-B3E1-F708021DF859}
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF} = {44D9C7DC-6636-4B82-BD01-6876C64017DF}
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE} = {FC369DF4-AEB7-4531-BF34-A638C4363BFE}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vio", "vio\vio.vcproj", "{F74653C4-8003-4A79-8F53-FC69E0AD7A9B}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib\zlib.vcproj", "{8762A9B8-72A9-462E-A9A2-F3265081F8AF}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mysqltest", "client\mysqltest.vcproj", "{8961F149-C68A-4154-A499-A2AB39E607E8}"
+	ProjectSection(ProjectDependencies) = postProject
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113} = {207E9014-C4D1-4F6D-B76F-BC7DD7E31113}
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB} = {BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}
+		{26383276-4843-494B-8BE0-8936ED3EBAAB} = {26383276-4843-494B-8BE0-8936ED3EBAAB}
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF} = {8762A9B8-72A9-462E-A9A2-F3265081F8AF}
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF} = {44D9C7DC-6636-4B82-BD01-6876C64017DF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mysql_client_test", "tests\mysql_client_test.vcproj", "{DA224DAB-5006-42BE-BB77-16E8BE5326D5}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mysql_test_run_new", "mysql-test\mysql_test_run_new.vcproj", "{6189F838-21C6-42A1-B2D0-9146316573F7}"
+	ProjectSection(ProjectDependencies) = postProject
+		{8961F149-C68A-4154-A499-A2AB39E607E8} = {8961F149-C68A-4154-A499-A2AB39E607E8}
+		{DA224DAB-5006-42BE-BB77-16E8BE5326D5} = {DA224DAB-5006-42BE-BB77-16E8BE5326D5}
+		{D2B00DE0-F6E9-40AF-B90D-A257D014F098} = {D2B00DE0-F6E9-40AF-B90D-A257D014F098}
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		classic = classic
+		classic nt = classic nt
+		Debug = Debug
+		Embedded_Classic = Embedded_Classic
+		Embedded_Debug = Embedded_Debug
+		Embedded_Pro = Embedded_Pro
+		Embedded_Release = Embedded_Release
+		Max = Max
+		Max nt = Max nt
+		nt = nt
+		pro = pro
+		pro nt = pro nt
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{6EEF697A-3772-48D8-A5BA-EF11B9AC46E3}.classic.ActiveCfg = Debug|Win32
+		{6EEF697A-3772-48D8-A5BA-EF11B9AC46E3}.classic nt.ActiveCfg = Debug|Win32
+		{6EEF697A-3772-48D8-A5BA-EF11B9AC46E3}.Debug.ActiveCfg = Debug|Win32
+		{6EEF697A-3772-48D8-A5BA-EF11B9AC46E3}.Debug.Build.0 = Debug|Win32
+		{6EEF697A-3772-48D8-A5BA-EF11B9AC46E3}.Embedded_Classic.ActiveCfg = Debug|Win32
+		{6EEF697A-3772-48D8-A5BA-EF11B9AC46E3}.Embedded_Classic.Build.0 = Debug|Win32
+		{6EEF697A-3772-48D8-A5BA-EF11B9AC46E3}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{6EEF697A-3772-48D8-A5BA-EF11B9AC46E3}.Embedded_Debug.Build.0 = Debug|Win32
+		{6EEF697A-3772-48D8-A5BA-EF11B9AC46E3}.Embedded_Pro.ActiveCfg = Debug|Win32
+		{6EEF697A-3772-48D8-A5BA-EF11B9AC46E3}.Embedded_Release.ActiveCfg = Max|Win32
+		{6EEF697A-3772-48D8-A5BA-EF11B9AC46E3}.Max.ActiveCfg = Max|Win32
+		{6EEF697A-3772-48D8-A5BA-EF11B9AC46E3}.Max.Build.0 = Max|Win32
+		{6EEF697A-3772-48D8-A5BA-EF11B9AC46E3}.Max nt.ActiveCfg = Max|Win32
+		{6EEF697A-3772-48D8-A5BA-EF11B9AC46E3}.Max nt.Build.0 = Max|Win32
+		{6EEF697A-3772-48D8-A5BA-EF11B9AC46E3}.nt.ActiveCfg = Debug|Win32
+		{6EEF697A-3772-48D8-A5BA-EF11B9AC46E3}.pro.ActiveCfg = Debug|Win32
+		{6EEF697A-3772-48D8-A5BA-EF11B9AC46E3}.pro nt.ActiveCfg = Debug|Win32
+		{6EEF697A-3772-48D8-A5BA-EF11B9AC46E3}.Release.ActiveCfg = Debug|Win32
+		{1FD8A136-B86A-4B54-95B0-FA4E2EE2CCBC}.classic.ActiveCfg = Release|Win32
+		{1FD8A136-B86A-4B54-95B0-FA4E2EE2CCBC}.classic nt.ActiveCfg = Release|Win32
+		{1FD8A136-B86A-4B54-95B0-FA4E2EE2CCBC}.classic nt.Build.0 = Release|Win32
+		{1FD8A136-B86A-4B54-95B0-FA4E2EE2CCBC}.Debug.ActiveCfg = Release|Win32
+		{1FD8A136-B86A-4B54-95B0-FA4E2EE2CCBC}.Embedded_Classic.ActiveCfg = Release|Win32
+		{1FD8A136-B86A-4B54-95B0-FA4E2EE2CCBC}.Embedded_Debug.ActiveCfg = Release|Win32
+		{1FD8A136-B86A-4B54-95B0-FA4E2EE2CCBC}.Embedded_Pro.ActiveCfg = Release|Win32
+		{1FD8A136-B86A-4B54-95B0-FA4E2EE2CCBC}.Embedded_Release.ActiveCfg = Release|Win32
+		{1FD8A136-B86A-4B54-95B0-FA4E2EE2CCBC}.Max.ActiveCfg = Release|Win32
+		{1FD8A136-B86A-4B54-95B0-FA4E2EE2CCBC}.Max.Build.0 = Release|Win32
+		{1FD8A136-B86A-4B54-95B0-FA4E2EE2CCBC}.Max nt.ActiveCfg = Release|Win32
+		{1FD8A136-B86A-4B54-95B0-FA4E2EE2CCBC}.Max nt.Build.0 = Release|Win32
+		{1FD8A136-B86A-4B54-95B0-FA4E2EE2CCBC}.nt.ActiveCfg = Release|Win32
+		{1FD8A136-B86A-4B54-95B0-FA4E2EE2CCBC}.nt.Build.0 = Release|Win32
+		{1FD8A136-B86A-4B54-95B0-FA4E2EE2CCBC}.pro.ActiveCfg = Release|Win32
+		{1FD8A136-B86A-4B54-95B0-FA4E2EE2CCBC}.pro.Build.0 = Release|Win32
+		{1FD8A136-B86A-4B54-95B0-FA4E2EE2CCBC}.pro nt.ActiveCfg = Release|Win32
+		{1FD8A136-B86A-4B54-95B0-FA4E2EE2CCBC}.pro nt.Build.0 = Release|Win32
+		{1FD8A136-B86A-4B54-95B0-FA4E2EE2CCBC}.Release.ActiveCfg = Release|Win32
+		{1FD8A136-B86A-4B54-95B0-FA4E2EE2CCBC}.Release.Build.0 = Release|Win32
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE}.classic.ActiveCfg = Release|Win32
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE}.classic.Build.0 = Release|Win32
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE}.classic nt.ActiveCfg = Release|Win32
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE}.classic nt.Build.0 = Release|Win32
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE}.Debug.ActiveCfg = Debug|Win32
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE}.Debug.Build.0 = Debug|Win32
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE}.Embedded_Classic.ActiveCfg = Debug|Win32
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE}.Embedded_Debug.ActiveCfg = TLS_DEBUG|Win32
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE}.Embedded_Debug.Build.0 = TLS_DEBUG|Win32
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE}.Embedded_Pro.ActiveCfg = Debug|Win32
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE}.Embedded_Release.ActiveCfg = Release|Win32
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE}.Max.ActiveCfg = Release|Win32
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE}.Max.Build.0 = Release|Win32
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE}.Max nt.ActiveCfg = Release|Win32
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE}.Max nt.Build.0 = Release|Win32
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE}.nt.ActiveCfg = Release|Win32
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE}.nt.Build.0 = Release|Win32
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE}.pro.ActiveCfg = Release|Win32
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE}.pro.Build.0 = Release|Win32
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE}.pro nt.ActiveCfg = Release|Win32
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE}.pro nt.Build.0 = Release|Win32
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE}.Release.ActiveCfg = Release|Win32
+		{FC369DF4-AEB7-4531-BF34-A638C4363BFE}.Release.Build.0 = Release|Win32
+		{C70A6DC7-7D45-4C16-8654-7E57713A4C04}.classic.ActiveCfg = Release|Win32
+		{C70A6DC7-7D45-4C16-8654-7E57713A4C04}.classic.Build.0 = Release|Win32
+		{C70A6DC7-7D45-4C16-8654-7E57713A4C04}.classic nt.ActiveCfg = Release|Win32
+		{C70A6DC7-7D45-4C16-8654-7E57713A4C04}.classic nt.Build.0 = Release|Win32
+		{C70A6DC7-7D45-4C16-8654-7E57713A4C04}.Debug.ActiveCfg = Debug|Win32
+		{C70A6DC7-7D45-4C16-8654-7E57713A4C04}.Debug.Build.0 = Debug|Win32
+		{C70A6DC7-7D45-4C16-8654-7E57713A4C04}.Embedded_Classic.ActiveCfg = TLS|Win32
+		{C70A6DC7-7D45-4C16-8654-7E57713A4C04}.Embedded_Classic.Build.0 = TLS|Win32
+		{C70A6DC7-7D45-4C16-8654-7E57713A4C04}.Embedded_Debug.ActiveCfg = TLS_DEBUG|Win32
+		{C70A6DC7-7D45-4C16-8654-7E57713A4C04}.Embedded_Debug.Build.0 = TLS_DEBUG|Win32
+		{C70A6DC7-7D45-4C16-8654-7E57713A4C04}.Embedded_Pro.ActiveCfg = TLS|Win32
+		{C70A6DC7-7D45-4C16-8654-7E57713A4C04}.Embedded_Pro.Build.0 = TLS|Win32
+		{C70A6DC7-7D45-4C16-8654-7E57713A4C04}.Embedded_Release.ActiveCfg = TLS|Win32
+		{C70A6DC7-7D45-4C16-8654-7E57713A4C04}.Embedded_Release.Build.0 = TLS|Win32
+		{C70A6DC7-7D45-4C16-8654-7E57713A4C04}.Max.ActiveCfg = Release|Win32
+		{C70A6DC7-7D45-4C16-8654-7E57713A4C04}.Max.Build.0 = Release|Win32
+		{C70A6DC7-7D45-4C16-8654-7E57713A4C04}.Max nt.ActiveCfg = Release|Win32
+		{C70A6DC7-7D45-4C16-8654-7E57713A4C04}.Max nt.Build.0 = Release|Win32
+		{C70A6DC7-7D45-4C16-8654-7E57713A4C04}.nt.ActiveCfg = Release|Win32
+		{C70A6DC7-7D45-4C16-8654-7E57713A4C04}.nt.Build.0 = Release|Win32
+		{C70A6DC7-7D45-4C16-8654-7E57713A4C04}.pro.ActiveCfg = Release|Win32
+		{C70A6DC7-7D45-4C16-8654-7E57713A4C04}.pro.Build.0 = Release|Win32
+		{C70A6DC7-7D45-4C16-8654-7E57713A4C04}.pro nt.ActiveCfg = Release|Win32
+		{C70A6DC7-7D45-4C16-8654-7E57713A4C04}.pro nt.Build.0 = Release|Win32
+		{C70A6DC7-7D45-4C16-8654-7E57713A4C04}.Release.ActiveCfg = Release|Win32
+		{C70A6DC7-7D45-4C16-8654-7E57713A4C04}.Release.Build.0 = Release|Win32
+		{13D37150-54D0-46C5-9519-03923243C7C7}.classic.ActiveCfg = nt|Win32
+		{13D37150-54D0-46C5-9519-03923243C7C7}.classic nt.ActiveCfg = nt|Win32
+		{13D37150-54D0-46C5-9519-03923243C7C7}.Debug.ActiveCfg = Debug|Win32
+		{13D37150-54D0-46C5-9519-03923243C7C7}.Debug.Build.0 = Debug|Win32
+		{13D37150-54D0-46C5-9519-03923243C7C7}.Embedded_Classic.ActiveCfg = nt|Win32
+		{13D37150-54D0-46C5-9519-03923243C7C7}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{13D37150-54D0-46C5-9519-03923243C7C7}.Embedded_Debug.Build.0 = Debug|Win32
+		{13D37150-54D0-46C5-9519-03923243C7C7}.Embedded_Pro.ActiveCfg = Release|Win32
+		{13D37150-54D0-46C5-9519-03923243C7C7}.Embedded_Pro.Build.0 = Release|Win32
+		{13D37150-54D0-46C5-9519-03923243C7C7}.Embedded_Release.ActiveCfg = Release|Win32
+		{13D37150-54D0-46C5-9519-03923243C7C7}.Embedded_Release.Build.0 = Release|Win32
+		{13D37150-54D0-46C5-9519-03923243C7C7}.Max.ActiveCfg = Release|Win32
+		{13D37150-54D0-46C5-9519-03923243C7C7}.Max.Build.0 = Release|Win32
+		{13D37150-54D0-46C5-9519-03923243C7C7}.Max nt.ActiveCfg = Max nt|Win32
+		{13D37150-54D0-46C5-9519-03923243C7C7}.Max nt.Build.0 = Max nt|Win32
+		{13D37150-54D0-46C5-9519-03923243C7C7}.nt.ActiveCfg = nt|Win32
+		{13D37150-54D0-46C5-9519-03923243C7C7}.nt.Build.0 = nt|Win32
+		{13D37150-54D0-46C5-9519-03923243C7C7}.pro.ActiveCfg = Release|Win32
+		{13D37150-54D0-46C5-9519-03923243C7C7}.pro.Build.0 = Release|Win32
+		{13D37150-54D0-46C5-9519-03923243C7C7}.pro nt.ActiveCfg = nt|Win32
+		{13D37150-54D0-46C5-9519-03923243C7C7}.pro nt.Build.0 = nt|Win32
+		{13D37150-54D0-46C5-9519-03923243C7C7}.Release.ActiveCfg = Release|Win32
+		{13D37150-54D0-46C5-9519-03923243C7C7}.Release.Build.0 = Release|Win32
+		{1FC6EB72-1D0F-4E40-8851-1CC5DEB94F0F}.classic.ActiveCfg = Release|Win32
+		{1FC6EB72-1D0F-4E40-8851-1CC5DEB94F0F}.classic.Build.0 = Release|Win32
+		{1FC6EB72-1D0F-4E40-8851-1CC5DEB94F0F}.classic nt.ActiveCfg = Release|Win32
+		{1FC6EB72-1D0F-4E40-8851-1CC5DEB94F0F}.classic nt.Build.0 = Release|Win32
+		{1FC6EB72-1D0F-4E40-8851-1CC5DEB94F0F}.Debug.ActiveCfg = Debug|Win32
+		{1FC6EB72-1D0F-4E40-8851-1CC5DEB94F0F}.Debug.Build.0 = Debug|Win32
+		{1FC6EB72-1D0F-4E40-8851-1CC5DEB94F0F}.Embedded_Classic.ActiveCfg = Release|Win32
+		{1FC6EB72-1D0F-4E40-8851-1CC5DEB94F0F}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{1FC6EB72-1D0F-4E40-8851-1CC5DEB94F0F}.Embedded_Pro.ActiveCfg = Release|Win32
+		{1FC6EB72-1D0F-4E40-8851-1CC5DEB94F0F}.Embedded_Release.ActiveCfg = Release|Win32
+		{1FC6EB72-1D0F-4E40-8851-1CC5DEB94F0F}.Max.ActiveCfg = Release|Win32
+		{1FC6EB72-1D0F-4E40-8851-1CC5DEB94F0F}.Max.Build.0 = Release|Win32
+		{1FC6EB72-1D0F-4E40-8851-1CC5DEB94F0F}.Max nt.ActiveCfg = Release|Win32
+		{1FC6EB72-1D0F-4E40-8851-1CC5DEB94F0F}.Max nt.Build.0 = Release|Win32
+		{1FC6EB72-1D0F-4E40-8851-1CC5DEB94F0F}.nt.ActiveCfg = Release|Win32
+		{1FC6EB72-1D0F-4E40-8851-1CC5DEB94F0F}.nt.Build.0 = Release|Win32
+		{1FC6EB72-1D0F-4E40-8851-1CC5DEB94F0F}.pro.ActiveCfg = Release|Win32
+		{1FC6EB72-1D0F-4E40-8851-1CC5DEB94F0F}.pro.Build.0 = Release|Win32
+		{1FC6EB72-1D0F-4E40-8851-1CC5DEB94F0F}.pro nt.ActiveCfg = Release|Win32
+		{1FC6EB72-1D0F-4E40-8851-1CC5DEB94F0F}.pro nt.Build.0 = Release|Win32
+		{1FC6EB72-1D0F-4E40-8851-1CC5DEB94F0F}.Release.ActiveCfg = Release|Win32
+		{1FC6EB72-1D0F-4E40-8851-1CC5DEB94F0F}.Release.Build.0 = Release|Win32
+		{93CA92A0-D7B8-4FAE-9EBB-D92EFBF631C9}.classic.ActiveCfg = classic|Win32
+		{93CA92A0-D7B8-4FAE-9EBB-D92EFBF631C9}.classic nt.ActiveCfg = classic|Win32
+		{93CA92A0-D7B8-4FAE-9EBB-D92EFBF631C9}.Debug.ActiveCfg = Debug|Win32
+		{93CA92A0-D7B8-4FAE-9EBB-D92EFBF631C9}.Embedded_Classic.ActiveCfg = classic|Win32
+		{93CA92A0-D7B8-4FAE-9EBB-D92EFBF631C9}.Embedded_Classic.Build.0 = classic|Win32
+		{93CA92A0-D7B8-4FAE-9EBB-D92EFBF631C9}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{93CA92A0-D7B8-4FAE-9EBB-D92EFBF631C9}.Embedded_Debug.Build.0 = Debug|Win32
+		{93CA92A0-D7B8-4FAE-9EBB-D92EFBF631C9}.Embedded_Pro.ActiveCfg = pro|Win32
+		{93CA92A0-D7B8-4FAE-9EBB-D92EFBF631C9}.Embedded_Pro.Build.0 = pro|Win32
+		{93CA92A0-D7B8-4FAE-9EBB-D92EFBF631C9}.Embedded_Release.ActiveCfg = Release|Win32
+		{93CA92A0-D7B8-4FAE-9EBB-D92EFBF631C9}.Embedded_Release.Build.0 = Release|Win32
+		{93CA92A0-D7B8-4FAE-9EBB-D92EFBF631C9}.Max.ActiveCfg = classic|Win32
+		{93CA92A0-D7B8-4FAE-9EBB-D92EFBF631C9}.Max nt.ActiveCfg = classic|Win32
+		{93CA92A0-D7B8-4FAE-9EBB-D92EFBF631C9}.nt.ActiveCfg = classic|Win32
+		{93CA92A0-D7B8-4FAE-9EBB-D92EFBF631C9}.pro.ActiveCfg = pro|Win32
+		{93CA92A0-D7B8-4FAE-9EBB-D92EFBF631C9}.pro nt.ActiveCfg = pro|Win32
+		{93CA92A0-D7B8-4FAE-9EBB-D92EFBF631C9}.Release.ActiveCfg = Release|Win32
+		{2794E434-7CCE-44DB-B2FB-789ABE53D6B9}.classic.ActiveCfg = Debug|Win32
+		{2794E434-7CCE-44DB-B2FB-789ABE53D6B9}.classic.Build.0 = Debug|Win32
+		{2794E434-7CCE-44DB-B2FB-789ABE53D6B9}.classic nt.ActiveCfg = Release|Win32
+		{2794E434-7CCE-44DB-B2FB-789ABE53D6B9}.classic nt.Build.0 = Release|Win32
+		{2794E434-7CCE-44DB-B2FB-789ABE53D6B9}.Debug.ActiveCfg = Debug|Win32
+		{2794E434-7CCE-44DB-B2FB-789ABE53D6B9}.Debug.Build.0 = Debug|Win32
+		{2794E434-7CCE-44DB-B2FB-789ABE53D6B9}.Embedded_Classic.ActiveCfg = Debug|Win32
+		{2794E434-7CCE-44DB-B2FB-789ABE53D6B9}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{2794E434-7CCE-44DB-B2FB-789ABE53D6B9}.Embedded_Pro.ActiveCfg = Debug|Win32
+		{2794E434-7CCE-44DB-B2FB-789ABE53D6B9}.Embedded_Release.ActiveCfg = Release|Win32
+		{2794E434-7CCE-44DB-B2FB-789ABE53D6B9}.Max.ActiveCfg = Release|Win32
+		{2794E434-7CCE-44DB-B2FB-789ABE53D6B9}.Max.Build.0 = Release|Win32
+		{2794E434-7CCE-44DB-B2FB-789ABE53D6B9}.Max nt.ActiveCfg = Release|Win32
+		{2794E434-7CCE-44DB-B2FB-789ABE53D6B9}.Max nt.Build.0 = Release|Win32
+		{2794E434-7CCE-44DB-B2FB-789ABE53D6B9}.nt.ActiveCfg = Release|Win32
+		{2794E434-7CCE-44DB-B2FB-789ABE53D6B9}.nt.Build.0 = Release|Win32
+		{2794E434-7CCE-44DB-B2FB-789ABE53D6B9}.pro.ActiveCfg = Release|Win32
+		{2794E434-7CCE-44DB-B2FB-789ABE53D6B9}.pro.Build.0 = Release|Win32
+		{2794E434-7CCE-44DB-B2FB-789ABE53D6B9}.pro nt.ActiveCfg = Release|Win32
+		{2794E434-7CCE-44DB-B2FB-789ABE53D6B9}.pro nt.Build.0 = Release|Win32
+		{2794E434-7CCE-44DB-B2FB-789ABE53D6B9}.Release.ActiveCfg = Release|Win32
+		{2794E434-7CCE-44DB-B2FB-789ABE53D6B9}.Release.Build.0 = Release|Win32
+		{B0EC3594-CD67-4364-826E-BA75EF2050F8}.classic.ActiveCfg = classic|Win32
+		{B0EC3594-CD67-4364-826E-BA75EF2050F8}.classic.Build.0 = classic|Win32
+		{B0EC3594-CD67-4364-826E-BA75EF2050F8}.classic nt.ActiveCfg = Release|Win32
+		{B0EC3594-CD67-4364-826E-BA75EF2050F8}.classic nt.Build.0 = Release|Win32
+		{B0EC3594-CD67-4364-826E-BA75EF2050F8}.Debug.ActiveCfg = Debug|Win32
+		{B0EC3594-CD67-4364-826E-BA75EF2050F8}.Debug.Build.0 = Debug|Win32
+		{B0EC3594-CD67-4364-826E-BA75EF2050F8}.Embedded_Classic.ActiveCfg = Debug|Win32
+		{B0EC3594-CD67-4364-826E-BA75EF2050F8}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{B0EC3594-CD67-4364-826E-BA75EF2050F8}.Embedded_Pro.ActiveCfg = Debug|Win32
+		{B0EC3594-CD67-4364-826E-BA75EF2050F8}.Embedded_Release.ActiveCfg = Release|Win32
+		{B0EC3594-CD67-4364-826E-BA75EF2050F8}.Max.ActiveCfg = Release|Win32
+		{B0EC3594-CD67-4364-826E-BA75EF2050F8}.Max.Build.0 = Release|Win32
+		{B0EC3594-CD67-4364-826E-BA75EF2050F8}.Max nt.ActiveCfg = Release|Win32
+		{B0EC3594-CD67-4364-826E-BA75EF2050F8}.Max nt.Build.0 = Release|Win32
+		{B0EC3594-CD67-4364-826E-BA75EF2050F8}.nt.ActiveCfg = Release|Win32
+		{B0EC3594-CD67-4364-826E-BA75EF2050F8}.nt.Build.0 = Release|Win32
+		{B0EC3594-CD67-4364-826E-BA75EF2050F8}.pro.ActiveCfg = Release|Win32
+		{B0EC3594-CD67-4364-826E-BA75EF2050F8}.pro.Build.0 = Release|Win32
+		{B0EC3594-CD67-4364-826E-BA75EF2050F8}.pro nt.ActiveCfg = Release|Win32
+		{B0EC3594-CD67-4364-826E-BA75EF2050F8}.pro nt.Build.0 = Release|Win32
+		{B0EC3594-CD67-4364-826E-BA75EF2050F8}.Release.ActiveCfg = Release|Win32
+		{B0EC3594-CD67-4364-826E-BA75EF2050F8}.Release.Build.0 = Release|Win32
+		{262280A8-37D5-4037-BDFB-242468DFB3D2}.classic.ActiveCfg = Release|Win32
+		{262280A8-37D5-4037-BDFB-242468DFB3D2}.classic.Build.0 = Release|Win32
+		{262280A8-37D5-4037-BDFB-242468DFB3D2}.classic nt.ActiveCfg = Release|Win32
+		{262280A8-37D5-4037-BDFB-242468DFB3D2}.classic nt.Build.0 = Release|Win32
+		{262280A8-37D5-4037-BDFB-242468DFB3D2}.Debug.ActiveCfg = Debug|Win32
+		{262280A8-37D5-4037-BDFB-242468DFB3D2}.Debug.Build.0 = Debug|Win32
+		{262280A8-37D5-4037-BDFB-242468DFB3D2}.Embedded_Classic.ActiveCfg = TLS|Win32
+		{262280A8-37D5-4037-BDFB-242468DFB3D2}.Embedded_Classic.Build.0 = TLS|Win32
+		{262280A8-37D5-4037-BDFB-242468DFB3D2}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{262280A8-37D5-4037-BDFB-242468DFB3D2}.Embedded_Pro.ActiveCfg = TLS|Win32
+		{262280A8-37D5-4037-BDFB-242468DFB3D2}.Embedded_Pro.Build.0 = TLS|Win32
+		{262280A8-37D5-4037-BDFB-242468DFB3D2}.Embedded_Release.ActiveCfg = TLS|Win32
+		{262280A8-37D5-4037-BDFB-242468DFB3D2}.Embedded_Release.Build.0 = TLS|Win32
+		{262280A8-37D5-4037-BDFB-242468DFB3D2}.Max.ActiveCfg = Release|Win32
+		{262280A8-37D5-4037-BDFB-242468DFB3D2}.Max.Build.0 = Release|Win32
+		{262280A8-37D5-4037-BDFB-242468DFB3D2}.Max nt.ActiveCfg = Release|Win32
+		{262280A8-37D5-4037-BDFB-242468DFB3D2}.Max nt.Build.0 = Release|Win32
+		{262280A8-37D5-4037-BDFB-242468DFB3D2}.nt.ActiveCfg = Release|Win32
+		{262280A8-37D5-4037-BDFB-242468DFB3D2}.nt.Build.0 = Release|Win32
+		{262280A8-37D5-4037-BDFB-242468DFB3D2}.pro.ActiveCfg = Release|Win32
+		{262280A8-37D5-4037-BDFB-242468DFB3D2}.pro.Build.0 = Release|Win32
+		{262280A8-37D5-4037-BDFB-242468DFB3D2}.pro nt.ActiveCfg = Release|Win32
+		{262280A8-37D5-4037-BDFB-242468DFB3D2}.pro nt.Build.0 = Release|Win32
+		{262280A8-37D5-4037-BDFB-242468DFB3D2}.Release.ActiveCfg = Release|Win32
+		{262280A8-37D5-4037-BDFB-242468DFB3D2}.Release.Build.0 = Release|Win32
+		{4C5D0EB1-B953-4BE9-A48B-4F3A874E6635}.classic.ActiveCfg = Release|Win32
+		{4C5D0EB1-B953-4BE9-A48B-4F3A874E6635}.classic.Build.0 = Release|Win32
+		{4C5D0EB1-B953-4BE9-A48B-4F3A874E6635}.classic nt.ActiveCfg = Release|Win32
+		{4C5D0EB1-B953-4BE9-A48B-4F3A874E6635}.classic nt.Build.0 = Release|Win32
+		{4C5D0EB1-B953-4BE9-A48B-4F3A874E6635}.Debug.ActiveCfg = Debug|Win32
+		{4C5D0EB1-B953-4BE9-A48B-4F3A874E6635}.Debug.Build.0 = Debug|Win32
+		{4C5D0EB1-B953-4BE9-A48B-4F3A874E6635}.Embedded_Classic.ActiveCfg = Release|Win32
+		{4C5D0EB1-B953-4BE9-A48B-4F3A874E6635}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{4C5D0EB1-B953-4BE9-A48B-4F3A874E6635}.Embedded_Pro.ActiveCfg = Release|Win32
+		{4C5D0EB1-B953-4BE9-A48B-4F3A874E6635}.Embedded_Release.ActiveCfg = Release|Win32
+		{4C5D0EB1-B953-4BE9-A48B-4F3A874E6635}.Max.ActiveCfg = Release|Win32
+		{4C5D0EB1-B953-4BE9-A48B-4F3A874E6635}.Max.Build.0 = Release|Win32
+		{4C5D0EB1-B953-4BE9-A48B-4F3A874E6635}.Max nt.ActiveCfg = Release|Win32
+		{4C5D0EB1-B953-4BE9-A48B-4F3A874E6635}.Max nt.Build.0 = Release|Win32
+		{4C5D0EB1-B953-4BE9-A48B-4F3A874E6635}.nt.ActiveCfg = Release|Win32
+		{4C5D0EB1-B953-4BE9-A48B-4F3A874E6635}.nt.Build.0 = Release|Win32
+		{4C5D0EB1-B953-4BE9-A48B-4F3A874E6635}.pro.ActiveCfg = Release|Win32
+		{4C5D0EB1-B953-4BE9-A48B-4F3A874E6635}.pro.Build.0 = Release|Win32
+		{4C5D0EB1-B953-4BE9-A48B-4F3A874E6635}.pro nt.ActiveCfg = Release|Win32
+		{4C5D0EB1-B953-4BE9-A48B-4F3A874E6635}.pro nt.Build.0 = Release|Win32
+		{4C5D0EB1-B953-4BE9-A48B-4F3A874E6635}.Release.ActiveCfg = Release|Win32
+		{4C5D0EB1-B953-4BE9-A48B-4F3A874E6635}.Release.Build.0 = Release|Win32
+		{87CD9881-D234-4306-BBC6-0668C6168C0F}.classic.ActiveCfg = classic|Win32
+		{87CD9881-D234-4306-BBC6-0668C6168C0F}.classic.Build.0 = classic|Win32
+		{87CD9881-D234-4306-BBC6-0668C6168C0F}.classic nt.ActiveCfg = Release|Win32
+		{87CD9881-D234-4306-BBC6-0668C6168C0F}.classic nt.Build.0 = Release|Win32
+		{87CD9881-D234-4306-BBC6-0668C6168C0F}.Debug.ActiveCfg = Debug|Win32
+		{87CD9881-D234-4306-BBC6-0668C6168C0F}.Debug.Build.0 = Debug|Win32
+		{87CD9881-D234-4306-BBC6-0668C6168C0F}.Embedded_Classic.ActiveCfg = Debug|Win32
+		{87CD9881-D234-4306-BBC6-0668C6168C0F}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{87CD9881-D234-4306-BBC6-0668C6168C0F}.Embedded_Pro.ActiveCfg = Debug|Win32
+		{87CD9881-D234-4306-BBC6-0668C6168C0F}.Embedded_Release.ActiveCfg = Release|Win32
+		{87CD9881-D234-4306-BBC6-0668C6168C0F}.Max.ActiveCfg = Release|Win32
+		{87CD9881-D234-4306-BBC6-0668C6168C0F}.Max.Build.0 = Release|Win32
+		{87CD9881-D234-4306-BBC6-0668C6168C0F}.Max nt.ActiveCfg = Release|Win32
+		{87CD9881-D234-4306-BBC6-0668C6168C0F}.Max nt.Build.0 = Release|Win32
+		{87CD9881-D234-4306-BBC6-0668C6168C0F}.nt.ActiveCfg = Release|Win32
+		{87CD9881-D234-4306-BBC6-0668C6168C0F}.nt.Build.0 = Release|Win32
+		{87CD9881-D234-4306-BBC6-0668C6168C0F}.pro.ActiveCfg = Release|Win32
+		{87CD9881-D234-4306-BBC6-0668C6168C0F}.pro.Build.0 = Release|Win32
+		{87CD9881-D234-4306-BBC6-0668C6168C0F}.pro nt.ActiveCfg = Release|Win32
+		{87CD9881-D234-4306-BBC6-0668C6168C0F}.pro nt.Build.0 = Release|Win32
+		{87CD9881-D234-4306-BBC6-0668C6168C0F}.Release.ActiveCfg = Release|Win32
+		{87CD9881-D234-4306-BBC6-0668C6168C0F}.Release.Build.0 = Release|Win32
+		{194F5EE6-9440-4298-A6FE-A9B4B480B44C}.classic.ActiveCfg = classic|Win32
+		{194F5EE6-9440-4298-A6FE-A9B4B480B44C}.classic.Build.0 = classic|Win32
+		{194F5EE6-9440-4298-A6FE-A9B4B480B44C}.classic nt.ActiveCfg = Release|Win32
+		{194F5EE6-9440-4298-A6FE-A9B4B480B44C}.classic nt.Build.0 = Release|Win32
+		{194F5EE6-9440-4298-A6FE-A9B4B480B44C}.Debug.ActiveCfg = Debug|Win32
+		{194F5EE6-9440-4298-A6FE-A9B4B480B44C}.Debug.Build.0 = Debug|Win32
+		{194F5EE6-9440-4298-A6FE-A9B4B480B44C}.Embedded_Classic.ActiveCfg = Release|Win32
+		{194F5EE6-9440-4298-A6FE-A9B4B480B44C}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{194F5EE6-9440-4298-A6FE-A9B4B480B44C}.Embedded_Pro.ActiveCfg = Release|Win32
+		{194F5EE6-9440-4298-A6FE-A9B4B480B44C}.Embedded_Release.ActiveCfg = Release|Win32
+		{194F5EE6-9440-4298-A6FE-A9B4B480B44C}.Max.ActiveCfg = Release|Win32
+		{194F5EE6-9440-4298-A6FE-A9B4B480B44C}.Max.Build.0 = Release|Win32
+		{194F5EE6-9440-4298-A6FE-A9B4B480B44C}.Max nt.ActiveCfg = Release|Win32
+		{194F5EE6-9440-4298-A6FE-A9B4B480B44C}.Max nt.Build.0 = Release|Win32
+		{194F5EE6-9440-4298-A6FE-A9B4B480B44C}.nt.ActiveCfg = Release|Win32
+		{194F5EE6-9440-4298-A6FE-A9B4B480B44C}.nt.Build.0 = Release|Win32
+		{194F5EE6-9440-4298-A6FE-A9B4B480B44C}.pro.ActiveCfg = Release|Win32
+		{194F5EE6-9440-4298-A6FE-A9B4B480B44C}.pro.Build.0 = Release|Win32
+		{194F5EE6-9440-4298-A6FE-A9B4B480B44C}.pro nt.ActiveCfg = Release|Win32
+		{194F5EE6-9440-4298-A6FE-A9B4B480B44C}.pro nt.Build.0 = Release|Win32
+		{194F5EE6-9440-4298-A6FE-A9B4B480B44C}.Release.ActiveCfg = Release|Win32
+		{194F5EE6-9440-4298-A6FE-A9B4B480B44C}.Release.Build.0 = Release|Win32
+		{D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0}.classic.ActiveCfg = Debug|Win32
+		{D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0}.classic.Build.0 = Debug|Win32
+		{D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0}.classic nt.ActiveCfg = Release|Win32
+		{D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0}.classic nt.Build.0 = Release|Win32
+		{D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0}.Debug.ActiveCfg = Debug|Win32
+		{D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0}.Debug.Build.0 = Debug|Win32
+		{D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0}.Embedded_Classic.ActiveCfg = TLS|Win32
+		{D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0}.Embedded_Classic.Build.0 = TLS|Win32
+		{D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0}.Embedded_Pro.ActiveCfg = TLS|Win32
+		{D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0}.Embedded_Pro.Build.0 = TLS|Win32
+		{D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0}.Embedded_Release.ActiveCfg = TLS|Win32
+		{D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0}.Embedded_Release.Build.0 = TLS|Win32
+		{D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0}.Max.ActiveCfg = Release|Win32
+		{D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0}.Max.Build.0 = Release|Win32
+		{D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0}.Max nt.ActiveCfg = Release|Win32
+		{D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0}.Max nt.Build.0 = Release|Win32
+		{D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0}.nt.ActiveCfg = Release|Win32
+		{D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0}.nt.Build.0 = Release|Win32
+		{D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0}.pro.ActiveCfg = Release|Win32
+		{D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0}.pro.Build.0 = Release|Win32
+		{D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0}.pro nt.ActiveCfg = Release|Win32
+		{D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0}.pro nt.Build.0 = Release|Win32
+		{D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0}.Release.ActiveCfg = Release|Win32
+		{D8E4B489-C5DD-407D-99DB-FE7C7A5A83A0}.Release.Build.0 = Release|Win32
+		{EF833A1E-E358-4B6C-9C27-9489E85041CC}.classic.ActiveCfg = classic|Win32
+		{EF833A1E-E358-4B6C-9C27-9489E85041CC}.classic.Build.0 = classic|Win32
+		{EF833A1E-E358-4B6C-9C27-9489E85041CC}.classic nt.ActiveCfg = Release|Win32
+		{EF833A1E-E358-4B6C-9C27-9489E85041CC}.classic nt.Build.0 = Release|Win32
+		{EF833A1E-E358-4B6C-9C27-9489E85041CC}.Debug.ActiveCfg = Debug|Win32
+		{EF833A1E-E358-4B6C-9C27-9489E85041CC}.Debug.Build.0 = Debug|Win32
+		{EF833A1E-E358-4B6C-9C27-9489E85041CC}.Embedded_Classic.ActiveCfg = classic|Win32
+		{EF833A1E-E358-4B6C-9C27-9489E85041CC}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{EF833A1E-E358-4B6C-9C27-9489E85041CC}.Embedded_Pro.ActiveCfg = classic|Win32
+		{EF833A1E-E358-4B6C-9C27-9489E85041CC}.Embedded_Release.ActiveCfg = Release|Win32
+		{EF833A1E-E358-4B6C-9C27-9489E85041CC}.Max.ActiveCfg = Release|Win32
+		{EF833A1E-E358-4B6C-9C27-9489E85041CC}.Max.Build.0 = Release|Win32
+		{EF833A1E-E358-4B6C-9C27-9489E85041CC}.Max nt.ActiveCfg = Release|Win32
+		{EF833A1E-E358-4B6C-9C27-9489E85041CC}.Max nt.Build.0 = Release|Win32
+		{EF833A1E-E358-4B6C-9C27-9489E85041CC}.nt.ActiveCfg = Release|Win32
+		{EF833A1E-E358-4B6C-9C27-9489E85041CC}.nt.Build.0 = Release|Win32
+		{EF833A1E-E358-4B6C-9C27-9489E85041CC}.pro.ActiveCfg = Release|Win32
+		{EF833A1E-E358-4B6C-9C27-9489E85041CC}.pro.Build.0 = Release|Win32
+		{EF833A1E-E358-4B6C-9C27-9489E85041CC}.pro nt.ActiveCfg = Release|Win32
+		{EF833A1E-E358-4B6C-9C27-9489E85041CC}.pro nt.Build.0 = Release|Win32
+		{EF833A1E-E358-4B6C-9C27-9489E85041CC}.Release.ActiveCfg = Release|Win32
+		{EF833A1E-E358-4B6C-9C27-9489E85041CC}.Release.Build.0 = Release|Win32
+		{F9868FD3-7AE2-486D-BAB3-A299E11F6AC1}.classic.ActiveCfg = classic|Win32
+		{F9868FD3-7AE2-486D-BAB3-A299E11F6AC1}.classic.Build.0 = classic|Win32
+		{F9868FD3-7AE2-486D-BAB3-A299E11F6AC1}.classic nt.ActiveCfg = Release|Win32
+		{F9868FD3-7AE2-486D-BAB3-A299E11F6AC1}.classic nt.Build.0 = Release|Win32
+		{F9868FD3-7AE2-486D-BAB3-A299E11F6AC1}.Debug.ActiveCfg = Debug|Win32
+		{F9868FD3-7AE2-486D-BAB3-A299E11F6AC1}.Debug.Build.0 = Debug|Win32
+		{F9868FD3-7AE2-486D-BAB3-A299E11F6AC1}.Embedded_Classic.ActiveCfg = Debug|Win32
+		{F9868FD3-7AE2-486D-BAB3-A299E11F6AC1}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{F9868FD3-7AE2-486D-BAB3-A299E11F6AC1}.Embedded_Pro.ActiveCfg = Debug|Win32
+		{F9868FD3-7AE2-486D-BAB3-A299E11F6AC1}.Embedded_Release.ActiveCfg = Release|Win32
+		{F9868FD3-7AE2-486D-BAB3-A299E11F6AC1}.Max.ActiveCfg = Release|Win32
+		{F9868FD3-7AE2-486D-BAB3-A299E11F6AC1}.Max.Build.0 = Release|Win32
+		{F9868FD3-7AE2-486D-BAB3-A299E11F6AC1}.Max nt.ActiveCfg = Release|Win32
+		{F9868FD3-7AE2-486D-BAB3-A299E11F6AC1}.Max nt.Build.0 = Release|Win32
+		{F9868FD3-7AE2-486D-BAB3-A299E11F6AC1}.nt.ActiveCfg = Release|Win32
+		{F9868FD3-7AE2-486D-BAB3-A299E11F6AC1}.nt.Build.0 = Release|Win32
+		{F9868FD3-7AE2-486D-BAB3-A299E11F6AC1}.pro.ActiveCfg = Release|Win32
+		{F9868FD3-7AE2-486D-BAB3-A299E11F6AC1}.pro.Build.0 = Release|Win32
+		{F9868FD3-7AE2-486D-BAB3-A299E11F6AC1}.pro nt.ActiveCfg = Release|Win32
+		{F9868FD3-7AE2-486D-BAB3-A299E11F6AC1}.pro nt.Build.0 = Release|Win32
+		{F9868FD3-7AE2-486D-BAB3-A299E11F6AC1}.Release.ActiveCfg = Release|Win32
+		{F9868FD3-7AE2-486D-BAB3-A299E11F6AC1}.Release.Build.0 = Release|Win32
+		{D2B00DE0-F6E9-40AF-B90D-A257D014F098}.classic.ActiveCfg = classic|Win32
+		{D2B00DE0-F6E9-40AF-B90D-A257D014F098}.classic.Build.0 = classic|Win32
+		{D2B00DE0-F6E9-40AF-B90D-A257D014F098}.classic nt.ActiveCfg = Release|Win32
+		{D2B00DE0-F6E9-40AF-B90D-A257D014F098}.classic nt.Build.0 = Release|Win32
+		{D2B00DE0-F6E9-40AF-B90D-A257D014F098}.Debug.ActiveCfg = Debug|Win32
+		{D2B00DE0-F6E9-40AF-B90D-A257D014F098}.Debug.Build.0 = Debug|Win32
+		{D2B00DE0-F6E9-40AF-B90D-A257D014F098}.Embedded_Classic.ActiveCfg = Debug|Win32
+		{D2B00DE0-F6E9-40AF-B90D-A257D014F098}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{D2B00DE0-F6E9-40AF-B90D-A257D014F098}.Embedded_Pro.ActiveCfg = Debug|Win32
+		{D2B00DE0-F6E9-40AF-B90D-A257D014F098}.Embedded_Release.ActiveCfg = Release|Win32
+		{D2B00DE0-F6E9-40AF-B90D-A257D014F098}.Max.ActiveCfg = Release|Win32
+		{D2B00DE0-F6E9-40AF-B90D-A257D014F098}.Max.Build.0 = Release|Win32
+		{D2B00DE0-F6E9-40AF-B90D-A257D014F098}.Max nt.ActiveCfg = Release|Win32
+		{D2B00DE0-F6E9-40AF-B90D-A257D014F098}.Max nt.Build.0 = Release|Win32
+		{D2B00DE0-F6E9-40AF-B90D-A257D014F098}.nt.ActiveCfg = Release|Win32
+		{D2B00DE0-F6E9-40AF-B90D-A257D014F098}.nt.Build.0 = Release|Win32
+		{D2B00DE0-F6E9-40AF-B90D-A257D014F098}.pro.ActiveCfg = Release|Win32
+		{D2B00DE0-F6E9-40AF-B90D-A257D014F098}.pro.Build.0 = Release|Win32
+		{D2B00DE0-F6E9-40AF-B90D-A257D014F098}.pro nt.ActiveCfg = Release|Win32
+		{D2B00DE0-F6E9-40AF-B90D-A257D014F098}.pro nt.Build.0 = Release|Win32
+		{D2B00DE0-F6E9-40AF-B90D-A257D014F098}.Release.ActiveCfg = Release|Win32
+		{D2B00DE0-F6E9-40AF-B90D-A257D014F098}.Release.Build.0 = Release|Win32
+		{DC3A4D26-B533-465B-A3C7-9DBBC06DC8BB}.classic.ActiveCfg = classic|Win32
+		{DC3A4D26-B533-465B-A3C7-9DBBC06DC8BB}.classic.Build.0 = classic|Win32
+		{DC3A4D26-B533-465B-A3C7-9DBBC06DC8BB}.classic nt.ActiveCfg = Release|Win32
+		{DC3A4D26-B533-465B-A3C7-9DBBC06DC8BB}.classic nt.Build.0 = Release|Win32
+		{DC3A4D26-B533-465B-A3C7-9DBBC06DC8BB}.Debug.ActiveCfg = Debug|Win32
+		{DC3A4D26-B533-465B-A3C7-9DBBC06DC8BB}.Debug.Build.0 = Debug|Win32
+		{DC3A4D26-B533-465B-A3C7-9DBBC06DC8BB}.Embedded_Classic.ActiveCfg = Release|Win32
+		{DC3A4D26-B533-465B-A3C7-9DBBC06DC8BB}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{DC3A4D26-B533-465B-A3C7-9DBBC06DC8BB}.Embedded_Pro.ActiveCfg = Release|Win32
+		{DC3A4D26-B533-465B-A3C7-9DBBC06DC8BB}.Embedded_Release.ActiveCfg = Release|Win32
+		{DC3A4D26-B533-465B-A3C7-9DBBC06DC8BB}.Max.ActiveCfg = Release|Win32
+		{DC3A4D26-B533-465B-A3C7-9DBBC06DC8BB}.Max.Build.0 = Release|Win32
+		{DC3A4D26-B533-465B-A3C7-9DBBC06DC8BB}.Max nt.ActiveCfg = Release|Win32
+		{DC3A4D26-B533-465B-A3C7-9DBBC06DC8BB}.Max nt.Build.0 = Release|Win32
+		{DC3A4D26-B533-465B-A3C7-9DBBC06DC8BB}.nt.ActiveCfg = Release|Win32
+		{DC3A4D26-B533-465B-A3C7-9DBBC06DC8BB}.nt.Build.0 = Release|Win32
+		{DC3A4D26-B533-465B-A3C7-9DBBC06DC8BB}.pro.ActiveCfg = Release|Win32
+		{DC3A4D26-B533-465B-A3C7-9DBBC06DC8BB}.pro.Build.0 = Release|Win32
+		{DC3A4D26-B533-465B-A3C7-9DBBC06DC8BB}.pro nt.ActiveCfg = Release|Win32
+		{DC3A4D26-B533-465B-A3C7-9DBBC06DC8BB}.pro nt.Build.0 = Release|Win32
+		{DC3A4D26-B533-465B-A3C7-9DBBC06DC8BB}.Release.ActiveCfg = Release|Win32
+		{DC3A4D26-B533-465B-A3C7-9DBBC06DC8BB}.Release.Build.0 = Release|Win32
+		{67154F28-D076-419E-B149-819EF548E670}.classic.ActiveCfg = classic|Win32
+		{67154F28-D076-419E-B149-819EF548E670}.classic.Build.0 = classic|Win32
+		{67154F28-D076-419E-B149-819EF548E670}.classic nt.ActiveCfg = Release|Win32
+		{67154F28-D076-419E-B149-819EF548E670}.classic nt.Build.0 = Release|Win32
+		{67154F28-D076-419E-B149-819EF548E670}.Debug.ActiveCfg = Debug|Win32
+		{67154F28-D076-419E-B149-819EF548E670}.Debug.Build.0 = Debug|Win32
+		{67154F28-D076-419E-B149-819EF548E670}.Embedded_Classic.ActiveCfg = Debug|Win32
+		{67154F28-D076-419E-B149-819EF548E670}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{67154F28-D076-419E-B149-819EF548E670}.Embedded_Pro.ActiveCfg = Debug|Win32
+		{67154F28-D076-419E-B149-819EF548E670}.Embedded_Release.ActiveCfg = Release|Win32
+		{67154F28-D076-419E-B149-819EF548E670}.Max.ActiveCfg = Release|Win32
+		{67154F28-D076-419E-B149-819EF548E670}.Max.Build.0 = Release|Win32
+		{67154F28-D076-419E-B149-819EF548E670}.Max nt.ActiveCfg = Release|Win32
+		{67154F28-D076-419E-B149-819EF548E670}.Max nt.Build.0 = Release|Win32
+		{67154F28-D076-419E-B149-819EF548E670}.nt.ActiveCfg = Release|Win32
+		{67154F28-D076-419E-B149-819EF548E670}.nt.Build.0 = Release|Win32
+		{67154F28-D076-419E-B149-819EF548E670}.pro.ActiveCfg = Release|Win32
+		{67154F28-D076-419E-B149-819EF548E670}.pro.Build.0 = Release|Win32
+		{67154F28-D076-419E-B149-819EF548E670}.pro nt.ActiveCfg = Release|Win32
+		{67154F28-D076-419E-B149-819EF548E670}.pro nt.Build.0 = Release|Win32
+		{67154F28-D076-419E-B149-819EF548E670}.Release.ActiveCfg = Release|Win32
+		{67154F28-D076-419E-B149-819EF548E670}.Release.Build.0 = Release|Win32
+		{26383276-4843-494B-8BE0-8936ED3EBAAB}.classic.ActiveCfg = Debug|Win32
+		{26383276-4843-494B-8BE0-8936ED3EBAAB}.classic.Build.0 = Debug|Win32
+		{26383276-4843-494B-8BE0-8936ED3EBAAB}.classic nt.ActiveCfg = Release|Win32
+		{26383276-4843-494B-8BE0-8936ED3EBAAB}.classic nt.Build.0 = Release|Win32
+		{26383276-4843-494B-8BE0-8936ED3EBAAB}.Debug.ActiveCfg = Debug|Win32
+		{26383276-4843-494B-8BE0-8936ED3EBAAB}.Debug.Build.0 = Debug|Win32
+		{26383276-4843-494B-8BE0-8936ED3EBAAB}.Embedded_Classic.ActiveCfg = Debug|Win32
+		{26383276-4843-494B-8BE0-8936ED3EBAAB}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{26383276-4843-494B-8BE0-8936ED3EBAAB}.Embedded_Pro.ActiveCfg = Debug|Win32
+		{26383276-4843-494B-8BE0-8936ED3EBAAB}.Embedded_Release.ActiveCfg = Release|Win32
+		{26383276-4843-494B-8BE0-8936ED3EBAAB}.Max.ActiveCfg = Release|Win32
+		{26383276-4843-494B-8BE0-8936ED3EBAAB}.Max.Build.0 = Release|Win32
+		{26383276-4843-494B-8BE0-8936ED3EBAAB}.Max nt.ActiveCfg = Release|Win32
+		{26383276-4843-494B-8BE0-8936ED3EBAAB}.Max nt.Build.0 = Release|Win32
+		{26383276-4843-494B-8BE0-8936ED3EBAAB}.nt.ActiveCfg = Release|Win32
+		{26383276-4843-494B-8BE0-8936ED3EBAAB}.nt.Build.0 = Release|Win32
+		{26383276-4843-494B-8BE0-8936ED3EBAAB}.pro.ActiveCfg = Release|Win32
+		{26383276-4843-494B-8BE0-8936ED3EBAAB}.pro.Build.0 = Release|Win32
+		{26383276-4843-494B-8BE0-8936ED3EBAAB}.pro nt.ActiveCfg = Release|Win32
+		{26383276-4843-494B-8BE0-8936ED3EBAAB}.pro nt.Build.0 = Release|Win32
+		{26383276-4843-494B-8BE0-8936ED3EBAAB}.Release.ActiveCfg = Release|Win32
+		{26383276-4843-494B-8BE0-8936ED3EBAAB}.Release.Build.0 = Release|Win32
+		{62E85884-3ACF-4F4C-873B-60B878147890}.classic.ActiveCfg = classic|Win32
+		{62E85884-3ACF-4F4C-873B-60B878147890}.classic.Build.0 = classic|Win32
+		{62E85884-3ACF-4F4C-873B-60B878147890}.classic nt.ActiveCfg = classic nt|Win32
+		{62E85884-3ACF-4F4C-873B-60B878147890}.classic nt.Build.0 = classic nt|Win32
+		{62E85884-3ACF-4F4C-873B-60B878147890}.Debug.ActiveCfg = Debug|Win32
+		{62E85884-3ACF-4F4C-873B-60B878147890}.Debug.Build.0 = Debug|Win32
+		{62E85884-3ACF-4F4C-873B-60B878147890}.Embedded_Classic.ActiveCfg = Release|Win32
+		{62E85884-3ACF-4F4C-873B-60B878147890}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{62E85884-3ACF-4F4C-873B-60B878147890}.Embedded_Pro.ActiveCfg = Release|Win32
+		{62E85884-3ACF-4F4C-873B-60B878147890}.Embedded_Release.ActiveCfg = Release|Win32
+		{62E85884-3ACF-4F4C-873B-60B878147890}.Max.ActiveCfg = Max|Win32
+		{62E85884-3ACF-4F4C-873B-60B878147890}.Max.Build.0 = Max|Win32
+		{62E85884-3ACF-4F4C-873B-60B878147890}.Max nt.ActiveCfg = Max nt|Win32
+		{62E85884-3ACF-4F4C-873B-60B878147890}.Max nt.Build.0 = Max nt|Win32
+		{62E85884-3ACF-4F4C-873B-60B878147890}.nt.ActiveCfg = nt|Win32
+		{62E85884-3ACF-4F4C-873B-60B878147890}.nt.Build.0 = nt|Win32
+		{62E85884-3ACF-4F4C-873B-60B878147890}.pro.ActiveCfg = pro|Win32
+		{62E85884-3ACF-4F4C-873B-60B878147890}.pro.Build.0 = pro|Win32
+		{62E85884-3ACF-4F4C-873B-60B878147890}.pro nt.ActiveCfg = pro nt|Win32
+		{62E85884-3ACF-4F4C-873B-60B878147890}.pro nt.Build.0 = pro nt|Win32
+		{62E85884-3ACF-4F4C-873B-60B878147890}.Release.ActiveCfg = Release|Win32
+		{62E85884-3ACF-4F4C-873B-60B878147890}.Release.Build.0 = Release|Win32
+		{37D9BA79-302E-4582-A545-CB5FF7982EA3}.classic.ActiveCfg = classic|Win32
+		{37D9BA79-302E-4582-A545-CB5FF7982EA3}.classic.Build.0 = classic|Win32
+		{37D9BA79-302E-4582-A545-CB5FF7982EA3}.classic nt.ActiveCfg = classic|Win32
+		{37D9BA79-302E-4582-A545-CB5FF7982EA3}.classic nt.Build.0 = classic|Win32
+		{37D9BA79-302E-4582-A545-CB5FF7982EA3}.Debug.ActiveCfg = Debug|Win32
+		{37D9BA79-302E-4582-A545-CB5FF7982EA3}.Debug.Build.0 = Debug|Win32
+		{37D9BA79-302E-4582-A545-CB5FF7982EA3}.Embedded_Classic.ActiveCfg = Release|Win32
+		{37D9BA79-302E-4582-A545-CB5FF7982EA3}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{37D9BA79-302E-4582-A545-CB5FF7982EA3}.Embedded_Pro.ActiveCfg = Release|Win32
+		{37D9BA79-302E-4582-A545-CB5FF7982EA3}.Embedded_Release.ActiveCfg = Release|Win32
+		{37D9BA79-302E-4582-A545-CB5FF7982EA3}.Max.ActiveCfg = Release|Win32
+		{37D9BA79-302E-4582-A545-CB5FF7982EA3}.Max.Build.0 = Release|Win32
+		{37D9BA79-302E-4582-A545-CB5FF7982EA3}.Max nt.ActiveCfg = Release|Win32
+		{37D9BA79-302E-4582-A545-CB5FF7982EA3}.Max nt.Build.0 = Release|Win32
+		{37D9BA79-302E-4582-A545-CB5FF7982EA3}.nt.ActiveCfg = Release|Win32
+		{37D9BA79-302E-4582-A545-CB5FF7982EA3}.nt.Build.0 = Release|Win32
+		{37D9BA79-302E-4582-A545-CB5FF7982EA3}.pro.ActiveCfg = pro|Win32
+		{37D9BA79-302E-4582-A545-CB5FF7982EA3}.pro.Build.0 = pro|Win32
+		{37D9BA79-302E-4582-A545-CB5FF7982EA3}.pro nt.ActiveCfg = pro|Win32
+		{37D9BA79-302E-4582-A545-CB5FF7982EA3}.pro nt.Build.0 = pro|Win32
+		{37D9BA79-302E-4582-A545-CB5FF7982EA3}.Release.ActiveCfg = Release|Win32
+		{37D9BA79-302E-4582-A545-CB5FF7982EA3}.Release.Build.0 = Release|Win32
+		{89F24ECE-9953-40EF-BDF4-B41F5631E92B}.classic.ActiveCfg = classic|Win32
+		{89F24ECE-9953-40EF-BDF4-B41F5631E92B}.classic.Build.0 = classic|Win32
+		{89F24ECE-9953-40EF-BDF4-B41F5631E92B}.classic nt.ActiveCfg = classic|Win32
+		{89F24ECE-9953-40EF-BDF4-B41F5631E92B}.classic nt.Build.0 = classic|Win32
+		{89F24ECE-9953-40EF-BDF4-B41F5631E92B}.Debug.ActiveCfg = Debug|Win32
+		{89F24ECE-9953-40EF-BDF4-B41F5631E92B}.Debug.Build.0 = Debug|Win32
+		{89F24ECE-9953-40EF-BDF4-B41F5631E92B}.Embedded_Classic.ActiveCfg = classic|Win32
+		{89F24ECE-9953-40EF-BDF4-B41F5631E92B}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{89F24ECE-9953-40EF-BDF4-B41F5631E92B}.Embedded_Pro.ActiveCfg = classic|Win32
+		{89F24ECE-9953-40EF-BDF4-B41F5631E92B}.Embedded_Release.ActiveCfg = Release|Win32
+		{89F24ECE-9953-40EF-BDF4-B41F5631E92B}.Max.ActiveCfg = Release|Win32
+		{89F24ECE-9953-40EF-BDF4-B41F5631E92B}.Max.Build.0 = Release|Win32
+		{89F24ECE-9953-40EF-BDF4-B41F5631E92B}.Max nt.ActiveCfg = Release|Win32
+		{89F24ECE-9953-40EF-BDF4-B41F5631E92B}.Max nt.Build.0 = Release|Win32
+		{89F24ECE-9953-40EF-BDF4-B41F5631E92B}.nt.ActiveCfg = Release|Win32
+		{89F24ECE-9953-40EF-BDF4-B41F5631E92B}.nt.Build.0 = Release|Win32
+		{89F24ECE-9953-40EF-BDF4-B41F5631E92B}.pro.ActiveCfg = Release|Win32
+		{89F24ECE-9953-40EF-BDF4-B41F5631E92B}.pro.Build.0 = Release|Win32
+		{89F24ECE-9953-40EF-BDF4-B41F5631E92B}.pro nt.ActiveCfg = Release|Win32
+		{89F24ECE-9953-40EF-BDF4-B41F5631E92B}.pro nt.Build.0 = Release|Win32
+		{89F24ECE-9953-40EF-BDF4-B41F5631E92B}.Release.ActiveCfg = Release|Win32
+		{89F24ECE-9953-40EF-BDF4-B41F5631E92B}.Release.Build.0 = Release|Win32
+		{AD95DAD3-6DB9-4F8B-A345-7A39A83AAD3D}.classic.ActiveCfg = classic|Win32
+		{AD95DAD3-6DB9-4F8B-A345-7A39A83AAD3D}.classic.Build.0 = classic|Win32
+		{AD95DAD3-6DB9-4F8B-A345-7A39A83AAD3D}.classic nt.ActiveCfg = classic|Win32
+		{AD95DAD3-6DB9-4F8B-A345-7A39A83AAD3D}.classic nt.Build.0 = classic|Win32
+		{AD95DAD3-6DB9-4F8B-A345-7A39A83AAD3D}.Debug.ActiveCfg = Debug|Win32
+		{AD95DAD3-6DB9-4F8B-A345-7A39A83AAD3D}.Debug.Build.0 = Debug|Win32
+		{AD95DAD3-6DB9-4F8B-A345-7A39A83AAD3D}.Embedded_Classic.ActiveCfg = classic|Win32
+		{AD95DAD3-6DB9-4F8B-A345-7A39A83AAD3D}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{AD95DAD3-6DB9-4F8B-A345-7A39A83AAD3D}.Embedded_Pro.ActiveCfg = classic|Win32
+		{AD95DAD3-6DB9-4F8B-A345-7A39A83AAD3D}.Embedded_Release.ActiveCfg = Release|Win32
+		{AD95DAD3-6DB9-4F8B-A345-7A39A83AAD3D}.Max.ActiveCfg = Release|Win32
+		{AD95DAD3-6DB9-4F8B-A345-7A39A83AAD3D}.Max.Build.0 = Release|Win32
+		{AD95DAD3-6DB9-4F8B-A345-7A39A83AAD3D}.Max nt.ActiveCfg = Release|Win32
+		{AD95DAD3-6DB9-4F8B-A345-7A39A83AAD3D}.Max nt.Build.0 = Release|Win32
+		{AD95DAD3-6DB9-4F8B-A345-7A39A83AAD3D}.nt.ActiveCfg = Release|Win32
+		{AD95DAD3-6DB9-4F8B-A345-7A39A83AAD3D}.nt.Build.0 = Release|Win32
+		{AD95DAD3-6DB9-4F8B-A345-7A39A83AAD3D}.pro.ActiveCfg = Release|Win32
+		{AD95DAD3-6DB9-4F8B-A345-7A39A83AAD3D}.pro.Build.0 = Release|Win32
+		{AD95DAD3-6DB9-4F8B-A345-7A39A83AAD3D}.pro nt.ActiveCfg = Release|Win32
+		{AD95DAD3-6DB9-4F8B-A345-7A39A83AAD3D}.pro nt.Build.0 = Release|Win32
+		{AD95DAD3-6DB9-4F8B-A345-7A39A83AAD3D}.Release.ActiveCfg = Release|Win32
+		{AD95DAD3-6DB9-4F8B-A345-7A39A83AAD3D}.Release.Build.0 = Release|Win32
+		{94B86159-C581-42CD-825D-C69CBC237E5C}.classic.ActiveCfg = Release|Win32
+		{94B86159-C581-42CD-825D-C69CBC237E5C}.classic.Build.0 = Release|Win32
+		{94B86159-C581-42CD-825D-C69CBC237E5C}.classic nt.ActiveCfg = Release|Win32
+		{94B86159-C581-42CD-825D-C69CBC237E5C}.classic nt.Build.0 = Release|Win32
+		{94B86159-C581-42CD-825D-C69CBC237E5C}.Debug.ActiveCfg = Debug|Win32
+		{94B86159-C581-42CD-825D-C69CBC237E5C}.Debug.Build.0 = Debug|Win32
+		{94B86159-C581-42CD-825D-C69CBC237E5C}.Embedded_Classic.ActiveCfg = Release|Win32
+		{94B86159-C581-42CD-825D-C69CBC237E5C}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{94B86159-C581-42CD-825D-C69CBC237E5C}.Embedded_Pro.ActiveCfg = Release|Win32
+		{94B86159-C581-42CD-825D-C69CBC237E5C}.Embedded_Release.ActiveCfg = Release|Win32
+		{94B86159-C581-42CD-825D-C69CBC237E5C}.Max.ActiveCfg = Release|Win32
+		{94B86159-C581-42CD-825D-C69CBC237E5C}.Max.Build.0 = Release|Win32
+		{94B86159-C581-42CD-825D-C69CBC237E5C}.Max nt.ActiveCfg = Release|Win32
+		{94B86159-C581-42CD-825D-C69CBC237E5C}.Max nt.Build.0 = Release|Win32
+		{94B86159-C581-42CD-825D-C69CBC237E5C}.nt.ActiveCfg = Release|Win32
+		{94B86159-C581-42CD-825D-C69CBC237E5C}.nt.Build.0 = Release|Win32
+		{94B86159-C581-42CD-825D-C69CBC237E5C}.pro.ActiveCfg = Release|Win32
+		{94B86159-C581-42CD-825D-C69CBC237E5C}.pro.Build.0 = Release|Win32
+		{94B86159-C581-42CD-825D-C69CBC237E5C}.pro nt.ActiveCfg = Release|Win32
+		{94B86159-C581-42CD-825D-C69CBC237E5C}.pro nt.Build.0 = Release|Win32
+		{94B86159-C581-42CD-825D-C69CBC237E5C}.Release.ActiveCfg = Release|Win32
+		{94B86159-C581-42CD-825D-C69CBC237E5C}.Release.Build.0 = Release|Win32
+		{3737BFE2-EF25-464F-994D-BD28A9F84528}.classic.ActiveCfg = classic|Win32
+		{3737BFE2-EF25-464F-994D-BD28A9F84528}.classic.Build.0 = classic|Win32
+		{3737BFE2-EF25-464F-994D-BD28A9F84528}.classic nt.ActiveCfg = classic|Win32
+		{3737BFE2-EF25-464F-994D-BD28A9F84528}.classic nt.Build.0 = classic|Win32
+		{3737BFE2-EF25-464F-994D-BD28A9F84528}.Debug.ActiveCfg = Debug|Win32
+		{3737BFE2-EF25-464F-994D-BD28A9F84528}.Debug.Build.0 = Debug|Win32
+		{3737BFE2-EF25-464F-994D-BD28A9F84528}.Embedded_Classic.ActiveCfg = Debug|Win32
+		{3737BFE2-EF25-464F-994D-BD28A9F84528}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{3737BFE2-EF25-464F-994D-BD28A9F84528}.Embedded_Pro.ActiveCfg = Debug|Win32
+		{3737BFE2-EF25-464F-994D-BD28A9F84528}.Embedded_Release.ActiveCfg = Release|Win32
+		{3737BFE2-EF25-464F-994D-BD28A9F84528}.Max.ActiveCfg = Release|Win32
+		{3737BFE2-EF25-464F-994D-BD28A9F84528}.Max.Build.0 = Release|Win32
+		{3737BFE2-EF25-464F-994D-BD28A9F84528}.Max nt.ActiveCfg = Release|Win32
+		{3737BFE2-EF25-464F-994D-BD28A9F84528}.Max nt.Build.0 = Release|Win32
+		{3737BFE2-EF25-464F-994D-BD28A9F84528}.nt.ActiveCfg = Release|Win32
+		{3737BFE2-EF25-464F-994D-BD28A9F84528}.nt.Build.0 = Release|Win32
+		{3737BFE2-EF25-464F-994D-BD28A9F84528}.pro.ActiveCfg = Release|Win32
+		{3737BFE2-EF25-464F-994D-BD28A9F84528}.pro.Build.0 = Release|Win32
+		{3737BFE2-EF25-464F-994D-BD28A9F84528}.pro nt.ActiveCfg = Release|Win32
+		{3737BFE2-EF25-464F-994D-BD28A9F84528}.pro nt.Build.0 = Release|Win32
+		{3737BFE2-EF25-464F-994D-BD28A9F84528}.Release.ActiveCfg = Release|Win32
+		{3737BFE2-EF25-464F-994D-BD28A9F84528}.Release.Build.0 = Release|Win32
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}.classic.ActiveCfg = Release|Win32
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}.classic.Build.0 = Release|Win32
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}.classic nt.ActiveCfg = Release|Win32
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}.classic nt.Build.0 = Release|Win32
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}.Debug.ActiveCfg = Debug|Win32
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}.Debug.Build.0 = Debug|Win32
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}.Embedded_Classic.ActiveCfg = Release|Win32
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}.Embedded_Classic.Build.0 = Release|Win32
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}.Embedded_Debug.Build.0 = Debug|Win32
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}.Embedded_Pro.ActiveCfg = Release|Win32
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}.Embedded_Pro.Build.0 = Release|Win32
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}.Embedded_Release.ActiveCfg = Release|Win32
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}.Embedded_Release.Build.0 = Release|Win32
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}.Max.ActiveCfg = Release|Win32
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}.Max.Build.0 = Release|Win32
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}.Max nt.ActiveCfg = Release|Win32
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}.Max nt.Build.0 = Release|Win32
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}.nt.ActiveCfg = Release|Win32
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}.nt.Build.0 = Release|Win32
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}.pro.ActiveCfg = Release|Win32
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}.pro.Build.0 = Release|Win32
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}.pro nt.ActiveCfg = Release|Win32
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}.pro nt.Build.0 = Release|Win32
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}.Release.ActiveCfg = Release|Win32
+		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}.Release.Build.0 = Release|Win32
+		{DB28DE80-837F-4497-9AA9-CC0A20584C98}.classic.ActiveCfg = Release|Win32
+		{DB28DE80-837F-4497-9AA9-CC0A20584C98}.classic.Build.0 = Release|Win32
+		{DB28DE80-837F-4497-9AA9-CC0A20584C98}.classic nt.ActiveCfg = Release|Win32
+		{DB28DE80-837F-4497-9AA9-CC0A20584C98}.classic nt.Build.0 = Release|Win32
+		{DB28DE80-837F-4497-9AA9-CC0A20584C98}.Debug.ActiveCfg = Debug|Win32
+		{DB28DE80-837F-4497-9AA9-CC0A20584C98}.Debug.Build.0 = Debug|Win32
+		{DB28DE80-837F-4497-9AA9-CC0A20584C98}.Embedded_Classic.ActiveCfg = Release|Win32
+		{DB28DE80-837F-4497-9AA9-CC0A20584C98}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{DB28DE80-837F-4497-9AA9-CC0A20584C98}.Embedded_Pro.ActiveCfg = Release|Win32
+		{DB28DE80-837F-4497-9AA9-CC0A20584C98}.Embedded_Release.ActiveCfg = Release|Win32
+		{DB28DE80-837F-4497-9AA9-CC0A20584C98}.Max.ActiveCfg = Release|Win32
+		{DB28DE80-837F-4497-9AA9-CC0A20584C98}.Max.Build.0 = Release|Win32
+		{DB28DE80-837F-4497-9AA9-CC0A20584C98}.Max nt.ActiveCfg = Release|Win32
+		{DB28DE80-837F-4497-9AA9-CC0A20584C98}.Max nt.Build.0 = Release|Win32
+		{DB28DE80-837F-4497-9AA9-CC0A20584C98}.nt.ActiveCfg = Release|Win32
+		{DB28DE80-837F-4497-9AA9-CC0A20584C98}.nt.Build.0 = Release|Win32
+		{DB28DE80-837F-4497-9AA9-CC0A20584C98}.pro.ActiveCfg = Release|Win32
+		{DB28DE80-837F-4497-9AA9-CC0A20584C98}.pro.Build.0 = Release|Win32
+		{DB28DE80-837F-4497-9AA9-CC0A20584C98}.pro nt.ActiveCfg = Release|Win32
+		{DB28DE80-837F-4497-9AA9-CC0A20584C98}.pro nt.Build.0 = Release|Win32
+		{DB28DE80-837F-4497-9AA9-CC0A20584C98}.Release.ActiveCfg = Release|Win32
+		{DB28DE80-837F-4497-9AA9-CC0A20584C98}.Release.Build.0 = Release|Win32
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.classic.ActiveCfg = TLS|Win32
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.classic.Build.0 = TLS|Win32
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.classic nt.ActiveCfg = Release|Win32
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.classic nt.Build.0 = Release|Win32
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.Debug.ActiveCfg = Debug|Win32
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.Debug.Build.0 = Debug|Win32
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.Embedded_Classic.ActiveCfg = TLS|Win32
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.Embedded_Classic.Build.0 = TLS|Win32
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.Embedded_Debug.ActiveCfg = TLS_DEBUG|Win32
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.Embedded_Debug.Build.0 = TLS_DEBUG|Win32
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.Embedded_Pro.ActiveCfg = TLS|Win32
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.Embedded_Pro.Build.0 = TLS|Win32
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.Embedded_Release.ActiveCfg = TLS|Win32
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.Embedded_Release.Build.0 = TLS|Win32
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.Max.ActiveCfg = Max|Win32
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.Max.Build.0 = Max|Win32
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.Max nt.ActiveCfg = Max|Win32
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.Max nt.Build.0 = Max|Win32
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.nt.ActiveCfg = Release|Win32
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.nt.Build.0 = Release|Win32
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.pro.ActiveCfg = Release|Win32
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.pro.Build.0 = Release|Win32
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.pro nt.ActiveCfg = Release|Win32
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.pro nt.Build.0 = Release|Win32
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.Release.ActiveCfg = Release|Win32
+		{44D9C7DC-6636-4B82-BD01-6876C64017DF}.Release.Build.0 = Release|Win32
+		{AC47623D-933C-4A80-83BB-B6AF7CB28B4B}.classic.ActiveCfg = classic|Win32
+		{AC47623D-933C-4A80-83BB-B6AF7CB28B4B}.classic.Build.0 = classic|Win32
+		{AC47623D-933C-4A80-83BB-B6AF7CB28B4B}.classic nt.ActiveCfg = classic|Win32
+		{AC47623D-933C-4A80-83BB-B6AF7CB28B4B}.classic nt.Build.0 = classic|Win32
+		{AC47623D-933C-4A80-83BB-B6AF7CB28B4B}.Debug.ActiveCfg = Debug|Win32
+		{AC47623D-933C-4A80-83BB-B6AF7CB28B4B}.Debug.Build.0 = Debug|Win32
+		{AC47623D-933C-4A80-83BB-B6AF7CB28B4B}.Embedded_Classic.ActiveCfg = Debug|Win32
+		{AC47623D-933C-4A80-83BB-B6AF7CB28B4B}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{AC47623D-933C-4A80-83BB-B6AF7CB28B4B}.Embedded_Pro.ActiveCfg = Debug|Win32
+		{AC47623D-933C-4A80-83BB-B6AF7CB28B4B}.Embedded_Release.ActiveCfg = Release|Win32
+		{AC47623D-933C-4A80-83BB-B6AF7CB28B4B}.Max.ActiveCfg = Release|Win32
+		{AC47623D-933C-4A80-83BB-B6AF7CB28B4B}.Max.Build.0 = Release|Win32
+		{AC47623D-933C-4A80-83BB-B6AF7CB28B4B}.Max nt.ActiveCfg = Release|Win32
+		{AC47623D-933C-4A80-83BB-B6AF7CB28B4B}.Max nt.Build.0 = Release|Win32
+		{AC47623D-933C-4A80-83BB-B6AF7CB28B4B}.nt.ActiveCfg = Release|Win32
+		{AC47623D-933C-4A80-83BB-B6AF7CB28B4B}.nt.Build.0 = Release|Win32
+		{AC47623D-933C-4A80-83BB-B6AF7CB28B4B}.pro.ActiveCfg = Release|Win32
+		{AC47623D-933C-4A80-83BB-B6AF7CB28B4B}.pro.Build.0 = Release|Win32
+		{AC47623D-933C-4A80-83BB-B6AF7CB28B4B}.pro nt.ActiveCfg = Release|Win32
+		{AC47623D-933C-4A80-83BB-B6AF7CB28B4B}.pro nt.Build.0 = Release|Win32
+		{AC47623D-933C-4A80-83BB-B6AF7CB28B4B}.Release.ActiveCfg = Release|Win32
+		{AC47623D-933C-4A80-83BB-B6AF7CB28B4B}.Release.Build.0 = Release|Win32
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113}.classic.ActiveCfg = Release|Win32
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113}.classic.Build.0 = Release|Win32
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113}.classic nt.ActiveCfg = Release|Win32
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113}.classic nt.Build.0 = Release|Win32
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113}.Debug.ActiveCfg = Debug|Win32
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113}.Debug.Build.0 = Debug|Win32
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113}.Embedded_Classic.ActiveCfg = Release|Win32
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113}.Embedded_Classic.Build.0 = Release|Win32
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113}.Embedded_Debug.Build.0 = Debug|Win32
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113}.Embedded_Pro.ActiveCfg = Release|Win32
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113}.Embedded_Pro.Build.0 = Release|Win32
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113}.Embedded_Release.ActiveCfg = Release|Win32
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113}.Embedded_Release.Build.0 = Release|Win32
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113}.Max.ActiveCfg = Release|Win32
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113}.Max.Build.0 = Release|Win32
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113}.Max nt.ActiveCfg = Release|Win32
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113}.Max nt.Build.0 = Release|Win32
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113}.nt.ActiveCfg = Release|Win32
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113}.nt.Build.0 = Release|Win32
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113}.pro.ActiveCfg = Release|Win32
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113}.pro.Build.0 = Release|Win32
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113}.pro nt.ActiveCfg = Release|Win32
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113}.pro nt.Build.0 = Release|Win32
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113}.Release.ActiveCfg = Release|Win32
+		{207E9014-C4D1-4F6D-B76F-BC7DD7E31113}.Release.Build.0 = Release|Win32
+		{16699B52-ECC6-4A96-A99F-A043059BA2E7}.classic.ActiveCfg = classic|Win32
+		{16699B52-ECC6-4A96-A99F-A043059BA2E7}.classic.Build.0 = classic|Win32
+		{16699B52-ECC6-4A96-A99F-A043059BA2E7}.classic nt.ActiveCfg = classic|Win32
+		{16699B52-ECC6-4A96-A99F-A043059BA2E7}.classic nt.Build.0 = classic|Win32
+		{16699B52-ECC6-4A96-A99F-A043059BA2E7}.Debug.ActiveCfg = Debug|Win32
+		{16699B52-ECC6-4A96-A99F-A043059BA2E7}.Debug.Build.0 = Debug|Win32
+		{16699B52-ECC6-4A96-A99F-A043059BA2E7}.Embedded_Classic.ActiveCfg = classic|Win32
+		{16699B52-ECC6-4A96-A99F-A043059BA2E7}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{16699B52-ECC6-4A96-A99F-A043059BA2E7}.Embedded_Pro.ActiveCfg = classic|Win32
+		{16699B52-ECC6-4A96-A99F-A043059BA2E7}.Embedded_Release.ActiveCfg = Release|Win32
+		{16699B52-ECC6-4A96-A99F-A043059BA2E7}.Max.ActiveCfg = Release|Win32
+		{16699B52-ECC6-4A96-A99F-A043059BA2E7}.Max.Build.0 = Release|Win32
+		{16699B52-ECC6-4A96-A99F-A043059BA2E7}.Max nt.ActiveCfg = Release|Win32
+		{16699B52-ECC6-4A96-A99F-A043059BA2E7}.Max nt.Build.0 = Release|Win32
+		{16699B52-ECC6-4A96-A99F-A043059BA2E7}.nt.ActiveCfg = Release|Win32
+		{16699B52-ECC6-4A96-A99F-A043059BA2E7}.nt.Build.0 = Release|Win32
+		{16699B52-ECC6-4A96-A99F-A043059BA2E7}.pro.ActiveCfg = Release|Win32
+		{16699B52-ECC6-4A96-A99F-A043059BA2E7}.pro.Build.0 = Release|Win32
+		{16699B52-ECC6-4A96-A99F-A043059BA2E7}.pro nt.ActiveCfg = Release|Win32
+		{16699B52-ECC6-4A96-A99F-A043059BA2E7}.pro nt.Build.0 = Release|Win32
+		{16699B52-ECC6-4A96-A99F-A043059BA2E7}.Release.ActiveCfg = Release|Win32
+		{16699B52-ECC6-4A96-A99F-A043059BA2E7}.Release.Build.0 = Release|Win32
+		{EEC1300B-85A5-497C-B3E1-F708021DF859}.classic.ActiveCfg = Debug|Win32
+		{EEC1300B-85A5-497C-B3E1-F708021DF859}.classic.Build.0 = Debug|Win32
+		{EEC1300B-85A5-497C-B3E1-F708021DF859}.classic nt.ActiveCfg = Release|Win32
+		{EEC1300B-85A5-497C-B3E1-F708021DF859}.classic nt.Build.0 = Release|Win32
+		{EEC1300B-85A5-497C-B3E1-F708021DF859}.Debug.ActiveCfg = Debug|Win32
+		{EEC1300B-85A5-497C-B3E1-F708021DF859}.Debug.Build.0 = Debug|Win32
+		{EEC1300B-85A5-497C-B3E1-F708021DF859}.Embedded_Classic.ActiveCfg = Debug|Win32
+		{EEC1300B-85A5-497C-B3E1-F708021DF859}.Embedded_Classic.Build.0 = Debug|Win32
+		{EEC1300B-85A5-497C-B3E1-F708021DF859}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{EEC1300B-85A5-497C-B3E1-F708021DF859}.Embedded_Debug.Build.0 = Debug|Win32
+		{EEC1300B-85A5-497C-B3E1-F708021DF859}.Embedded_Pro.ActiveCfg = Release|Win32
+		{EEC1300B-85A5-497C-B3E1-F708021DF859}.Embedded_Pro.Build.0 = Release|Win32
+		{EEC1300B-85A5-497C-B3E1-F708021DF859}.Embedded_Release.ActiveCfg = Release|Win32
+		{EEC1300B-85A5-497C-B3E1-F708021DF859}.Embedded_Release.Build.0 = Release|Win32
+		{EEC1300B-85A5-497C-B3E1-F708021DF859}.Max.ActiveCfg = Release|Win32
+		{EEC1300B-85A5-497C-B3E1-F708021DF859}.Max.Build.0 = Release|Win32
+		{EEC1300B-85A5-497C-B3E1-F708021DF859}.Max nt.ActiveCfg = Release|Win32
+		{EEC1300B-85A5-497C-B3E1-F708021DF859}.Max nt.Build.0 = Release|Win32
+		{EEC1300B-85A5-497C-B3E1-F708021DF859}.nt.ActiveCfg = Release|Win32
+		{EEC1300B-85A5-497C-B3E1-F708021DF859}.nt.Build.0 = Release|Win32
+		{EEC1300B-85A5-497C-B3E1-F708021DF859}.pro.ActiveCfg = Release|Win32
+		{EEC1300B-85A5-497C-B3E1-F708021DF859}.pro.Build.0 = Release|Win32
+		{EEC1300B-85A5-497C-B3E1-F708021DF859}.pro nt.ActiveCfg = Release|Win32
+		{EEC1300B-85A5-497C-B3E1-F708021DF859}.pro nt.Build.0 = Release|Win32
+		{EEC1300B-85A5-497C-B3E1-F708021DF859}.Release.ActiveCfg = Release|Win32
+		{EEC1300B-85A5-497C-B3E1-F708021DF859}.Release.Build.0 = Release|Win32
+		{8CB5AB80-05DA-49DA-BC9F-EAC20667E0D0}.classic.ActiveCfg = Debug|Win32
+		{8CB5AB80-05DA-49DA-BC9F-EAC20667E0D0}.classic.Build.0 = Debug|Win32
+		{8CB5AB80-05DA-49DA-BC9F-EAC20667E0D0}.classic nt.ActiveCfg = Debug|Win32
+		{8CB5AB80-05DA-49DA-BC9F-EAC20667E0D0}.Debug.ActiveCfg = Debug|Win32
+		{8CB5AB80-05DA-49DA-BC9F-EAC20667E0D0}.Debug.Build.0 = Debug|Win32
+		{8CB5AB80-05DA-49DA-BC9F-EAC20667E0D0}.Embedded_Classic.ActiveCfg = Debug|Win32
+		{8CB5AB80-05DA-49DA-BC9F-EAC20667E0D0}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{8CB5AB80-05DA-49DA-BC9F-EAC20667E0D0}.Embedded_Pro.ActiveCfg = Debug|Win32
+		{8CB5AB80-05DA-49DA-BC9F-EAC20667E0D0}.Embedded_Release.ActiveCfg = Release|Win32
+		{8CB5AB80-05DA-49DA-BC9F-EAC20667E0D0}.Max.ActiveCfg = Release|Win32
+		{8CB5AB80-05DA-49DA-BC9F-EAC20667E0D0}.Max nt.ActiveCfg = Debug|Win32
+		{8CB5AB80-05DA-49DA-BC9F-EAC20667E0D0}.nt.ActiveCfg = Debug|Win32
+		{8CB5AB80-05DA-49DA-BC9F-EAC20667E0D0}.pro.ActiveCfg = Debug|Win32
+		{8CB5AB80-05DA-49DA-BC9F-EAC20667E0D0}.pro nt.ActiveCfg = Debug|Win32
+		{8CB5AB80-05DA-49DA-BC9F-EAC20667E0D0}.Release.ActiveCfg = Release|Win32
+		{8CB5AB80-05DA-49DA-BC9F-EAC20667E0D0}.Release.Build.0 = Release|Win32
+		{6F01B69C-B1A5-4C45-B3A9-744E1EB0BED5}.classic.ActiveCfg = Release|Win32
+		{6F01B69C-B1A5-4C45-B3A9-744E1EB0BED5}.classic.Build.0 = Release|Win32
+		{6F01B69C-B1A5-4C45-B3A9-744E1EB0BED5}.classic nt.ActiveCfg = Release|Win32
+		{6F01B69C-B1A5-4C45-B3A9-744E1EB0BED5}.Debug.ActiveCfg = Release|Win32
+		{6F01B69C-B1A5-4C45-B3A9-744E1EB0BED5}.Embedded_Classic.ActiveCfg = Release|Win32
+		{6F01B69C-B1A5-4C45-B3A9-744E1EB0BED5}.Embedded_Debug.ActiveCfg = Release|Win32
+		{6F01B69C-B1A5-4C45-B3A9-744E1EB0BED5}.Embedded_Pro.ActiveCfg = Release|Win32
+		{6F01B69C-B1A5-4C45-B3A9-744E1EB0BED5}.Embedded_Release.ActiveCfg = Release|Win32
+		{6F01B69C-B1A5-4C45-B3A9-744E1EB0BED5}.Max.ActiveCfg = Release|Win32
+		{6F01B69C-B1A5-4C45-B3A9-744E1EB0BED5}.Max nt.ActiveCfg = Release|Win32
+		{6F01B69C-B1A5-4C45-B3A9-744E1EB0BED5}.Max nt.Build.0 = Release|Win32
+		{6F01B69C-B1A5-4C45-B3A9-744E1EB0BED5}.nt.ActiveCfg = Release|Win32
+		{6F01B69C-B1A5-4C45-B3A9-744E1EB0BED5}.pro.ActiveCfg = Release|Win32
+		{6F01B69C-B1A5-4C45-B3A9-744E1EB0BED5}.pro nt.ActiveCfg = Release|Win32
+		{6F01B69C-B1A5-4C45-B3A9-744E1EB0BED5}.Release.ActiveCfg = Release|Win32
+		{6F01B69C-B1A5-4C45-B3A9-744E1EB0BED5}.Release.Build.0 = Release|Win32
+		{7FFA3009-E0E1-4E4E-9CDF-F408AA108CC8}.classic.ActiveCfg = Release|Win32
+		{7FFA3009-E0E1-4E4E-9CDF-F408AA108CC8}.classic.Build.0 = Release|Win32
+		{7FFA3009-E0E1-4E4E-9CDF-F408AA108CC8}.classic nt.ActiveCfg = Release|Win32
+		{7FFA3009-E0E1-4E4E-9CDF-F408AA108CC8}.classic nt.Build.0 = Release|Win32
+		{7FFA3009-E0E1-4E4E-9CDF-F408AA108CC8}.Debug.ActiveCfg = Debug|Win32
+		{7FFA3009-E0E1-4E4E-9CDF-F408AA108CC8}.Debug.Build.0 = Debug|Win32
+		{7FFA3009-E0E1-4E4E-9CDF-F408AA108CC8}.Embedded_Classic.ActiveCfg = Release|Win32
+		{7FFA3009-E0E1-4E4E-9CDF-F408AA108CC8}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{7FFA3009-E0E1-4E4E-9CDF-F408AA108CC8}.Embedded_Pro.ActiveCfg = Release|Win32
+		{7FFA3009-E0E1-4E4E-9CDF-F408AA108CC8}.Embedded_Release.ActiveCfg = Release|Win32
+		{7FFA3009-E0E1-4E4E-9CDF-F408AA108CC8}.Max.ActiveCfg = Release|Win32
+		{7FFA3009-E0E1-4E4E-9CDF-F408AA108CC8}.Max.Build.0 = Release|Win32
+		{7FFA3009-E0E1-4E4E-9CDF-F408AA108CC8}.Max nt.ActiveCfg = Release|Win32
+		{7FFA3009-E0E1-4E4E-9CDF-F408AA108CC8}.Max nt.Build.0 = Release|Win32
+		{7FFA3009-E0E1-4E4E-9CDF-F408AA108CC8}.nt.ActiveCfg = Release|Win32
+		{7FFA3009-E0E1-4E4E-9CDF-F408AA108CC8}.nt.Build.0 = Release|Win32
+		{7FFA3009-E0E1-4E4E-9CDF-F408AA108CC8}.pro.ActiveCfg = Release|Win32
+		{7FFA3009-E0E1-4E4E-9CDF-F408AA108CC8}.pro.Build.0 = Release|Win32
+		{7FFA3009-E0E1-4E4E-9CDF-F408AA108CC8}.pro nt.ActiveCfg = Release|Win32
+		{7FFA3009-E0E1-4E4E-9CDF-F408AA108CC8}.pro nt.Build.0 = Release|Win32
+		{7FFA3009-E0E1-4E4E-9CDF-F408AA108CC8}.Release.ActiveCfg = Release|Win32
+		{7FFA3009-E0E1-4E4E-9CDF-F408AA108CC8}.Release.Build.0 = Release|Win32
+		{F74653C4-8003-4A79-8F53-FC69E0AD7A9B}.classic.ActiveCfg = Debug|Win32
+		{F74653C4-8003-4A79-8F53-FC69E0AD7A9B}.classic.Build.0 = Debug|Win32
+		{F74653C4-8003-4A79-8F53-FC69E0AD7A9B}.classic nt.ActiveCfg = Release|Win32
+		{F74653C4-8003-4A79-8F53-FC69E0AD7A9B}.classic nt.Build.0 = Release|Win32
+		{F74653C4-8003-4A79-8F53-FC69E0AD7A9B}.Debug.ActiveCfg = Debug|Win32
+		{F74653C4-8003-4A79-8F53-FC69E0AD7A9B}.Debug.Build.0 = Debug|Win32
+		{F74653C4-8003-4A79-8F53-FC69E0AD7A9B}.Embedded_Classic.ActiveCfg = Debug|Win32
+		{F74653C4-8003-4A79-8F53-FC69E0AD7A9B}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{F74653C4-8003-4A79-8F53-FC69E0AD7A9B}.Embedded_Pro.ActiveCfg = Debug|Win32
+		{F74653C4-8003-4A79-8F53-FC69E0AD7A9B}.Embedded_Release.ActiveCfg = Release|Win32
+		{F74653C4-8003-4A79-8F53-FC69E0AD7A9B}.Max.ActiveCfg = Release|Win32
+		{F74653C4-8003-4A79-8F53-FC69E0AD7A9B}.Max.Build.0 = Release|Win32
+		{F74653C4-8003-4A79-8F53-FC69E0AD7A9B}.Max nt.ActiveCfg = Release|Win32
+		{F74653C4-8003-4A79-8F53-FC69E0AD7A9B}.Max nt.Build.0 = Release|Win32
+		{F74653C4-8003-4A79-8F53-FC69E0AD7A9B}.nt.ActiveCfg = Release|Win32
+		{F74653C4-8003-4A79-8F53-FC69E0AD7A9B}.nt.Build.0 = Release|Win32
+		{F74653C4-8003-4A79-8F53-FC69E0AD7A9B}.pro.ActiveCfg = Release|Win32
+		{F74653C4-8003-4A79-8F53-FC69E0AD7A9B}.pro.Build.0 = Release|Win32
+		{F74653C4-8003-4A79-8F53-FC69E0AD7A9B}.pro nt.ActiveCfg = Release|Win32
+		{F74653C4-8003-4A79-8F53-FC69E0AD7A9B}.pro nt.Build.0 = Release|Win32
+		{F74653C4-8003-4A79-8F53-FC69E0AD7A9B}.Release.ActiveCfg = Release|Win32
+		{F74653C4-8003-4A79-8F53-FC69E0AD7A9B}.Release.Build.0 = Release|Win32
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF}.classic.ActiveCfg = Release|Win32
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF}.classic.Build.0 = Release|Win32
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF}.classic nt.ActiveCfg = Release|Win32
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF}.classic nt.Build.0 = Release|Win32
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF}.Debug.ActiveCfg = Debug|Win32
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF}.Debug.Build.0 = Debug|Win32
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF}.Embedded_Classic.ActiveCfg = Release|Win32
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF}.Embedded_Classic.Build.0 = Release|Win32
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF}.Embedded_Pro.ActiveCfg = Release|Win32
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF}.Embedded_Pro.Build.0 = Release|Win32
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF}.Embedded_Release.ActiveCfg = Release|Win32
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF}.Embedded_Release.Build.0 = Release|Win32
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF}.Max.ActiveCfg = Release|Win32
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF}.Max.Build.0 = Release|Win32
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF}.Max nt.ActiveCfg = Release|Win32
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF}.Max nt.Build.0 = Release|Win32
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF}.nt.ActiveCfg = Release|Win32
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF}.nt.Build.0 = Release|Win32
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF}.pro.ActiveCfg = Release|Win32
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF}.pro.Build.0 = Release|Win32
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF}.pro nt.ActiveCfg = Release|Win32
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF}.pro nt.Build.0 = Release|Win32
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF}.Release.ActiveCfg = Release|Win32
+		{8762A9B8-72A9-462E-A9A2-F3265081F8AF}.Release.Build.0 = Release|Win32
+		{8961F149-C68A-4154-A499-A2AB39E607E8}.classic.ActiveCfg = classic|Win32
+		{8961F149-C68A-4154-A499-A2AB39E607E8}.classic.Build.0 = classic|Win32
+		{8961F149-C68A-4154-A499-A2AB39E607E8}.classic nt.ActiveCfg = classic|Win32
+		{8961F149-C68A-4154-A499-A2AB39E607E8}.classic nt.Build.0 = classic|Win32
+		{8961F149-C68A-4154-A499-A2AB39E607E8}.Debug.ActiveCfg = Debug|Win32
+		{8961F149-C68A-4154-A499-A2AB39E607E8}.Debug.Build.0 = Debug|Win32
+		{8961F149-C68A-4154-A499-A2AB39E607E8}.Embedded_Classic.ActiveCfg = Debug|Win32
+		{8961F149-C68A-4154-A499-A2AB39E607E8}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{8961F149-C68A-4154-A499-A2AB39E607E8}.Embedded_Pro.ActiveCfg = Debug|Win32
+		{8961F149-C68A-4154-A499-A2AB39E607E8}.Embedded_Release.ActiveCfg = Release|Win32
+		{8961F149-C68A-4154-A499-A2AB39E607E8}.Max.ActiveCfg = Release|Win32
+		{8961F149-C68A-4154-A499-A2AB39E607E8}.Max.Build.0 = Release|Win32
+		{8961F149-C68A-4154-A499-A2AB39E607E8}.Max nt.ActiveCfg = Release|Win32
+		{8961F149-C68A-4154-A499-A2AB39E607E8}.Max nt.Build.0 = Release|Win32
+		{8961F149-C68A-4154-A499-A2AB39E607E8}.nt.ActiveCfg = Release|Win32
+		{8961F149-C68A-4154-A499-A2AB39E607E8}.nt.Build.0 = Release|Win32
+		{8961F149-C68A-4154-A499-A2AB39E607E8}.pro.ActiveCfg = Release|Win32
+		{8961F149-C68A-4154-A499-A2AB39E607E8}.pro.Build.0 = Release|Win32
+		{8961F149-C68A-4154-A499-A2AB39E607E8}.pro nt.ActiveCfg = Release|Win32
+		{8961F149-C68A-4154-A499-A2AB39E607E8}.pro nt.Build.0 = Release|Win32
+		{8961F149-C68A-4154-A499-A2AB39E607E8}.Release.ActiveCfg = Release|Win32
+		{8961F149-C68A-4154-A499-A2AB39E607E8}.Release.Build.0 = Release|Win32
+		{DA224DAB-5006-42BE-BB77-16E8BE5326D5}.classic.ActiveCfg = Debug|Win32
+		{DA224DAB-5006-42BE-BB77-16E8BE5326D5}.classic.Build.0 = Debug|Win32
+		{DA224DAB-5006-42BE-BB77-16E8BE5326D5}.classic nt.ActiveCfg = Release|Win32
+		{DA224DAB-5006-42BE-BB77-16E8BE5326D5}.classic nt.Build.0 = Release|Win32
+		{DA224DAB-5006-42BE-BB77-16E8BE5326D5}.Debug.ActiveCfg = Debug|Win32
+		{DA224DAB-5006-42BE-BB77-16E8BE5326D5}.Debug.Build.0 = Debug|Win32
+		{DA224DAB-5006-42BE-BB77-16E8BE5326D5}.Embedded_Classic.ActiveCfg = Debug|Win32
+		{DA224DAB-5006-42BE-BB77-16E8BE5326D5}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{DA224DAB-5006-42BE-BB77-16E8BE5326D5}.Embedded_Pro.ActiveCfg = Debug|Win32
+		{DA224DAB-5006-42BE-BB77-16E8BE5326D5}.Embedded_Release.ActiveCfg = Release|Win32
+		{DA224DAB-5006-42BE-BB77-16E8BE5326D5}.Max.ActiveCfg = Release|Win32
+		{DA224DAB-5006-42BE-BB77-16E8BE5326D5}.Max.Build.0 = Release|Win32
+		{DA224DAB-5006-42BE-BB77-16E8BE5326D5}.Max nt.ActiveCfg = Release|Win32
+		{DA224DAB-5006-42BE-BB77-16E8BE5326D5}.Max nt.Build.0 = Release|Win32
+		{DA224DAB-5006-42BE-BB77-16E8BE5326D5}.nt.ActiveCfg = Release|Win32
+		{DA224DAB-5006-42BE-BB77-16E8BE5326D5}.nt.Build.0 = Release|Win32
+		{DA224DAB-5006-42BE-BB77-16E8BE5326D5}.pro.ActiveCfg = Release|Win32
+		{DA224DAB-5006-42BE-BB77-16E8BE5326D5}.pro.Build.0 = Release|Win32
+		{DA224DAB-5006-42BE-BB77-16E8BE5326D5}.pro nt.ActiveCfg = Release|Win32
+		{DA224DAB-5006-42BE-BB77-16E8BE5326D5}.pro nt.Build.0 = Release|Win32
+		{DA224DAB-5006-42BE-BB77-16E8BE5326D5}.Release.ActiveCfg = Release|Win32
+		{DA224DAB-5006-42BE-BB77-16E8BE5326D5}.Release.Build.0 = Release|Win32
+		{6189F838-21C6-42A1-B2D0-9146316573F7}.classic.ActiveCfg = Release|Win32
+		{6189F838-21C6-42A1-B2D0-9146316573F7}.classic.Build.0 = Release|Win32
+		{6189F838-21C6-42A1-B2D0-9146316573F7}.classic nt.ActiveCfg = Release|Win32
+		{6189F838-21C6-42A1-B2D0-9146316573F7}.classic nt.Build.0 = Release|Win32
+		{6189F838-21C6-42A1-B2D0-9146316573F7}.Debug.ActiveCfg = Debug|Win32
+		{6189F838-21C6-42A1-B2D0-9146316573F7}.Debug.Build.0 = Debug|Win32
+		{6189F838-21C6-42A1-B2D0-9146316573F7}.Embedded_Classic.ActiveCfg = Release|Win32
+		{6189F838-21C6-42A1-B2D0-9146316573F7}.Embedded_Debug.ActiveCfg = Debug|Win32
+		{6189F838-21C6-42A1-B2D0-9146316573F7}.Embedded_Pro.ActiveCfg = Release|Win32
+		{6189F838-21C6-42A1-B2D0-9146316573F7}.Embedded_Release.ActiveCfg = Release|Win32
+		{6189F838-21C6-42A1-B2D0-9146316573F7}.Max.ActiveCfg = Release|Win32
+		{6189F838-21C6-42A1-B2D0-9146316573F7}.Max.Build.0 = Release|Win32
+		{6189F838-21C6-42A1-B2D0-9146316573F7}.Max nt.ActiveCfg = Release|Win32
+		{6189F838-21C6-42A1-B2D0-9146316573F7}.Max nt.Build.0 = Release|Win32
+		{6189F838-21C6-42A1-B2D0-9146316573F7}.nt.ActiveCfg = Release|Win32
+		{6189F838-21C6-42A1-B2D0-9146316573F7}.nt.Build.0 = Release|Win32
+		{6189F838-21C6-42A1-B2D0-9146316573F7}.pro.ActiveCfg = Release|Win32
+		{6189F838-21C6-42A1-B2D0-9146316573F7}.pro.Build.0 = Release|Win32
+		{6189F838-21C6-42A1-B2D0-9146316573F7}.pro nt.ActiveCfg = Release|Win32
+		{6189F838-21C6-42A1-B2D0-9146316573F7}.pro nt.Build.0 = Release|Win32
+		{6189F838-21C6-42A1-B2D0-9146316573F7}.Release.ActiveCfg = Release|Win32
+		{6189F838-21C6-42A1-B2D0-9146316573F7}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/VC++Files/mysqlbinlog/mysqlbinlog.vcproj b/VC++Files/mysqlbinlog/mysqlbinlog.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..9d5d4db2565a9ca0a56aa9f6552cbf3867a63d42
--- /dev/null
+++ b/VC++Files/mysqlbinlog/mysqlbinlog.vcproj
@@ -0,0 +1,271 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="mysqlbinlog"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Debug"
+			IntermediateDirectory=".\Debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../,../sql"
+				PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_CONSOLE;_WINDOWS;MYSQL_SERVER"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\Debug/mysqlbinlog.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib"
+				OutputFile="../client_debug/mysqlbinlog.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\Debug/mysqlbinlog.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\Debug/mysqlbinlog.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="classic|Win32"
+			OutputDirectory=".\classic"
+			IntermediateDirectory=".\classic"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../,../sql"
+				PreprocessorDefinitions="MYSQL_SERVER;_CONSOLE;_WINDOWS;LICENSE=Commercial;DBUG_OFF;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\classic/mysqlbinlog.pch"
+				AssemblerListingLocation=".\classic/"
+				ObjectFile=".\classic/"
+				ProgramDataBaseFileName=".\classic/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib"
+				OutputFile="../client_classic/mysqlbinlog.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				ProgramDatabaseFile=".\classic/mysqlbinlog.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\classic/mysqlbinlog.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\eelease"
+			IntermediateDirectory=".\eelease"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../,../sql"
+				PreprocessorDefinitions="DBUG_OFF;_CONSOLE;_WINDOWS;MYSQL_SERVER;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\eelease/mysqlbinlog.pch"
+				AssemblerListingLocation=".\eelease/"
+				ObjectFile=".\eelease/"
+				ProgramDataBaseFileName=".\eelease/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib"
+				OutputFile="../client_release/mysqlbinlog.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				ProgramDatabaseFile=".\eelease/mysqlbinlog.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\eelease/mysqlbinlog.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="..\mysys\mf_tempdir.c">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="classic|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\client\mysqlbinlog.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="classic|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/mysqlcheck/mysqlcheck.vcproj b/VC++Files/mysqlcheck/mysqlcheck.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..f47e171fd6555a91b60837406a9a500544b84521
--- /dev/null
+++ b/VC++Files/mysqlcheck/mysqlcheck.vcproj
@@ -0,0 +1,244 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="mysqlcheck"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="classic|Win32"
+			OutputDirectory=".\classic"
+			IntermediateDirectory=".\classic"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../"
+				PreprocessorDefinitions="MYSQL_SERVER;_CONSOLE;_WINDOWS;LICENSE=Commercial;DBUG_OFF;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\classic/mysqlcheck.pch"
+				AssemblerListingLocation=".\classic/"
+				ObjectFile=".\classic/"
+				ProgramDataBaseFileName=".\classic/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib"
+				OutputFile="../client_classic/mysqlcheck.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				ProgramDatabaseFile=".\classic/mysqlcheck.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\classic/mysqlcheck.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../"
+				PreprocessorDefinitions="DBUG_OFF;_CONSOLE;_WINDOWS;MYSQL_SERVER;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/mysqlcheck.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib"
+				OutputFile="../client_release/mysqlcheck.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				ProgramDatabaseFile=".\Release/mysqlcheck.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\Release/mysqlcheck.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Debug"
+			IntermediateDirectory=".\Debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../"
+				PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_CONSOLE;_WINDOWS;MYSQL_SERVER"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\Debug/mysqlcheck.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib"
+				OutputFile="../client_debug/mysqlcheck.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\Debug/mysqlcheck.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\Debug/mysqlcheck.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="..\client\mysqlcheck.c">
+				<FileConfiguration
+					Name="classic|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/mysqldemb/mysqldemb.vcproj b/VC++Files/mysqldemb/mysqldemb.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..52081adb2142c414f6c89ec856bf30138c1a0c1a
--- /dev/null
+++ b/VC++Files/mysqldemb/mysqldemb.vcproj
@@ -0,0 +1,2960 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="mysqldemb"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="classic|Win32"
+			OutputDirectory=".\classic"
+			IntermediateDirectory=".\classic"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../include,../regex,../libmysqld,../sql,../zlib"
+				PreprocessorDefinitions="WIN32;_LIB;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;MYSQL_SERVER;USE_TLS;__WIN__;LICENSE=Commercial;DBUG_OFF;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\classic/mysqldemb.pch"
+				AssemblerListingLocation=".\classic/"
+				ObjectFile=".\classic/"
+				ProgramDataBaseFileName=".\classic/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_classic\mysqldemb.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="pro|Win32"
+			OutputDirectory=".\pro"
+			IntermediateDirectory=".\pro"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="/D MYSQL_SERVER_SUFFIX=-pro"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../include,../regex,../libmysqld,../sql,../zlib"
+				PreprocessorDefinitions="WIN32;_LIB;SIGNAL_WITH_VIO_CLOSE;EMBEDDED_LIBRARY;USE_TLS;__WIN__;USE_SYMDIR;MYSQL_SERVER;LICENSE=Commercial;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\pro/mysqldemb.pch"
+				AssemblerListingLocation=".\pro/"
+				ObjectFile=".\pro/"
+				ProgramDataBaseFileName=".\pro/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_pro\mysqldemb.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Debug"
+			IntermediateDirectory=".\Debug"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../zlib,../include,../regex,../libmysqld,../sql,../bdb/build_win32"
+				PreprocessorDefinitions="WIN32;_DEBUG;_LIB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;MYSQL_SERVER;HAVE_INNOBASE_DB;USE_TLS;__WIN__"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\Debug/mysqldemb.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="../lib_debug/mysqldemb.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../include,../regex,../libmysqld,../sql,../bdb/build_win32,../zlib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_LIB;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;MYSQL_SERVER;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS;__WIN__"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/mysqldemb.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Release\mysqldemb.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\sql\derror.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\libmysql\errmsg.c">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\field.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\field_conv.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\filesort.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\libmysql\get_password.c">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\ha_heap.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\ha_innodb.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\ha_myisam.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\ha_myisammrg.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\handler.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\hash_filo.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\hostname.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\init.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\item.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\item_buff.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\item_cmpfunc.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\item_create.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\item_func.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\item_row.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\item_strfunc.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\item_subselect.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\item_sum.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\item_timefunc.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\item_uniq.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\key.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\libmysqld\lib_sql.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\libmysqld\libmysqld.c">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\lock.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\log.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\log_event.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\mf_iocache.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\net_serv.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\opt_range.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\opt_sum.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\libmysql\password.c">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\procedure.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\protocol.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\records.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\repl_failsafe.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\slave.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_acl.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_analyse.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_base.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_cache.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_class.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_crypt.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_db.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_delete.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_derived.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_do.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_error.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_handler.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_insert.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_lex.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_list.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_manager.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_map.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_parse.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_prepare.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_rename.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_repl.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_select.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_show.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_string.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_table.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_test.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_udf.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_union.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_update.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\sql_yacc.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\table.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\thr_malloc.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\time.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\uniques.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\sql\unireg.cpp">
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/mysqlserver/mysqlserver.vcproj b/VC++Files/mysqlserver/mysqlserver.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..2c587e0a2d7b9c5bb638026dfe140b3d48c78b81
--- /dev/null
+++ b/VC++Files/mysqlserver/mysqlserver.vcproj
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="mysqlserver"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Debug"
+			IntermediateDirectory=".\Debug"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../include,../regex,../sql,../bdb/build_win32,libmysqld"
+				PreprocessorDefinitions="WIN32;_DEBUG;_LIB;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderFile=".\Debug/mysqlserver.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Debug\mysqlserver.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../include,../regex,../sql,../bdb/build_win32,../libmysqld"
+				PreprocessorDefinitions="WIN32;NDEBUG;_LIB;HAVE_BERKELEY_DB;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;DBUG_OFF;USE_TLS"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderFile=".\release/mysqlserver.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\release\mysqlserver.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/mysys/mysys.vcproj b/VC++Files/mysys/mysys.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..3d53fd3923c59f1b6d96c17c950d5386b03b8abf
--- /dev/null
+++ b/VC++Files/mysys/mysys.vcproj
@@ -0,0 +1,4789 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="mysys"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\debug"
+			IntermediateDirectory=".\debug"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../zlib"
+				PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_WINDOWS;USE_SYMDIR"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\debug/mysys.pch"
+				AssemblerListingLocation=".\debug/"
+				ObjectFile=".\debug/"
+				ProgramDataBaseFileName=".\debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_debug\mysys.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Max|Win32"
+			OutputDirectory=".\max"
+			IntermediateDirectory=".\max"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="/D MYSQL_SERVER_SUFFIX=-max"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../zlib"
+				PreprocessorDefinitions="USE_SYMDIR;NDEBUG;DBUG_OFF;_WINDOWS"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\max/mysys.pch"
+				AssemblerListingLocation=".\max/"
+				ObjectFile=".\max/"
+				ProgramDataBaseFileName=".\max/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_release\mysys-max.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../zlib"
+				PreprocessorDefinitions="DBUG_OFF;_WINDOWS;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/mysys.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_release\mysys.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="TLS_DEBUG|Win32"
+			OutputDirectory=".\mysys___Win32_TLS_DEBUG"
+			IntermediateDirectory=".\mysys___Win32_TLS_DEBUG"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../zlib"
+				PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_WINDOWS;USE_SYMDIR;USE_TLS"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\mysys___Win32_TLS_DEBUG/mysys.pch"
+				AssemblerListingLocation=".\mysys___Win32_TLS_DEBUG/"
+				ObjectFile=".\mysys___Win32_TLS_DEBUG/"
+				ProgramDataBaseFileName=".\mysys___Win32_TLS_DEBUG/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_debug\mysys_tls.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="TLS|Win32"
+			OutputDirectory=".\mysys___Win32_TLS"
+			IntermediateDirectory=".\mysys___Win32_TLS"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../zlib"
+				PreprocessorDefinitions="DBUG_OFF;_WINDOWS;NDEBUG;USE_TLS"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\mysys___Win32_TLS/mysys.pch"
+				AssemblerListingLocation=".\mysys___Win32_TLS/"
+				ObjectFile=".\mysys___Win32_TLS/"
+				ProgramDataBaseFileName=".\mysys___Win32_TLS/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_release\mysys_tls.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="array.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BrowseInformation="1"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="charset-def.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="charset.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="checksum.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="default.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="default_modify.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="errors.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="hash.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="list.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="md5.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mf_brkhant.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mf_cache.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mf_dirname.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mf_fn_ext.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mf_format.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mf_getdate.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mf_iocache.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mf_iocache2.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mf_keycache.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mf_keycaches.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mf_loadpath.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mf_pack.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mf_path.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mf_qsort.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mf_qsort2.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mf_radix.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mf_same.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mf_sort.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mf_soundex.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mf_strip.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mf_tempdir.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mf_tempfile.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mf_wcomp.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mf_wfile.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mulalloc.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_access.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_aes.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_alarm.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_alloc.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_append.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_bit.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_bitmap.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_chsize.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_clock.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_compress.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_copy.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_crc32.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_create.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_delete.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_div.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_error.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_file.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_fopen.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_fstream.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_gethostbyname.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_gethwaddr.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_getopt.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_getsystime.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_getwd.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_handler.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_init.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_lib.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_lock.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_lockmem.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_lread.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_lwrite.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_malloc.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_messnc.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_mkdir.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_mmap.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_net.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_once.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_open.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_pread.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_pthread.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_quick.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_read.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_realloc.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_redel.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_rename.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_seek.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_sleep.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_static.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_static.h">
+		</File>
+		<File
+			RelativePath="my_symlink.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_symlink2.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_sync.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_thr_init.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_wincond.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_windac.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_winsem.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_winthread.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_write.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mysys_priv.h">
+		</File>
+		<File
+			RelativePath="ptr_cmp.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="queues.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="raid.cpp">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="rijndael.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="safemalloc.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sha1.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="string.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="thr_alarm.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="thr_lock.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="EXTRA_DEBUG"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions="EXTRA_DEBUG"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="thr_mutex.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="thr_rwlock.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="tree.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="typelib.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS_DEBUG|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="TLS|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/perror/perror.vcproj b/VC++Files/perror/perror.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..2a7bb6407c00b2e77b53b825c45697ec2af9dd4e
--- /dev/null
+++ b/VC++Files/perror/perror.vcproj
@@ -0,0 +1,255 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="perror"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="classic|Win32"
+			OutputDirectory=".\classic"
+			IntermediateDirectory=".\classic"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="WIN32;_WINDOWS;LICENSE=Commercial;DBUG_OFF;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\classic/perror.pch"
+				AssemblerListingLocation=".\classic/"
+				ObjectFile=".\classic/"
+				ProgramDataBaseFileName=".\classic/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib"
+				OutputFile="../client_classic/perror.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				ProgramDatabaseFile=".\classic/perror.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="TRUE"
+				SuppressStartupBanner="TRUE"
+				TargetEnvironment="1"
+				TypeLibraryName=".\classic/perror.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/perror.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib"
+				OutputFile="../client_release/perror.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				ProgramDatabaseFile=".\release/perror.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="TRUE"
+				SuppressStartupBanner="TRUE"
+				TargetEnvironment="1"
+				TypeLibraryName=".\release/perror.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Debug"
+			IntermediateDirectory=".\Debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\Debug/perror.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib"
+				OutputFile=".\Debug/perror.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\Debug/perror.pdb"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="TRUE"
+				SuppressStartupBanner="TRUE"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Debug/perror.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="..\extra\perror.c">
+				<FileConfiguration
+					Name="classic|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/regex/regex.vcproj b/VC++Files/regex/regex.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..1b52017ca3b64174bc83dc1f8d19596c48138947
--- /dev/null
+++ b/VC++Files/regex/regex.vcproj
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="regex"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\debug"
+			IntermediateDirectory=".\debug"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,./"
+				PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_WINDOWS"
+				StringPooling="TRUE"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\debug/regex.pch"
+				AssemblerListingLocation=".\debug/"
+				ObjectFile=".\debug/"
+				ProgramDataBaseFileName=".\debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_debug\regex.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,./"
+				PreprocessorDefinitions="DBUG_OFF;_WINDOWS;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/regex.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_release\regex.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="debug.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="regcomp.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="regerror.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="regexec.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="regfree.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="reginit.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="split.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/replace/replace.vcproj b/VC++Files/replace/replace.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..270ff49453989bbacbc7fdb1da9fa9d5a593d70d
--- /dev/null
+++ b/VC++Files/replace/replace.vcproj
@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="replace"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\debug"
+			IntermediateDirectory=".\debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="_DEBUG;_CONSOLE;_WINDOWS"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\debug/replace.pch"
+				AssemblerListingLocation=".\debug/"
+				ObjectFile=".\debug/"
+				ProgramDataBaseFileName=".\debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib setargv.obj"
+				OutputFile="../client_debug/replace.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				ProgramDatabaseFile=".\debug/replace.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\debug/replace.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1035"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="DBUG_OFF;_CONSOLE;_WINDOWS;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/replace.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib setargv.obj"
+				OutputFile="../client_release/replace.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				ProgramDatabaseFile=".\release/replace.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\release/replace.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1035"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="classic|Win32"
+			OutputDirectory=".\classic"
+			IntermediateDirectory=".\classic"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="_CONSOLE;_WINDOWS;LICENSE=Commercial;DBUG_OFF;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\classic/replace.pch"
+				AssemblerListingLocation=".\classic/"
+				ObjectFile=".\classic/"
+				ProgramDataBaseFileName=".\classic/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib odbc32.lib odbccp32.lib setargv.obj"
+				OutputFile="../client_classic/replace.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				ProgramDatabaseFile=".\classic/replace.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\classic/replace.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1035"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\extra\replace.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/sql/mysqld.vcproj b/VC++Files/sql/mysqld.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..b96ce83246d6b1bb9989725930d2c37729631df7
--- /dev/null
+++ b/VC++Files/sql/mysqld.vcproj
@@ -0,0 +1,8584 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="mysqld"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="classic nt|Win32"
+			OutputDirectory=".\classic_nt"
+			IntermediateDirectory=".\classic_nt"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="/D MYSQL_SERVER_SUFFIX=-classic-nt"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../regex,../zlib,../extra/yassl/include"
+				PreprocessorDefinitions="__NT__;DBUG_OFF;NDEBUG;MYSQL_SERVER;_WINDOWS;_CONSOLE;HAVE_DLOPEN;LICENSE=Commercial"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\classic_nt/mysqld.pch"
+				AssemblerListingLocation=".\classic_nt/"
+				ObjectFile=".\classic_nt/"
+				ProgramDataBaseFileName=".\classic_nt/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="odbc32.lib odbccp32.lib Wsock32.lib"
+				OutputFile="../client_classic/mysqld-nt.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\classic_nt/mysqld.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Max|Win32"
+			OutputDirectory=".\max"
+			IntermediateDirectory=".\max"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="/D MYSQL_SERVER_SUFFIX=-max"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../bdb/build_win32,../include,../regex,../extra/yassl/include,../zlib"
+				PreprocessorDefinitions="NDEBUG;DBUG_OFF;USE_SYMDIR;HAVE_INNOBASE_DB;HAVE_BERKELEY_DB;HAVE_ARCHIVE_DB;HAVE_BLACKHOLE_DB;HAVE_FEDERATED_DB;MYSQL_SERVER;_WINDOWS;_CONSOLE;HAVE_DLOPEN"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\max/mysqld.pch"
+				AssemblerListingLocation=".\max/"
+				ObjectFile=".\max/"
+				ProgramDataBaseFileName=".\max/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="odbc32.lib odbccp32.lib Wsock32.lib"
+				OutputFile="../client_release/mysqld-max.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\max/mysqld.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Max nt|Win32"
+			OutputDirectory=".\max_nt"
+			IntermediateDirectory=".\max_nt"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="/D MYSQL_SERVER_SUFFIX=-nt-max"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../bdb/build_win32,../include,../regex,../extra/yassl/include,../zlib"
+				PreprocessorDefinitions="NDEBUG;__NT__;DBUG_OFF;HAVE_INNOBASE_DB;HAVE_BERKELEY_DB;HAVE_ARCHIVE_DB;HAVE_BLACKHOLE_DB;HAVE_FEDERATED_DB;MYSQL_SERVER;_WINDOWS;_CONSOLE;HAVE_DLOPEN"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\max_nt/mysqld.pch"
+				AssemblerListingLocation=".\max_nt/"
+				ObjectFile=".\max_nt/"
+				ProgramDataBaseFileName=".\max_nt/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="odbc32.lib odbccp32.lib Wsock32.lib"
+				OutputFile="../client_release/mysqld-max-nt.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				ProgramDatabaseFile=".\max_nt/mysqld-max-nt.pdb"
+				GenerateMapFile="TRUE"
+				MapFileName=".\max_nt/mysqld-max-nt.map"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\max_nt/mysqld.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="nt|Win32"
+			OutputDirectory=".\nt"
+			IntermediateDirectory=".\nt"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="/D MYSQL_SERVER_SUFFIX=-nt"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../regex,../zlib,../extra/yassl/include"
+				PreprocessorDefinitions="__NT__;DBUG_OFF;NDEBUG;HAVE_INNOBASE_DB;MYSQL_SERVER;_WINDOWS;_CONSOLE;HAVE_DLOPEN"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\nt/mysqld.pch"
+				AssemblerListingLocation=".\nt/"
+				ObjectFile=".\nt/"
+				ProgramDataBaseFileName=".\nt/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="odbc32.lib odbccp32.lib Wsock32.lib"
+				OutputFile="../client_release/mysqld-nt.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				ProgramDatabaseFile=".\nt/mysqld-nt.pdb"
+				GenerateMapFile="TRUE"
+				MapFileName=".\nt/mysqld-nt.map"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\nt/mysqld.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="pro nt|Win32"
+			OutputDirectory=".\pro_nt"
+			IntermediateDirectory=".\pro_nt"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="/D MYSQL_SERVER_SUFFIX=-pro-nt"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../regex,../zlib,../extra/yassl/include"
+				PreprocessorDefinitions="__NT__;DBUG_OFF;NDEBUG;HAVE_INNOBASE_DB;MYSQL_SERVER;LICENSE=Commercial;_WINDOWS;_CONSOLE;HAVE_DLOPEN"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\pro_nt/mysqld.pch"
+				AssemblerListingLocation=".\pro_nt/"
+				ObjectFile=".\pro_nt/"
+				ProgramDataBaseFileName=".\pro_nt/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="odbc32.lib odbccp32.lib Wsock32.lib"
+				OutputFile="../client_pro/mysqld-nt.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\pro_nt/mysqld.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\debug"
+			IntermediateDirectory=".\debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../bdb/build_win32,../include,../regex,../extra/yassl/include,../zlib"
+				PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;HAVE_INNOBASE_DB;HAVE_BERKELEY_DB;HAVE_ARCHIVE_DB;HAVE_BLACKHOLE_DB;HAVE_FEDERATED_DB;MYSQL_SERVER;_WINDOWS;_CONSOLE;HAVE_DLOPEN"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\debug/mysqld.pch"
+				AssemblerListingLocation=".\debug/"
+				ObjectFile=".\debug/"
+				ProgramDataBaseFileName=".\debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="odbc32.lib odbccp32.lib Wsock32.lib"
+				OutputFile="../client_debug/mysqld-debug.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\debug/mysqld-debug.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\debug/mysqld.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="pro|Win32"
+			OutputDirectory=".\pro"
+			IntermediateDirectory=".\pro"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="/D MYSQL_SERVER_SUFFIX=-pro"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../regex,../zlib,../extra/yassl/include"
+				PreprocessorDefinitions="MYSQL_SERVER;LICENSE=Commercial;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\pro/mysqld.pch"
+				AssemblerListingLocation=".\pro/"
+				ObjectFile=".\pro/"
+				ProgramDataBaseFileName=".\pro/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="odbc32.lib odbccp32.lib Wsock32.lib"
+				OutputFile="../client_pro/mysqld.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\pro/mysqld.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="classic|Win32"
+			OutputDirectory=".\classic"
+			IntermediateDirectory=".\classic"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="/D MYSQL_SERVER_SUFFIX=-classic"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../regex,../zlib,../extra/yassl/include"
+				PreprocessorDefinitions="LICENSE=Commercial;MYSQL_SERVER;_WINDOWS;_CONSOLE;HAVE_DLOPEN;DBUG_OFF;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\classic/mysqld.pch"
+				AssemblerListingLocation=".\classic/"
+				ObjectFile=".\classic/"
+				ProgramDataBaseFileName=".\classic/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="odbc32.lib odbccp32.lib Wsock32.lib"
+				OutputFile="../client_classic/mysqld.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\classic/mysqld.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../zlib,../include,../regex,../extra/yassl/include"
+				PreprocessorDefinitions="NDEBUG;DBUG_OFF;HAVE_INNOBASE_DB;MYSQL_SERVER;_WINDOWS;_CONSOLE;HAVE_DLOPEN"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/mysqld.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="odbc32.lib odbccp32.lib Wsock32.lib"
+				OutputFile="../client_release/mysqld.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\release/mysqld.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="client.c">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="derror.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="des_key_file.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="discover.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\libmysql\errmsg.c">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="field.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="field_conv.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="filesort.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="gstream.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="examples\ha_archive.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ha_berkeley.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ha_blackhole.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ha_federated.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ha_heap.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ha_innodb.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ha_myisam.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ha_myisammrg.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="handler.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="hash_filo.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="hash_filo.h">
+		</File>
+		<File
+			RelativePath="hostname.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="init.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="item.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="item_buff.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="item_cmpfunc.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="item_create.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="item_func.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="item_geofunc.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="item_row.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="item_strfunc.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="item_subselect.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="item_sum.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="item_timefunc.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="item_uniq.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="key.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="lock.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="log.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="log_event.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="message.mc">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCustomBuildTool"
+					CommandLine="mc message.mc
+"
+					Outputs="message.rc;message.h"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCustomBuildTool"
+					CommandLine="mc message.mc
+"
+					Outputs="message.rc;message.h"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCustomBuildTool"
+					CommandLine="mc message.mc
+"
+					Outputs="message.rc;message.h"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCustomBuildTool"
+					CommandLine="mc message.mc
+"
+					Outputs="message.rc;message.h"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCustomBuildTool"
+					CommandLine="mc message.mc
+"
+					Outputs="message.rc;message.h"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCustomBuildTool"
+					CommandLine="mc message.mc
+"
+					Outputs="message.rc;message.h"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCustomBuildTool"
+					CommandLine="mc message.mc
+"
+					Outputs="message.rc;message.h"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCustomBuildTool"
+					CommandLine="mc message.mc
+"
+					Outputs="message.rc;message.h"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCustomBuildTool"
+					CommandLine="mc message.mc
+"
+					Outputs="message.rc;message.h"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="message.rc">
+		</File>
+		<File
+			RelativePath="mf_iocache.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_decimal.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_time.c">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\myisammrg\myrg_rnext_same.c">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="mysqld.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="net_serv.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="nt_servc.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="nt_servc.h">
+		</File>
+		<File
+			RelativePath="opt_range.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="opt_range.h">
+		</File>
+		<File
+			RelativePath="OPT_SUM.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="pack.c">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="parse_file.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="password.c">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="procedure.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="protocol.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="protocol_cursor.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="records.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="repl_failsafe.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="set_var.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="slave.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sp.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sp_cache.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sp_head.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sp_pcontext.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sp_rcontext.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="spatial.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_acl.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_analyse.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_base.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_cache.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_class.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_client.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_crypt.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_crypt.h">
+		</File>
+		<File
+			RelativePath="sql_db.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_delete.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_derived.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_do.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_error.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_handler.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_help.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_insert.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_lex.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_list.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_load.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_manager.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_map.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_parse.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_prepare.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_rename.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_repl.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_select.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_show.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_state.c">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_string.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_table.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_test.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_trigger.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_udf.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_union.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_update.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_view.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="sql_yacc.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="strfunc.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="table.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="thr_malloc.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="time.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="tztime.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="uniques.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="unireg.cpp">
+			<FileConfiguration
+				Name="classic nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Max nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro nt|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="pro|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="classic|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/strings/backup/strings.dsp b/VC++Files/strings/backup/strings.dsp
index a6be39b40ab81a58f6d99bf857190da869bf76d3..dcff9915f13498e7bd7fd2c013089c820e755c61 100644
--- a/VC++Files/strings/backup/strings.dsp
+++ b/VC++Files/strings/backup/strings.dsp
@@ -238,7 +238,12 @@ InputName=Strxmov
 # End Source File
 # Begin Source File
 
-SOURCE=.\strxnmov.c
+SOURCE=.\strxnmov.c 
+# End Source File 
+# Begin Source File
+
+SOURCE=.\str_alloc.c 
 # End Source File
+
 # End Target
 # End Project
diff --git a/VC++Files/strings/noMASM/strings.dsp b/VC++Files/strings/noMASM/strings.dsp
index ffec20f3a5911f4748127ec9e576bbec787cb202..e7a0395c3df988df133d7474ae190efc18d95bc3 100644
--- a/VC++Files/strings/noMASM/strings.dsp
+++ b/VC++Files/strings/noMASM/strings.dsp
@@ -256,6 +256,10 @@ SOURCE=.\strxnmov.c
 # End Source File
 # Begin Source File
 
+SOURCE=.\str_alloc.c
+# End Source File
+# Begin Source File
+
 SOURCE=.\xml.c
 # End Source File
 # End Target
diff --git a/VC++Files/strings/strings.dsp b/VC++Files/strings/strings.dsp
index 320cdaf2132dc1065af6280fe57c13b3da32bd75..714359c5570147dc6b122ffce8476d9e80f7b0fd 100644
--- a/VC++Files/strings/strings.dsp
+++ b/VC++Files/strings/strings.dsp
@@ -273,6 +273,10 @@ SOURCE=.\strxnmov.c
 # End Source File
 # Begin Source File
 
+SOURCE=.\str_alloc.c
+# End Source File
+# Begin Source File
+
 SOURCE=.\xml.c
 # End Source File
 # End Target
diff --git a/VC++Files/strings/strings.vcproj b/VC++Files/strings/strings.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..8e16a0c7221cc6bd4dbdf13b808e344975c0efff
--- /dev/null
+++ b/VC++Files/strings/strings.vcproj
@@ -0,0 +1,1034 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="strings"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="DBUG_OFF;_WINDOWS;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/strings.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_release\strings.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\debug"
+			IntermediateDirectory=".\debug"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_WINDOWS"
+				StringPooling="TRUE"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\debug/strings.pch"
+				AssemblerListingLocation=".\debug/"
+				ObjectFile=".\debug/"
+				ProgramDataBaseFileName=".\debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_debug\strings.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="bchange.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="bcmp.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="bfill.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="bmove512.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="bmove_upp.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ctype-big5.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ctype-bin.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ctype-cp932.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ctype-czech.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ctype-euc_kr.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ctype-eucjpms.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ctype-extra.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ctype-gb2312.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ctype-gbk.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ctype-latin1.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ctype-mb.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ctype-simple.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ctype-sjis.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ctype-tis620.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ctype-uca.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ctype-ucs2.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ctype-ujis.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ctype-utf8.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ctype-win1250ch.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="ctype.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="decimal.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="int2str.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="is_prefix.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="llstr.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="longlong2str.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_strtoll10.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="my_vsnprintf.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="r_strinstr.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="str2int.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath=".\str_alloc.c">
+		</File>
+		<File
+			RelativePath="strcend.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="strend.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="strfill.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="strmake.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="strmov.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="strnmov.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="strtod.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="strtol.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="strtoll.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="strtoul.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="strtoull.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="strxmov.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="strxnmov.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="xml.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/strings/strings_ia64.dsp b/VC++Files/strings/strings_ia64.dsp
index c0b7b9c292c8d2f809816d53f90b88c16a5c617b..0ccb4f62928fb072fb88f96d8cd713cc84a879c4 100644
--- a/VC++Files/strings/strings_ia64.dsp
+++ b/VC++Files/strings/strings_ia64.dsp
@@ -272,6 +272,10 @@ SOURCE=.\strxnmov.c
 # End Source File
 # Begin Source File
 
+SOURCE=.\str_alloc.c
+# End Source File
+# Begin Source File
+
 SOURCE=.\xml.c
 # End Source File
 # End Target
diff --git a/VC++Files/test1/test1.vcproj b/VC++Files/test1/test1.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..6a850f7b2e3320b6fc4a5c991894c3eb409527a6
--- /dev/null
+++ b/VC++Files/test1/test1.vcproj
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="test1"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="_CONSOLE;_WINDOWS;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="4"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/test1.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile=".\release/test1.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				ProgramDatabaseFile=".\release/test1.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\release/test1.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\debug"
+			IntermediateDirectory=".\debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="_DEBUG;_CONSOLE;_WINDOWS"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\debug/test1.pch"
+				AssemblerListingLocation=".\debug/"
+				ObjectFile=".\debug/"
+				ProgramDataBaseFileName=".\debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libmysql.lib odbc32.lib odbccp32.lib"
+				OutputFile=".\debug/test1.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories="..\lib_debug"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\debug/test1.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\debug/test1.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="mysql_thr.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					RuntimeLibrary="0"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/tests/mysql_client_test.vcproj b/VC++Files/tests/mysql_client_test.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..adcc680b6e7edce31b1009b08ba2c6b48ea20516
--- /dev/null
+++ b/VC++Files/tests/mysql_client_test.vcproj
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="mysql_client_test"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Release"
+			IntermediateDirectory=".\Release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="4"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../"
+				PreprocessorDefinitions="DBUG_OFF;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;__WIN__;_WIN32"
+				StringPooling="TRUE"
+				RuntimeLibrary="1"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\Release/mysql_client_test.pch"
+				AssemblerListingLocation=".\Release/"
+				ObjectFile=".\Release/"
+				ProgramDataBaseFileName=".\Release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="odbc32.lib odbccp32.lib Ws2_32.lib mysqlclient.lib mysys.lib regex.lib ..\extra\yassl\Release\yassl.lib"
+				OutputFile="..\client_release\mysql_client_test.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories="..\lib_release\"
+				ProgramDatabaseFile=".\Release/mysql_client_test.pdb"
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				SuppressStartupBanner="TRUE"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Release/mysql_client_test.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Debug"
+			IntermediateDirectory=".\Debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../"
+				PreprocessorDefinitions="_DEBUG;_WINDOWS;SAFE_MUTEX;USE_TLS;MYSQL_CLIENT;__WIN__;_WIN32"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\Debug/mysql_client_test.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib mysys.lib regex.lib ..\extra\yassl\Debug\yassl.lib"
+				OutputFile="..\client_debug\mysql_client_test.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories="..\lib_debug\"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\Debug/mysql_client_test.pdb"
+				GenerateMapFile="TRUE"
+				MapFileName=".\Debug/mysql_client_test.map"
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				SuppressStartupBanner="TRUE"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Debug/mysql_client_test.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="mysql_client_test.c">
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					BasicRuntimeChecks="3"/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/thr_test/thr_test.vcproj b/VC++Files/thr_test/thr_test.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..ede9bd04de88a88fc0e64e5e8ad5b48ede4b9a33
--- /dev/null
+++ b/VC++Files/thr_test/thr_test.vcproj
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="thr_test"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\debug"
+			IntermediateDirectory=".\debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="__WIN32__;_DEBUG;SAFEMALLOC;SAFE_MUTEX;_CONSOLE;_WINDOWS"
+				ExceptionHandling="FALSE"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\debug/thr_test.pch"
+				AssemblerListingLocation=".\debug/"
+				ObjectFile=".\debug/"
+				ProgramDataBaseFileName=".\debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile=".\debug/thr_test.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\debug/thr_test.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\debug/thr_test.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1035"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="DBUG_OFF;_CONSOLE;_WINDOWS;NDEBUG"
+				StringPooling="TRUE"
+				ExceptionHandling="FALSE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/thr_test.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile=".\release/thr_test.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				ProgramDatabaseFile=".\release/thr_test.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\release/thr_test.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1035"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="thr_test.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+					AssemblerOutput="2"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					OptimizeForProcessor="1"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/vio/vio.vcproj b/VC++Files/vio/vio.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..3f50c1546fb24efd9ede7226663635f45d022611
--- /dev/null
+++ b/VC++Files/vio/vio.vcproj
@@ -0,0 +1,204 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="vio"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../extra/yassl/include"
+				PreprocessorDefinitions="DBUG_OFF;_WINDOWS;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/vio.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_release\vio.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Debug"
+			IntermediateDirectory=".\Debug"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				AdditionalIncludeDirectories="../include,../extra/yassl/include"
+				PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_WINDOWS;USE_SYMDIR"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\Debug/vio.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_debug\vio.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="vio.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="viosocket.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="viossl.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="viosslfactories.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/VC++Files/zlib/zlib.vcproj b/VC++Files/zlib/zlib.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..ee17d915a1ac46fbd22d25ae33762e6741a68bd7
--- /dev/null
+++ b/VC++Files/zlib/zlib.vcproj
@@ -0,0 +1,483 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="zlib"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\debug"
+			IntermediateDirectory=".\debug"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				OptimizeForProcessor="2"
+				PreprocessorDefinitions="_DEBUG;__WIN32__;_WINDOWS"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\debug/zlib.pch"
+				AssemblerListingLocation=".\debug/"
+				ObjectFile=".\debug/"
+				ProgramDataBaseFileName=".\debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="1"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_debug\zlib.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="authent|Win32"
+			OutputDirectory=".\zlib___Win32_authent"
+			IntermediateDirectory=".\zlib___Win32_authent"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				PreprocessorDefinitions="DBUG_OFF;_WINDOWS;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\zlib___Win32_authent/zlib.pch"
+				AssemblerListingLocation=".\zlib___Win32_authent/"
+				ObjectFile=".\zlib___Win32_authent/"
+				ProgramDataBaseFileName=".\zlib___Win32_authent/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_release\zlib.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\release"
+			IntermediateDirectory=".\release"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OptimizeForProcessor="2"
+				PreprocessorDefinitions="DBUG_OFF;_WINDOWS;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\release/zlib.pch"
+				AssemblerListingLocation=".\release/"
+				ObjectFile=".\release/"
+				ProgramDataBaseFileName=".\release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib_release\zlib.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="adler32.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="compress.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="crc32.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="crc32.h">
+		</File>
+		<File
+			RelativePath="deflate.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="deflate.h">
+		</File>
+		<File
+			RelativePath="gzio.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="infback.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="inffast.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="inffast.h">
+		</File>
+		<File
+			RelativePath="inffixed.h">
+		</File>
+		<File
+			RelativePath="inflate.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="inflate.h">
+		</File>
+		<File
+			RelativePath="inftrees.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="inftrees.h">
+		</File>
+		<File
+			RelativePath="inftrees.h">
+		</File>
+		<File
+			RelativePath="trees.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="trees.h">
+		</File>
+		<File
+			RelativePath="uncompr.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="zconf.h">
+		</File>
+		<File
+			RelativePath="zlib.h">
+		</File>
+		<File
+			RelativePath="zutil.c">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="0"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="authent|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32">
+				<Tool
+					Name="VCCLCompilerTool"
+					Optimization="2"
+					PreprocessorDefinitions=""/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="zutil.h">
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/client/client_priv.h b/client/client_priv.h
index c8aa7385276b7c790dd3ab39bddcc2e194efb6e2..74bc0b41006d17863a3a8d01660ea8a6bfae3368 100644
--- a/client/client_priv.h
+++ b/client/client_priv.h
@@ -49,5 +49,6 @@ enum options_client
 #ifdef HAVE_NDBCLUSTER_DB
   OPT_NDBCLUSTER, OPT_NDB_CONNECTSTRING,
 #endif
+  OPT_TRIGGERS,
   OPT_IGNORE_TABLE,OPT_INSERT_IGNORE,OPT_SHOW_WARNINGS,OPT_DROP_DATABASE
 };
diff --git a/client/mysql.cc b/client/mysql.cc
index 871936d780012148fbcc071ab5ed900b0bff1718..04b634a47af6e48632b7e4a82df010e2a0c2196d 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -432,7 +432,7 @@ int main(int argc,char *argv[])
   put_info((char*) glob_buffer.ptr(),INFO_INFO);
 
 #ifdef HAVE_READLINE
-  initialize_readline(my_progname);
+  initialize_readline((char*) my_progname);
   if (!status.batch && !quick && !opt_html && !opt_xml)
   {
     /* read-history from file, default ~/.mysql_history*/
@@ -624,7 +624,7 @@ static struct my_option my_long_options[] =
    NO_ARG, 0, 0, 0, 0, 0, 0},
 #endif
   {"port", 'P', "Port number to use for connection.", (gptr*) &opt_mysql_port,
-   (gptr*) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0,
+   (gptr*) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
    0},
   {"prompt", OPT_PROMPT, "Set the mysql prompt to this value.",
    (gptr*) &current_prompt, (gptr*) &current_prompt, 0, GET_STR_ALLOC,
@@ -1598,11 +1598,8 @@ You can turn off this feature to get a quicker startup with -A\n\n");
       mysql_free_result(fields);
     }
     else
-    {
-      tee_fprintf(stdout,
-		  "Didn't find any fields in table '%s'\n",table_row[0]);
       field_names[i]= 0;
-    }
+
     i++;
   }
   mysql_free_result(tables);
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index 1a628bd08c7c83ec665615fb907c56680d68e2f6..d074fa1912262020f9d50ab84f2220ceaa9fbbb2 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -805,7 +805,7 @@ static my_time_t convert_str_to_timestamp(const char* str)
   int was_cut;
   MYSQL_TIME l_time;
   long dummy_my_timezone;
-  bool dummy_in_dst_time_gap;
+  my_bool dummy_in_dst_time_gap;
   /* We require a total specification (date AND time) */
   if (str_to_datetime(str, strlen(str), &l_time, 0, &was_cut) !=
       MYSQL_TIMESTAMP_DATETIME || was_cut)
diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c
index c767f1c89b7af8df51091b868d8379f2efbd7a48..465213cce502637374ae01bdceffa9453243a9a2 100644
--- a/client/mysqlcheck.c
+++ b/client/mysqlcheck.c
@@ -575,8 +575,13 @@ static void print_result()
 
     if (status)
     {
+      /*
+        if there was an error with the table, we have --auto-repair set,
+        and this isn't a repair op, then add the table to the tables4repair
+        list
+      */
       if (found_error && opt_auto_repair && what_to_do != DO_REPAIR &&
-	  (!opt_fast || strcmp(row[3],"OK")))
+	  strcmp(row[3],"OK"))
 	insert_dynamic(&tables4repair, prev);
       found_error=0;
       if (opt_silent)
@@ -595,8 +600,8 @@ static void print_result()
     strmov(prev, row[0]);
     putchar('\n');
   }
-  if (found_error && opt_auto_repair && what_to_do != DO_REPAIR &&
-      !opt_fast)
+  /* add the last table to be repaired to the list */
+  if (found_error && opt_auto_repair && what_to_do != DO_REPAIR)
     insert_dynamic(&tables4repair, prev);
   mysql_free_result(res);
 }
diff --git a/client/mysqldump.c b/client/mysqldump.c
index be9eb5ef58b02f483eea737bf792d5e991ebe818..d0bad88678efbedb9ca43aeb56c683c1c0217a0e 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -372,7 +372,7 @@ static struct my_option my_long_options[] =
    (gptr*) &path, (gptr*) &path, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
   {"tables", OPT_TABLES, "Overrides option --databases (-B).",
    0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
-   {"triggers", '/0', "Dump triggers for each dumped table",
+   {"triggers", OPT_TRIGGERS, "Dump triggers for each dumped table",
      (gptr*) &opt_dump_triggers, (gptr*) &opt_dump_triggers, 0, GET_BOOL,
      NO_ARG, 1, 0, 0, 0, 0, 0},
 #ifndef DONT_ALLOW_USER_CHANGE
@@ -424,6 +424,7 @@ void check_io(FILE *file)
   if (ferror(file))
   {
     fprintf(stderr, "%s: Got errno %d on write\n", my_progname, errno);
+    ignore_errors= 0; /* We can't ignore this error */
     safe_exit(EX_EOF);
   }
 }
@@ -1296,10 +1297,11 @@ static uint get_table_structure(char *table, char *db)
         row= mysql_fetch_row(tableRes);
 
         if (opt_drop)
-          fprintf(sql_file, "DROP VIEW IF EXISTS %s;\n",opt_quoted_table);
+          fprintf(sql_file, "/*!50001 DROP VIEW IF EXISTS %s*/;\n",
+                  opt_quoted_table);
 
         /* Print CREATE statement but remove TEMPORARY */
-        fprintf(sql_file, "CREATE %s;\n", row[1]+17);
+        fprintf(sql_file, "/*!50001 CREATE %s*/;\n", row[1]+17);
         check_io(sql_file);
 
         mysql_free_result(tableRes);
@@ -1335,19 +1337,23 @@ static uint get_table_structure(char *table, char *db)
           DBUG_RETURN(0);
         }
         if (mysql_num_rows(tableRes))
-          fprintf(sql_file, "\nDELIMITER //;\n");
+          fprintf(sql_file, "\n/*!50003 SET @OLD_SQL_MODE=@@SQL_MODE*/;\n\
+DELIMITER //;\n");
         while ((row=mysql_fetch_row(tableRes)))
         {
-          fprintf(sql_file, "CREATE TRIGGER %s %s %s ON %s\n"
-                  "FOR EACH ROW%s//\n\n",
-                  quote_name(row[0], name_buff, 0),
-                  row[4],
-                  row[1],
+          fprintf(sql_file, "/*!50003 SET SESSION SQL_MODE=\"%s\"*/ //\n\
+/*!50003 CREATE TRIGGER %s %s %s ON %s FOR EACH ROW%s*/ //\n\n",
+                  row[6], /* sql_mode */
+                  quote_name(row[0], name_buff, 0), /* Trigger */
+                  row[4], /* Timing */
+                  row[1], /* Event */
                   result_table,
-                  row[3]);
+                  row[3] /* Statement */);
         }
         if (mysql_num_rows(tableRes))
-          fprintf(sql_file, "DELIMITER ;//");
+          fprintf(sql_file,
+                  "DELIMITER ;//\n\
+/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;");
         mysql_free_result(tableRes);
       }
     }
@@ -2610,7 +2616,7 @@ static int do_show_master_status(MYSQL *mysql_con)
     {
       /* SHOW MASTER STATUS reports nothing and --force is not enabled */
       my_printf_error(0, "Error: Binlogging on server not active", 
-		      MYF(0), mysql_error(mysql_con));
+		      MYF(0));
       mysql_free_result(master);
       return 1;
     }
@@ -2957,13 +2963,15 @@ static my_bool get_view_structure(char *table, char* db)
   }
   if (opt_drop)
   {
-    fprintf(sql_file, "DROP TABLE IF EXISTS %s;\n", opt_quoted_table);
-    fprintf(sql_file, "DROP VIEW IF EXISTS %s;\n", opt_quoted_table);
+    fprintf(sql_file, "/*!50001 DROP TABLE IF EXISTS %s*/;\n",
+            opt_quoted_table);
+    fprintf(sql_file, "/*!50001 DROP VIEW IF EXISTS %s*/;\n",
+            opt_quoted_table);
     check_io(sql_file);
   }
 
   row= mysql_fetch_row(table_res);
-  fprintf(sql_file, "%s;\n", row[1]);
+  fprintf(sql_file, "/*!50001 %s*/;\n", row[1]);
   check_io(sql_file);
   mysql_free_result(table_res);
 
@@ -2979,11 +2987,12 @@ static my_bool get_view_structure(char *table, char* db)
 
 int main(int argc, char **argv)
 {
+  MY_INIT("mysqldump");
+
   compatible_mode_normal_str[0]= 0;
   default_charset= (char *)mysql_universal_client_charset;
   bzero((char*) &ignore_table, sizeof(ignore_table));
 
-  MY_INIT("mysqldump");
   if (get_options(&argc, &argv))
   {
     my_end(0);
diff --git a/client/mysqltest.c b/client/mysqltest.c
index 4b8bb047e47e1a0fb4d2646740d932ef30dfdc99..57b81e46b66a5706a1ad1956023e090e32340462 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -42,7 +42,7 @@
 
 **********************************************************************/
 
-#define MTEST_VERSION "2.4"
+#define MTEST_VERSION "2.5"
 
 #include <my_global.h>
 #include <mysql_embed.h>
@@ -66,7 +66,8 @@
 #ifndef WEXITSTATUS
 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
 #endif
-#define MAX_QUERY     131072
+/* MAX_QUERY is 256K -- there is a test in sp-big that is >128K */
+#define MAX_QUERY     (256*1024)
 #define MAX_VAR_NAME	256
 #define MAX_COLUMNS	256
 #define PAD_SIZE	128
@@ -151,6 +152,7 @@ const char* user = 0, *host = 0, *unix_sock = 0, *opt_basedir="./";
 static int port = 0;
 static my_bool opt_big_test= 0, opt_compress= 0, silent= 0, verbose = 0;
 static my_bool tty_password= 0, ps_protocol= 0, ps_protocol_enabled= 0;
+static int parsing_disabled= 0;
 static uint start_lineno, *lineno;
 const char* manager_user="root",*manager_host=0;
 char *manager_pass=0;
@@ -308,6 +310,7 @@ Q_CHARACTER_SET, Q_DISABLE_PS_PROTOCOL, Q_ENABLE_PS_PROTOCOL,
 Q_EXIT,
 Q_DISABLE_RECONNECT, Q_ENABLE_RECONNECT,
 Q_IF,
+Q_DISABLE_PARSING, Q_ENABLE_PARSING,
 
 Q_UNKNOWN,			       /* Unknown command.   */
 Q_COMMENT,			       /* Comments, ignored. */
@@ -399,6 +402,8 @@ const char *command_names[]=
   "disable_reconnect",
   "enable_reconnect",
   "if",
+  "disable_parsing",
+  "enable_parsing",
   0
 };
 
@@ -2141,7 +2146,7 @@ int read_line(char* buf, int size)
       }
       break;
     case R_LINE_START:
-      if (c == '#' || c == '-')
+      if (c == '#' || c == '-' || parsing_disabled)
       {
 	state = R_COMMENT;
       }
@@ -2268,18 +2273,22 @@ int read_query(struct st_query** q_ptr)
     /* This goto is to avoid losing the "expected error" info. */
     goto end;
   }
-  memcpy((gptr) q->expected_errno, (gptr) global_expected_errno,
-	 sizeof(global_expected_errno));
-  q->expected_errors= global_expected_errors;
-  q->abort_on_error= (global_expected_errors == 0 && abort_on_error);
-  bzero((gptr) global_expected_errno, sizeof(global_expected_errno));
-  global_expected_errors=0;
+  if (!parsing_disabled)
+  {
+    memcpy((gptr) q->expected_errno, (gptr) global_expected_errno,
+           sizeof(global_expected_errno));
+    q->expected_errors= global_expected_errors;
+    q->abort_on_error= (global_expected_errors == 0 && abort_on_error);
+    bzero((gptr) global_expected_errno, sizeof(global_expected_errno));
+    global_expected_errors=0;
+  }
+
   if (p[0] == '-' && p[1] == '-')
   {
     q->type= Q_COMMENT_WITH_COMMAND;
     p+= 2;					/* To calculate first word */
   }
-  else
+  else if (!parsing_disabled)
   {
     if (*p == '!')
     {
@@ -2772,6 +2781,7 @@ static int run_query_normal(MYSQL* mysql, struct st_query* q, int flags)
     if (!disable_result_log)
     {
       ulong affected_rows;    /* Ok to be undef if 'disable_info' is set */
+      LINT_INIT(affected_rows);
 
       if (res)
       {
@@ -3586,20 +3596,29 @@ void get_query_type(struct st_query* q)
   uint type;
   DBUG_ENTER("get_query_type");
 
-  if (*q->query == '}')
+  if (!parsing_disabled && *q->query == '}')
   {
     q->type = Q_END_BLOCK;
     DBUG_VOID_RETURN;
   }
   if (q->type != Q_COMMENT_WITH_COMMAND)
-    q->type = Q_QUERY;
+    q->type= parsing_disabled ? Q_COMMENT : Q_QUERY;
 
   save=q->query[q->first_word_len];
   q->query[q->first_word_len]=0;
   type=find_type(q->query, &command_typelib, 1+2);
   q->query[q->first_word_len]=save;
   if (type > 0)
+  {
     q->type=(enum enum_commands) type;		/* Found command */
+    /*
+      If queries are disabled, only recognize
+      --enable-queries and --disable-queries
+    */
+    if (parsing_disabled && q->type != Q_ENABLE_PARSING &&
+        q->type != Q_DISABLE_PARSING)
+      q->type= Q_COMMENT;
+  }
   DBUG_VOID_RETURN;
 }
 
@@ -3963,6 +3982,17 @@ int main(int argc, char **argv)
       case Q_ENABLE_RECONNECT:
         cur_con->mysql.reconnect= 1;
         break;
+      case Q_DISABLE_PARSING:
+        parsing_disabled++;
+        break;
+      case Q_ENABLE_PARSING:
+        /*
+          Ensure we don't get parsing_disabled < 0 as this would accidently
+          disable code we don't want to have disabled
+        */
+        if (parsing_disabled > 0)
+          parsing_disabled--;
+        break;
 
       case Q_EXIT:
         abort_flag= 1;
diff --git a/config/ac-macros/ha_ndbcluster.m4 b/config/ac-macros/ha_ndbcluster.m4
index dc5e0e73558f179d07e759df4db03c1b01cfaf14..509cd868909e01571af38526e2393c1d621f48d9 100644
--- a/config/ac-macros/ha_ndbcluster.m4
+++ b/config/ac-macros/ha_ndbcluster.m4
@@ -62,10 +62,19 @@ AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [
               [ndb_debug="$withval"],
               [ndb_debug="default"])
   AC_ARG_WITH([ndb-ccflags],
-              [
-  --with-ndb-ccflags    Extra CC options for ndb compile],
-              [ndb_cxxflags_fix="$ndb_cxxflags_fix $withval"],
-              [ndb_cxxflags_fix=$ndb_cxxflags_fix])
+              AC_HELP_STRING([--with-ndb-ccflags=CFLAGS],
+                           [Extra CFLAGS for ndb compile]),
+              [ndb_ccflags=${withval}],
+              [ndb_ccflags=""])
+
+    case "$ndb_ccflags" in
+    "yes")
+        AC_MSG_RESULT([The --ndb-ccflags option requires a parameter (passed to CC for ndb compilation)])
+        ;;
+    *)
+        ndb_cxxflags_fix="$ndb_cxxflags_fix $ndb_ccflags"
+    ;;
+  esac
 
   AC_MSG_CHECKING([for NDB Cluster options])
   AC_MSG_RESULT([])
diff --git a/config/ac-macros/yassl.m4 b/config/ac-macros/yassl.m4
index fb7c89181df73e238f8258c7102ef6b5a6030886..921333393438816eb1190b503e63300f0f532dbc 100644
--- a/config/ac-macros/yassl.m4
+++ b/config/ac-macros/yassl.m4
@@ -5,12 +5,9 @@ extra/yassl/src/Makefile)
 
 AC_DEFUN([MYSQL_CHECK_YASSL], [
   AC_MSG_CHECKING(for yaSSL)
-  AC_ARG_WITH([yassl],
-              [  --with-yassl          Include the yaSSL support],
-              [yassl=yes],
-              [yassl=no])
+  AC_ARG_WITH([yassl], [  --with-yassl          Include the yaSSL support],,)
 
-  if test "$yassl" = "yes"
+  if test "$with_yassl" = "yes"
   then
     if test "$openssl" != "no"
     then
@@ -30,5 +27,5 @@ AC_DEFUN([MYSQL_CHECK_YASSL], [
   AC_SUBST(openssl_libs)
   AC_SUBST(openssl_includes)
   AC_SUBST(yassl_dir)
-  AM_CONDITIONAL([HAVE_YASSL], [ test "$yassl" = "yes" ])
+  AM_CONDITIONAL([HAVE_YASSL], [ test "with_yassl" = "yes" ])
 ])
diff --git a/configure.in b/configure.in
index 8a5220dbf38caa72f07a288562b6311495324044..e06f32f5e97e1463ccb71ae1c76aca966d38f8f4 100644
--- a/configure.in
+++ b/configure.in
@@ -1,12 +1,12 @@
 dnl -*- ksh -*-
 dnl Process this file with autoconf to produce a configure script.
 
-AC_PREREQ(2.57)dnl		Minimum Autoconf version required.
+AC_PREREQ(2.52)dnl		Minimum Autoconf version required.
 
 AC_INIT(sql/mysqld.cc)
 AC_CANONICAL_SYSTEM
 # Don't forget to also update the NDB lines below.
-AM_INIT_AUTOMAKE(mysql, 5.0.11-beta)
+AM_INIT_AUTOMAKE(mysql, 5.0.12-beta)
 AM_CONFIG_HEADER(config.h)
 
 PROTOCOL_VERSION=10
@@ -17,7 +17,7 @@ SHARED_LIB_VERSION=15:0:0
 # ndb version
 NDB_VERSION_MAJOR=5
 NDB_VERSION_MINOR=0
-NDB_VERSION_BUILD=11
+NDB_VERSION_BUILD=12
 NDB_VERSION_STATUS="beta"
 
 # Set all version vars based on $VERSION. How do we do this more elegant ?
@@ -130,6 +130,7 @@ AC_PROG_MAKE_SET
 # Hack for OS X/Darwin and Metrowerks CodeWarrior
 AC_ARG_WITH(darwin-mwcc,
 [  --with-darwin-mwcc      Use Metrowerks CodeWarrior wrappers on OS X/Darwin],[
+ if [ "with_darwin_mwcc" = yes ] ; then
   builddir=`pwd`
   ccwrapper="$builddir/support-files/MacOSX/mwcc-wrapper"
   arwrapper="$builddir/support-files/MacOSX/mwar-wrapper"
@@ -141,7 +142,7 @@ AC_ARG_WITH(darwin-mwcc,
   export CC CXX LD AR RANLIB
   AC_SUBST(AR)
   AC_SUBST(RANLIB)
-  with_darwin_mwcc=yes
+ fi
 ])
 
 AM_CONDITIONAL(DARWIN_MWCC, test x$with_darwin_mwcc = xyes)
diff --git a/extra/replace.c b/extra/replace.c
index 0b7d96002326775b8ebbff00be7b0f949f5824c3..9acf1620d49714bbf71b54b6bb6ac24962358c16 100644
--- a/extra/replace.c
+++ b/extra/replace.c
@@ -1053,12 +1053,18 @@ static int convert_file(REPLACE *rep, my_string name)
   int error;
   FILE *in,*out;
   char dir_buff[FN_REFLEN], tempname[FN_REFLEN];
+  char link_name[FN_REFLEN], *org_name = name;
   File temp_file;
   DBUG_ENTER("convert_file");
 
-  if (!(in=my_fopen(name,O_RDONLY,MYF(MY_WME))))
+  /* check if name is a symlink */
+#ifdef HAVE_READLINK  
+  org_name= (!my_disable_symlinks && 
+             !my_readlink(link_name, name, MYF(0))) ? link_name : name;
+#endif
+  if (!(in= my_fopen(org_name,O_RDONLY,MYF(MY_WME))))
     DBUG_RETURN(1);
-  dirname_part(dir_buff,name);
+  dirname_part(dir_buff,org_name);
   if ((temp_file= create_temp_file(tempname, dir_buff, "PR", O_WRONLY,
                                    MYF(MY_WME))) < 0)
   {
@@ -1075,7 +1081,7 @@ static int convert_file(REPLACE *rep, my_string name)
   my_fclose(in,MYF(0)); my_fclose(out,MYF(0));
 
   if (updated && ! error)
-    my_redel(name,tempname,MYF(MY_WME | MY_LINK_WARNING));
+    my_redel(org_name,tempname,MYF(MY_WME | MY_LINK_WARNING));
   else
     my_delete(tempname,MYF(MY_WME));
   if (!silent && ! error)
diff --git a/extra/yassl/src/Makefile.am b/extra/yassl/src/Makefile.am
index 4ebb9a2d86245e7e59a7602a306ad19ffdc51f0c..83397e2416887ee1502b1b7eca5c2998a1831a93 100644
--- a/extra/yassl/src/Makefile.am
+++ b/extra/yassl/src/Makefile.am
@@ -1,7 +1,7 @@
 INCLUDES = -I../include -I../taocrypt/include -I../mySTL
 
-noinst_LIBRARIES = libyassl.a
-libyassl_a_SOURCES = buffer.cpp cert_wrapper.cpp crypto_wrapper.cpp \
+noinst_LTLIBRARIES = libyassl.la
+libyassl_la_SOURCES = buffer.cpp cert_wrapper.cpp crypto_wrapper.cpp \
 	handshake.cpp lock.cpp log.cpp socket_wrapper.cpp ssl.cpp \
 	template_instnt.cpp timer.cpp yassl_imp.cpp yassl_error.cpp yassl_int.cpp
 EXTRA_DIST = ../include/*.hpp ../include/openssl/*.h
diff --git a/extra/yassl/taocrypt/src/Makefile.am b/extra/yassl/taocrypt/src/Makefile.am
index 5bf45074a98db2ea3b678f6d197b5671b06389bd..4549c218d87fcbcc1a1c081ca4a272b7a4d96e54 100644
--- a/extra/yassl/taocrypt/src/Makefile.am
+++ b/extra/yassl/taocrypt/src/Makefile.am
@@ -1,7 +1,7 @@
 INCLUDES = -I../include -I../../mySTL
 
-noinst_LIBRARIES = libtaocrypt.a
-libtaocrypt_a_SOURCES  = aes.cpp aestables.cpp algebra.cpp arc4.cpp asn.cpp \
+noinst_LTLIBRARIES = libtaocrypt.la
+libtaocrypt_la_SOURCES  = aes.cpp aestables.cpp algebra.cpp arc4.cpp asn.cpp \
 	coding.cpp dh.cpp des.cpp dsa.cpp file.cpp hash.cpp integer.cpp \
 	md2.cpp md5.cpp misc.cpp random.cpp ripemd.cpp rsa.cpp sha.cpp \
 	template_instnt.cpp
diff --git a/extra/yassl/taocrypt/taocrypt.vcproj b/extra/yassl/taocrypt/taocrypt.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..603fafd4090eba7e40d54fad7969d948d65ea29b
--- /dev/null
+++ b/extra/yassl/taocrypt/taocrypt.vcproj
@@ -0,0 +1,602 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="taocrypt"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Debug"
+			IntermediateDirectory=".\Debug"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="include,..\mySTL"
+				PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
+				ExceptionHandling="FALSE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderFile=".\Debug/taocrypt.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				BrowseInformation="1"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="4"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Debug\taocrypt.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Release"
+			IntermediateDirectory=".\Release"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="include,..\mySTL"
+				PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
+				StringPooling="TRUE"
+				ExceptionHandling="FALSE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderFile=".\Release/taocrypt.pch"
+				AssemblerListingLocation=".\Release/"
+				ObjectFile=".\Release/"
+				ProgramDataBaseFileName=".\Release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Release\taocrypt.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="src\aes.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="src\aestables.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="src\algebra.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="src\arc4.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="src\asn.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="src\coding.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="src\des.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="src\dh.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="src\dsa.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="src\file.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="src\hash.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="src\integer.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="src\md2.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="src\md5.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="src\misc.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="src\random.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="src\ripemd.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="src\rsa.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="src\sha.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="include\aes.hpp">
+			</File>
+			<File
+				RelativePath="include\algebra.hpp">
+			</File>
+			<File
+				RelativePath="include\arc4.hpp">
+			</File>
+			<File
+				RelativePath="include\asn.hpp">
+			</File>
+			<File
+				RelativePath="include\block.hpp">
+			</File>
+			<File
+				RelativePath="include\coding.hpp">
+			</File>
+			<File
+				RelativePath="include\des.hpp">
+			</File>
+			<File
+				RelativePath="include\dh.hpp">
+			</File>
+			<File
+				RelativePath="include\dsa.hpp">
+			</File>
+			<File
+				RelativePath="include\error.hpp">
+			</File>
+			<File
+				RelativePath="include\file.hpp">
+			</File>
+			<File
+				RelativePath="include\hash.hpp">
+			</File>
+			<File
+				RelativePath="include\hmac.hpp">
+			</File>
+			<File
+				RelativePath="include\integer.hpp">
+			</File>
+			<File
+				RelativePath="include\md2.hpp">
+			</File>
+			<File
+				RelativePath="include\md5.hpp">
+			</File>
+			<File
+				RelativePath="include\misc.hpp">
+			</File>
+			<File
+				RelativePath="include\modarith.hpp">
+			</File>
+			<File
+				RelativePath="include\modes.hpp">
+			</File>
+			<File
+				RelativePath="include\random.hpp">
+			</File>
+			<File
+				RelativePath="include\ripemd.hpp">
+			</File>
+			<File
+				RelativePath="include\rsa.hpp">
+			</File>
+			<File
+				RelativePath="include\sha.hpp">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/extra/yassl/yassl.vcproj b/extra/yassl/yassl.vcproj
new file mode 100755
index 0000000000000000000000000000000000000000..e2915e3f575d658c2d3921c9f60abcba670420d7
--- /dev/null
+++ b/extra/yassl/yassl.vcproj
@@ -0,0 +1,425 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="yassl"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Debug"
+			IntermediateDirectory=".\Debug"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="include,taocrypt\include,mySTL"
+				PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
+				ExceptionHandling="FALSE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderFile=".\Debug/yassl.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				BrowseInformation="1"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="4"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Debug\yassl.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Release"
+			IntermediateDirectory=".\Release"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="include,taocrypt\include,mySTL"
+				PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
+				StringPooling="TRUE"
+				ExceptionHandling="FALSE"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="TRUE"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderFile=".\Release/yassl.pch"
+				AssemblerListingLocation=".\Release/"
+				ObjectFile=".\Release/"
+				ProgramDataBaseFileName=".\Release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Release\yassl.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="src\buffer.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="src\cert_wrapper.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="src\crypto_wrapper.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="src\handshake.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="src\lock.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="src\log.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="src\socket_wrapper.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="src\ssl.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="src\timer.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="src\yassl_error.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="src\yassl_imp.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="src\yassl_int.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						BrowseInformation="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="include\buffer.hpp">
+			</File>
+			<File
+				RelativePath="include\cert_wrapper.hpp">
+			</File>
+			<File
+				RelativePath="include\crypto_wrapper.hpp">
+			</File>
+			<File
+				RelativePath="include\factory.hpp">
+			</File>
+			<File
+				RelativePath="include\handshake.hpp">
+			</File>
+			<File
+				RelativePath="include\lock.hpp">
+			</File>
+			<File
+				RelativePath="include\log.hpp">
+			</File>
+			<File
+				RelativePath="include\socket_wrapper.hpp">
+			</File>
+			<File
+				RelativePath="include\timer.hpp">
+			</File>
+			<File
+				RelativePath="include\yassl_error.hpp">
+			</File>
+			<File
+				RelativePath="include\yassl_imp.hpp">
+			</File>
+			<File
+				RelativePath="include\yassl_int.hpp">
+			</File>
+			<File
+				RelativePath="include\yassl_types.hpp">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/include/config-netware.h b/include/config-netware.h
index 906f557f60883e4f036d8c004e05d22a9fe63af9..16fa451a770ac7bc20fdce0b8d4c45178f0c01f6 100644
--- a/include/config-netware.h
+++ b/include/config-netware.h
@@ -46,6 +46,7 @@ extern "C" {
 #undef HAVE_SYS_MMAN_H
 #undef HAVE_SYNCH_H
 #undef HAVE_MMAP
+#undef HAVE_RINT
 
 #define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
 #define HAVE_PTHREAD_SIGMASK 1
diff --git a/include/config-win.h b/include/config-win.h
index 6e0740497b030bb9abc94a7031969a5283096cfc..4eaf97cd4f568bf161403018f8b448256797b2a6 100644
--- a/include/config-win.h
+++ b/include/config-win.h
@@ -285,6 +285,7 @@ inline double ulonglong2double(ulonglong value)
 			   *(((long *) T)+1) = *(((long*) &V)+1); }
 #define float4get(V,M) { *((long *) &(V)) = *((long*) (M)); }
 #define floatstore(T,V) memcpy((byte*)(T), (byte*)(&V), sizeof(float))
+#define floatget(V,M)   memcpy((byte*)(&V), (byte*)(M), sizeof(float))
 #define float8get(V,M) doubleget((V),(M))
 #define float4store(V,M) memcpy((byte*) V,(byte*) (&M),sizeof(float))
 #define float8store(V,M) doublestore((V),(M))
diff --git a/include/m_string.h b/include/m_string.h
index d3465363bebd5752ec82c8c24208ee75947410cd..33ba9c155c273e5c39cb8ceae8c82540d60911b5 100644
--- a/include/m_string.h
+++ b/include/m_string.h
@@ -88,6 +88,13 @@
 extern "C" {
 #endif
 
+/*
+  my_str_malloc() and my_str_free() are assigned to implementations in
+  strings/alloc.c, but can be overridden in the calling program.
+ */
+extern void *(*my_str_malloc)(size_t);
+extern void (*my_str_free)(void *);
+
 #if defined(HAVE_STPCPY) && !defined(HAVE_mit_thread)
 #define strmov(A,B) stpcpy((A),(B))
 #ifndef stpcpy
diff --git a/include/my_list.h b/include/my_list.h
index f786621e311ee35f0cd7266d98d2b67059e76d96..92598696fc447a5aaea2748a24231786a31dc3df 100644
--- a/include/my_list.h
+++ b/include/my_list.h
@@ -36,7 +36,7 @@ extern void list_free(LIST *root,unsigned int free_data);
 extern unsigned int list_length(LIST *);
 extern int list_walk(LIST *,list_walk_action action,gptr argument);
 
-#define rest(a) ((a)->next)
+#define list_rest(a) ((a)->next)
 #define list_push(a,b) (a)=list_cons((b),(a))
 #define list_pop(A) {LIST *old=(A); (A)=list_delete(old,old) ; my_free((gptr) old,MYF(MY_FAE)); }
 
diff --git a/include/my_sys.h b/include/my_sys.h
index 6747733da9c068b10fe7754a5945f3ee20d5684b..11e8a36f5fa903acc225efaca784d9519c2dd3e7 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -218,7 +218,7 @@ extern int errno;			/* declare errno */
 #endif					/* #ifndef errno */
 extern char NEAR errbuff[NRERRBUFFS][ERRMSGSIZE];
 extern char *home_dir;			/* Home directory for user */
-extern char *my_progname;		/* program-name (printed in errors) */
+extern const char *my_progname;		/* program-name (printed in errors) */
 extern char NEAR curr_dir[];		/* Current directory for user */
 extern int (*error_handler_hook)(uint my_err, const char *str,myf MyFlags);
 extern int (*fatal_error_handler_hook)(uint my_err, const char *str,
@@ -866,6 +866,11 @@ extern void add_compiled_collation(CHARSET_INFO *cs);
 extern ulong escape_string_for_mysql(CHARSET_INFO *charset_info,
                                      char *to, ulong to_length,
                                      const char *from, ulong length);
+#ifdef __WIN__
+#define BACKSLASH_MBTAIL
+/* File system character set */
+extern CHARSET_INFO *fs_character_set(void);
+#endif
 extern ulong escape_quotes_for_mysql(CHARSET_INFO *charset_info,
                                      char *to, ulong to_length,
                                      const char *from, ulong length);
diff --git a/include/my_time.h b/include/my_time.h
index aa68a6f0bbd75bb0f9f58fabac647d8d2454627b..e52ef69475d4bd8c3a77ee845f9ca022a18f66f8 100644
--- a/include/my_time.h
+++ b/include/my_time.h
@@ -60,8 +60,8 @@ ulonglong TIME_to_ulonglong_time(const MYSQL_TIME *time);
 ulonglong TIME_to_ulonglong(const MYSQL_TIME *time);
 
 
-bool str_to_time(const char *str,uint length, MYSQL_TIME *l_time,
-                 int *was_cut);
+my_bool str_to_time(const char *str,uint length, MYSQL_TIME *l_time,
+                    int *was_cut);
 
 long calc_daynr(uint year,uint month,uint day);
 uint calc_days_in_year(uint year);
@@ -69,7 +69,8 @@ uint calc_days_in_year(uint year);
 void init_time(void);
 
 my_time_t 
-my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone, bool *in_dst_time_gap);
+my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone,
+                  my_bool *in_dst_time_gap);
 
 void set_zero_time(MYSQL_TIME *tm, enum enum_mysql_timestamp_type time_type);
 
diff --git a/include/thr_lock.h b/include/thr_lock.h
index ef4e6a7e97b8e693ca1ee8ca4ebf524b886adf57..251d8e7c9cfc14858a34e9a036618e1e2f7a2dcc 100644
--- a/include/thr_lock.h
+++ b/include/thr_lock.h
@@ -144,7 +144,7 @@ enum enum_thr_lock_result thr_multi_lock(THR_LOCK_DATA **data,
                                          uint count, THR_LOCK_OWNER *owner);
 void thr_multi_unlock(THR_LOCK_DATA **data,uint count);
 void thr_abort_locks(THR_LOCK *lock);
-bool thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread);
+my_bool thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread);
 void thr_print_locks(void);		/* For debugging */
 my_bool thr_upgrade_write_delay_lock(THR_LOCK_DATA *data);
 my_bool thr_reschedule_write_lock(THR_LOCK_DATA *data);
diff --git a/innobase/btr/btr0pcur.c b/innobase/btr/btr0pcur.c
index cb398b4afab77c434e1f298fef3efaef73b8e3d2..5dbbca0b17dbb2875ad0d9587c32de1e858e27d0 100644
--- a/innobase/btr/btr0pcur.c
+++ b/innobase/btr/btr0pcur.c
@@ -210,7 +210,7 @@ btr_pcur_restore_position(
 			     && cursor->pos_state != BTR_PCUR_IS_POSITIONED)) {
 		ut_print_buf(stderr, (const byte*)cursor, sizeof(btr_pcur_t));
 		if (cursor->trx_if_known) {
-			trx_print(stderr, cursor->trx_if_known);
+			trx_print(stderr, cursor->trx_if_known, 0);
 		}
 		
 		ut_error;
diff --git a/innobase/buf/buf0buf.c b/innobase/buf/buf0buf.c
index fe4498e6f10cca9952f1c70a4230764afab62384..aa3aef7f97cef46be6701aee40672540ac9fa68d 100644
--- a/innobase/buf/buf0buf.c
+++ b/innobase/buf/buf0buf.c
@@ -1776,6 +1776,15 @@ buf_page_create(
 	buf_flush_free_margin();
 
 	frame = block->frame;
+
+	/* Reset to zero the file flush lsn field in the page; if the first
+	page of an ibdata file is 'created' in this function into the buffer
+	pool then we lose the original contents of the file flush lsn stamp.
+	Then InnoDB could in a crash recovery print a big, false, corruption
+	warning if the stamp contains an lsn bigger than the ib_logfile lsn. */
+
+	memset(frame + FIL_PAGE_FILE_FLUSH_LSN, 0, 8);
+
 #ifdef UNIV_DEBUG
 	buf_dbg_counter++;
 
diff --git a/innobase/include/os0file.h b/innobase/include/os0file.h
index 362e3552411c26ae69ea78c07fb748526c68e5a5..adbc4afafd2fa84dc5c9af329fdbc626a6beef09 100644
--- a/innobase/include/os0file.h
+++ b/innobase/include/os0file.h
@@ -19,7 +19,9 @@ Created 10/21/1995 Heikki Tuuri
 
 typedef	struct fil_node_struct	fil_node_t;
 
+#ifdef UNIV_DO_FLUSH
 extern ibool	os_do_not_call_flush_at_each_write;
+#endif /* UNIV_DO_FLUSH */
 extern ibool	os_has_said_disk_full;
 extern ibool	os_aio_print_debug;
 
diff --git a/innobase/include/read0read.h b/innobase/include/read0read.h
index db6bf8880952fbc5e62ceeda1c9980039f540d1d..7a91248cf7fe5a05c2850f845615232708cd6efd 100644
--- a/innobase/include/read0read.h
+++ b/innobase/include/read0read.h
@@ -68,7 +68,34 @@ void
 read_view_print(
 /*============*/
 	read_view_t*	view);	/* in: read view */
+/*************************************************************************
+Create a consistent cursor view for mysql to be used in cursors. In this 
+consistent read view modifications done by the creating transaction or future
+transactions are not visible. */
+
+cursor_view_t*
+read_cursor_view_create_for_mysql(
+/*==============================*/
+	trx_t*		cr_trx);/* in: trx where cursor view is created */
+/*************************************************************************
+Close a given consistent cursor view for mysql and restore global read view
+back to a transaction read view. */
+
+void
+read_cursor_view_close_for_mysql(
+/*=============================*/
+	trx_t*		trx,		/* in: trx */
+	cursor_view_t*	curview);	/* in: cursor view to be closed */
+/*************************************************************************
+This function sets a given consistent cursor view to a transaction
+read view if given consistent cursor view is not NULL. Otherwise, function
+restores a global read view to a transaction read view. */
 
+void 
+read_cursor_set_for_mysql(
+/*======================*/
+	trx_t*		trx,	/* in: transaction where cursor is set */
+	cursor_view_t*	curview);/* in: consistent cursor view to be set */
 
 /* Read view lists the trx ids of those transactions for which a consistent
 read should not see the modifications to the database. */
@@ -100,6 +127,20 @@ struct read_view_struct{
 				/* List of read views in trx_sys */
 };
 
+/* Implement InnoDB framework to support consistent read views in
+cursors. This struct holds both heap where consistent read view
+is allocated and pointer to a read view. */
+
+struct cursor_view_struct{
+	mem_heap_t*	heap;
+				/* Memory heap for the cursor view */
+	read_view_t*	read_view;	
+				/* Consistent read view of the cursor*/
+	ulint		n_mysql_tables_in_use;
+                                /* number of Innobase tables used in the
+				  processing of this cursor */
+};
+
 #ifndef UNIV_NONINL
 #include "read0read.ic"
 #endif
diff --git a/innobase/include/read0types.h b/innobase/include/read0types.h
index 5eb3e533f895961b4dbdeb71843b9c17a3695c1d..7d42728523e1f435edc0c268e1c2066da1df9e7b 100644
--- a/innobase/include/read0types.h
+++ b/innobase/include/read0types.h
@@ -10,5 +10,6 @@ Created 2/16/1997 Heikki Tuuri
 #define read0types_h
 
 typedef struct read_view_struct	read_view_t;
+typedef struct cursor_view_struct	cursor_view_t;
 
 #endif
diff --git a/innobase/include/srv0srv.h b/innobase/include/srv0srv.h
index 116ae7b643880ca7dea1101e5b8e6730238d3cde..11347f430d465dd5b8f8f85285ed45fec487ed1c 100644
--- a/innobase/include/srv0srv.h
+++ b/innobase/include/srv0srv.h
@@ -94,6 +94,7 @@ extern ulint	srv_max_dirty_pages_pct;
 
 extern ulint	srv_force_recovery;
 extern ulong	srv_thread_concurrency;
+extern ulong	srv_commit_concurrency;
 
 extern ulint	srv_max_n_threads;
 
diff --git a/innobase/include/trx0trx.h b/innobase/include/trx0trx.h
index 146730d46f8945ffd38e1f440c131b1380eae00a..5dbf003594f3dfaa38fbb18d3c2684ec0959893f 100644
--- a/innobase/include/trx0trx.h
+++ b/innobase/include/trx0trx.h
@@ -329,17 +329,20 @@ trx_commit_step(
 /*============*/
 				/* out: query thread to run next, or NULL */
 	que_thr_t*	thr);	/* in: query thread */
+
 /**************************************************************************
-Prints info about a transaction to the standard output. The caller must
-own the kernel mutex and must have called
-innobase_mysql_prepare_print_arbitrary_thd(), unless he knows that MySQL or
-InnoDB cannot meanwhile change the info printed here. */
+Prints info about a transaction to the given file. The caller must own the
+kernel mutex and must have called
+innobase_mysql_prepare_print_arbitrary_thd(), unless he knows that MySQL
+or InnoDB cannot meanwhile change the info printed here. */
 
 void
 trx_print(
 /*======*/
-	FILE*	f,	/* in: output stream */
-	trx_t*	trx);	/* in: transaction */
+	FILE*	f,		/* in: output stream */
+	trx_t*	trx,		/* in: transaction */
+	uint	max_query_len);	/* in: max query length to print, or 0 to
+				   use the default max length */
 
 #ifndef UNIV_HOTBACKUP
 /**************************************************************************
@@ -602,8 +605,18 @@ struct trx_struct{
 	UT_LIST_BASE_NODE_T(lock_t) 
 			trx_locks;	/* locks reserved by the transaction */
 	/*------------------------------*/
-	mem_heap_t*	read_view_heap;	/* memory heap for the read view */
-	read_view_t*	read_view;	/* consistent read view or NULL */
+	mem_heap_t*	global_read_view_heap;	
+					/* memory heap for the global read 
+					view */
+	read_view_t*	global_read_view;
+					/* consistent read view associated
+					to a transaction or NULL */
+	read_view_t*	read_view;	/* consistent read view used in the
+					transaction or NULL, this read view
+					if defined can be normal read view 
+					associated to a transaction (i.e. 
+					same as global_read_view) or read view
+					associated to a cursor */
 	/*------------------------------*/
 	UT_LIST_BASE_NODE_T(trx_named_savept_t) 
 			trx_savepoints;	/* savepoints set with SAVEPOINT ...,
diff --git a/innobase/include/univ.i b/innobase/include/univ.i
index 132ac9e18c5cdcb0304efb05d76c4baa404359c0..6849dcd9c51d38230cced5d107042e0c3f0b3e5d 100644
--- a/innobase/include/univ.i
+++ b/innobase/include/univ.i
@@ -244,7 +244,7 @@ contains the sum of the following flag and the locally stored len. */
 #define UNIV_EXTERN_STORAGE_FIELD (UNIV_SQL_NULL - UNIV_PAGE_SIZE)
 
 /* Some macros to improve branch prediction and reduce cache misses */
-#if defined(__GNUC__) && (__GNUC__ > 2)
+#if defined(__GNUC__) && (__GNUC__ > 2) && ! defined(__INTEL_COMPILER)
 /* Tell the compiler that 'expr' probably evaluates to 'constant'. */
 # define UNIV_EXPECT(expr,constant) __builtin_expect(expr, constant)
 /* Tell the compiler that a pointer is likely to be NULL */
diff --git a/innobase/lock/lock0lock.c b/innobase/lock/lock0lock.c
index 280c4871ee94a5d8733f0e01e5f7e52643086f44..1f222d71d6abe496e221567a4aeaf5787263b2f3 100644
--- a/innobase/lock/lock0lock.c
+++ b/innobase/lock/lock0lock.c
@@ -3297,7 +3297,7 @@ lock_deadlock_recursive(
 
 				fputs("\n*** (1) TRANSACTION:\n", ef);
 
-				trx_print(ef, wait_lock->trx);
+				trx_print(ef, wait_lock->trx, 3000);
 
 				fputs(
 			"*** (1) WAITING FOR THIS LOCK TO BE GRANTED:\n", ef);
@@ -3310,7 +3310,7 @@ lock_deadlock_recursive(
 			
 				fputs("*** (2) TRANSACTION:\n", ef);
 
-				trx_print(ef, lock->trx);
+				trx_print(ef, lock->trx, 3000);
 
 				fputs("*** (2) HOLDS THE LOCK(S):\n", ef);
 			
@@ -4207,7 +4207,7 @@ lock_print_info_all_transactions(
 	while (trx) {
 		if (trx->conc_state == TRX_NOT_STARTED) {
 			fputs("---", file);
-			trx_print(file, trx);
+			trx_print(file, trx, 600);
 		}
 			
 		trx = UT_LIST_GET_NEXT(mysql_trx_list, trx);
@@ -4239,7 +4239,7 @@ loop:
 
 	if (nth_lock == 0) {
 		fputs("---", file);
-		trx_print(file, trx);
+		trx_print(file, trx, 600);
 		
 	        if (trx->read_view) {
 			fprintf(file,
diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c
index 48dc808e36cf78b3bdbc3072f0ea82ef71ea2450..9c87b59f018e29dea51bfe588959c29c8e733c6b 100644
--- a/innobase/os/os0file.c
+++ b/innobase/os/os0file.c
@@ -40,9 +40,13 @@ ulint	os_innodb_umask		= S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP;
 ulint	os_innodb_umask		= 0;
 #endif
 
+#ifdef UNIV_DO_FLUSH
 /* If the following is set to TRUE, we do not call os_file_flush in every
 os_file_write. We can set this TRUE when the doublewrite buffer is used. */
 ibool	os_do_not_call_flush_at_each_write	= FALSE;
+#else
+/* We do not call os_file_flush in every os_file_write. */
+#endif /* UNIV_DO_FLUSH */
 
 /* We use these mutexes to protect lseek + file i/o operation, if the
 OS does not provide an atomic pread or pwrite, or similar */
@@ -1985,6 +1989,7 @@ os_file_pwrite(
 	os_file_n_pending_pwrites--;
         os_mutex_exit(os_file_count_mutex);
 
+# ifdef UNIV_DO_FLUSH
 	if (srv_unix_file_flush_method != SRV_UNIX_LITTLESYNC
 	    && srv_unix_file_flush_method != SRV_UNIX_NOSYNC
 	    && !os_do_not_call_flush_at_each_write) {
@@ -1995,6 +2000,7 @@ os_file_pwrite(
 
 	        ut_a(TRUE == os_file_flush(file));
 	}
+# endif /* UNIV_DO_FLUSH */
 
         return(ret);
 #else
@@ -2017,6 +2023,7 @@ os_file_pwrite(
 	
 	ret = write(file, buf, (ssize_t)n);
 
+# ifdef UNIV_DO_FLUSH
 	if (srv_unix_file_flush_method != SRV_UNIX_LITTLESYNC
 	    && srv_unix_file_flush_method != SRV_UNIX_NOSYNC
 	    && !os_do_not_call_flush_at_each_write) {
@@ -2027,6 +2034,7 @@ os_file_pwrite(
 
 	        ut_a(TRUE == os_file_flush(file));
 	}
+# endif /* UNIV_DO_FLUSH */
 
 	os_mutex_exit(os_file_seek_mutexes[i]);
 
@@ -2313,9 +2321,11 @@ retry:
 	/* Always do fsync to reduce the probability that when the OS crashes,
 	a database page is only partially physically written to disk. */
 
+# ifdef UNIV_DO_FLUSH
 	if (!os_do_not_call_flush_at_each_write) {
 		ut_a(TRUE == os_file_flush(file));
 	}
+# endif /* UNIV_DO_FLUSH */
 
 	os_mutex_exit(os_file_seek_mutexes[i]);
 
@@ -3533,10 +3543,12 @@ os_aio_windows_handle(
 	if (ret && len == slot->len) {
 		ret_val = TRUE;
 
+# ifdef UNIV_DO_FLUSH
 		if (slot->type == OS_FILE_WRITE
 				&& !os_do_not_call_flush_at_each_write) {
 		         ut_a(TRUE == os_file_flush(slot->file));
 		}
+# endif /* UNIV_DO_FLUSH */
 	} else {
 		os_file_handle_error(slot->name, "Windows aio");
 		
@@ -3617,10 +3629,12 @@ os_aio_posix_handle(
 	*message1 = slot->message1;
 	*message2 = slot->message2;
 
+# ifdef UNIV_DO_FLUSH
 	if (slot->type == OS_FILE_WRITE
 				&& !os_do_not_call_flush_at_each_write) {
 		ut_a(TRUE == os_file_flush(slot->file));
 	}
+# endif /* UNIV_DO_FLUSH */
 
 	os_mutex_exit(array->mutex);
 
diff --git a/innobase/read/read0read.c b/innobase/read/read0read.c
index 0c4a037508e2b62b7af086981c551bc49a8eae5b..dc1ae2f1a16699e8763c095af15bdcc834d06de3 100644
--- a/innobase/read/read0read.c
+++ b/innobase/read/read0read.c
@@ -212,15 +212,16 @@ read_view_close_for_mysql(
 /*======================*/
 	trx_t*	trx)	/* in: trx which has a read view */
 {
-	ut_a(trx->read_view);
+	ut_a(trx->global_read_view);
 
 	mutex_enter(&kernel_mutex);
 
-	read_view_close(trx->read_view);
+	read_view_close(trx->global_read_view);
 
-	mem_heap_empty(trx->read_view_heap);
+	mem_heap_empty(trx->global_read_view_heap);
 
 	trx->read_view = NULL;
+	trx->global_read_view = NULL;
 
 	mutex_exit(&kernel_mutex);
 }
@@ -258,3 +259,146 @@ read_view_print(
 			(ulong) ut_dulint_get_low(read_view_get_nth_trx_id(view, i)));
 	}
 }
+
+/*************************************************************************
+Create a consistent cursor view for mysql to be used in cursors. In this 
+consistent read view modifications done by the creating transaction or future
+transactions are not visible. */
+
+cursor_view_t*
+read_cursor_view_create_for_mysql(
+/*==============================*/
+	trx_t*	cr_trx)	/* in: trx where cursor view is created */
+{
+	cursor_view_t*	curview;
+	read_view_t*	view;
+	mem_heap_t*	heap;
+	trx_t*		trx;
+	ulint		n;
+
+	ut_a(cr_trx);
+
+	/* Use larger heap than in trx_create when creating a read_view 
+	because cursors are quite long. */
+
+	heap = mem_heap_create(512);
+
+	curview = (cursor_view_t*) mem_heap_alloc(heap, sizeof(cursor_view_t));
+	curview->heap = heap;
+
+        /* Drop cursor tables from consideration when evaluating the need of
+          auto-commit */
+	curview->n_mysql_tables_in_use = cr_trx->n_mysql_tables_in_use;
+	cr_trx->n_mysql_tables_in_use = 0;
+
+	mutex_enter(&kernel_mutex);
+
+	curview->read_view = read_view_create_low(
+				UT_LIST_GET_LEN(trx_sys->trx_list), 
+					curview->heap);
+
+	view = curview->read_view;
+	view->creator = cr_trx;
+
+	/* No future transactions should be visible in the view */
+
+  	view->low_limit_no = trx_sys->max_trx_id;
+	view->low_limit_id = view->low_limit_no;
+
+	view->can_be_too_old = FALSE;
+
+	n = 0;
+	trx = UT_LIST_GET_FIRST(trx_sys->trx_list);
+
+	/* No active transaction should be visible, not even cr_trx !*/
+
+	while (trx) {
+                if (trx->conc_state == TRX_ACTIVE ||
+			trx->conc_state == TRX_PREPARED) {
+
+			read_view_set_nth_trx_id(view, n, trx->id);
+
+			n++;
+
+			/* NOTE that a transaction whose trx number is <
+			trx_sys->max_trx_id can still be active, if it is
+			in the middle of its commit! Note that when a
+			transaction starts, we initialize trx->no to
+			ut_dulint_max. */
+
+			if (ut_dulint_cmp(view->low_limit_no, trx->no) > 0) {
+
+				view->low_limit_no = trx->no;
+			}	
+		}
+
+		trx = UT_LIST_GET_NEXT(trx_list, trx);
+	}
+
+	view->n_trx_ids = n;		
+
+	if (n > 0) {
+		/* The last active transaction has the smallest id: */
+		view->up_limit_id = read_view_get_nth_trx_id(view, n - 1);
+	} else {
+		view->up_limit_id = view->low_limit_id;
+	}
+
+	UT_LIST_ADD_FIRST(view_list, trx_sys->view_list, view);
+	
+	mutex_exit(&kernel_mutex);
+
+	return(curview);
+}
+
+/*************************************************************************
+Close a given consistent cursor view for mysql and restore global read view
+back to a transaction read view. */
+
+void
+read_cursor_view_close_for_mysql(
+/*=============================*/
+	trx_t*		trx,	/* in: trx */
+	cursor_view_t*	curview)/* in: cursor view to be closed */
+{
+	ut_a(curview);
+	ut_a(curview->read_view); 
+	ut_a(curview->heap);
+
+        /* Add cursor's tables to the global count of active tables that
+          belong to this transaction */
+	trx->n_mysql_tables_in_use += curview->n_mysql_tables_in_use;
+
+	mutex_enter(&kernel_mutex);
+
+	read_view_close(curview->read_view);
+	trx->read_view = trx->global_read_view;
+
+	mutex_exit(&kernel_mutex);
+
+	mem_heap_free(curview->heap);
+}
+	
+/*************************************************************************
+This function sets a given consistent cursor view to a transaction
+read view if given consistent cursor view is not NULL. Otherwise, function
+restores a global read view to a transaction read view. */
+
+void 
+read_cursor_set_for_mysql(
+/*======================*/
+	trx_t*		trx,	/* in: transaction where cursor is set */
+	cursor_view_t*	curview)/* in: consistent cursor view to be set */
+{
+	ut_a(trx);
+
+	mutex_enter(&kernel_mutex);
+
+	if (UNIV_LIKELY(curview != NULL)) {
+		trx->read_view = curview->read_view;
+	} else {
+		trx->read_view = trx->global_read_view;
+	}
+
+	mutex_exit(&kernel_mutex);
+}
diff --git a/innobase/row/row0ins.c b/innobase/row/row0ins.c
index bce775c25d66bc03eb0de3057ced57c4db63e725..75d8117a73ed39bb9e6dbd6546d69c2cffd8ef65 100644
--- a/innobase/row/row0ins.c
+++ b/innobase/row/row0ins.c
@@ -602,7 +602,7 @@ row_ins_foreign_report_err(
 	rewind(ef);
 	ut_print_timestamp(ef);
 	fputs(" Transaction:\n", ef);
-	trx_print(ef, trx);
+	trx_print(ef, trx, 600);
 
 	fputs("Foreign key constraint fails for table ", ef);
 	ut_print_name(ef, trx, foreign->foreign_table_name);
@@ -653,7 +653,7 @@ row_ins_foreign_report_add_err(
 	rewind(ef);
 	ut_print_timestamp(ef);
 	fputs(" Transaction:\n", ef);
-	trx_print(ef, trx);
+	trx_print(ef, trx, 600);
 	fputs("Foreign key constraint fails for table ", ef);
 	ut_print_name(ef, trx, foreign->foreign_table_name);
 	fputs(":\n", ef);
@@ -1228,7 +1228,7 @@ run_again:
 			rewind(ef);
 			ut_print_timestamp(ef);
 			fputs(" Transaction:\n", ef);
-			trx_print(ef, trx);
+			trx_print(ef, trx, 600);
 			fputs("Foreign key constraint fails for table ", ef);
 			ut_print_name(ef, trx, foreign->foreign_table_name);
 			fputs(":\n", ef);
diff --git a/innobase/row/row0sel.c b/innobase/row/row0sel.c
index 15439bed7e754141c50f11a550bdcb3d2a354854..7328db1c65d6ad7b3a33027f7c88b59fb5c37f45 100644
--- a/innobase/row/row0sel.c
+++ b/innobase/row/row0sel.c
@@ -2524,13 +2524,21 @@ row_sel_store_mysql_rec(
 					(byte) (templ->mysql_null_bit_mask);
 			switch (templ->type) {
 			case DATA_VARCHAR:
-			case DATA_CHAR:
 			case DATA_BINARY:
+			case DATA_VARMYSQL:
+				if (templ->mysql_type
+				    == DATA_MYSQL_TRUE_VARCHAR) {
+					/* This is a >= 5.0.3 type
+					true VARCHAR.  Zero the field. */
+					pad_char = 0x00;
+					break;
+				}
+				/* Fall through */
+			case DATA_CHAR:
 			case DATA_FIXBINARY:
 			case DATA_MYSQL:
-			case DATA_VARMYSQL:
-			        /* MySQL pads all non-BLOB and non-TEXT
-				string types with space ' ' */
+			        /* MySQL pads all string types (except
+				BLOB, TEXT and true VARCHAR) with space. */
 				if (UNIV_UNLIKELY(templ->mbminlen == 2)) {
 					/* Treat UCS2 as a special case. */
 					data = mysql_rec
@@ -2677,7 +2685,7 @@ row_sel_get_clust_rec_for_mysql(
 				"InnoDB: clust index record ", stderr);
 			rec_print(stderr, clust_rec, clust_index);
 			putc('\n', stderr);
-			trx_print(stderr, trx);
+			trx_print(stderr, trx, 600);
 
 			fputs("\n"
 "InnoDB: Submit a detailed bug report to http://bugs.mysql.com\n", stderr);
@@ -3092,6 +3100,7 @@ row_search_for_mysql(
 "http://dev.mysql.com/doc/mysql/en/InnoDB_troubleshooting_datadict.html\n"
 "InnoDB: how you can resolve the problem.\n",
 				prebuilt->table->name);
+
 		return(DB_ERROR);
 	}
 
@@ -3119,7 +3128,7 @@ row_search_for_mysql(
 "InnoDB: Error: MySQL is trying to perform a SELECT\n"
 "InnoDB: but it has not locked any tables in ::external_lock()!\n",
                       stderr);
-		trx_print(stderr, trx);
+		trx_print(stderr, trx, 600);
                 fputc('\n', stderr);
 	}
 
@@ -3446,7 +3455,7 @@ shortcut_fails_too_big_rec:
 			fputs(
 "InnoDB: Error: MySQL is trying to perform a consistent read\n"
 "InnoDB: but the read view is not assigned!\n", stderr);
-			trx_print(stderr, trx);
+			trx_print(stderr, trx, 600);
                         fputc('\n', stderr);
 			ut_a(0);
 		}
@@ -4136,7 +4145,8 @@ row_search_check_if_query_cache_permitted(
 		    && !trx->read_view) {
 
 			trx->read_view = read_view_open_now(trx,
-						trx->read_view_heap);
+						trx->global_read_view_heap);
+			trx->global_read_view = trx->read_view;
 		}
 	}
 	
diff --git a/innobase/row/row0umod.c b/innobase/row/row0umod.c
index 0225a9faec5eddd8efa1b205fb2dcb3ec14f6d30..f906027033f52d20c392ced973a34cf1cbe9e631 100644
--- a/innobase/row/row0umod.c
+++ b/innobase/row/row0umod.c
@@ -431,7 +431,7 @@ row_undo_mod_del_unmark_sec_and_undo_update(
 			"InnoDB: record ", stderr);
 		rec_print(stderr, btr_pcur_get_rec(&pcur), index);
 		putc('\n', stderr);
-		trx_print(stderr, trx);
+		trx_print(stderr, trx, 0);
 		fputs("\n"
 "InnoDB: Submit a detailed bug report to http://bugs.mysql.com\n", stderr);
 	} else {
diff --git a/innobase/row/row0upd.c b/innobase/row/row0upd.c
index 514fb6bd5771002c1d36caa8098a2c73e9ac9f93..4f44dbeae67c79f8e8cdded0c3e21cf20e19ca55 100644
--- a/innobase/row/row0upd.c
+++ b/innobase/row/row0upd.c
@@ -1279,7 +1279,7 @@ row_upd_sec_index_entry(
 		rec_print(stderr, rec, index);
 		putc('\n', stderr);
 
-		trx_print(stderr, trx);
+		trx_print(stderr, trx, 0);
 
 		fputs("\n"
 "InnoDB: Submit a detailed bug report to http://bugs.mysql.com\n", stderr);
diff --git a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c
index 837c5be2bb609f1c6197509d9dd32b57266752e3..c585536baee9a726dfd43ef4f5196c954800acad 100644
--- a/innobase/srv/srv0srv.c
+++ b/innobase/srv/srv0srv.c
@@ -261,6 +261,7 @@ Value 10 should be good if there are less than 4 processors + 4 disks in the
 computer. Bigger computers need bigger values. */
 
 ulong	srv_thread_concurrency	= SRV_CONCURRENCY_THRESHOLD;
+ulong   srv_commit_concurrency  = 0;
 
 os_fast_mutex_t	srv_conc_mutex;		/* this mutex protects srv_conc data
 					structures */
@@ -999,7 +1000,7 @@ retry:
 		fputs(
 "  InnoDB: Error: trying to declare trx to enter InnoDB, but\n"
 "InnoDB: it already is declared.\n", stderr);
-		trx_print(stderr, trx);
+		trx_print(stderr, trx, 0);
 		putc('\n', stderr);
 		os_fast_mutex_unlock(&srv_conc_mutex);
 
@@ -1711,6 +1712,10 @@ srv_printf_innodb_monitor(
 	fprintf(file, "%ld queries inside InnoDB, %lu queries in queue\n",
        		       (long) srv_conc_n_threads,
 		       (ulong) srv_conc_n_waiting_threads);
+
+	fprintf(file, "%lu read views open inside InnoDB\n",
+			UT_LIST_GET_LEN(trx_sys->view_list));
+
         n_reserved = fil_space_get_n_reserved_extents(0);
         if (n_reserved > 0) {
                 fprintf(file,
diff --git a/innobase/srv/srv0start.c b/innobase/srv/srv0start.c
index 7798e0c8e32d33e89f10f1785b321db4dd2fa30e..ffe4ba08ee9b15da6258ae2f4a8440656b62d793 100644
--- a/innobase/srv/srv0start.c
+++ b/innobase/srv/srv0start.c
@@ -1833,6 +1833,16 @@ innobase_shutdown_for_mysql(void)
 	srv_free();
 	os_sync_free();
 
+	/* Check that all read views are closed except read view owned
+	by a purge. */
+
+	if (UT_LIST_GET_LEN(trx_sys->view_list) > 1) {
+	        fprintf(stderr,
+"InnoDB: Error: all read views were not closed before shutdown:\n"
+"InnoDB: %lu read views open \n",
+		UT_LIST_GET_LEN(trx_sys->view_list) - 1);
+	}
+
 	/* 5. Free all allocated memory and the os_fast_mutex created in
 	ut0mem.c */
 
diff --git a/innobase/trx/trx0sys.c b/innobase/trx/trx0sys.c
index 68fe6d5079a9d954397a52fa21867c13c23aa7fc..bf48c30e9428dea47b4537356673c254f5644814 100644
--- a/innobase/trx/trx0sys.c
+++ b/innobase/trx/trx0sys.c
@@ -97,8 +97,9 @@ trx_doublewrite_init(
 
 	/* Since we now start to use the doublewrite buffer, no need to call
 	fsync() after every write to a data file */
-
+#ifdef UNIV_DO_FLUSH
 	os_do_not_call_flush_at_each_write = TRUE;
+#endif /* UNIV_DO_FLUSH */
 
 	mutex_create(&(trx_doublewrite->mutex));
 	mutex_set_level(&(trx_doublewrite->mutex), SYNC_DOUBLEWRITE);
diff --git a/innobase/trx/trx0trx.c b/innobase/trx/trx0trx.c
index 10fbf3468c01f1b68a6d1d5d337c21a4944c3563..078befb81d2307879b23a1780f03f6fcf85d77e5 100644
--- a/innobase/trx/trx0trx.c
+++ b/innobase/trx/trx0trx.c
@@ -30,8 +30,9 @@ Created 3/26/1996 Heikki Tuuri
 copy MUST be equal to the one in mysql/sql/ha_innodb.cc ! */
 
 void innobase_mysql_print_thd(
-	FILE* f,
-	void* thd);
+	FILE*	f,
+	void*	thd,
+	uint	max_query_len);
 
 /* Dummy session used currently in MySQL interface */
 sess_t*		trx_dummy_sess = NULL;
@@ -159,7 +160,8 @@ trx_create(
 
 	trx->auto_inc_lock = NULL;
 	
-	trx->read_view_heap = mem_heap_create(256);
+	trx->global_read_view_heap = mem_heap_create(256);
+	trx->global_read_view = NULL;
 	trx->read_view = NULL;
 
 	/* Set X/Open XA transaction identification to NULL */
@@ -261,7 +263,7 @@ trx_free(
 		fputs(
 "  InnoDB: Error: Freeing a trx which is declared to be processing\n"
 "InnoDB: inside InnoDB.\n", stderr);
-		trx_print(stderr, trx);
+		trx_print(stderr, trx, 600);
 		putc('\n', stderr);
 	}
 
@@ -276,7 +278,7 @@ trx_free(
 			(ulong)trx->n_mysql_tables_in_use,
 			(ulong)trx->mysql_n_tables_locked);
 
-		trx_print(stderr, trx);		
+		trx_print(stderr, trx, 600);
 
 		ut_print_buf(stderr, (byte*)trx, sizeof(trx_t));
 	}
@@ -318,10 +320,12 @@ trx_free(
 
 	ut_a(UT_LIST_GET_LEN(trx->trx_locks) == 0);
 
-	if (trx->read_view_heap) {
-		mem_heap_free(trx->read_view_heap);
+	if (trx->global_read_view_heap) {
+		mem_heap_free(trx->global_read_view_heap);
 	}
 
+	trx->global_read_view = NULL;
+
 	ut_a(trx->read_view == NULL);
 	
 	mem_free(trx);
@@ -830,13 +834,14 @@ trx_commit_off_kernel(
 
 	lock_release_off_kernel(trx);
 
-	if (trx->read_view) {
-		read_view_close(trx->read_view);
-
-		mem_heap_empty(trx->read_view_heap);
-		trx->read_view = NULL;
+	if (trx->global_read_view) {
+		read_view_close(trx->global_read_view);
+		mem_heap_empty(trx->global_read_view_heap);
+		trx->global_read_view = NULL;
 	}
 
+	trx->read_view = NULL;
+
 	if (must_flush_log) {
 
 		mutex_exit(&kernel_mutex);
@@ -964,7 +969,9 @@ trx_assign_read_view(
 	mutex_enter(&kernel_mutex);
 
 	if (!trx->read_view) {
-		trx->read_view = read_view_open_now(trx, trx->read_view_heap);
+		trx->read_view = read_view_open_now(trx,
+					trx->global_read_view_heap);
+		trx->global_read_view = trx->read_view;
 	}
 
 	mutex_exit(&kernel_mutex);
@@ -1645,16 +1652,18 @@ trx_mark_sql_stat_end(
 }
 
 /**************************************************************************
-Prints info about a transaction to the standard output. The caller must
-own the kernel mutex and must have called
-innobase_mysql_prepare_print_arbitrary_thd(), unless he knows that MySQL or
-InnoDB cannot meanwhile change the info printed here. */
+Prints info about a transaction to the given file. The caller must own the
+kernel mutex and must have called
+innobase_mysql_prepare_print_arbitrary_thd(), unless he knows that MySQL
+or InnoDB cannot meanwhile change the info printed here. */
 
 void
 trx_print(
 /*======*/
-	FILE*	f,	/* in: output stream */
-	trx_t*	trx)	/* in: transaction */
+	FILE*	f,		/* in: output stream */
+	trx_t*	trx,		/* in: transaction */
+	uint	max_query_len)	/* in: max query length to print, or 0 to
+				   use the default max length */
 {
 	ibool	newline;
 
@@ -1749,7 +1758,7 @@ trx_print(
 	}
 
   	if (trx->mysql_thd != NULL) {
-		innobase_mysql_print_thd(f, trx->mysql_thd);
+		innobase_mysql_print_thd(f, trx->mysql_thd, max_query_len);
   	}  
 }
 
diff --git a/libmysql/Makefile.shared b/libmysql/Makefile.shared
index fab1a402c1eeee91e52d5b68a32521bea2645e6c..a4d616f936ab898251f91e9dbcfdd2ef28a2ebb5 100644
--- a/libmysql/Makefile.shared
+++ b/libmysql/Makefile.shared
@@ -46,7 +46,7 @@ mystringsobjects =	strmov.lo strxmov.lo strxnmov.lo strnmov.lo \
 			ctype-win1250ch.lo ctype-utf8.lo ctype-extra.lo \
 			ctype-ucs2.lo ctype-gb2312.lo ctype-gbk.lo \
 			ctype-sjis.lo ctype-tis620.lo ctype-ujis.lo \
-			ctype-uca.lo xml.lo my_strtoll10.lo
+			ctype-uca.lo xml.lo my_strtoll10.lo str_alloc.lo 
 
 mystringsextra= 	strto.c
 dbugobjects =		dbug.lo # IT IS IN SAFEMALLOC.C sanity.lo
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index 024d19ff24b497111c439f666fe0aee71fb6fb9d..11ee7284cbfbff1d8430207cb163ee2fc608a0ce 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -189,6 +189,13 @@ void STDCALL mysql_server_end()
   finish_client_errs();
   free_charsets();
   mysql_client_init= org_my_init_done= 0;
+#ifdef EMBEDDED_SERVER
+  if (stderror_file)
+  {
+    fclose(stderror_file);
+    stderror_file= 0;
+  }
+#endif
 }
 
 static MYSQL_PARAMETERS mysql_internal_parameters=
@@ -1599,13 +1606,8 @@ mysql_real_escape_string(MYSQL *mysql, char *to,const char *from,
 			 ulong length)
 {
   if (mysql->server_status & SERVER_STATUS_NO_BACKSLASH_ESCAPES)
-  {
     return escape_quotes_for_mysql(mysql->charset, to, 0, from, length);
-  }
-  else
-  {
-    return escape_string_for_mysql(mysql->charset, to, 0, from, length);
-  }
+  return escape_string_for_mysql(mysql->charset, to, 0, from, length);
 }
 
 
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index c3b239ac7b99f493c1706c3f99e4c15dac0ad3cb..a86d467299c069857b22d288bc27110444e73577 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -502,6 +502,8 @@ void *create_embedded_thd(int client_flag, char *db)
 
 /* TODO - add init_connect command execution */
 
+  if (thd->variables.max_join_size == HA_POS_ERROR)
+    thd->options |= OPTION_BIG_SELECTS;
   thd->proc_info=0;				// Remove 'login'
   thd->command=COM_SLEEP;
   thd->version=refresh_version;
diff --git a/myisam/ft_boolean_search.c b/myisam/ft_boolean_search.c
index 35c41b7d2d64a26dbed09c6b8024778e4b1a896d..c18984c7584a5c48e0849495009bcecd04758e13 100644
--- a/myisam/ft_boolean_search.c
+++ b/myisam/ft_boolean_search.c
@@ -221,6 +221,7 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search)
   MI_INFO *info=ftb->info;
   uint off, extra=HA_FT_WLEN+info->s->base.rec_reflength;
   byte *lastkey_buf=ftbw->word+ftbw->off;
+  LINT_INIT(off);
 
   LINT_INIT(off);
   if (ftbw->flags & FTB_FLAG_TRUNC)
diff --git a/myisam/mi_create.c b/myisam/mi_create.c
index 220bc47daf36ba736b9f50a6444f91556b39e890..6d4106afda5f16aab00ba38d33ca4378afa3ea0e 100644
--- a/myisam/mi_create.c
+++ b/myisam/mi_create.c
@@ -251,9 +251,11 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
         /*
            called by myisamchk - i.e. table structure was taken from
            MYI file and SPATIAL key *does have* additional sp_segs keysegs.
-           We'd better delete them now
+           keydef->seg here points right at the GEOMETRY segment,
+           so we only need to decrease keydef->keysegs.
+           (see recreate_table() in mi_check.c)
         */
-        keydef->keysegs-=(sp_segs-1);
+        keydef->keysegs-=sp_segs-1;
       }
 
       for (j=0, keyseg=keydef->seg ; (int) j < keydef->keysegs ;
diff --git a/myisam/myisampack.c b/myisam/myisampack.c
index ba48cbf1b62bf1d878e65d530a83d66cbc837d75..b3937ab960719125e2ff2fe9c1d2c407a9df0aaf 100644
--- a/myisam/myisampack.c
+++ b/myisam/myisampack.c
@@ -695,14 +695,22 @@ static int compress(PACK_MRG_INFO *mrg,char *result_table)
 	  else
 	    error=my_rename(new_name,org_name,MYF(MY_WME));
 	  if (!error)
+          {
 	    VOID(my_copystat(temp_name,org_name,MYF(MY_COPYTIME)));
+            if (tmp_dir[0])
+              VOID(my_delete(new_name,MYF(MY_WME)));
+          }
 	}
       }
       else
       {
 	if (tmp_dir[0])
+        {
 	  error=my_copy(new_name,org_name,
 			MYF(MY_WME | MY_HOLD_ORIGINAL_MODES | MY_COPYTIME));
+          if (!error)
+            VOID(my_delete(new_name,MYF(MY_WME)));
+        }
 	else
 	  error=my_redel(org_name,new_name,MYF(MY_WME | MY_COPYTIME));
       }
diff --git a/myisam/sort.c b/myisam/sort.c
index f2f8c8ef7ecf42f9d8c2e533ee2ccf22e04e01a4..fabd713ef4555879d41c1ca0aa2a623f5318b2e8 100644
--- a/myisam/sort.c
+++ b/myisam/sort.c
@@ -587,13 +587,15 @@ int thr_write_keys(MI_SORT_PARAM *sort_param)
 
       while (!got_error &&
 	     !my_b_read(&sinfo->tempfile_for_exceptions,(byte*)&key_length,
-			sizeof(key_length)) &&
-	     !my_b_read(&sinfo->tempfile_for_exceptions,(byte*)mergebuf,
-			(uint) key_length))
+			sizeof(key_length)))
       {
-	if (_mi_ck_write(info,sinfo->key,(uchar*) mergebuf,
-			 key_length - info->s->rec_reflength))
-	  got_error=1;
+        byte ft_buf[HA_FT_MAXBYTELEN + HA_FT_WLEN + 10];
+        if (key_length > sizeof(ft_buf) ||
+            my_b_read(&sinfo->tempfile_for_exceptions, (byte*)ft_buf,
+                      (uint)key_length) ||
+            _mi_ck_write(info, sinfo->key, (uchar*)ft_buf,
+                         key_length - info->s->rec_reflength))
+          got_error=1;
       }
     }
   }
diff --git a/mysql-test/include/have_gbk.inc b/mysql-test/include/have_gbk.inc
new file mode 100644
index 0000000000000000000000000000000000000000..55805da049543f5b3db6a2932e261fe9b0f6fc5a
--- /dev/null
+++ b/mysql-test/include/have_gbk.inc
@@ -0,0 +1,4 @@
+-- require r/have_gbk.require
+disable_query_log;
+show collation like "gbk_chinese_ci";
+enable_query_log;
diff --git a/mysql-test/include/have_lowercase0.inc b/mysql-test/include/have_lowercase0.inc
new file mode 100644
index 0000000000000000000000000000000000000000..f967c18928bbddbf7d869fc77cbaac0d202fb04d
--- /dev/null
+++ b/mysql-test/include/have_lowercase0.inc
@@ -0,0 +1,4 @@
+--require r/lowercase0.require
+--disable_query_log;
+show variables like "lower_case_%";
+--enable_query_log;
diff --git a/mysql-test/include/not_windows.inc b/mysql-test/include/not_windows.inc
new file mode 100644
index 0000000000000000000000000000000000000000..54e9e0e817af127c68ee0bfcd97eb8b47330113f
--- /dev/null
+++ b/mysql-test/include/not_windows.inc
@@ -0,0 +1,4 @@
+--require r/true.require
+disable_query_log;
+select convert(@@version_compile_os using latin1) NOT IN ("Win32","Win64","Windows") as "TRUE";
+enable_query_log;
diff --git a/mysql-test/include/ps_query.inc b/mysql-test/include/ps_query.inc
index 27a86f88231f9f06a2ce5cf28015e4638639be42..97653c0b9f88abae6ade99aa3af6791c9693c8c0 100644
--- a/mysql-test/include/ps_query.inc
+++ b/mysql-test/include/ps_query.inc
@@ -349,14 +349,14 @@ drop table if exists t2 ;
 --enable_warnings
 create table t2 as select * from t1 ;
 set @query1= 'SELECT * FROM t2 join t1 on (t1.a=t2.a) order by t2.a ' ;
-set @query2= 'SELECT * FROM t2 natural join t1 order by t2.a ' ;
-set @query3= 'SELECT * FROM t2 join t1 using(a) order by t2.a ' ;
+set @query2= 'SELECT * FROM t2 natural join t1 order by a ' ;
+set @query3= 'SELECT * FROM t2 join t1 using(a) order by a ' ;
 set @query4= 'SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a ' ;
-set @query5= 'SELECT * FROM t2 natural left join t1 order by t2.a ' ;
-set @query6= 'SELECT * FROM t2 left join t1 using(a) order by t2.a ' ;
+set @query5= 'SELECT * FROM t2 natural left join t1 order by a ' ;
+set @query6= 'SELECT * FROM t2 left join t1 using(a) order by a ' ;
 set @query7= 'SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a ' ;
-set @query8= 'SELECT * FROM t2 natural right join t1 order by t2.a ' ;
-set @query9= 'SELECT * FROM t2 right join t1 using(a) order by t2.a ' ;
+set @query8= 'SELECT * FROM t2 natural right join t1 order by a ' ;
+set @query9= 'SELECT * FROM t2 right join t1 using(a) order by a ' ;
 let $1= 9 ;
 while ($1)
 {
diff --git a/mysql-test/include/varchar.inc b/mysql-test/include/varchar.inc
index 13b4315f2b862688016169a6927484a4306098d8..70b563e871c60ba4e22f690791c98d118858eb6b 100644
--- a/mysql-test/include/varchar.inc
+++ b/mysql-test/include/varchar.inc
@@ -229,6 +229,7 @@ drop table t1;
 
 #
 # Bug #9489: problem with hash indexes
+# Bug #10802: Index is not used if table using BDB engine on HP-UX
 #
 
 create table t1(a int, b varchar(12), key ba(b, a));
diff --git a/mysql-test/lib/init_db.sql b/mysql-test/lib/init_db.sql
index fa02b350425aa56a498e2d7d3bb50ead8b1f62df..a71de229ee9c86de2794847c9c8b167e8b9f2cf9 100644
--- a/mysql-test/lib/init_db.sql
+++ b/mysql-test/lib/init_db.sql
@@ -504,7 +504,7 @@ comment='Procedure privileges';
 
 
 CREATE TABLE proc (
-  db                char(64) binary DEFAULT '' NOT NULL,
+  db                char(64) collate utf8_bin DEFAULT '' NOT NULL,
   name              char(64) DEFAULT '' NOT NULL,
   type              enum('FUNCTION','PROCEDURE') NOT NULL,
   specific_name     char(64) DEFAULT '' NOT NULL,
@@ -519,7 +519,7 @@ CREATE TABLE proc (
   param_list        blob DEFAULT '' NOT NULL,
   returns           char(64) DEFAULT '' NOT NULL,
   body              blob DEFAULT '' NOT NULL,
-  definer           char(77) binary DEFAULT '' NOT NULL,
+  definer           char(77) collate utf8_bin DEFAULT '' NOT NULL,
   created           timestamp,
   modified          timestamp,
   sql_mode          set(
@@ -554,6 +554,6 @@ CREATE TABLE proc (
                         'NO_AUTO_CREATE_USER',
                         'HIGH_NOT_PRECEDENCE'
                     ) DEFAULT '' NOT NULL,
-  comment           char(64) binary DEFAULT '' NOT NULL,
+  comment           char(64) collate utf8_bin DEFAULT '' NOT NULL,
   PRIMARY KEY (db,name,type)
-) comment='Stored Procedures';
+) character set utf8 comment='Stored Procedures';
diff --git a/mysql-test/lib/mtr_cases.pl b/mysql-test/lib/mtr_cases.pl
index 12714ddc1ad66c80013a050e6c1dcb230729a721..158fd602ef89076b307a6c6eec0b447664f7f672 100644
--- a/mysql-test/lib/mtr_cases.pl
+++ b/mysql-test/lib/mtr_cases.pl
@@ -53,21 +53,20 @@ sub collect_test_cases ($) {
   else
   {
     # ----------------------------------------------------------------------
-    # Skip some tests listed in disabled.def
+    # Disable some tests listed in disabled.def
     # ----------------------------------------------------------------------
-    my %skiplist;
-    my $skipfile= "$testdir/disabled.def";
-    if ( open(SKIPFILE, $skipfile) )
+    my %disabled;
+    if ( open(DISABLED, "$testdir/disabled.def" ) )
     {
-      while ( <SKIPFILE> )
+      while ( <DISABLED> )
       {
         chomp;
         if ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ )
         {
-          $skiplist{$1}= $2;
+          $disabled{$1}= $2;
         }
       }
-      close SKIPFILE;
+      close DISABLED;
     }
 
     foreach my $elem ( sort readdir(TESTDIR) ) {
@@ -75,7 +74,7 @@ sub collect_test_cases ($) {
       next if ! defined $tname;
       next if $::opt_do_test and ! defined mtr_match_prefix($elem,$::opt_do_test);
 
-      collect_one_test_case($testdir,$resdir,$tname,$elem,$cases,\%skiplist);
+      collect_one_test_case($testdir,$resdir,$tname,$elem,$cases,\%disabled);
     }
     closedir TESTDIR;
   }
@@ -119,7 +118,7 @@ sub collect_one_test_case($$$$$$) {
   my $tname=   shift;
   my $elem=    shift;
   my $cases=   shift;
-  my $skiplist=shift;
+  my $disabled=shift;
 
   my $path= "$testdir/$elem";
 
@@ -188,7 +187,7 @@ sub collect_one_test_case($$$$$$) {
   my $slave_mi_file=   "$testdir/$tname.slave-mi";
   my $master_sh=       "$testdir/$tname-master.sh";
   my $slave_sh=        "$testdir/$tname-slave.sh";
-  my $disabled=        "$testdir/$tname.disabled";
+  my $disabled_file=   "$testdir/$tname.disabled";
 
   $tinfo->{'master_opt'}= $::glob_win32 ? ["--default-time-zone=+3:00"] : [];
   $tinfo->{'slave_opt'}=  $::glob_win32 ? ["--default-time-zone=+3:00"] : [];
@@ -292,18 +291,18 @@ sub collect_one_test_case($$$$$$) {
   }
 
   # FIXME why this late?
-  if ( $skiplist->{$tname} )
+  if ( $disabled->{$tname} )
   {
     $tinfo->{'skip'}= 1;
     $tinfo->{'disable'}= 1;   # Sub type of 'skip'
-    $tinfo->{'comment'}= $skiplist->{$tname} if $skiplist->{$tname};
+    $tinfo->{'comment'}= $disabled->{$tname} if $disabled->{$tname};
   }
 
-  if ( -f $disabled )
+  if ( -f $disabled_file )
   {
     $tinfo->{'skip'}= 1;
     $tinfo->{'disable'}= 1;   # Sub type of 'skip'
-    $tinfo->{'comment'}= mtr_fromfile($disabled);
+    $tinfo->{'comment'}= mtr_fromfile($disabled_file);
   }
 
   # We can't restart a running server that may be in use
diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl
index 1eb4f6b7c5822e9952fa2bc1b52d712b951b606a..1f18968031c4dfea1e6ae154dbb344336d420620 100644
--- a/mysql-test/lib/mtr_process.pl
+++ b/mysql-test/lib/mtr_process.pl
@@ -186,8 +186,8 @@ sub spawn_parent_impl {
   if ( $mode eq 'run' or $mode eq 'test' )
   {
     my $exit_value= -1;
-    my $signal_num=  0;
-    my $dumped_core= 0;
+#    my $signal_num=  0;
+#    my $dumped_core= 0;
 
     if ( $mode eq 'run' )
     {
@@ -199,9 +199,10 @@ sub spawn_parent_impl {
         mtr_error("$path ($pid) got lost somehow");
       }
 
-      $exit_value=  $? >> 8;
-      $signal_num=  $? & 127;
-      $dumped_core= $? & 128;
+      $exit_value=  $?;
+#      $exit_value=  $? >> 8;
+#      $signal_num=  $? & 127;
+#      $dumped_core= $? & 128;
 
       return $exit_value;
     }
@@ -229,9 +230,10 @@ sub spawn_parent_impl {
         if ( $ret_pid == $pid )
         {
           # We got termination of mysqltest, we are done
-          $exit_value=  $? >> 8;
-          $signal_num=  $? & 127;
-          $dumped_core= $? & 128;
+          $exit_value=  $?;
+#          $exit_value=  $? >> 8;
+#          $signal_num=  $? & 127;
+#          $dumped_core= $? & 128;
           last;
         }
 
@@ -473,6 +475,7 @@ sub mtr_stop_mysqld_servers ($) {
     }
     else
     {
+      # Server is dead, we remove the pidfile if any
       # Race, could have been removed between I tested with -f
       # and the unlink() below, so I better check again with -f
 
@@ -502,10 +505,12 @@ sub mtr_stop_mysqld_servers ($) {
   # that for true Win32 processes, kill(0,$pid) will not return 1.
   # ----------------------------------------------------------------------
 
+  start_reap_all();                     # Avoid zombies
+
  SIGNAL:
   foreach my $sig (15,9)
   {
-    my $retries= 10;                    # 10 seconds
+    my $retries= 20;                    # FIXME 20 seconds, this is silly!
     kill($sig, keys %mysqld_pids);
     while ( $retries-- and  kill(0, keys %mysqld_pids) )
     {
@@ -514,6 +519,8 @@ sub mtr_stop_mysqld_servers ($) {
     }
   }
 
+  stop_reap_all();                      # Get into control again
+
   # ----------------------------------------------------------------------
   # Now, we check if all we can find using kill(0,$pid) are dead,
   # and just assume the rest are. We cleanup socket and PID files.
@@ -632,7 +639,8 @@ sub mtr_mysqladmin_shutdown () {
     $mysql_admin_pids{$pid}= 1;
   }
 
-  # We wait blocking, we wait for the last one anyway
+  # As mysqladmin is such a simple program, we trust it to terminate.
+  # I.e. we wait blocking, and wait wait for them all before we go on.
   while (keys %mysql_admin_pids)
   {
     foreach my $pid (keys %mysql_admin_pids)
@@ -651,7 +659,8 @@ sub mtr_mysqladmin_shutdown () {
 
   my $timeout= 20;                      # 20 seconds max
   my $res= 1;                           # If we just fall through, we are done
- 
+                                        # in the sense that the servers don't
+                                        # listen to their ports any longer
  TIME:
   while ( $timeout-- )
   {
@@ -669,6 +678,8 @@ sub mtr_mysqladmin_shutdown () {
     last;                               # If we got here, we are done
   }
 
+  $timeout or mtr_debug("At least one server is still listening to its port");
+
   sleep(5) if $::glob_win32;            # FIXME next startup fails if no sleep
 
   return $res;
@@ -752,6 +763,7 @@ sub mtr_ping_mysqld_server () {
 #
 ##############################################################################
 
+# FIXME check that the pidfile contains the expected pid!
 
 sub sleep_until_file_created ($$$) {
   my $pidfile= shift;
@@ -762,7 +774,7 @@ sub sleep_until_file_created ($$$) {
   {
     if ( -r $pidfile )
     {
-      return 1;
+      return $pid;
     }
 
     # Check if it died after the fork() was successful 
@@ -793,8 +805,12 @@ sub sleep_until_file_created ($$$) {
 #
 ##############################################################################
 
+# FIXME something is wrong, we sometimes terminate with "Hangup" written
+# to tty, and no STDERR output telling us why.
+
 sub mtr_exit ($) {
   my $code= shift;
+#  cluck("Called mtr_exit()");
   local $SIG{HUP} = 'IGNORE';
   kill('HUP', -$$);
   exit($code);
diff --git a/mysql-test/lib/mtr_report.pl b/mysql-test/lib/mtr_report.pl
index 0af34d11a3ff98d17d40678f348aefa6b99ff5a8..b9dab6b8d32e5d769f6081e71d065c59ac47ebdf 100644
--- a/mysql-test/lib/mtr_report.pl
+++ b/mysql-test/lib/mtr_report.pl
@@ -10,7 +10,6 @@ sub mtr_report_test_name($);
 sub mtr_report_test_passed($);
 sub mtr_report_test_failed($);
 sub mtr_report_test_skipped($);
-sub mtr_report_test_disabled($);
 
 sub mtr_show_failed_diff ($);
 sub mtr_report_stats ($);
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 0bc32c9eaeb42d8884a8a92cbafd144ebe9e4479..5ddc5b5308f2fa845c8564246592400022fb1384 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -341,7 +341,6 @@ sub main () {
 
   if ( ! $glob_use_running_server )
   {
-
     if ( $opt_start_dirty )
     {
       kill_running_server();
@@ -356,7 +355,7 @@ sub main () {
     }
   }
 
-  if ( $opt_start_and_exit or $opt_start_dirty )
+  if ( $opt_start_dirty )
   {
     if ( ndbcluster_start() )
     {
@@ -371,16 +370,13 @@ sub main () {
       mtr_error("Can't start the mysqld server");
     }
   }
+  elsif ( $opt_bench )
+  {
+    run_benchmarks(shift);      # Shift what? Extra arguments?!
+  }
   else
   {
-    if ( $opt_bench )
-    {
-      run_benchmarks(shift);      # Shift what? Extra arguments?!
-    }
-    else
-    {
-      run_tests();
-    }
+    run_tests();
   }
 
   mtr_exit(0);
@@ -1487,6 +1483,16 @@ sub run_testcase ($) {
     }
   }
 
+  # ----------------------------------------------------------------------
+  # If --start-and-exit given, stop here to let user manually run tests
+  # ----------------------------------------------------------------------
+
+  if ( $opt_start_and_exit )
+  {
+    mtr_report("\nServers started, exiting");
+    exit(0);
+  }
+
   # ----------------------------------------------------------------------
   # Run the test case
   # ----------------------------------------------------------------------
@@ -2248,7 +2254,8 @@ Misc options
   script-debug          Debug this script itself
   compress              Use the compressed protocol between client and server
   timer                 Show test case execution time
-  start-and-exit        Only initiate and start the "mysqld" servers
+  start-and-exit        Only initiate and start the "mysqld" servers, use the startup
+                        settings for the specified test case if any
   start-dirty           Only start the "mysqld" servers without initiation
   fast                  Don't try to cleanup from earlier runs
   reorder               Reorder tests to get less server restarts
diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result
index 74f0e3d9425727eb0d28a9502b06ba1cb43a81f5..9f127181fc2127e06df359b63e7106c1110f38d8 100644
--- a/mysql-test/r/alter_table.result
+++ b/mysql-test/r/alter_table.result
@@ -314,7 +314,7 @@ INSERT INTO t1 VALUES ('localhost','root'),('localhost',''),('games','monty');
 SHOW INDEX FROM t1;
 Table	Non_unique	Key_name	Seq_in_index	Column_name	Collation	Cardinality	Sub_part	Packed	Null	Index_type	Comment
 t1	0	PRIMARY	1	Host	A	NULL	NULL	NULL		BTREE	
-t1	0	PRIMARY	2	User	A	3	NULL	NULL		BTREE	
+t1	0	PRIMARY	2	User	A	0	NULL	NULL		BTREE	
 ALTER TABLE t1 ENABLE KEYS;
 UNLOCK TABLES;
 CHECK TABLES t1;
@@ -338,7 +338,7 @@ INSERT INTO t1 VALUES ('localhost','root'),('localhost','');
 SHOW INDEX FROM t1;
 Table	Non_unique	Key_name	Seq_in_index	Column_name	Collation	Cardinality	Sub_part	Packed	Null	Index_type	Comment
 t1	0	PRIMARY	1	Host	A	NULL	NULL	NULL		BTREE	
-t1	0	PRIMARY	2	User	A	2	NULL	NULL		BTREE	
+t1	0	PRIMARY	2	User	A	0	NULL	NULL		BTREE	
 t1	1	Host	1	Host	A	NULL	NULL	NULL		BTREE	disabled
 ALTER TABLE t1 ENABLE KEYS;
 SHOW INDEX FROM t1;
diff --git a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result
index 876da3cb964e2b08199db9ed44b581790c39cea0..a0b68bfbc1395db21a1ae0d80e4e1630a73ae088 100644
--- a/mysql-test/r/bdb.result
+++ b/mysql-test/r/bdb.result
@@ -732,7 +732,7 @@ drop table t1;
 set @a:=now();
 CREATE TABLE t1 (a int not null, b timestamp not null, primary key (a)) engine=bdb;
 insert into t1 (a) values(1),(2),(3);
-select t1.a from t1 natural join t1 as t2 where t1.b >= @a order by t1.a;
+select a from t1 natural join t1 as t2 where b >= @a order by a;
 a
 1
 2
@@ -906,7 +906,7 @@ create temporary table tmp1
 select branch_id, target_id, platform_id, product_id
 from t1, t2, t3, t4 ;
 create temporary table tmp2 
-select tmp1.branch_id, tmp1.target_id, tmp1.platform_id, tmp1.product_id 
+select branch_id, target_id, platform_id, product_id 
 from tmp1 left join t8 
 using (branch_id,target_id,platform_id,product_id) 
 where t8.archive_id is null ;
diff --git a/mysql-test/r/bigint.result b/mysql-test/r/bigint.result
index a0c8f317db2c5cde1d7a7441990d524bc04e39dd..1b5619eb18d529fee3db9141875c7ef9949eb263 100644
--- a/mysql-test/r/bigint.result
+++ b/mysql-test/r/bigint.result
@@ -17,6 +17,15 @@ select 9223372036854775808+1;
 select -(0-3),round(-(0-3)), round(9999999999999999999);
 -(0-3)	round(-(0-3))	round(9999999999999999999)
 3	3	9999999999999999999
+select 1,11,101,1001,10001,100001,1000001,10000001,100000001,1000000001,10000000001,100000000001,1000000000001,10000000000001,100000000000001,1000000000000001,10000000000000001,100000000000000001,1000000000000000001,10000000000000000001;
+1	11	101	1001	10001	100001	1000001	10000001	100000001	1000000001	10000000001	100000000001	1000000000001	10000000000001	100000000000001	1000000000000001	10000000000000001	100000000000000001	1000000000000000001	10000000000000000001
+1	11	101	1001	10001	100001	1000001	10000001	100000001	1000000001	10000000001	100000000001	1000000000001	10000000000001	100000000000001	1000000000000001	10000000000000001	100000000000000001	1000000000000000001	10000000000000000001
+select -1,-11,-101,-1001,-10001,-100001,-1000001,-10000001,-100000001,-1000000001,-10000000001,-100000000001,-1000000000001,-10000000000001,-100000000000001,-1000000000000001,-10000000000000001,-100000000000000001,-1000000000000000001,-10000000000000000001;
+-1	-11	-101	-1001	-10001	-100001	-1000001	-10000001	-100000001	-1000000001	-10000000001	-100000000001	-1000000000001	-10000000000001	-100000000000001	-1000000000000001	-10000000000000001	-100000000000000001	-1000000000000000001	-10000000000000000001
+-1	-11	-101	-1001	-10001	-100001	-1000001	-10000001	-100000001	-1000000001	-10000000001	-100000000001	-1000000000001	-10000000000001	-100000000000001	-1000000000000001	-10000000000000001	-100000000000000001	-1000000000000000001	-10000000000000000001
+select conv(1,10,16),conv((1<<2)-1,10,16),conv((1<<10)-2,10,16),conv((1<<16)-3,10,16),conv((1<<25)-4,10,16),conv((1<<31)-5,10,16),conv((1<<36)-6,10,16),conv((1<<47)-7,10,16),conv((1<<48)-8,10,16),conv((1<<55)-9,10,16),conv((1<<56)-10,10,16),conv((1<<63)-11,10,16);
+conv(1,10,16)	conv((1<<2)-1,10,16)	conv((1<<10)-2,10,16)	conv((1<<16)-3,10,16)	conv((1<<25)-4,10,16)	conv((1<<31)-5,10,16)	conv((1<<36)-6,10,16)	conv((1<<47)-7,10,16)	conv((1<<48)-8,10,16)	conv((1<<55)-9,10,16)	conv((1<<56)-10,10,16)	conv((1<<63)-11,10,16)
+1	3	3FE	FFFD	1FFFFFC	7FFFFFFB	FFFFFFFFA	7FFFFFFFFFF9	FFFFFFFFFFF8	7FFFFFFFFFFFF7	FFFFFFFFFFFFF6	7FFFFFFFFFFFFFF5
 create table t1 (a bigint unsigned not null, primary key(a));
 insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612);
 select * from t1;
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index d622127e8f0d70dad55acff55d650a45d20ae6d6..82a5ccc3e82d8ccb091c663a9797bd02c933bc72 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -37,7 +37,7 @@ Note	1051	Unknown table 't1'
 create table t1 (ordid int(8) not null auto_increment, ord  varchar(50) not null, primary key (ord,ordid)) engine=heap;
 ERROR 42000: Incorrect table definition; there can be only one auto column and it must be defined as a key
 create table not_existing_database.test (a int);
-Got one of the listed errors
+ERROR 42000: Unknown database 'not_existing_database'
 create table `a/a` (a int);
 ERROR 42000: Incorrect table name 'a/a'
 create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa int);
@@ -358,7 +358,7 @@ create table t3 like t1;
 create table t3 like mysqltest.t3;
 ERROR 42S01: Table 't3' already exists
 create table non_existing_database.t1 like t1;
-Got one of the listed errors
+ERROR 42000: Unknown database 'non_existing_database'
 create table t3 like non_existing_table;
 ERROR 42S02: Unknown table 'non_existing_table'
 create temporary table t3 like t1;
@@ -602,3 +602,10 @@ drop database mysqltest;
 create table test.t1 like x;
 ERROR 42000: Incorrect database name 'NULL'
 drop table if exists test.t1;
+create database mysqltest;
+use mysqltest;
+create view v1 as select 'foo' from dual;
+create table t1 like v1;
+ERROR HY000: 'mysqltest.v1' is not BASE TABLE
+drop view v1;
+drop database mysqltest;
diff --git a/mysql-test/r/ctype_big5.result b/mysql-test/r/ctype_big5.result
index 8d2c39df853d1cd7bf3108e78c9ed4203cdb5846..01b59b93b52c4a0248502e1c629b5846aeeda2fc 100644
--- a/mysql-test/r/ctype_big5.result
+++ b/mysql-test/r/ctype_big5.result
@@ -128,3 +128,9 @@ SELECT * FROM t1;
 a
 ùØ
 DROP TABLE t1;
+CREATE TABLE t1 (a CHAR(50) CHARACTER SET big5 NOT NULL, FULLTEXT(a));
+INSERT INTO t1 VALUES(0xA741ADCCA66EB6DC20A7DAADCCABDCA66E);
+SELECT HEX(a) FROM t1 WHERE MATCH(a) AGAINST (0xA741ADCCA66EB6DC IN BOOLEAN MODE);
+HEX(a)
+A741ADCCA66EB6DC20A7DAADCCABDCA66E
+DROP TABLE t1;
diff --git a/mysql-test/r/ctype_gbk.result b/mysql-test/r/ctype_gbk.result
new file mode 100644
index 0000000000000000000000000000000000000000..1a9dea28429961fc5705dd91b4b3af51e2def537
--- /dev/null
+++ b/mysql-test/r/ctype_gbk.result
@@ -0,0 +1,131 @@
+drop table if exists t1;
+SET @test_character_set= 'gbk';
+SET @test_collation= 'gbk_chinese_ci';
+SET @safe_character_set_server= @@character_set_server;
+SET @safe_collation_server= @@collation_server;
+SET character_set_server= @test_character_set;
+SET collation_server= @test_collation;
+CREATE DATABASE d1;
+USE d1;
+CREATE TABLE t1 (c CHAR(10), KEY(c));
+SHOW FULL COLUMNS FROM t1;
+Field	Type	Collation	Null	Key	Default	Extra	Privileges	Comment
+c	char(10)	gbk_chinese_ci	YES	MUL	NULL			
+INSERT INTO t1 VALUES ('aaa'),('aaaa'),('aaaaa');
+SELECT c as want3results FROM t1 WHERE c LIKE 'aaa%';
+want3results
+aaa
+aaaa
+aaaaa
+DROP TABLE t1;
+CREATE TABLE t1 (c1 varchar(15), KEY c1 (c1(2)));
+SHOW FULL COLUMNS FROM t1;
+Field	Type	Collation	Null	Key	Default	Extra	Privileges	Comment
+c1	varchar(15)	gbk_chinese_ci	YES	MUL	NULL			
+INSERT INTO t1 VALUES ('location'),('loberge'),('lotre'),('boabab');
+SELECT c1 as want3results from t1 where c1 like 'l%';
+want3results
+location
+loberge
+lotre
+SELECT c1 as want3results from t1 where c1 like 'lo%';
+want3results
+location
+loberge
+lotre
+SELECT c1 as want1result  from t1 where c1 like 'loc%';
+want1result
+location
+SELECT c1 as want1result  from t1 where c1 like 'loca%';
+want1result
+location
+SELECT c1 as want1result  from t1 where c1 like 'locat%';
+want1result
+location
+SELECT c1 as want1result  from t1 where c1 like 'locati%';
+want1result
+location
+SELECT c1 as want1result  from t1 where c1 like 'locatio%';
+want1result
+location
+SELECT c1 as want1result  from t1 where c1 like 'location%';
+want1result
+location
+DROP TABLE t1;
+DROP DATABASE d1;
+USE test;
+SET character_set_server= @safe_character_set_server;
+SET collation_server= @safe_collation_server;
+SET NAMES gbk;
+SET collation_connection='gbk_chinese_ci';
+create table t1 select repeat('a',4000) a;
+delete from t1;
+insert into t1 values ('a'), ('a '), ('a\t');
+select collation(a),hex(a) from t1 order by a;
+collation(a)	hex(a)
+gbk_chinese_ci	6109
+gbk_chinese_ci	61
+gbk_chinese_ci	6120
+drop table t1;
+create table t1 engine=innodb select repeat('a',50) as c1;
+alter table t1 add index(c1(5));
+insert into t1 values ('abcdefg'),('abcde100'),('abcde110'),('abcde111');
+select collation(c1) from t1 limit 1;
+collation(c1)
+gbk_chinese_ci
+select c1 from t1 where c1 like 'abcdef%' order by c1;
+c1
+abcdefg
+select c1 from t1 where c1 like 'abcde1%' order by c1;
+c1
+abcde100
+abcde110
+abcde111
+select c1 from t1 where c1 like 'abcde11%' order by c1;
+c1
+abcde110
+abcde111
+select c1 from t1 where c1 like 'abcde111%' order by c1;
+c1
+abcde111
+drop table t1;
+SET collation_connection='gbk_bin';
+create table t1 select repeat('a',4000) a;
+delete from t1;
+insert into t1 values ('a'), ('a '), ('a\t');
+select collation(a),hex(a) from t1 order by a;
+collation(a)	hex(a)
+gbk_bin	6109
+gbk_bin	61
+gbk_bin	6120
+drop table t1;
+create table t1 engine=innodb select repeat('a',50) as c1;
+alter table t1 add index(c1(5));
+insert into t1 values ('abcdefg'),('abcde100'),('abcde110'),('abcde111');
+select collation(c1) from t1 limit 1;
+collation(c1)
+gbk_bin
+select c1 from t1 where c1 like 'abcdef%' order by c1;
+c1
+abcdefg
+select c1 from t1 where c1 like 'abcde1%' order by c1;
+c1
+abcde100
+abcde110
+abcde111
+select c1 from t1 where c1 like 'abcde11%' order by c1;
+c1
+abcde110
+abcde111
+select c1 from t1 where c1 like 'abcde111%' order by c1;
+c1
+abcde111
+drop table t1;
+SET NAMES gbk;
+CREATE TABLE t1 (a text) character set gbk;
+INSERT INTO t1 VALUES (0xA3A0),(0xA1A1);
+SELECT hex(a) FROM t1 ORDER BY a;
+hex(a)
+A1A1
+A3A0
+DROP TABLE t1;
diff --git a/mysql-test/r/delayed.result b/mysql-test/r/delayed.result
index e9766622cf6aefa894a0ec185c4c115f1900ce13..f8ae61b03fb7b40a2e304541436566d997ee1de7 100644
--- a/mysql-test/r/delayed.result
+++ b/mysql-test/r/delayed.result
@@ -32,3 +32,10 @@ a	b
 3	d
 4	e
 drop table t1;
+create table t1 (a int not null primary key);
+insert into t1 values (1);
+insert delayed into t1 values (1);
+select * from t1;
+a
+1
+drop table t1;
diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result
index fd6a834c694a4d99bd445b5305286ca2e2e98f3e..7c9d88acf9035c266397e6c24b632bc649d173c2 100644
--- a/mysql-test/r/derived.result
+++ b/mysql-test/r/derived.result
@@ -111,7 +111,7 @@ a	b
 1	a
 2	b
 3	c
-explain select * from (select * from t1,t2 where t1.a=t2.a) t1;
+explain select * from (select t1.*, t2.a as t2a from t1,t2 where t1.a=t2.a) t1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	PRIMARY	<derived2>	system	NULL	NULL	NULL	NULL	1	
 2	DERIVED	t2	system	NULL	NULL	NULL	NULL	1	
@@ -149,8 +149,8 @@ SELECT * FROM (SELECT (SELECT * FROM (SELECT 1 as a) as a )) as b;
 (SELECT * FROM (SELECT 1 as a) as a )
 1
 select * from (select 1 as a) b  left join (select 2 as a) c using(a);
-a	a
-1	NULL
+a
+1
 SELECT * FROM (SELECT 1 UNION SELECT a) b;
 ERROR 42S22: Unknown column 'a' in 'field list'
 SELECT 1 as a FROM (SELECT a UNION SELECT 1) b;
@@ -363,3 +363,8 @@ a
 3
 3
 drop table t1, t2, t3;
+create table t1 (a int);
+create table t2 (a int);
+select * from (select * from t1,t2) foo;
+ERROR 42S21: Duplicate column name 'a'
+drop table t1,t2;
diff --git a/mysql-test/r/errors.result b/mysql-test/r/errors.result
index d0011c8deb68b337d7ba8066c1084b82a25fb0fa..0c84f24a2e43bf22a6794c2b244b2e9b6f1785a9 100644
--- a/mysql-test/r/errors.result
+++ b/mysql-test/r/errors.result
@@ -9,9 +9,9 @@ create table t1 (a int);
 select count(test.t1.b) from t1;
 ERROR 42S22: Unknown column 'test.t1.b' in 'field list'
 select count(not_existing_database.t1) from t1;
-ERROR 42S02: Unknown table 'not_existing_database' in field list
+ERROR 42S22: Unknown column 'not_existing_database.t1' in 'field list'
 select count(not_existing_database.t1.a) from t1;
-ERROR 42S02: Unknown table 'not_existing_database.t1' in field list
+ERROR 42S22: Unknown column 'not_existing_database.t1.a' in 'field list'
 select count(not_existing_database.t1.a) from not_existing_database.t1;
 Got one of the listed errors
 select 1 from t1 order by 2;
@@ -23,3 +23,8 @@ ERROR 42S22: Unknown column 't1.b' in 'order clause'
 select count(*),b from t1;
 ERROR 42S22: Unknown column 'b' in 'field list'
 drop table t1;
+create table t1 (a int(256));
+ERROR 42000: Display width out of range for column 'a' (max = 255)
+set sql_mode='traditional';
+create table t1 (a varchar(66000));
+ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead
diff --git a/mysql-test/r/flush.result b/mysql-test/r/flush.result
index 306376b13c3d3c1d969192389e72e2332e10b632..16c308e345041f7a47b622a740a70cbb07c9a77f 100644
--- a/mysql-test/r/flush.result
+++ b/mysql-test/r/flush.result
@@ -27,3 +27,24 @@ select * from t1;
 n
 345
 drop table t1;
+create table t1 (c1 int);
+lock table t1 write;
+flush tables with read lock;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+lock table t1 read;
+flush tables with read lock;
+lock table t1 write;
+ERROR HY000: Can't execute the query because you have a conflicting read lock
+lock table t1 read;
+lock table t1 write;
+ERROR HY000: Can't execute the query because you have a conflicting read lock
+unlock tables;
+create table t2 (c1 int);
+create table t3 (c1 int);
+lock table t1 read, t2 read, t3 write;
+flush tables with read lock;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+lock table t1 read, t2 read, t3 read;
+flush tables with read lock;
+unlock tables;
+drop table t1, t2, t3;
diff --git a/mysql-test/r/flush_table.result b/mysql-test/r/flush_table.result
index 2ef4ab5b52b7a3be7b2e68724bb46426d7f85acc..db54d2e53ef27b63d91518947d5d0155c0cc671c 100644
--- a/mysql-test/r/flush_table.result
+++ b/mysql-test/r/flush_table.result
@@ -101,3 +101,6 @@ table_id
 Record-02
 handler t1 close;
 drop table t1;
+FLUSH TABLES WITH READ LOCK ;
+FLUSH TABLES WITH READ LOCK ;
+UNLOCK TABLES;
diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result
index 1a79f6d9736bbbf81d0e60754385c1c2e351e8c8..ea0ffe9d7ddd9c63552df8a1d633b732ebeb6673 100644
--- a/mysql-test/r/fulltext.result
+++ b/mysql-test/r/fulltext.result
@@ -221,14 +221,14 @@ select t1.id FROM t2 as ttxt,t1,t1 as ticket2
 WHERE ticket2.id = ttxt.ticket AND t1.id = ticket2.ticket and
 match(ttxt.inhalt) against ('foobar');
 id
-select t1.id FROM t2 as ttxt,t1 INNER JOIN t1 as ticket2 ON
-ticket2.id = ttxt.ticket
-WHERE t1.id = ticket2.ticket and match(ttxt.inhalt) against ('foobar');
+select ticket2.id FROM t2 as ttxt,t2 INNER JOIN t1 as ticket2 ON
+ticket2.id = t2.ticket
+WHERE ticket2.id = ticket2.ticket and match(ttxt.inhalt) against ('foobar');
 id
 INSERT INTO t1 VALUES (3,3);
-select t1.id FROM t2 as ttxt,t1
-INNER JOIN t1 as ticket2 ON ticket2.id = ttxt.ticket
-WHERE t1.id = ticket2.ticket and
+select ticket2.id FROM t2 as ttxt,t2
+INNER JOIN t1 as ticket2 ON ticket2.id = t2.ticket
+WHERE ticket2.id = ticket2.ticket and
 match(ttxt.inhalt) against ('foobar');
 id
 3
@@ -337,8 +337,8 @@ insert into t2 values (1, 1, 'xxfoo');
 insert into t2 values (2, 1, 'xxbar');
 insert into t2 values (3, 1, 'xxbuz');
 select * from t1 join t2 using(`t1_id`) where match (t1.name, t2.name) against('xxfoo' in boolean mode);
-t1_id	name	t2_id	t1_id	name
-1	data1	1	1	xxfoo
+t1_id	name	t2_id	name
+1	data1	1	xxfoo
 select * from t2 where match name against ('*a*b*c*d*e*f*' in boolean mode);
 t2_id	t1_id	name
 drop table t1,t2;
@@ -422,3 +422,11 @@ SELECT COUNT(*) FROM t1 WHERE MATCH(t) AGAINST ('"osnabr
 COUNT(*)
 1
 DROP TABLE t1;
+CREATE TABLE t1 (a VARCHAR(30), FULLTEXT(a));
+INSERT INTO t1 VALUES('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb');
+SET myisam_repair_threads=2;
+REPAIR TABLE t1;
+Table	Op	Msg_type	Msg_text
+test.t1	repair	status	OK
+SET myisam_repair_threads=@@global.myisam_repair_threads;
+DROP TABLE t1;
diff --git a/mysql-test/r/fulltext_order_by.result b/mysql-test/r/fulltext_order_by.result
index 3b52be4b1f20849107f5c1ec47792a5446da5a01..bc466b5aba7edcf4de941a91ecdc8f0b9affa33f 100644
--- a/mysql-test/r/fulltext_order_by.result
+++ b/mysql-test/r/fulltext_order_by.result
@@ -1,4 +1,4 @@
-DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1,t2,t3;
 CREATE TABLE t1 (
 a INT AUTO_INCREMENT PRIMARY KEY,
 message CHAR(20),
@@ -126,7 +126,7 @@ group by
 a.text, b.id, b.betreff
 order by 
 match(b.betreff) against ('+abc' in boolean mode) desc;
-ERROR 42S02: Unknown table 'b' in order clause
+ERROR 42S22: Unknown column 'b.betreff' in 'order clause'
 select a.text, b.id, b.betreff
 from 
 t2 a inner join t3 b on a.id = b.forum inner join
@@ -142,7 +142,7 @@ where
 match(c.beitrag) against ('+abc' in boolean mode)
 order by 
 match(b.betreff) against ('+abc' in boolean mode) desc;
-ERROR 42S02: Unknown table 'b' in order clause
+ERROR 42S22: Unknown column 'b.betreff' in 'order clause'
 select a.text, b.id, b.betreff
 from 
 t2 a inner join t3 b on a.id = b.forum inner join
@@ -158,5 +158,19 @@ where
 match(c.beitrag) against ('+abc' in boolean mode)
 order by 
 match(betreff) against ('+abc' in boolean mode) desc;
-ERROR HY000: The used table type doesn't support FULLTEXT indexes
+text	id	betreff
+(select b.id, b.betreff from t3 b) union 
+(select b.id, b.betreff from t3 b) 
+order by match(betreff) against ('+abc' in boolean mode) desc;
+id	betreff
+(select b.id, b.betreff from t3 b) union 
+(select b.id, b.betreff from t3 b) 
+order by match(betreff) against ('+abc') desc;
+ERROR HY000: Can't find FULLTEXT index matching the column list
+select distinct b.id, b.betreff from t3 b 
+order by match(betreff) against ('+abc' in boolean mode) desc;
+id	betreff
+select b.id, b.betreff from t3 b group by b.id+1 
+order by match(betreff) against ('+abc' in boolean mode) desc;
+id	betreff
 drop table t1,t2,t3;
diff --git a/mysql-test/r/func_date_add.result b/mysql-test/r/func_date_add.result
index 50889943b56de73a747c7d894b29593564d4c861..841d13a6ea6c18a2ee34b73859dfc259a12cd405 100644
--- a/mysql-test/r/func_date_add.result
+++ b/mysql-test/r/func_date_add.result
@@ -45,3 +45,29 @@ visitor_id	mts
 465931136	2000-03-18 16:09:53
 1092858576	2000-03-19 01:34:45
 drop table t1;
+set sql_mode='traditional';
+create table t1 (d date);
+insert into t1 (d) select date_sub('2000-01-01', INTERVAL 2001 YEAR);
+ERROR 22008: Datetime function: datetime field overflow
+insert into t1 (d) select date_add('2000-01-01',interval 8000 year);
+ERROR 22008: Datetime function: datetime field overflow
+insert into t1 values (date_add(NULL, INTERVAL 1 DAY));
+insert into t1 values (date_add('2000-01-04', INTERVAL NULL DAY));
+set sql_mode='';
+insert into t1 (d) select date_sub('2000-01-01', INTERVAL 2001 YEAR);
+Warnings:
+Warning	1441	Datetime function: datetime field overflow
+insert into t1 (d) select date_add('2000-01-01',interval 8000 year);
+Warnings:
+Warning	1441	Datetime function: datetime field overflow
+insert into t1 values (date_add(NULL, INTERVAL 1 DAY));
+insert into t1 values (date_add('2000-01-04', INTERVAL NULL DAY));
+select * from t1;
+d
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
+drop table t1;
diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result
index 10afb61ba1d6fe1d5e413066468d7090ea65e91a..184bd07b0665e066b99d080cc3a80cb97b9e8724 100644
--- a/mysql-test/r/func_gconcat.result
+++ b/mysql-test/r/func_gconcat.result
@@ -445,6 +445,30 @@ group_concat(distinct b order by b)
 Warnings:
 Warning	1260	2 line(s) were cut by GROUP_CONCAT()
 drop table t1;
+create table t1 (a varchar(255) character set cp1250 collate cp1250_general_ci,
+b varchar(255) character set koi8r);
+insert into t1 values ('xxx','yyy');
+select collation(a) from t1;
+collation(a)
+cp1250_general_ci
+select collation(group_concat(a)) from t1;
+collation(group_concat(a))
+cp1250_general_ci
+create table t2 select group_concat(a) as a from t1;
+show create table t2;
+Table	Create Table
+t2	CREATE TABLE `t2` (
+  `a` varchar(400) character set cp1250 default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+select collation(group_concat(a,_koi8r'test')) from t1;
+collation(group_concat(a,_koi8r'test'))
+cp1250_general_ci
+select collation(group_concat(a,_koi8r 0xC1C2)) from t1;
+ERROR HY000: Illegal mix of collations (cp1250_general_ci,IMPLICIT) and (koi8r_general_ci,COERCIBLE) for operation 'group_concat'
+select collation(group_concat(a,b)) from t1;
+ERROR HY000: Illegal mix of collations (cp1250_general_ci,IMPLICIT) and (koi8r_general_ci,IMPLICIT) for operation 'group_concat'
+drop table t1;
+drop table t2;
 CREATE TABLE t1 (id int);
 SELECT GROUP_CONCAT(id) AS gc FROM t1 HAVING gc IS NULL;
 gc
@@ -500,3 +524,34 @@ group_concat(a)
 ABW
 ABW
 drop table t1;
+CREATE TABLE t1 (
+aID smallint(5) unsigned NOT NULL auto_increment,
+sometitle varchar(255) NOT NULL default '',
+bID smallint(5) unsigned NOT NULL,
+PRIMARY KEY  (aID),
+UNIQUE KEY sometitle (sometitle)
+);
+INSERT INTO t1 SET sometitle = 'title1', bID = 1;
+INSERT INTO t1 SET sometitle = 'title2', bID = 1;
+CREATE TABLE t2 (
+bID smallint(5) unsigned NOT NULL auto_increment,
+somename varchar(255) NOT NULL default '',
+PRIMARY KEY  (bID),
+UNIQUE KEY somename (somename)
+);
+INSERT INTO t2 SET somename = 'test';
+SELECT COUNT(*), GROUP_CONCAT(DISTINCT t2.somename SEPARATOR ' |')
+FROM t1 JOIN t2 ON t1.bID = t2.bID;
+COUNT(*)	GROUP_CONCAT(DISTINCT t2.somename SEPARATOR ' |')
+2	test
+INSERT INTO t2 SET somename = 'test2';
+SELECT COUNT(*), GROUP_CONCAT(DISTINCT t2.somename SEPARATOR ' |')
+FROM t1 JOIN t2 ON t1.bID = t2.bID;
+COUNT(*)	GROUP_CONCAT(DISTINCT t2.somename SEPARATOR ' |')
+2	test
+DELETE FROM t2 WHERE somename = 'test2';
+SELECT COUNT(*), GROUP_CONCAT(DISTINCT t2.somename SEPARATOR ' |')
+FROM t1 JOIN t2 ON t1.bID = t2.bID;
+COUNT(*)	GROUP_CONCAT(DISTINCT t2.somename SEPARATOR ' |')
+2	test
+DROP TABLE t1,t2;
diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result
index 0db2ceb0e6b46d41b0ec023b94286ee13474ee73..1542794798ac48d667f5d74f0d7930bc4721b308 100644
--- a/mysql-test/r/func_group.result
+++ b/mysql-test/r/func_group.result
@@ -795,6 +795,32 @@ show columns from t2;
 Field	Type	Null	Key	Default	Extra
 f2	datetime	NO		0000-00-00 00:00:00	
 drop table t2, t1;
+CREATE TABLE t1(
+id int PRIMARY KEY,
+a  int,
+b  int,
+INDEX i_b_id(a,b,id),
+INDEX i_id(a,id)
+);
+INSERT INTO t1 VALUES 
+(1,1,4), (2,2,1), (3,1,3), (4,2,1), (5,1,1);
+SELECT MAX(id) FROM t1 WHERE id < 3 AND a=2 AND b=6;
+MAX(id)
+NULL
+DROP TABLE t1;
+CREATE TABLE t1(
+id int PRIMARY KEY,
+a  int,
+b  int,
+INDEX i_id(a,id),
+INDEX i_b_id(a,b,id)
+);
+INSERT INTO t1 VALUES 
+(1,1,4), (2,2,1), (3,1,3), (4,2,1), (5,1,1);
+SELECT MAX(id) FROM t1 WHERE id < 3 AND a=2 AND b=6;
+MAX(id)
+NULL
+DROP TABLE t1;
 create table t2 (ff double);
 insert into t2 values (2.2);
 select cast(sum(distinct ff) as decimal(5,2)) from t2;
@@ -860,32 +886,6 @@ select col1,sum(col1),max(col1),min(col1) from t1 group by col1;
 col1	sum(col1)	max(col1)	min(col1)
 5.000000000010	10.000000000020	5.000000000010	5.000000000010
 DROP TABLE t1;
-CREATE TABLE t1(
-id int PRIMARY KEY,
-a  int,
-b  int,
-INDEX i_b_id(a,b,id),
-INDEX i_id(a,id)
-);
-INSERT INTO t1 VALUES 
-(1,1,4), (2,2,1), (3,1,3), (4,2,1), (5,1,1);
-SELECT MAX(id) FROM t1 WHERE id < 3 AND a=2 AND b=6;
-MAX(id)
-NULL
-DROP TABLE t1;
-CREATE TABLE t1(
-id int PRIMARY KEY,
-a  int,
-b  int,
-INDEX i_id(a,id),
-INDEX i_b_id(a,b,id)
-);
-INSERT INTO t1 VALUES 
-(1,1,4), (2,2,1), (3,1,3), (4,2,1), (5,1,1);
-SELECT MAX(id) FROM t1 WHERE id < 3 AND a=2 AND b=6;
-MAX(id)
-NULL
-DROP TABLE t1;
 CREATE TABLE t1 (a VARCHAR(400));
 INSERT INTO t1 (a) VALUES ("A"), ("a"), ("a "), ("a   "),
 ("B"), ("b"), ("b "), ("b   ");
diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result
index b7188092b41c9d94d4f398784a2830649f318881..0149911e36b6ba45f99fce6bb0366cdf000353a8 100644
--- a/mysql-test/r/func_math.result
+++ b/mysql-test/r/func_math.result
@@ -152,3 +152,16 @@ ceil(0.09)
 select ceil(0.000000000000000009);
 ceil(0.000000000000000009)
 1
+create table t1 select round(1, 6);
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `round(1, 6)` decimal(7,6) NOT NULL default '0.000000'
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+select * from t1;
+round(1, 6)
+1.000000
+drop table t1;
+select abs(-2) * -2;
+abs(-2) * -2
+-4
diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result
index 5e74e6fa68ad62903567044c3141cbcc2bb62d51..670b8754e30cc49a09532e8d799e9906fef4ab49 100644
--- a/mysql-test/r/func_misc.result
+++ b/mysql-test/r/func_misc.result
@@ -59,3 +59,14 @@ t1	CREATE TABLE `t1` (
   `length(uuid())` int(10) NOT NULL default '0'
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
 drop table t1;
+create table t1 (a timestamp default '2005-05-05 01:01:01',
+b timestamp default '2005-05-05 01:01:01');
+insert into t1 set a = now();
+select sleep(3);
+sleep(3)
+0
+update t1 set b = now();
+select timediff(b, a) >= '00:00:03' from t1;
+timediff(b, a) >= '00:00:03'
+1
+drop table t1;
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result
index 5335f53d38246b3b720f7bfd5735658fe7db0e11..c7e69ae1d31627bb8a2b6191cd5dcba11ce4ead8 100644
--- a/mysql-test/r/func_str.result
+++ b/mysql-test/r/func_str.result
@@ -45,6 +45,123 @@ www.	.se
 select substring_index('.tcx.se','.',-2),substring_index('.tcx.se','.tcx',-1);
 substring_index('.tcx.se','.',-2)	substring_index('.tcx.se','.tcx',-1)
 tcx.se	.se
+select substring_index('aaaaaaaaa1','a',1);
+substring_index('aaaaaaaaa1','a',1)
+
+select substring_index('aaaaaaaaa1','aa',1);
+substring_index('aaaaaaaaa1','aa',1)
+
+select substring_index('aaaaaaaaa1','aa',2);
+substring_index('aaaaaaaaa1','aa',2)
+aa
+select substring_index('aaaaaaaaa1','aa',3);
+substring_index('aaaaaaaaa1','aa',3)
+aaaa
+select substring_index('aaaaaaaaa1','aa',4);
+substring_index('aaaaaaaaa1','aa',4)
+aaaaaa
+select substring_index('aaaaaaaaa1','aa',5);
+substring_index('aaaaaaaaa1','aa',5)
+aaaaaaaaa1
+select substring_index('aaaaaaaaa1','aaa',1);
+substring_index('aaaaaaaaa1','aaa',1)
+
+select substring_index('aaaaaaaaa1','aaa',2);
+substring_index('aaaaaaaaa1','aaa',2)
+aaa
+select substring_index('aaaaaaaaa1','aaa',3);
+substring_index('aaaaaaaaa1','aaa',3)
+aaaaaa
+select substring_index('aaaaaaaaa1','aaa',4);
+substring_index('aaaaaaaaa1','aaa',4)
+aaaaaaaaa1
+select substring_index('aaaaaaaaa1','aaaa',1);
+substring_index('aaaaaaaaa1','aaaa',1)
+
+select substring_index('aaaaaaaaa1','aaaa',2);
+substring_index('aaaaaaaaa1','aaaa',2)
+aaaa
+select substring_index('aaaaaaaaa1','1',1);
+substring_index('aaaaaaaaa1','1',1)
+aaaaaaaaa
+select substring_index('aaaaaaaaa1','a',-1);
+substring_index('aaaaaaaaa1','a',-1)
+1
+select substring_index('aaaaaaaaa1','aa',-1);
+substring_index('aaaaaaaaa1','aa',-1)
+1
+select substring_index('aaaaaaaaa1','aa',-2);
+substring_index('aaaaaaaaa1','aa',-2)
+aa1
+select substring_index('aaaaaaaaa1','aa',-3);
+substring_index('aaaaaaaaa1','aa',-3)
+aaaa1
+select substring_index('aaaaaaaaa1','aa',-4);
+substring_index('aaaaaaaaa1','aa',-4)
+aaaaaa1
+select substring_index('aaaaaaaaa1','aa',-5);
+substring_index('aaaaaaaaa1','aa',-5)
+aaaaaaaaa1
+select substring_index('aaaaaaaaa1','aaa',-1);
+substring_index('aaaaaaaaa1','aaa',-1)
+1
+select substring_index('aaaaaaaaa1','aaa',-2);
+substring_index('aaaaaaaaa1','aaa',-2)
+aaa1
+select substring_index('aaaaaaaaa1','aaa',-3);
+substring_index('aaaaaaaaa1','aaa',-3)
+aaaaaa1
+select substring_index('aaaaaaaaa1','aaa',-4);
+substring_index('aaaaaaaaa1','aaa',-4)
+
+select substring_index('the king of thethe hill','the',-2);
+substring_index('the king of thethe hill','the',-2)
+the hill
+select substring_index('the king of the the hill','the',-2);
+substring_index('the king of the the hill','the',-2)
+ the hill
+select substring_index('the king of the  the hill','the',-2);
+substring_index('the king of the  the hill','the',-2)
+  the hill
+select substring_index('the king of the  the hill',' the ',-1);
+substring_index('the king of the  the hill',' the ',-1)
+hill
+select substring_index('the king of the  the hill',' the ',-2);
+substring_index('the king of the  the hill',' the ',-2)
+ the hill
+select substring_index('the king of the  the hill',' ',-1);
+substring_index('the king of the  the hill',' ',-1)
+hill
+select substring_index('the king of the  the hill',' ',-2);
+substring_index('the king of the  the hill',' ',-2)
+the hill
+select substring_index('the king of the  the hill',' ',-3);
+substring_index('the king of the  the hill',' ',-3)
+ the hill
+select substring_index('the king of the  the hill',' ',-4);
+substring_index('the king of the  the hill',' ',-4)
+the  the hill
+select substring_index('the king of the  the hill',' ',-5);
+substring_index('the king of the  the hill',' ',-5)
+of the  the hill
+select substring_index('the king of the.the hill','the',-2);
+substring_index('the king of the.the hill','the',-2)
+.the hill
+select substring_index('the king of thethethe.the hill','the',-3);
+substring_index('the king of thethethe.the hill','the',-3)
+the.the hill
+select substring_index('the king of thethethe.the hill','the',-1);
+substring_index('the king of thethethe.the hill','the',-1)
+ hill
+select substring_index('the king of the the hill','the',1);
+substring_index('the king of the the hill','the',1)
+
+select substring_index('the king of the the hill','the',2);
+substring_index('the king of the the hill','the',2)
+the king of 
+select substring_index('the king of the the hill','the',3);
+substring_index('the king of the the hill','the',3)
+the king of the 
 select concat(':',ltrim('  left  '),':',rtrim('  right  '),':');
 concat(':',ltrim('  left  '),':',rtrim('  right  '),':')
 :left  :  right:
@@ -879,3 +996,18 @@ drop table t1;
 select hex(29223372036854775809), hex(-29223372036854775809);
 hex(29223372036854775809)	hex(-29223372036854775809)
 FFFFFFFFFFFFFFFF	FFFFFFFFFFFFFFFF
+create table t1 (i int);
+insert into t1 values (1000000000),(1);
+select lpad(i, 7, ' ') as t from t1;
+Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
+def					t	253	7	7	Y	128	31	63
+t
+1000000
+      1
+select rpad(i, 7, ' ') as t from t1;
+Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
+def					t	253	7	7	Y	128	31	63
+t
+1000000
+1      
+drop table t1;
diff --git a/mysql-test/r/func_system.result b/mysql-test/r/func_system.result
index 5ec5d7d724e1fb7c636164a79d24207c83ba0cbf..1c1c6dff21e68eab8067e2205bdc044684035678 100644
--- a/mysql-test/r/func_system.result
+++ b/mysql-test/r/func_system.result
@@ -68,6 +68,21 @@ drop table t1;
 select TRUE,FALSE,NULL;
 TRUE	FALSE	NULL
 1	0	NULL
+create table t1 (c1 char(5)) character set=latin1;
+insert into t1 values('row 1');
+insert into t1 values('row 2');
+insert into t1 values('row 3');
+select concat(user(), '--', c1) from t1;
+concat(user(), '--', c1)
+root@localhost--row 1
+root@localhost--row 2
+root@localhost--row 3
+select concat(database(), '--', c1) from t1;
+concat(database(), '--', c1)
+test--row 1
+test--row 2
+test--row 3
+drop table t1;
 create table t1 (a char(10)) character set latin1;
 select * from t1 where a=version();
 a
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result
index 63da5589c57b4d1d64f582b00cc58c2ac97c6d05..e51dc113f9782f3f705200698193c9296457e9b9 100644
--- a/mysql-test/r/func_time.result
+++ b/mysql-test/r/func_time.result
@@ -247,9 +247,13 @@ date_add("1997-12-31 23:59:59",INTERVAL -100000 DAY)
 select date_add("1997-12-31 23:59:59",INTERVAL 100000 MONTH);
 date_add("1997-12-31 23:59:59",INTERVAL 100000 MONTH)
 NULL
+Warnings:
+Warning	1441	Datetime function: datetime field overflow
 select date_add("1997-12-31 23:59:59",INTERVAL -100000 YEAR);
 date_add("1997-12-31 23:59:59",INTERVAL -100000 YEAR)
 NULL
+Warnings:
+Warning	1441	Datetime function: datetime field overflow
 select date_add("1997-12-31 23:59:59",INTERVAL "10000:1" MINUTE_SECOND);
 date_add("1997-12-31 23:59:59",INTERVAL "10000:1" MINUTE_SECOND)
 1998-01-07 22:40:00
@@ -301,6 +305,8 @@ NULL
 select date_add("9999-12-31 23:59:59",INTERVAL 1 SECOND);
 date_add("9999-12-31 23:59:59",INTERVAL 1 SECOND)
 NULL
+Warnings:
+Warning	1441	Datetime function: datetime field overflow
 select date_sub("0000-00-00 00:00:00",INTERVAL 1 SECOND);
 date_sub("0000-00-00 00:00:00",INTERVAL 1 SECOND)
 NULL
@@ -375,15 +381,23 @@ SELECT "1900-01-01 00:00:00" + INTERVAL 1<<20 HOUR;
 SELECT "1900-01-01 00:00:00" + INTERVAL 1<<38 SECOND;
 "1900-01-01 00:00:00" + INTERVAL 1<<38 SECOND
 NULL
+Warnings:
+Warning	1441	Datetime function: datetime field overflow
 SELECT "1900-01-01 00:00:00" + INTERVAL 1<<33 MINUTE;
 "1900-01-01 00:00:00" + INTERVAL 1<<33 MINUTE
 NULL
+Warnings:
+Warning	1441	Datetime function: datetime field overflow
 SELECT "1900-01-01 00:00:00" + INTERVAL 1<<30 HOUR;
 "1900-01-01 00:00:00" + INTERVAL 1<<30 HOUR
 NULL
+Warnings:
+Warning	1441	Datetime function: datetime field overflow
 SELECT "1900-01-01 00:00:00" + INTERVAL "1000000000:214748364700" MINUTE_SECOND;
 "1900-01-01 00:00:00" + INTERVAL "1000000000:214748364700" MINUTE_SECOND
 NULL
+Warnings:
+Warning	1441	Datetime function: datetime field overflow
 create table t1 (ctime varchar(20));
 insert into t1 values ('2001-01-12 12:23:40');
 select ctime, hour(ctime) from t1;
@@ -687,7 +701,7 @@ timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12:
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
 Warnings:
-Note	1003	select timestamp_diff(WEEK,_latin1'2001-02-01',_latin1'2001-05-01') AS `a1`,timestamp_diff(SECOND_FRAC,_latin1'2001-02-01 12:59:59.120000',_latin1'2001-05-01 12:58:58.119999') AS `a2`
+Note	1003	select timestampdiff(WEEK,_latin1'2001-02-01',_latin1'2001-05-01') AS `a1`,timestampdiff(SECOND_FRAC,_latin1'2001-02-01 12:59:59.120000',_latin1'2001-05-01 12:58:58.119999') AS `a2`
 select last_day('2005-00-00');
 last_day('2005-00-00')
 NULL
diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result
index 93216fe2003f40f413e7ed52bb71b892aa44f80f..dfe375fd6945bdd67999805c6fd9b2ba4d2f6669 100644
--- a/mysql-test/r/gis.result
+++ b/mysql-test/r/gis.result
@@ -665,3 +665,8 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
 insert into t1 values (pointfromtext('point(1,1)'));
 ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
 drop table t1;
+create table t1 (s1 geometry not null,s2 char(100));
+create trigger t1_bu before update on t1 for each row set new.s1 = null;
+insert into t1 values (null,null);
+ERROR 23000: Column 's1' cannot be null
+drop table t1;
diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result
index 19982c7bb600dcdd6ed11fb7b6166895bfbb49e2..14393be1cc83c2d5f749287e463d542692b4fea2 100644
--- a/mysql-test/r/grant.result
+++ b/mysql-test/r/grant.result
@@ -591,3 +591,6 @@ insert into tables_priv values ('','test_db','mysqltest_1','test_table','test_gr
 flush privileges;
 delete from tables_priv where host = '' and user = 'mysqltest_1';
 flush privileges;
+set @user123="non-existent";
+select * from mysql.db where user=@user123;
+Host	Db	User	Select_priv	Insert_priv	Update_priv	Delete_priv	Create_priv	Drop_priv	Grant_priv	References_priv	Index_priv	Alter_priv	Create_tmp_table_priv	Lock_tables_priv	Create_view_priv	Show_view_priv	Create_routine_priv	Alter_routine_priv	Execute_priv
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result
index 64446e63e6f43a20fbfada01a7d355f15186e18a..f4cf5217fa710f33259648e90d4be559cf128a33 100644
--- a/mysql-test/r/group_by.result
+++ b/mysql-test/r/group_by.result
@@ -751,6 +751,13 @@ COUNT(DISTINCT(t1.id))	comment
 1	NULL
 1	a problem
 DROP TABLE t1, t2;
+create table t1 (f1 date);
+insert into t1 values('2005-06-06');
+insert into t1 values('2005-06-06');
+select date(left(f1+0,8)) from t1 group by 1;
+date(left(f1+0,8))
+2005-06-06
+drop table t1;
 CREATE TABLE t1 (n int);
 INSERT INTO t1 VALUES (1);
 SELECT n+1 AS n FROM t1 GROUP BY n;
diff --git a/mysql-test/r/have_gbk.require b/mysql-test/r/have_gbk.require
new file mode 100644
index 0000000000000000000000000000000000000000..e19fead153a00cdce9029151b1de33a5f29804b3
--- /dev/null
+++ b/mysql-test/r/have_gbk.require
@@ -0,0 +1,2 @@
+Collation	Charset	Id	Default	Compiled	Sortlen
+gbk_chinese_ci	gbk	28	Yes	Yes	1
diff --git a/mysql-test/r/heap.result b/mysql-test/r/heap.result
index b905dae3abad854b6b5b679b0932847bd62621cb..969cb06e9feafbafc011f30363338d2dcb638ebb 100644
--- a/mysql-test/r/heap.result
+++ b/mysql-test/r/heap.result
@@ -701,3 +701,10 @@ insert into t1 values ("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd
 insert into t1 values ("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz");
 ERROR 23000: Duplicate entry 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl' for key 1
 drop table t1;
+create table t1 (c char(10)) engine=memory;
+create table t2 (c varchar(10)) engine=memory;
+show table status like 't_';
+Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment
+t1	MEMORY	10	Fixed	0	11	0	#	0	0	NULL	NULL	NULL	NULL	latin1_swedish_ci	NULL		
+t2	MEMORY	10	Fixed	0	12	0	#	0	0	NULL	NULL	NULL	NULL	latin1_swedish_ci	NULL		
+drop table t1, t2;
diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result
index 89b3df0a83b330438d208f6d5b31586599951b23..64e2434521e9db9d21fd4b3a5ec48a60d1d499c4 100644
--- a/mysql-test/r/information_schema.result
+++ b/mysql-test/r/information_schema.result
@@ -1,4 +1,4 @@
-DROP TABLE IF EXISTS t0,t1,t2;
+DROP TABLE IF EXISTS t0,t1,t2,t3,t5;
 show variables where variable_name like "skip_show_database";
 Variable_name	Value
 skip_show_database	OFF
@@ -30,25 +30,27 @@ create table mysqltest.t1(a int, b VARCHAR(30), KEY string_data (b));
 create table test.t2(a int);
 create table t3(a int, KEY a_data (a));
 create table mysqltest.t4(a int);
+create table t5 (id int auto_increment primary key);
+insert into t5 values (10);
 create view v1 (c) as select table_name from information_schema.TABLES;
 select * from v1;
 c
-SCHEMATA
-TABLES
-COLUMNS
 CHARACTER_SETS
 COLLATIONS
 COLLATION_CHARACTER_SET_APPLICABILITY
+COLUMNS
+COLUMN_PRIVILEGES
+KEY_COLUMN_USAGE
 ROUTINES
-STATISTICS
-VIEWS
-USER_PRIVILEGES
+SCHEMATA
 SCHEMA_PRIVILEGES
-TABLE_PRIVILEGES
-COLUMN_PRIVILEGES
+STATISTICS
+TABLES
 TABLE_CONSTRAINTS
-KEY_COLUMN_USAGE
+TABLE_PRIVILEGES
 TRIGGERS
+VIEWS
+USER_PRIVILEGES
 columns_priv
 db
 func
@@ -70,14 +72,15 @@ t1
 t4
 t2
 t3
+t5
 v1
 select c,table_name from v1 
 inner join information_schema.TABLES v2 on (v1.c=v2.table_name)
 where v1.c like "t%";
 c	table_name
 TABLES	TABLES
-TABLE_PRIVILEGES	TABLE_PRIVILEGES
 TABLE_CONSTRAINTS	TABLE_CONSTRAINTS
+TABLE_PRIVILEGES	TABLE_PRIVILEGES
 TRIGGERS	TRIGGERS
 tables_priv	tables_priv
 time_zone	time_zone
@@ -89,13 +92,14 @@ t1	t1
 t4	t4
 t2	t2
 t3	t3
+t5	t5
 select c,table_name from v1 
 left join information_schema.TABLES v2 on (v1.c=v2.table_name)
 where v1.c like "t%";
 c	table_name
 TABLES	TABLES
-TABLE_PRIVILEGES	TABLE_PRIVILEGES
 TABLE_CONSTRAINTS	TABLE_CONSTRAINTS
+TABLE_PRIVILEGES	TABLE_PRIVILEGES
 TRIGGERS	TRIGGERS
 tables_priv	tables_priv
 time_zone	time_zone
@@ -107,13 +111,14 @@ t1	t1
 t4	t4
 t2	t2
 t3	t3
+t5	t5
 select c, v2.table_name from v1
 right join information_schema.TABLES v2 on (v1.c=v2.table_name)
 where v1.c like "t%";
 c	table_name
 TABLES	TABLES
-TABLE_PRIVILEGES	TABLE_PRIVILEGES
 TABLE_CONSTRAINTS	TABLE_CONSTRAINTS
+TABLE_PRIVILEGES	TABLE_PRIVILEGES
 TRIGGERS	TRIGGERS
 tables_priv	tables_priv
 time_zone	time_zone
@@ -125,6 +130,7 @@ t1	t1
 t4	t4
 t2	t2
 t3	t3
+t5	t5
 select table_name from information_schema.TABLES
 where table_schema = "mysqltest" and table_name like "t%";
 table_name
@@ -140,10 +146,12 @@ show tables like 't%';
 Tables_in_test (t%)
 t2
 t3
+t5
 show table status;
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment
 t2	MyISAM	10	Fixed	0	0	0	#	1024	0	NULL	#	#	NULL	latin1_swedish_ci	NULL		
 t3	MyISAM	10	Fixed	0	0	0	#	1024	0	NULL	#	#	NULL	latin1_swedish_ci	NULL		
+t5	MyISAM	10	Fixed	1	7	7	#	2048	0	11	#	#	NULL	latin1_swedish_ci	NULL		
 v1	NULL	NULL	NULL	NULL	NULL	NULL	#	NULL	NULL	NULL	#	#	NULL	NULL	NULL	NULL	view
 show full columns from t3 like "a%";
 Field	Type	Collation	Null	Key	Default	Extra	Privileges	Comment
@@ -157,7 +165,7 @@ c	varchar(64)	utf8_general_ci	NO				select,insert,update,references
 select * from information_schema.COLUMNS where table_name="t1"
 and column_name= "a";
 TABLE_CATALOG	TABLE_SCHEMA	TABLE_NAME	COLUMN_NAME	ORDINAL_POSITION	COLUMN_DEFAULT	IS_NULLABLE	DATA_TYPE	CHARACTER_MAXIMUM_LENGTH	CHARACTER_OCTET_LENGTH	NUMERIC_PRECISION	NUMERIC_SCALE	CHARACTER_SET_NAME	COLLATION_NAME	COLUMN_TYPE	COLUMN_KEY	EXTRA	PRIVILEGES	COLUMN_COMMENT
-NULL	mysqltest	t1	a	1	NULL	YES	int	NULL	NULL	10	NULL	NULL	NULL	int(11)			select,insert,update,references	
+NULL	mysqltest	t1	a	1	NULL	YES	int	NULL	NULL	10	0	NULL	NULL	int(11)			select,insert,update,references	
 show columns from mysqltest.t1 where field like "%a%";
 Field	Type	Null	Key	Default	Extra
 a	int(11)	YES		NULL	
@@ -177,7 +185,7 @@ where table_schema = 'mysqltest' and table_name = 'v1';
 table_name	column_name	privileges
 v1	c	select
 drop view v1, mysqltest.v1;
-drop tables mysqltest.t4, mysqltest.t1, t2, t3;
+drop tables mysqltest.t4, mysqltest.t1, t2, t3, t5;
 drop database mysqltest;
 select * from information_schema.CHARACTER_SETS
 where CHARACTER_SET_NAME like 'latin1%';
@@ -527,7 +535,7 @@ c	float(5,2)	NULL	NULL	5	2
 d	decimal(6,4)	NULL	NULL	6	4
 e	float	NULL	NULL	12	NULL
 f	decimal(6,3)	NULL	NULL	6	3
-g	int(11)	NULL	NULL	10	NULL
+g	int(11)	NULL	NULL	10	0
 h	double(10,3)	NULL	NULL	10	3
 i	double	NULL	NULL	22	NULL
 drop table t1;
@@ -545,7 +553,7 @@ proc	is_deterministic	enum('YES','NO')
 proc	security_type	enum('INVOKER','DEFINER')
 proc	param_list	blob
 proc	returns	char(64)
-proc	body	blob
+proc	body	longblob
 proc	definer	char(77)
 proc	created	timestamp
 proc	modified	timestamp
@@ -577,13 +585,13 @@ select TABLE_NAME,TABLE_TYPE,ENGINE
 from information_schema.tables 
 where table_schema='information_schema' limit 2;
 TABLE_NAME	TABLE_TYPE	ENGINE
-SCHEMATA	TEMPORARY	MEMORY
-TABLES	TEMPORARY	MEMORY
+CHARACTER_SETS	TEMPORARY	MEMORY
+COLLATIONS	TEMPORARY	MEMORY
 show tables from information_schema like "T%";
 Tables_in_information_schema (T%)
 TABLES
-TABLE_PRIVILEGES
 TABLE_CONSTRAINTS
+TABLE_PRIVILEGES
 TRIGGERS
 create database information_schema;
 ERROR HY000: Can't create database 'information_schema'; database exists
@@ -591,8 +599,8 @@ use information_schema;
 show full tables like "T%";
 Tables_in_information_schema (T%)	Table_type
 TABLES	TEMPORARY
-TABLE_PRIVILEGES	TEMPORARY
 TABLE_CONSTRAINTS	TEMPORARY
+TABLE_PRIVILEGES	TEMPORARY
 TRIGGERS	TEMPORARY
 create table t1(a int);
 ERROR 42S02: Unknown table 't1' in information_schema
@@ -603,8 +611,8 @@ use information_schema;
 show tables like "T%";
 Tables_in_information_schema (T%)
 TABLES
-TABLE_PRIVILEGES
 TABLE_CONSTRAINTS
+TABLE_PRIVILEGES
 TRIGGERS
 select table_name from tables where table_name='user';
 table_name
@@ -689,7 +697,7 @@ show variables where variable_name like "skip_show_databas";
 Variable_name	Value
 show global status like "Threads_running";
 Variable_name	Value
-Threads_running	1
+Threads_running	#
 create table t1(f1 int);
 create table t2(f2 int);
 create view v1 as select * from t1, t2;
@@ -710,17 +718,18 @@ table_schema	table_name	column_name
 information_schema	COLUMNS	COLUMN_TYPE
 information_schema	ROUTINES	ROUTINE_DEFINITION
 information_schema	ROUTINES	SQL_MODE
-information_schema	VIEWS	VIEW_DEFINITION
 information_schema	TRIGGERS	ACTION_CONDITION
 information_schema	TRIGGERS	ACTION_STATEMENT
+information_schema	TRIGGERS	SQL_MODE
+information_schema	VIEWS	VIEW_DEFINITION
 select table_name, column_name, data_type from information_schema.columns
 where data_type = 'datetime';
 table_name	column_name	data_type
+ROUTINES	CREATED	datetime
+ROUTINES	LAST_ALTERED	datetime
 TABLES	CREATE_TIME	datetime
 TABLES	UPDATE_TIME	datetime
 TABLES	CHECK_TIME	datetime
-ROUTINES	CREATED	datetime
-ROUTINES	LAST_ALTERED	datetime
 TRIGGERS	CREATED	datetime
 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES A
 WHERE NOT EXISTS 
@@ -755,14 +764,14 @@ grant select on test.* to mysqltest_4@localhost;
 SELECT TABLE_NAME, COLUMN_NAME, PRIVILEGES FROM INFORMATION_SCHEMA.COLUMNS 
 where COLUMN_NAME='TABLE_NAME';
 TABLE_NAME	COLUMN_NAME	PRIVILEGES
-TABLES	TABLE_NAME	select
 COLUMNS	TABLE_NAME	select
-STATISTICS	TABLE_NAME	select
-VIEWS	TABLE_NAME	select
-TABLE_PRIVILEGES	TABLE_NAME	select
 COLUMN_PRIVILEGES	TABLE_NAME	select
-TABLE_CONSTRAINTS	TABLE_NAME	select
 KEY_COLUMN_USAGE	TABLE_NAME	select
+STATISTICS	TABLE_NAME	select
+TABLES	TABLE_NAME	select
+TABLE_CONSTRAINTS	TABLE_NAME	select
+TABLE_PRIVILEGES	TABLE_NAME	select
+VIEWS	TABLE_NAME	select
 delete from mysql.user where user='mysqltest_4';
 delete from mysql.db where user='mysqltest_4';
 flush privileges;
@@ -790,45 +799,45 @@ set @fired:= "Yes";
 end if;
 end|
 show triggers;
-Trigger	Event	Table	Statement	Timing	Created
+Trigger	Event	Table	Statement	Timing	Created	sql_mode
 trg1	INSERT	t1	
 begin
 if new.j > 10 then
 set new.j := 10;
 end if;
-end	BEFORE	NULL
+end	BEFORE	NULL	
 trg2	UPDATE	t1	
 begin
 if old.i % 2 = 0 then
 set new.j := -1;
 end if;
-end	BEFORE	NULL
+end	BEFORE	NULL	
 trg3	UPDATE	t1	
 begin
 if new.j = -1 then
 set @fired:= "Yes";
 end if;
-end	AFTER	NULL
+end	AFTER	NULL	
 select * from information_schema.triggers;
-TRIGGER_CATALOG	TRIGGER_SCHEMA	TRIGGER_NAME	EVENT_MANIPULATION	EVENT_OBJECT_CATALOG	EVENT_OBJECT_SCHEMA	EVENT_OBJECT_TABLE	ACTION_ORDER	ACTION_CONDITION	ACTION_STATEMENT	ACTION_ORIENTATION	ACTION_TIMING	ACTION_REFERENCE_OLD_TABLE	ACTION_REFERENCE_NEW_TABLE	ACTION_REFERENCE_OLD_ROW	ACTION_REFERENCE_NEW_ROW	CREATED
+TRIGGER_CATALOG	TRIGGER_SCHEMA	TRIGGER_NAME	EVENT_MANIPULATION	EVENT_OBJECT_CATALOG	EVENT_OBJECT_SCHEMA	EVENT_OBJECT_TABLE	ACTION_ORDER	ACTION_CONDITION	ACTION_STATEMENT	ACTION_ORIENTATION	ACTION_TIMING	ACTION_REFERENCE_OLD_TABLE	ACTION_REFERENCE_NEW_TABLE	ACTION_REFERENCE_OLD_ROW	ACTION_REFERENCE_NEW_ROW	CREATED	SQL_MODE
 NULL	test	trg1	INSERT	NULL	test	t1	0	NULL	
 begin
 if new.j > 10 then
 set new.j := 10;
 end if;
-end	ROW	BEFORE	NULL	NULL	OLD	NEW	NULL
+end	ROW	BEFORE	NULL	NULL	OLD	NEW	NULL	
 NULL	test	trg2	UPDATE	NULL	test	t1	0	NULL	
 begin
 if old.i % 2 = 0 then
 set new.j := -1;
 end if;
-end	ROW	BEFORE	NULL	NULL	OLD	NEW	NULL
+end	ROW	BEFORE	NULL	NULL	OLD	NEW	NULL	
 NULL	test	trg3	UPDATE	NULL	test	t1	0	NULL	
 begin
 if new.j = -1 then
 set @fired:= "Yes";
 end if;
-end	ROW	AFTER	NULL	NULL	OLD	NEW	NULL
+end	ROW	AFTER	NULL	NULL	OLD	NEW	NULL	
 drop trigger trg1;
 drop trigger trg2;
 drop trigger trg3;
@@ -932,11 +941,29 @@ select column_name, NUMERIC_PRECISION, NUMERIC_SCALE
 from information_schema.columns
 where table_name='t1';
 column_name	NUMERIC_PRECISION	NUMERIC_SCALE
-f1	3	NULL
-f2	5	NULL
-f3	7	NULL
-f4	10	NULL
-f5	19	NULL
+f1	3	0
+f2	5	0
+f3	7	0
+f4	10	0
+f5	19	0
 f6	1	NULL
 f7	64	NULL
 drop table t1;
+create table t1 (f1 integer);
+create trigger tr1 after insert on t1 for each row set @test_var=42;
+use information_schema;
+select trigger_schema, trigger_name from triggers where
+trigger_name='tr1';
+trigger_schema	trigger_name
+test	tr1
+use test;
+drop table t1;
+create table t1 (a int not null, b int);
+use information_schema;
+select column_name, column_default from columns
+where table_schema='test' and table_name='t1';
+column_name	column_default
+a	NULL
+b	NULL
+use test;
+drop table t1;
diff --git a/mysql-test/r/information_schema_db.result b/mysql-test/r/information_schema_db.result
index ece309240553cf6a51a24dbcbc48cb508a581661..d3ff310b812bb869abebb45601304e8f609a4a5a 100644
--- a/mysql-test/r/information_schema_db.result
+++ b/mysql-test/r/information_schema_db.result
@@ -1,27 +1,27 @@
 use INFORMATION_SCHEMA;
 show tables;
 Tables_in_information_schema
-SCHEMATA
-TABLES
-COLUMNS
 CHARACTER_SETS
 COLLATIONS
 COLLATION_CHARACTER_SET_APPLICABILITY
+COLUMNS
+COLUMN_PRIVILEGES
+KEY_COLUMN_USAGE
 ROUTINES
-STATISTICS
-VIEWS
-USER_PRIVILEGES
+SCHEMATA
 SCHEMA_PRIVILEGES
-TABLE_PRIVILEGES
-COLUMN_PRIVILEGES
+STATISTICS
+TABLES
 TABLE_CONSTRAINTS
-KEY_COLUMN_USAGE
+TABLE_PRIVILEGES
 TRIGGERS
+VIEWS
+USER_PRIVILEGES
 show tables from INFORMATION_SCHEMA like 'T%';
 Tables_in_information_schema (T%)
 TABLES
-TABLE_PRIVILEGES
 TABLE_CONSTRAINTS
+TABLE_PRIVILEGES
 TRIGGERS
 create database `inf%`;
 use `inf%`;
diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result
index 2c73cbeeea422c035d361f4e4a9cc073593f4292..69620d5d527ea208a502aa300010194a8d38f70e 100644
--- a/mysql-test/r/innodb.result
+++ b/mysql-test/r/innodb.result
@@ -750,7 +750,7 @@ drop table t1;
 set @a:=now();
 CREATE TABLE t1 (a int not null, b timestamp not null, primary key (a)) engine=innodb;
 insert into t1 (a) values(1),(2),(3);
-select t1.a from t1 natural join t1 as t2 where t1.b >= @a order by t1.a;
+select a from t1 natural join t1 as t2 where b >= @a order by a;
 a
 1
 2
@@ -1377,7 +1377,7 @@ ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fail
 update t1,t2,t3 set t3.id=5, t2.id=6, t1.id=7  where t1.id =1 and t2.id = t1.id and t3.id = t2.id;
 ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
 update t3 set  t3.id=7  where t1.id =1 and t2.id = t1.id and t3.id = t2.id;
-ERROR 42S02: Unknown table 't1' in where clause
+ERROR 42S22: Unknown column 't1.id' in 'where clause'
 drop table t3,t2,t1;
 create table t1(
 id int primary key,
@@ -1452,16 +1452,16 @@ Error	1146	Table 'test.t4' doesn't exist
 checksum table t1, t2, t3, t4;
 Table	Checksum
 test.t1	2948697075
-test.t2	1157260244
-test.t3	1157260244
+test.t2	3835700799
+test.t3	3835700799
 test.t4	NULL
 Warnings:
 Error	1146	Table 'test.t4' doesn't exist
 checksum table t1, t2, t3, t4 extended;
 Table	Checksum
 test.t1	3092701434
-test.t2	1157260244
-test.t3	1157260244
+test.t2	3835700799
+test.t3	3835700799
 test.t4	NULL
 Warnings:
 Error	1146	Table 'test.t4' doesn't exist
@@ -2475,3 +2475,11 @@ SELECT GRADE  FROM t1 WHERE GRADE= 151;
 GRADE
 151
 DROP TABLE t1;
+create table t1 (f1 varchar(10), f2 varchar(10), primary key (f1,f2)) engine=innodb;
+create table t2 (f3 varchar(10), f4 varchar(10), key (f4)) engine=innodb;
+insert into t2 values ('aa','cc');
+insert into t1 values ('aa','bb'),('aa','cc');
+delete t1 from t1,t2 where f1=f3 and f4='cc';
+select * from t1;
+f1	f2
+drop table t1,t2;
diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result
index f745af182ebbaa70964793675907c78691567f03..17f65d96abcdca7023f11a2b3d7bceab96e3dbc1 100644
--- a/mysql-test/r/insert_select.result
+++ b/mysql-test/r/insert_select.result
@@ -664,7 +664,7 @@ insert into t1 select t2.a from t2 group by t2.a on duplicate key update a= a +
 insert into t1 select t2.a from t2 on duplicate key update a= a + t2.b;
 ERROR 23000: Column 'a' in field list is ambiguous
 insert into t1 select t2.a from t2 on duplicate key update t2.a= a + t2.b;
-ERROR 42S02: Unknown table 't2' in field list
+ERROR 42S22: Unknown column 't2.a' in 'field list'
 insert into t1 select t2.a from t2 group by t2.a on duplicate key update a= t1.a + t2.b;
-ERROR 42S02: Unknown table 't2' in field list
+ERROR 42S22: Unknown column 't2.b' in 'field list'
 drop table t1,t2,t3;
diff --git a/mysql-test/r/insert_update.result b/mysql-test/r/insert_update.result
index fc157093a7f6963c4511f47da60d757e36b6d65b..dbe5d600a951d0327c41f75ecf4fbbab6bba7553 100644
--- a/mysql-test/r/insert_update.result
+++ b/mysql-test/r/insert_update.result
@@ -191,3 +191,9 @@ ERROR 23000: Column 'a' in field list is ambiguous
 insert ignore into t1 select a from t1 on duplicate key update a=t1.a+1 ;
 ERROR 23000: Column 't1.a' in field list is ambiguous
 drop table t1;
+CREATE TABLE t1 (
+a BIGINT(20) NOT NULL DEFAULT 0,
+PRIMARY KEY  (a)
+) ENGINE=MyISAM;
+INSERT INTO t1 ( a ) SELECT 0 ON DUPLICATE KEY UPDATE a = a + VALUES (a) ;
+DROP TABLE t1;
diff --git a/mysql-test/r/join.result b/mysql-test/r/join.result
index dc763472b0e544baddea2688f68e95dad00ccf2d..b7a2f0ce4f4789cbf94afed5da40ceea214c1274 100644
--- a/mysql-test/r/join.result
+++ b/mysql-test/r/join.result
@@ -10,21 +10,21 @@ SELECT * FROM t1 INNER JOIN t2;
 S1	S1
 1	2
 SELECT * from t1 JOIN t2 USING (S1);
-S1	S1
+S1
 SELECT * FROM t1 INNER JOIN t2 USING (S1);
-S1	S1
+S1
 SELECT * from t1 CROSS JOIN t2;
 S1	S1
 1	2
 SELECT * from t1 LEFT JOIN t2 USING(S1);
-S1	S1
-1	NULL
+S1
+1
 SELECT * from t1 LEFT JOIN t2 ON(t2.S1=2);
 S1	S1
 1	2
 SELECT * from t1 RIGHT JOIN t2 USING(S1);
-S1	S1
-NULL	2
+S1
+2
 SELECT * from t1 RIGHT JOIN t2 ON(t1.S1=1);
 S1	S1
 1	2
@@ -121,11 +121,7 @@ id	catid	stateid	countyid
 drop table t1, t2;
 create table t1 (a int primary key);
 insert into t1 values(1),(2);
-select t1.a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a);
-a
-1
-2
-select t1.a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a) left join t1 as t32 using (a) left join t1 as t33 using (a) left join t1 as t34 using (a) left join t1 as t35 using (a) left join t1 as t36 using (a) left join t1 as t37 using (a) left join t1 as t38 using (a) left join t1 as t39 using (a) left join t1 as t40 using (a) left join t1 as t41 using (a) left join t1 as t42 using (a) left join t1 as t43 using (a) left join t1 as t44 using (a) left join t1 as t45 using (a) left join t1 as t46 using (a) left join t1 as t47 using (a) left join t1 as t48 using (a) left join t1 as t49 using (a) left join t1 as t50 using (a) left join t1 as t51 using (a) left join t1 as t52 using (a) left join t1 as t53 using (a) left join t1 as t54 using (a) left join t1 as t55 using (a) left join t1 as t56 using (a) left join t1 as t57 using (a) left join t1 as t58 using (a) left join t1 as t59 using (a) left join t1 as t60 using (a) left join t1 as t61 using (a) left join t1 as t62 using (a) left join t1 as t63 using (a) left join t1 as t64 using (a) left join t1 as t65 using (a);
+select a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a) left join t1 as t32 using (a) left join t1 as t33 using (a) left join t1 as t34 using (a) left join t1 as t35 using (a) left join t1 as t36 using (a) left join t1 as t37 using (a) left join t1 as t38 using (a) left join t1 as t39 using (a) left join t1 as t40 using (a) left join t1 as t41 using (a) left join t1 as t42 using (a) left join t1 as t43 using (a) left join t1 as t44 using (a) left join t1 as t45 using (a) left join t1 as t46 using (a) left join t1 as t47 using (a) left join t1 as t48 using (a) left join t1 as t49 using (a) left join t1 as t50 using (a) left join t1 as t51 using (a) left join t1 as t52 using (a) left join t1 as t53 using (a) left join t1 as t54 using (a) left join t1 as t55 using (a) left join t1 as t56 using (a) left join t1 as t57 using (a) left join t1 as t58 using (a) left join t1 as t59 using (a) left join t1 as t60 using (a) left join t1 as t61 using (a) left join t1 as t62 using (a) left join t1 as t63 using (a) left join t1 as t64 using (a) left join t1 as t65 using (a);
 ERROR HY000: Too many tables; MySQL can only use XX tables in a join
 drop table t1;
 CREATE TABLE t1 (
@@ -145,10 +141,9 @@ DROP TABLE t1, t2;
 CREATE TABLE t1 (d DATE NOT NULL);
 CREATE TABLE t2 (d DATE NOT NULL);
 INSERT INTO t1 (d) VALUES ('2001-08-01'),('0000-00-00');
-SELECT * FROM t1 LEFT JOIN t2 USING (d) WHERE t2.d IS NULL;
-d	d
-2001-08-01	NULL
-0000-00-00	NULL
+SELECT * FROM t1 LEFT JOIN t2 USING (d) WHERE d IS NULL;
+d
+0000-00-00
 SELECT * from t1 WHERE t1.d IS NULL;
 d
 0000-00-00
@@ -265,10 +260,10 @@ PRIMARY KEY  (siteid,rate_code),
 FULLTEXT KEY rate_code (rate_code)
 ) ENGINE=MyISAM;
 INSERT INTO t2 VALUES ('rivercats','cust',20);
-SELECT emp.rate_code, lr.base_rate FROM t1 AS emp LEFT JOIN t2 AS lr USING (siteid, rate_code) WHERE emp.emp_id = 'psmith' AND lr.siteid = 'rivercats';
+SELECT rate_code, lr.base_rate FROM t1 AS emp LEFT JOIN t2 AS lr USING (siteid, rate_code) WHERE emp.emp_id = 'psmith' AND siteid = 'rivercats';
 rate_code	base_rate
 cust	20
-SELECT emp.rate_code, lr.base_rate FROM t1 AS emp LEFT JOIN t2 AS lr USING (siteid, rate_code) WHERE lr.siteid = 'rivercats' AND emp.emp_id = 'psmith';
+SELECT rate_code, lr.base_rate FROM t1 AS emp LEFT JOIN t2 AS lr USING (siteid, rate_code) WHERE siteid = 'rivercats' AND emp.emp_id = 'psmith';
 rate_code	base_rate
 cust	20
 drop table t1,t2;
@@ -296,79 +291,79 @@ insert into t1 values(1),(2);
 insert into t2 values(2),(3);
 insert into t3 values (2),(4);
 select * from t1 natural left join t2;
-i	i
-1	NULL
-2	2
+i
+1
+2
 select * from t1 left join t2 on (t1.i=t2.i);
 i	i
 1	NULL
 2	2
 select * from t1 natural left join t2 natural left join t3;
-i	i	i
-1	NULL	NULL
-2	2	2
+i
+1
+2
 select * from t1 left join t2 on (t1.i=t2.i) left join t3 on (t2.i=t3.i);
 i	i	i
 1	NULL	NULL
 2	2	2
 select * from t3 natural right join t2;
-i	i
-2	2
-NULL	3
+i
+2
+3
 select * from t3 right join t2 on (t3.i=t2.i);
 i	i
 2	2
 NULL	3
 select * from t3 natural right join t2 natural right join t1;
-i	i	i
-NULL	NULL	1
-2	2	2
+i
+1
+2
 select * from t3 right join t2 on (t3.i=t2.i) right join t1 on (t2.i=t1.i);
 i	i	i
 NULL	NULL	1
 2	2	2
-select * from t1,t2 natural left join t3 order by t1.i,t2.i,t3.i;
-i	i	i
-1	2	2
-1	3	NULL
-2	2	2
-2	3	NULL
+select * from t1,t2 natural left join t3 order by 1,2;
+i	i
+1	2
+1	3
+2	2
+2	3
 select * from t1,t2 left join t3 on (t2.i=t3.i) order by t1.i,t2.i,t3.i;
 i	i	i
 1	2	2
 1	3	NULL
 2	2	2
 2	3	NULL
-select t1.i,t2.i,t3.i from t2 natural left join t3,t1 order by t1.i,t2.i,t3.i;
-i	i	i
-1	2	2
-1	3	NULL
-2	2	2
-2	3	NULL
+select * from t2 natural left join t3,t1 order by t1.i;
+i	i
+2	1
+3	1
+2	2
+3	2
 select t1.i,t2.i,t3.i from t2 left join t3 on (t2.i=t3.i),t1 order by t1.i,t2.i,t3.i;
 i	i	i
 1	2	2
 1	3	NULL
 2	2	2
 2	3	NULL
-select * from t1,t2 natural right join t3 order by t1.i,t2.i,t3.i;
-i	i	i
-1	NULL	4
-1	2	2
-2	NULL	4
-2	2	2
+select * from t1,t2 natural right join t3 order by 1,2;
+i	i
+1	2
+1	4
+2	2
+2	4
 select * from t1,t2 right join t3 on (t2.i=t3.i) order by t1.i,t2.i,t3.i;
 i	i	i
 1	NULL	4
 1	2	2
 2	NULL	4
 2	2	2
-select t1.i,t2.i,t3.i from t2 natural right join t3,t1 order by t1.i,t2.i,t3.i;
-i	i	i
-1	NULL	4
-1	2	2
-2	NULL	4
-2	2	2
+select * from t2 natural right join t3,t1 order by t1.i;
+i	i
+2	1
+4	1
+2	2
+4	2
 select t1.i,t2.i,t3.i from t2 right join t3 on (t2.i=t3.i),t1 order by t1.i,t2.i,t3.i;
 i	i	i
 1	NULL	4
diff --git a/mysql-test/r/join_crash.result b/mysql-test/r/join_crash.result
index c1671ea7e2019528022f7511bfa9d8a95fe0bfd1..f1a3b4956a8c17199a89b61362e0b22e9e5ecf17 100644
--- a/mysql-test/r/join_crash.result
+++ b/mysql-test/r/join_crash.result
@@ -75,18 +75,11 @@ t1.client_ptr as client_ptr,
 t1.comments as comments,
 sum( t3.amount_received ) + sum( t3.adjustment ) as total_budget
 from
-t1 ,
 t2 as client_period ,
-t2 as project_period
-left join
-t3
-on
-t3.project_ptr = t1.project_id
-and t3.date_received <= '2001-03-22 14:15:09'
-    left join
-t4
-on
-t4.client_id = t1.client_ptr
+t2 as project_period,
+t3 left join t1 on (t3.project_ptr = t1.project_id and
+t3.date_received <= '2001-03-22 14:15:09')
+left join t4 on t4.client_id = t1.client_ptr
 where
 1
 and ( client_period.period_type = 'client_table'
diff --git a/mysql-test/r/join_nested.result b/mysql-test/r/join_nested.result
index 27edac1b30b9bb73981a5e986b98730c4a8d2533..8779c61b686d466bacf73d613d153303868bae0f 100644
--- a/mysql-test/r/join_nested.result
+++ b/mysql-test/r/join_nested.result
@@ -223,8 +223,7 @@ a	b
 1	2
 EXPLAIN EXTENDED
 SELECT t6.a,t6.b,t7.a,t7.b,t8.a,t8.b
-FROM t6,
-t7 
+FROM (t6, t7)
 LEFT JOIN 
 t8
 ON t7.b=t8.b AND t6.b < 10;
@@ -235,8 +234,7 @@ id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 Warnings:
 Note	1003	select `test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b` from `test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t7`.`b` = `test`.`t8`.`b`) and (`test`.`t6`.`b` < 10))) where 1
 SELECT t6.a,t6.b,t7.a,t7.b,t8.a,t8.b
-FROM t6,
-t7 
+FROM (t6, t7)
 LEFT JOIN 
 t8
 ON t7.b=t8.b AND t6.b < 10;
@@ -260,8 +258,7 @@ SELECT t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b
 FROM t5 
 LEFT JOIN 
 ( 
-t6,
-t7 
+(t6, t7)
 LEFT JOIN 
 t8
 ON t7.b=t8.b AND t6.b < 10
@@ -279,8 +276,7 @@ SELECT t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b
 FROM t5 
 LEFT JOIN 
 ( 
-t6,
-t7 
+(t6, t7)
 LEFT JOIN 
 t8
 ON t7.b=t8.b AND t6.b < 10
@@ -312,8 +308,7 @@ ON t3.a=1 AND t2.b=t4.b,
 t5 
 LEFT JOIN 
 ( 
-t6,
-t7 
+(t6, t7)
 LEFT JOIN 
 t8
 ON t7.b=t8.b AND t6.b < 10
@@ -357,8 +352,7 @@ ON t3.a=1 AND t2.b=t4.b,
 t5 
 LEFT JOIN 
 ( 
-t6,
-t7 
+(t6, t7)
 LEFT JOIN 
 t8
 ON t7.b=t8.b AND t6.b < 10
@@ -397,8 +391,7 @@ ON t3.a=1 AND t2.b=t4.b,
 t5 
 LEFT JOIN 
 ( 
-t6,
-t7 
+(t6, t7)
 LEFT JOIN 
 t8
 ON t7.b=t8.b AND t6.b < 10
@@ -470,8 +463,7 @@ ON t3.a=1 AND t2.b=t4.b,
 t5 
 LEFT JOIN 
 ( 
-t6,
-t7 
+(t6, t7)
 LEFT JOIN 
 t8
 ON t7.b=t8.b AND t6.b < 10
@@ -537,8 +529,7 @@ ON t3.a=1 AND t2.b=t4.b,
 t5 
 LEFT JOIN 
 ( 
-t6,
-t7 
+(t6, t7)
 LEFT JOIN 
 t8
 ON t7.b=t8.b AND t6.b < 10
@@ -575,8 +566,7 @@ ON t3.a=1 AND t2.b=t4.b,
 t5 
 LEFT JOIN 
 ( 
-t6,
-t7 
+(t6, t7)
 LEFT JOIN 
 t8
 ON t7.b=t8.b AND t6.b < 10
@@ -625,8 +615,7 @@ ON t3.a=1 AND t2.b=t4.b,
 t5 
 LEFT JOIN 
 ( 
-t6,
-t7 
+(t6, t7)
 LEFT JOIN 
 t8
 ON t7.b=t8.b AND t6.b < 10
@@ -679,8 +668,7 @@ ON t3.a=1 AND t2.b=t4.b,
 t5 
 LEFT JOIN 
 ( 
-t6,
-t7 
+(t6, t7)
 LEFT JOIN 
 t8
 ON t7.b=t8.b AND t6.b < 10
@@ -825,44 +813,38 @@ a	b	a	b	a	b	a	b
 1	3	5	3	NULL	NULL	NULL	NULL
 2	2	5	3	NULL	NULL	NULL	NULL
 SELECT t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b
-FROM t1, t3, t4 
+FROM t1, (t3, t4)
 RIGHT JOIN              
 t2
 ON t3.a=1 AND t2.b=t4.b
 WHERE t1.a <= 2;
 a	b	a	b	a	b	a	b
-1	3	3	3	1	2	NULL	NULL
-1	3	3	3	2	2	NULL	NULL
-2	2	3	3	1	2	NULL	NULL
-2	2	3	3	2	2	NULL	NULL
+1	3	3	3	NULL	NULL	NULL	NULL
+2	2	3	3	NULL	NULL	NULL	NULL
 1	3	4	2	1	2	3	2
 1	3	4	2	1	2	4	2
-1	3	4	2	2	2	NULL	NULL
 2	2	4	2	1	2	3	2
 2	2	4	2	1	2	4	2
-2	2	4	2	2	2	NULL	NULL
-1	3	5	3	1	2	NULL	NULL
-1	3	5	3	2	2	NULL	NULL
-2	2	5	3	1	2	NULL	NULL
-2	2	5	3	2	2	NULL	NULL
+1	3	5	3	NULL	NULL	NULL	NULL
+2	2	5	3	NULL	NULL	NULL	NULL
 EXPLAIN EXTENDED
 SELECT t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b
-FROM t1, t3, t4
+FROM t1, (t3, t4)
 RIGHT JOIN
 t2
 ON t3.a=1 AND t2.b=t4.b
 WHERE t1.a <= 2;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t3	ALL	NULL	NULL	NULL	NULL	2	
 1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	3	Using where
 1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	3	
+1	SIMPLE	t3	ALL	NULL	NULL	NULL	NULL	2	
 1	SIMPLE	t4	ALL	NULL	NULL	NULL	NULL	2	
 Warnings:
-Note	1003	select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b` from `test`.`t1` join `test`.`t3` join `test`.`t2` left join `test`.`t4` on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) where (`test`.`t1`.`a` <= 2)
+Note	1003	select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b` from `test`.`t1` join `test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) where (`test`.`t1`.`a` <= 2)
 CREATE INDEX idx_b ON t2(b);
 EXPLAIN EXTENDED
 SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b
-FROM t3,t4 
+FROM (t3,t4)
 LEFT JOIN              
 (t1,t2)
 ON t3.a=1 AND t3.b=t2.b AND t2.b=t4.b;
@@ -874,7 +856,7 @@ id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 Warnings:
 Note	1003	select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b` from `test`.`t3` join `test`.`t4` left join (`test`.`t1` join `test`.`t2`) on(((`test`.`t3`.`a` = 1) and (`test`.`t3`.`b` = `test`.`t2`.`b`) and (`test`.`t2`.`b` = `test`.`t4`.`b`))) where 1
 SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b
-FROM t3,t4 
+FROM (t3,t4)
 LEFT JOIN              
 (t1,t2)
 ON t3.a=1 AND t3.b=t2.b AND t2.b=t4.b;
@@ -900,8 +882,7 @@ ON t3.a=1 AND t2.b=t4.b,
 t5 
 LEFT JOIN 
 ( 
-t6,
-t7 
+(t6, t7)
 LEFT JOIN 
 t8
 ON t7.b=t8.b AND t6.b < 10
@@ -951,8 +932,7 @@ ON t3.a=1 AND t2.b=t4.b,
 t5 
 LEFT JOIN 
 ( 
-t6,
-t7 
+(t6, t7)
 LEFT JOIN 
 t8
 ON t7.b=t8.b AND t6.b < 10
@@ -1001,8 +981,7 @@ ON t3.a=1 AND t2.b=t4.b,
 t5 
 LEFT JOIN 
 ( 
-t6,
-t7 
+(t6, t7)
 LEFT JOIN 
 t8
 ON t7.b=t8.b AND t6.b < 10
@@ -1052,8 +1031,7 @@ ON t3.a=1 AND t2.b=t4.b,
 t5 
 LEFT JOIN 
 ( 
-t6,
-t7 
+(t6, t7)
 LEFT JOIN 
 t8
 ON t7.b=t8.b AND t6.b < 10
@@ -1100,8 +1078,7 @@ ON t3.a=1 AND t2.b=t4.b,
 t5 
 LEFT JOIN 
 ( 
-t6,
-t7 
+(t6, t7)
 LEFT JOIN 
 t8
 ON t7.b=t8.b AND t6.b < 10
@@ -1176,13 +1153,13 @@ a	b	a1	b
 4	2	1	2
 4	2	2	2
 5	3	NULL	NULL
-SELECT t2.a,t2.b,t3.a1,t3.b
+SELECT *
 FROM t2 NATURAL LEFT JOIN t3
 WHERE t2.a = 4 OR (t2.a > 4 AND t3.a1 IS NULL);
-a	b	a1	b
-4	2	1	2
-4	2	2	2
-5	3	NULL	NULL
+b	a	c	a1	c1
+2	4	0	1	0
+2	4	0	2	0
+3	5	0	NULL	NULL
 DROP TABLE t0,t1,t2,t3,t4,t5,t6,t7,t8,t9;
 CREATE TABLE t1 (a int);
 CREATE TABLE t2 (a int);
@@ -1343,3 +1320,58 @@ id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	0	
 1	SIMPLE	t3	ALL	NULL	NULL	NULL	NULL	0	
 DROP TABLE t1,t2,t3;
+CREATE TABLE t1 (goods int(12) NOT NULL, price varchar(128) NOT NULL);
+INSERT INTO t1 VALUES (23, 2340), (26, 9900);
+CREATE TABLE t2 (goods int(12), name varchar(50), shop char(2));
+INSERT INTO t2 VALUES (23, 'as300', 'fr'), (26, 'as600', 'fr');
+create table t3 (groupid int(12) NOT NULL, goodsid int(12) NOT NULL);
+INSERT INTO t3 VALUES (3,23), (6,26);
+CREATE TABLE t4 (groupid int(12));
+INSERT INTO t4 VALUES (1), (2), (3), (4), (5), (6);
+SELECT * FROM
+(SELECT DISTINCT gl.groupid, gp.price
+FROM t4 gl 
+LEFT JOIN
+(t3 g INNER JOIN t2 p ON g.goodsid = p.goods 
+INNER JOIN t1 gp ON p.goods = gp.goods)
+ON gl.groupid = g.groupid and p.shop = 'fr') t;
+groupid	price
+1	NULL
+2	NULL
+3	2340
+4	NULL
+5	NULL
+6	9900
+CREATE VIEW v1 AS
+SELECT g.groupid groupid, p.goods goods,  
+p.name name, p.shop shop, 
+gp.price price
+FROM t3 g INNER JOIN t2 p ON g.goodsid = p.goods
+INNER JOIN t1 gp on p.goods = gp.goods;
+CREATE VIEW v2 AS
+SELECT DISTINCT g.groupid, fr.price
+FROM t4 g
+LEFT JOIN
+v1 fr on g.groupid = fr.groupid and fr.shop = 'fr';
+SELECT * FROM v2;
+groupid	price
+1	NULL
+2	NULL
+3	2340
+4	NULL
+5	NULL
+6	9900
+SELECT * FROM 
+(SELECT DISTINCT g.groupid, fr.price
+FROM t4 g
+LEFT JOIN
+v1 fr on g.groupid = fr.groupid and fr.shop = 'fr') t;
+groupid	price
+1	NULL
+2	NULL
+3	2340
+4	NULL
+5	NULL
+6	9900
+DROP VIEW v1,v2;
+DROP TABLE t1,t2,t3,t4;
diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result
index b75eadd5291809ec1fef7637453154b7cd11f639..9bc85dfa987847e37b3997f0dbd3c7d8da2451de 100644
--- a/mysql-test/r/join_outer.result
+++ b/mysql-test/r/join_outer.result
@@ -36,7 +36,16 @@ grp	a	c	id	a	c	d
 3	5	C	3	5	B	5
 3	6	D	3	6	C	6
 NULL	NULL	NULL	4	7	D	7
-select t1.*,t2.* from t1 left join t2 using (a);
+select * from t1 left join t2 using (a);
+a	grp	c	id	c	d
+1	1	a	1	a	1
+2	2	b	NULL	NULL	NULL
+3	2	c	NULL	NULL	NULL
+4	3	E	3	A	4
+5	3	C	3	B	5
+6	3	D	3	C	6
+NULL	NULL		NULL	NULL	NULL
+select t1.*,t2.* from t1 left join t2 on t1.a=t2.a;
 grp	a	c	id	a	c	d
 1	1	a	1	1	a	1
 2	2	b	NULL	NULL	NULL	NULL
@@ -45,40 +54,34 @@ grp	a	c	id	a	c	d
 3	5	C	3	5	B	5
 3	6	D	3	6	C	6
 NULL	NULL		NULL	NULL	NULL	NULL
-select t1.*,t2.* from t1 left join t2 using (a) where t1.a=t2.a;
-grp	a	c	id	a	c	d
-1	1	a	1	1	a	1
-3	4	E	3	4	A	4
-3	5	C	3	5	B	5
-3	6	D	3	6	C	6
-select t1.*,t2.* from t1 left join t2 using (a,c);
-grp	a	c	id	a	c	d
-1	1	a	1	1	a	1
-2	2	b	NULL	NULL	NULL	NULL
-2	3	c	NULL	NULL	NULL	NULL
-3	4	E	NULL	NULL	NULL	NULL
-3	5	C	NULL	NULL	NULL	NULL
-3	6	D	NULL	NULL	NULL	NULL
-NULL	NULL		NULL	NULL	NULL	NULL
-select t1.*,t2.* from t1 left join t2 using (c);
-grp	a	c	id	a	c	d
-1	1	a	1	1	a	1
-1	1	a	3	4	A	4
-2	2	b	3	5	B	5
-2	3	c	3	6	C	6
-3	4	E	NULL	NULL	NULL	NULL
-3	5	C	3	6	C	6
-3	6	D	4	7	D	7
-NULL	NULL		NULL	NULL	NULL	NULL
-select t1.*,t2.* from t1 natural left outer join t2;
-grp	a	c	id	a	c	d
-1	1	a	1	1	a	1
-2	2	b	NULL	NULL	NULL	NULL
-2	3	c	NULL	NULL	NULL	NULL
-3	4	E	NULL	NULL	NULL	NULL
-3	5	C	NULL	NULL	NULL	NULL
-3	6	D	NULL	NULL	NULL	NULL
-NULL	NULL		NULL	NULL	NULL	NULL
+select * from t1 left join t2 using (a,c);
+a	c	grp	id	d
+1	a	1	1	1
+2	b	2	NULL	NULL
+3	c	2	NULL	NULL
+4	E	3	NULL	NULL
+5	C	3	NULL	NULL
+6	D	3	NULL	NULL
+NULL		NULL	NULL	NULL
+select * from t1 left join t2 using (c);
+c	grp	a	id	a	d
+a	1	1	1	1	1
+a	1	1	3	4	4
+b	2	2	3	5	5
+c	2	3	3	6	6
+E	3	4	NULL	NULL	NULL
+C	3	5	3	6	6
+D	3	6	4	7	7
+	NULL	NULL	NULL	NULL	NULL
+select * from t1 natural left outer join t2;
+a	c	grp	id	d
+1	a	1	1	1
+2	b	2	NULL	NULL
+3	c	2	NULL	NULL
+4	E	3	NULL	NULL
+5	C	3	NULL	NULL
+6	D	3	NULL	NULL
+NULL		NULL	NULL	NULL
 select t1.*,t2.* from t1 left join t2 on (t1.a=t2.a) where t2.id=3;
 grp	a	c	id	a	c	d
 3	4	E	3	4	A	4
@@ -106,26 +109,26 @@ grp	a	c	id	a	c	d	a
 3	6	D	3	6	C	6	6
 NULL	NULL		NULL	NULL	NULL	NULL	NULL
 explain select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t1.a=t3.a);
-ERROR 42000: Cross dependency found in OUTER JOIN; examine your ON conditions
+ERROR 42S22: Unknown column 't3.a' in 'on clause'
 select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t1.a=t3.a);
-ERROR 42000: Cross dependency found in OUTER JOIN; examine your ON conditions
+ERROR 42S22: Unknown column 't3.a' in 'on clause'
 select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t2.a=t3.a);
-ERROR 42000: Cross dependency found in OUTER JOIN; examine your ON conditions
-select t1.*,t2.* from t1 inner join t2 using (a);
-grp	a	c	id	a	c	d
-1	1	a	1	1	a	1
-3	4	E	3	4	A	4
-3	5	C	3	5	B	5
-3	6	D	3	6	C	6
+ERROR 42S22: Unknown column 't3.a' in 'on clause'
+select * from t1 inner join t2 using (a);
+a	grp	c	id	c	d
+1	1	a	1	a	1
+4	3	E	3	A	4
+5	3	C	3	B	5
+6	3	D	3	C	6
 select t1.*,t2.* from t1 inner join t2 on (t1.a=t2.a);
 grp	a	c	id	a	c	d
 1	1	a	1	1	a	1
 3	4	E	3	4	A	4
 3	5	C	3	5	B	5
 3	6	D	3	6	C	6
-select t1.*,t2.* from t1 natural join t2;
-grp	a	c	id	d
-1	1	a	1	1
+select * from t1 natural join t2;
+a	c	grp	id	d
+1	a	1	1	1
 drop table t1,t2;
 CREATE TABLE t1 (
 usr_id INT unsigned NOT NULL,
@@ -400,7 +403,7 @@ insert into t3 values (1);
 insert into t4 values (1,1);
 insert into t5 values (1,1);
 explain select * from t3 left join t4 on t4.seq_1_id = t2.t2_id left join t1 on t1.t1_id = t4.seq_0_id left join t5 on t5.seq_0_id = t1.t1_id left join t2 on t2.t2_id = t5.seq_1_id where t3.t3_id = 23;
-ERROR 42000: Cross dependency found in OUTER JOIN; examine your ON conditions
+ERROR 42S22: Unknown column 't2.t2_id' in 'on clause'
 drop table t1,t2,t3,t4,t5;
 create table t1 (n int, m int, o int, key(n));
 create table t2 (n int not null, m int, o int, primary key(n));
@@ -432,7 +435,7 @@ INSERT INTO t2 VALUES (3,'z');
 SELECT t2.id2 FROM t2 LEFT OUTER JOIN t1 ON t1.id2 = t2.id2 WHERE id1 IS NULL;
 id2
 3
-SELECT t2.id2 FROM t2 NATURAL LEFT OUTER JOIN t1 WHERE id1 IS NULL;
+SELECT id2 FROM t2 NATURAL LEFT OUTER JOIN t1 WHERE id1 IS NULL;
 id2
 3
 drop table t1,t2;
@@ -461,10 +464,10 @@ count	color
 15	white
 7	green
 select * from t2 natural join t1;
-count	color	name
-10	green	lime
-7	green	lime
-5	black	grape
+color	count	name
+green	10	lime
+green	7	lime
+black	5	grape
 select t2.count, t1.name from t2 natural join t1;
 count	name
 10	lime
@@ -647,16 +650,15 @@ insert into t1 values(1),(2);
 insert into t2 values(2),(3);
 insert into t3 values(2),(4);
 select * from t1 natural left join t2 natural left join t3;
-i	i	i
-1	NULL	NULL
-2	2	2
-select * from t1 natural left join t2 where (t2.i is not null)=0;
-i	i
-1	NULL
-select * from t1 natural left join t2 where (t2.i is not null) is not null;
-i	i
-1	NULL
-2	2
+i
+1
+2
+select * from t1 natural left join t2 where (i is not null)=0;
+i
+select * from t1 natural left join t2 where (i is not null) is not null;
+i
+1
+2
 drop table t1,t2,t3;
 create table t1 (f1 integer,f2 integer,f3 integer);
 create table t2 (f2 integer,f4 integer);
@@ -664,7 +666,7 @@ create table t3 (f3 integer,f5 integer);
 select * from t1
 left outer join t2 using (f2)
 left outer join t3 using (f3);
-ERROR 42S22: Unknown column 'test.t2.f3' in 'on clause'
+f3	f2	f1	f4	f5
 drop table t1,t2,t3;
 create table t1 (a1 int, a2 int);
 create table t2 (b1 int not null, b2 int);
@@ -929,13 +931,13 @@ create table t1 (a int, b varchar(20));
 create table t2 (a int, c varchar(20));
 insert into t1 values (1,"aaaaaaaaaa"),(2,"bbbbbbbbbb");
 insert into t2 values (1,"cccccccccc"),(2,"dddddddddd");
-select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by t1.a;
+select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by a;
 group_concat(t1.b,t2.c)
 aaaaa
 bbbbb
 Warnings:
 Warning	1260	2 line(s) were cut by GROUP_CONCAT()
-select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by t1.a;
+select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by a;
 group_concat(t1.b,t2.c)
 aaaaa
 bbbbb
diff --git a/mysql-test/r/key.result b/mysql-test/r/key.result
index 3ad8571aaddf428d62ae64ccd9e6e93ea8b1b198..bce02a1cb0f25846e5d4220f7c04788bc2cc0467 100644
--- a/mysql-test/r/key.result
+++ b/mysql-test/r/key.result
@@ -354,3 +354,28 @@ t1	CREATE TABLE `t1` (
   KEY `a` (`a`,`b`)
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
 drop table t1;
+create table t1 (a int not null primary key, b varchar(20) not null unique);
+desc t1;
+Field	Type	Null	Key	Default	Extra
+a	int(11)	NO	PRI		
+b	varchar(20)	NO	UNI		
+drop table t1;
+create table t1 (a int not null primary key, b int not null unique);
+desc t1;
+Field	Type	Null	Key	Default	Extra
+a	int(11)	NO	PRI		
+b	int(11)	NO	UNI		
+drop table t1;
+create table t1 (a int not null primary key, b varchar(20) not null, unique (b(10)));
+desc t1;
+Field	Type	Null	Key	Default	Extra
+a	int(11)	NO	PRI		
+b	varchar(20)	NO	UNI		
+drop table t1;
+create table t1 (a int not null primary key, b varchar(20) not null, c varchar(20) not null, unique(b(10),c(10)));
+desc t1;
+Field	Type	Null	Key	Default	Extra
+a	int(11)	NO	PRI		
+b	varchar(20)	NO	MUL		
+c	varchar(20)	NO			
+drop table t1;
diff --git a/mysql-test/r/key_cache.result b/mysql-test/r/key_cache.result
index 7c286ced58a67fdca791f715f77b0e757c02c2fb..de9a2b2c003fbb18caddfef5c33a13b24f04b4d7 100644
--- a/mysql-test/r/key_cache.result
+++ b/mysql-test/r/key_cache.result
@@ -23,13 +23,13 @@ SELECT @@global.default.key_buffer_size;
 @@global.default.key_buffer_size
 16777216
 SELECT @@global.default.`key_buffer_size`;
-@@global.default.key_buffer_size
+@@global.default.`key_buffer_size`
 16777216
 SELECT @@global.`default`.`key_buffer_size`;
-@@global.default.key_buffer_size
+@@global.`default`.`key_buffer_size`
 16777216
 SELECT @@`default`.key_buffer_size;
-@@default.key_buffer_size
+@@`default`.key_buffer_size
 16777216
 SELECT @@small.key_buffer_size;
 @@small.key_buffer_size
@@ -289,3 +289,9 @@ check table t1;
 Table	Op	Msg_type	Msg_text
 test.t1	check	status	OK
 drop table t1;
+set @@global.key_buffer_size=0;
+Warnings:
+Warning	1438	Cannot drop default keycache
+select @@global.key_buffer_size;
+@@global.key_buffer_size
+2097152
diff --git a/mysql-test/r/metadata.result b/mysql-test/r/metadata.result
index dcd32bf477bfebef400f10a805d11aa9ca5aa36f..50b0b6ae2943bf4f3fe3e1cbb91dbd2a9c028935 100644
--- a/mysql-test/r/metadata.result
+++ b/mysql-test/r/metadata.result
@@ -85,3 +85,14 @@ def			aaa	1	1	8	20	1	N	32769	0	63
 1
 1
 drop table t1;
+create table t1 (i int);
+insert into t1 values (1),(2),(3);
+select * from t1 where i = 2;
+drop table t1;//
+affected rows: 0
+affected rows: 3
+info: Records: 3  Duplicates: 0  Warnings: 0
+i
+2
+affected rows: 1
+affected rows: 0
diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result
index f5c4e19af64c8b600a21cd9366d7dab62c35c5a3..ea02a703c656291080b9c6e8c81b51093a3a1188 100644
--- a/mysql-test/r/multi_update.result
+++ b/mysql-test/r/multi_update.result
@@ -135,16 +135,16 @@ create table t1 (n numeric(10));
 create table t2 (n numeric(10));
 insert into t2 values (1),(2),(4),(8),(16),(32);
 select * from t2 left outer join t1  using (n);
-n	n
-1	NULL
-2	NULL
-4	NULL
-8	NULL
-16	NULL
-32	NULL
+n
+1
+2
+4
+8
+16
+32
 delete  t1,t2 from t2 left outer join t1  using (n);
 select * from t2 left outer join t1  using (n);
-n	n
+n
 drop table t1,t2 ;
 create table t1 (n int(10) not null primary key, d int(10));
 create table t2 (n int(10) not null primary key, d int(10));
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result
index 8239202fc049829a0a1d628025966b22441762f9..71cb76fe844c32c86cbe2ef5de00bc5ea93738e7 100644
--- a/mysql-test/r/myisam.result
+++ b/mysql-test/r/myisam.result
@@ -506,7 +506,7 @@ id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t2	index	NULL	PRIMARY	4	NULL	2	Using index; Distinct
 drop table t1,t2;
 CREATE TABLE t1 (`a` int(11) NOT NULL default '0', `b` int(11) NOT NULL default '0', UNIQUE KEY `a` USING RTREE (`a`,`b`)) ENGINE=MyISAM;
-ERROR 42000: This version of MySQL doesn't yet support 'RTREE INDEX'
+Got one of the listed errors
 create table t1 (a int, b varchar(200), c text not null) checksum=1;
 create table t2 (a int, b varchar(200), c text not null) checksum=0;
 insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, "");
diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result
index bf783402921bd250663b3032f60a5bdde8b8dd23..917724580cfba90c2c8962ee4df6936288e7523f 100644
--- a/mysql-test/r/mysqldump.result
+++ b/mysql-test/r/mysqldump.result
@@ -1,6 +1,5 @@
 DROP TABLE IF EXISTS t1, `"t"1`, t1aa, t2, t2aa;
 drop database if exists mysqldump_test_db;
-drop database if exists db1;
 drop view if exists v1, v2, v3;
 CREATE TABLE t1(a int);
 INSERT INTO t1 VALUES (1), (2);
@@ -357,46 +356,6 @@ CREATE TABLE `t1` (
 2
 3
 drop table t1;
-create table t1(a int);
-create view v1 as select * from t1;
-
-/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
-/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
-/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
-/*!40101 SET NAMES utf8 */;
-/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
-/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
-/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-DROP TABLE IF EXISTS `t1`;
-CREATE TABLE `t1` (
-  `a` int(11) default NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-
-
-/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-LOCK TABLES `t1` WRITE;
-UNLOCK TABLES;
-/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
-DROP TABLE IF EXISTS `v1`;
-DROP VIEW IF EXISTS `v1`;
-CREATE TABLE `v1` (
-  `a` int(11) default NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-DROP TABLE IF EXISTS `v1`;
-DROP VIEW IF EXISTS `v1`;
-CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1` AS select `test`.`t1`.`a` AS `a` from `test`.`t1`;
-
-/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
-/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
-/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
-/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
-/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
-/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-
-drop view v1;
-drop table t1;
 
 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
 /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -604,38 +563,6 @@ UNLOCK TABLES;
 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
 
-DROP TABLE t1;
-CREATE TABLE t1 (a char(10));
-INSERT INTO t1 VALUES ('\'');
-
-/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
-/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
-/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
-/*!40101 SET NAMES utf8 */;
-/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
-/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
-/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-DROP TABLE IF EXISTS `t1`;
-CREATE TABLE `t1` (
-  `a` char(10) default NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-
-
-/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-LOCK TABLES `t1` WRITE;
-INSERT INTO `t1` VALUES ('\'');
-UNLOCK TABLES;
-/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
-
-/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
-/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
-/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
-/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
-/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
-/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-
 DROP TABLE t1;
 CREATE TABLE t1 (a int);
 INSERT INTO t1 VALUES (1),(2),(3);
@@ -1428,59 +1355,6 @@ UNLOCK TABLES;
 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
 
 DROP TABLE t1;
-create database db1;
-use db1;
-CREATE TABLE t2 (
-a varchar(30) default NULL,
-KEY a (a(5))
-);
-INSERT INTO t2 VALUES ('alfred');
-INSERT INTO t2 VALUES ('angie');
-INSERT INTO t2 VALUES ('bingo');
-INSERT INTO t2 VALUES ('waffle');
-INSERT INTO t2 VALUES ('lemon');
-create view v2 as select * from t2 where a like 'a%' with check option;
-
-/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
-/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
-/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
-/*!40101 SET NAMES utf8 */;
-/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
-/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
-/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-DROP TABLE IF EXISTS `t2`;
-CREATE TABLE `t2` (
-  `a` varchar(30) default NULL,
-  KEY `a` (`a`(5))
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-
-
-/*!40000 ALTER TABLE `t2` DISABLE KEYS */;
-LOCK TABLES `t2` WRITE;
-INSERT INTO `t2` VALUES ('alfred'),('angie'),('bingo'),('waffle'),('lemon');
-UNLOCK TABLES;
-/*!40000 ALTER TABLE `t2` ENABLE KEYS */;
-DROP TABLE IF EXISTS `v2`;
-DROP VIEW IF EXISTS `v2`;
-CREATE TABLE `v2` (
-  `a` varchar(30) default NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-DROP TABLE IF EXISTS `v2`;
-DROP VIEW IF EXISTS `v2`;
-CREATE ALGORITHM=UNDEFINED VIEW `db1`.`v2` AS select `db1`.`t2`.`a` AS `a` from `db1`.`t2` where (`db1`.`t2`.`a` like _latin1'a%') WITH CASCADED CHECK OPTION;
-
-/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
-/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
-/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
-/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
-/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
-/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-
-drop table t2;
-drop view v2;
-drop database db1;
 CREATE DATABASE mysqldump_test_db;
 USE mysqldump_test_db;
 CREATE TABLE t1 ( a INT );
@@ -1647,6 +1521,132 @@ insert into t2 (a, b) values (NULL, NULL),(10, NULL),(NULL, "twenty"),(30, "thir
 </database>
 </mysqldump>
 drop table t1, t2;
+create table t1(a int);
+create view v1 as select * from t1;
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+DROP TABLE IF EXISTS `t1`;
+CREATE TABLE `t1` (
+  `a` int(11) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+
+
+/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
+LOCK TABLES `t1` WRITE;
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
+DROP TABLE IF EXISTS `v1`;
+/*!50001 DROP VIEW IF EXISTS `v1`*/;
+/*!50001 CREATE TABLE `v1` (
+  `a` int(11) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1*/;
+/*!50001 DROP TABLE IF EXISTS `v1`*/;
+/*!50001 DROP VIEW IF EXISTS `v1`*/;
+/*!50001 CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1` AS select `test`.`t1`.`a` AS `a` from `test`.`t1`*/;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+drop view v1;
+drop table t1;
+create database mysqldump_test_db;
+use mysqldump_test_db;
+CREATE TABLE t2 (
+a varchar(30) default NULL,
+KEY a (a(5))
+);
+INSERT INTO t2 VALUES ('alfred');
+INSERT INTO t2 VALUES ('angie');
+INSERT INTO t2 VALUES ('bingo');
+INSERT INTO t2 VALUES ('waffle');
+INSERT INTO t2 VALUES ('lemon');
+create view v2 as select * from t2 where a like 'a%' with check option;
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+DROP TABLE IF EXISTS `t2`;
+CREATE TABLE `t2` (
+  `a` varchar(30) default NULL,
+  KEY `a` (`a`(5))
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+
+
+/*!40000 ALTER TABLE `t2` DISABLE KEYS */;
+LOCK TABLES `t2` WRITE;
+INSERT INTO `t2` VALUES ('alfred'),('angie'),('bingo'),('waffle'),('lemon');
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `t2` ENABLE KEYS */;
+DROP TABLE IF EXISTS `v2`;
+/*!50001 DROP VIEW IF EXISTS `v2`*/;
+/*!50001 CREATE TABLE `v2` (
+  `a` varchar(30) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1*/;
+/*!50001 DROP TABLE IF EXISTS `v2`*/;
+/*!50001 DROP VIEW IF EXISTS `v2`*/;
+/*!50001 CREATE ALGORITHM=UNDEFINED VIEW `mysqldump_test_db`.`v2` AS select `mysqldump_test_db`.`t2`.`a` AS `a` from `mysqldump_test_db`.`t2` where (`mysqldump_test_db`.`t2`.`a` like _latin1'a%') WITH CASCADED CHECK OPTION*/;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+drop table t2;
+drop view v2;
+drop database mysqldump_test_db;
+use test;
+CREATE TABLE t1 (a char(10));
+INSERT INTO t1 VALUES ('\'');
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+DROP TABLE IF EXISTS `t1`;
+CREATE TABLE `t1` (
+  `a` char(10) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+
+
+/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
+LOCK TABLES `t1` WRITE;
+INSERT INTO `t1` VALUES ('\'');
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+DROP TABLE t1;
 create table t1(a int, b int, c varchar(30));
 insert into t1 values(1, 2, "one"), (2, 4, "two"), (3, 6, "three");
 create view v3 as
@@ -1685,6 +1685,7 @@ end|
 create trigger trg2 before update on t1 for each row begin
 if old.a % 2 = 0 then set new.b := 12; end if;
 end|
+set sql_mode="traditional"|
 create trigger trg3 after update on t1 for each row
 begin
 if new.a = -1 then
@@ -1697,24 +1698,25 @@ if new.a > 10 then
 set @fired:= "No";
 end if;
 end|
+set sql_mode=default|
 show triggers like "t1";
-Trigger	Event	Table	Statement	Timing	Created
+Trigger	Event	Table	Statement	Timing	Created	sql_mode
 trg1	INSERT	t1	
 begin
 if new.a > 10 then
 set new.a := 10;
 set new.a := 11;
 end if;
-end	BEFORE	0000-00-00 00:00:00
+end	BEFORE	0000-00-00 00:00:00	
 trg2	UPDATE	t1	 begin
 if old.a % 2 = 0 then set new.b := 12; end if;
-end	BEFORE	0000-00-00 00:00:00
+end	BEFORE	0000-00-00 00:00:00	
 trg3	UPDATE	t1	
 begin
 if new.a = -1 then
 set @fired:= "Yes";
 end if;
-end	AFTER	0000-00-00 00:00:00
+end	AFTER	0000-00-00 00:00:00	STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER
 INSERT INTO t1 (a) VALUES (1),(2),(3),(22);
 update t1 set a = 4 where a=3;
 
@@ -1736,30 +1738,32 @@ CREATE TABLE `t1` (
   `b` bigint(20) default NULL
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
 
+/*!50003 SET @OLD_SQL_MODE=@@SQL_MODE*/;
 DELIMITER //;
-CREATE TRIGGER `trg1` BEFORE INSERT ON `t1`
-FOR EACH ROW
+/*!50003 SET SESSION SQL_MODE=""*/ //
+/*!50003 CREATE TRIGGER `trg1` BEFORE INSERT ON `t1` FOR EACH ROW
 begin
 if new.a > 10 then
 set new.a := 10;
 set new.a := 11;
 end if;
-end//
+end*/ //
 
-CREATE TRIGGER `trg2` BEFORE UPDATE ON `t1`
-FOR EACH ROW begin
+/*!50003 SET SESSION SQL_MODE=""*/ //
+/*!50003 CREATE TRIGGER `trg2` BEFORE UPDATE ON `t1` FOR EACH ROW begin
 if old.a % 2 = 0 then set new.b := 12; end if;
-end//
+end*/ //
 
-CREATE TRIGGER `trg3` AFTER UPDATE ON `t1`
-FOR EACH ROW
+/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER"*/ //
+/*!50003 CREATE TRIGGER `trg3` AFTER UPDATE ON `t1` FOR EACH ROW
 begin
 if new.a = -1 then
 set @fired:= "Yes";
 end if;
-end//
+end*/ //
 
 DELIMITER ;//
+/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;
 
 /*!40000 ALTER TABLE `t1` DISABLE KEYS */;
 LOCK TABLES `t1` WRITE;
@@ -1771,16 +1775,18 @@ CREATE TABLE `t2` (
   `a` int(11) default NULL
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
 
+/*!50003 SET @OLD_SQL_MODE=@@SQL_MODE*/;
 DELIMITER //;
-CREATE TRIGGER `trg4` BEFORE INSERT ON `t2`
-FOR EACH ROW
+/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER"*/ //
+/*!50003 CREATE TRIGGER `trg4` BEFORE INSERT ON `t2` FOR EACH ROW
 begin
 if new.a > 10 then
 set @fired:= "No";
 end if;
-end//
+end*/ //
 
 DELIMITER ;//
+/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;
 
 /*!40000 ALTER TABLE `t2` DISABLE KEYS */;
 LOCK TABLES `t2` WRITE;
@@ -1844,4 +1850,28 @@ show tables;
 Tables_in_test
 t1
 t2
+show triggers;
+Trigger	Event	Table	Statement	Timing	Created	sql_mode
+trg1	INSERT	t1	
+begin
+if new.a > 10 then
+set new.a := 10;
+set new.a := 11;
+end if;
+end	BEFORE	#	
+trg2	UPDATE	t1	 begin
+if old.a % 2 = 0 then set new.b := 12; end if;
+end	BEFORE	#	
+trg3	UPDATE	t1	
+begin
+if new.a = -1 then
+set @fired:= "Yes";
+end if;
+end	AFTER	#	STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER
+trg4	INSERT	t2	
+begin
+if new.a > 10 then
+set @fired:= "No";
+end if;
+end	BEFORE	#	STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER
 DROP TABLE t1, t2;
diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result
index 2b17122909692cecbba572fa8a6c27b395866915..256576704b56f7d78d13efca9e653d52e3a0f6a1 100644
--- a/mysql-test/r/mysqltest.result
+++ b/mysql-test/r/mysqltest.result
@@ -164,3 +164,5 @@ root@localhost
 .      - is longer then 80 characters    and
 .      - consists of several lines
 --------------------------------------------------------------------------------
+this will be executed
+this will be executed
diff --git a/mysql-test/r/ndb_condition_pushdown.result b/mysql-test/r/ndb_condition_pushdown.result
index 14cd46665280b063bcf3f33eb3b7f7a82faffc06..1c3da1b486f157ca20cd203f761332b58100cd83 100644
--- a/mysql-test/r/ndb_condition_pushdown.result
+++ b/mysql-test/r/ndb_condition_pushdown.result
@@ -1514,7 +1514,7 @@ select auto from t1 where
 '1901-01-01 01:01:01' in(date_time) 
 order by auto;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	4	Using where with pushed condition; Using filesort
+1	SIMPLE	t1	ref	medium_index	medium_index	3	const	10	Using where with pushed condition; Using filesort
 select auto from t1 where
 "aaaa" in(string) and 
 "aaaa" in(vstring) and 
diff --git a/mysql-test/r/ndb_config.result b/mysql-test/r/ndb_config.result
new file mode 100644
index 0000000000000000000000000000000000000000..c2557f85c0b1a09e2eec723288a73cdc9ad029ac
--- /dev/null
+++ b/mysql-test/r/ndb_config.result
@@ -0,0 +1,5 @@
+ndbd,1,localhost ndbd,2,localhost ndb_mgmd,3,localhost mysqld,4, mysqld,5, mysqld,6, mysqld,7,
+1,localhost,41943040,12582912 2,localhost,41943040,12582912
+1 localhost 41943040 12582912
+2 localhost 41943040 12582912
+1 2
diff --git a/mysql-test/r/not_embedded_server.result b/mysql-test/r/not_embedded_server.result
new file mode 100644
index 0000000000000000000000000000000000000000..082ebe72ba433d8481de0d0a366ff17ded1b2e70
--- /dev/null
+++ b/mysql-test/r/not_embedded_server.result
@@ -0,0 +1,5 @@
+prepare stmt1 from ' show full processlist ';
+execute stmt1;
+Id	User	Host	db	Command	Time	State	Info
+number	root	localhost	test	Execute	time	NULL	show full processlist
+deallocate prepare stmt1;
diff --git a/mysql-test/r/null_key.result b/mysql-test/r/null_key.result
index b9824cc4b814197424c04a9ce2f86c6ba9a1d75d..5c2141befa65578d2e1f3fcdb9ec21e5b3f1a188 100644
--- a/mysql-test/r/null_key.result
+++ b/mysql-test/r/null_key.result
@@ -313,12 +313,16 @@ INSERT INTO t1 (order_id, product_id, product_type) VALUES
 ('9d9aad7764b5b2c53004348ef8d34500',2315652, 3);
 INSERT INTO t2 (order_id, product_id, product_type) VALUES
 ('9d9aad7764b5b2c53004348ef8d34500',2315652, 3);
-select t1.* from t1
-left join t2 using(order_id, product_id, product_type)
-where t2.order_id=NULL;
+select t1.* from t1 left join t2
+on (t1.order_id = t2.order_id and
+t1.product_id = t2.product_id and
+t1.product_type = t2.product_type)
+where t2.order_id = NULL;
 order_id	product_id	product_type
-select t1.* from t1
-left join t2 using(order_id, product_id, product_type)
+select t1.* from t1 left join t2
+on (t1.order_id = t2.order_id and
+t1.product_id = t2.product_id and
+t1.product_type = t2.product_type)
 where t2.order_id is NULL;
 order_id	product_id	product_type
 3d7ce39b5d4b3e3d22aaafe9b633de51	1206029	3
@@ -369,3 +373,63 @@ select * from t1;
 id	id2
 1	1
 drop table t1;
+CREATE TABLE t1 (a int);
+CREATE TABLE t2 (a int, b int, INDEX idx(a));
+CREATE TABLE t3 (b int, INDEX idx(b));
+CREATE TABLE t4 (b int, INDEX idx(b));
+INSERT INTO t1 VALUES (1), (2), (3), (4);
+INSERT INTO t2 VALUES (1, 1), (3, 1);
+INSERT INTO t3 VALUES 
+(NULL), (NULL), (NULL), (NULL), (NULL),
+(NULL), (NULL), (NULL), (NULL), (NULL);
+INSERT INTO t4 SELECT * FROM t3;
+INSERT INTO t3 SELECT * FROM t4;
+INSERT INTO t4 SELECT * FROM t3;
+INSERT INTO t3 SELECT * FROM t4;
+INSERT INTO t4 SELECT * FROM t3;
+INSERT INTO t3 SELECT * FROM t4;
+INSERT INTO t4 SELECT * FROM t3;
+INSERT INTO t3 SELECT * FROM t4;
+INSERT INTO t4 SELECT * FROM t3;
+INSERT INTO t3 SELECT * FROM t4;
+INSERT INTO t4 SELECT * FROM t3;
+INSERT INTO t3 SELECT * FROM t4;
+INSERT INTO t4 SELECT * FROM t3;
+INSERT INTO t3 SELECT * FROM t4;
+INSERT INTO t4 SELECT * FROM t3;
+INSERT INTO t3 SELECT * FROM t4;
+INSERT INTO t3 VALUES (2), (3);
+ANALYZE table t1, t2, t3;
+Table	Op	Msg_type	Msg_text
+test.t1	analyze	status	OK
+test.t2	analyze	status	OK
+test.t3	analyze	status	OK
+SELECT COUNT(*) FROM t3;
+COUNT(*)
+15972
+EXPLAIN SELECT SQL_CALC_FOUND_ROWS * FROM t1 LEFT JOIN t2 ON t1.a=t2.a
+LEFT JOIN t3 ON t2.b=t3.b;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	4	
+1	SIMPLE	t2	ref	idx	idx	5	test.t1.a	1	
+1	SIMPLE	t3	ref	idx	idx	5	test.t2.b	1	Using index
+FLUSH STATUS ;
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 LEFT JOIN t2 ON t1.a=t2.a
+LEFT JOIN t3 ON t2.b=t3.b;
+a	a	b	b
+1	1	1	NULL
+2	NULL	NULL	NULL
+3	3	1	NULL
+4	NULL	NULL	NULL
+SELECT FOUND_ROWS();
+FOUND_ROWS()
+4
+SHOW STATUS LIKE "handler_read%";
+Variable_name	Value
+Handler_read_first	0
+Handler_read_key	6
+Handler_read_next	2
+Handler_read_prev	0
+Handler_read_rnd	0
+Handler_read_rnd_next	5
+DROP TABLE t1,t2,t3,t4;
diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result
index 628ca5fd9587ee7565db1aab71fe7faaa2e4ed87..b766f14625497aa22eb5f4bae3f51da7c63e4b9d 100644
--- a/mysql-test/r/order_by.result
+++ b/mysql-test/r/order_by.result
@@ -180,7 +180,7 @@ INSERT INTO t3 VALUES (1,'123 Park Place');
 INSERT INTO t3 VALUES (2,'453 Boardwalk');
 SELECT    a,b,if(b = 1,i,if(b = 2,v,''))
 FROM      t1
-LEFT JOIN t2 USING(c)
+LEFT JOIN t2 ON t1.c = t2.c
 LEFT JOIN t3 ON t3.c = t1.c;
 a	b	if(b = 1,i,if(b = 2,v,''))
 1	1	50
@@ -189,7 +189,7 @@ a	b	if(b = 1,i,if(b = 2,v,''))
 4	2	453 Boardwalk
 SELECT    a,b,if(b = 1,i,if(b = 2,v,''))
 FROM      t1
-LEFT JOIN t2 USING(c)
+LEFT JOIN t2 ON t1.c = t2.c
 LEFT JOIN t3 ON t3.c = t1.c
 ORDER BY a;
 a	b	if(b = 1,i,if(b = 2,v,''))
@@ -523,10 +523,10 @@ KEY `pseudo` (`pseudo`)
 );
 INSERT INTO t1 (titre,auteur,dest) VALUES ('test','joce','bug');
 INSERT INTO t2 (numeropost,pseudo) VALUES (1,'joce'),(1,'bug');
-SELECT titre,t1.numeropost,auteur,icone,nbrep,0,date,vue,ouvert,lastauteur,dest FROM t2 LEFT JOIN t1 USING(numeropost) WHERE t2.pseudo='joce' ORDER BY date DESC LIMIT 0,30;
+SELECT titre,numeropost,auteur,icone,nbrep,0,date,vue,ouvert,lastauteur,dest FROM t2 LEFT JOIN t1 USING(numeropost) WHERE t2.pseudo='joce' ORDER BY date DESC LIMIT 0,30;
 titre	numeropost	auteur	icone	nbrep	0	date	vue	ouvert	lastauteur	dest
 test	1	joce	0	0	0	0000-00-00 00:00:00	0	1		bug
-SELECT titre,t1.numeropost,auteur,icone,nbrep,'0',date,vue,ouvert,lastauteur,dest FROM t2 LEFT JOIN t1 USING(numeropost) WHERE t2.pseudo='joce' ORDER BY date DESC LIMIT 0,30;
+SELECT titre,numeropost,auteur,icone,nbrep,'0',date,vue,ouvert,lastauteur,dest FROM t2 LEFT JOIN t1 USING(numeropost) WHERE t2.pseudo='joce' ORDER BY date DESC LIMIT 0,30;
 titre	numeropost	auteur	icone	nbrep	0	date	vue	ouvert	lastauteur	dest
 test	1	joce	0	0	0	0000-00-00 00:00:00	0	1		bug
 drop table t1,t2;
diff --git a/mysql-test/r/ps_1general.result b/mysql-test/r/ps_1general.result
index f2d60ac50252ee025838d4675c298d692455086a..7fb1e1b4df401e65b019f296271eaed0e9b859ee 100644
--- a/mysql-test/r/ps_1general.result
+++ b/mysql-test/r/ps_1general.result
@@ -349,7 +349,7 @@ execute stmt1 ;
 ERROR 42S02: Unknown table 't5'
 prepare stmt1 from ' SELECT @@version ' ;
 execute stmt1 ;
-@@VERSION
+@@version
 <version>
 prepare stmt_do from ' do @var:=  (1 in (select a from t1)) ' ;
 prepare stmt_set from ' set @var= (1 in (select a from t1)) ' ;
diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result
index 5d0e1d703a6a6812b384f2de5b0a66d7e5b6e98a..da5466a6e9d382ca2b4b4eb10018755206f81ac5 100644
--- a/mysql-test/r/ps_2myisam.result
+++ b/mysql-test/r/ps_2myisam.result
@@ -519,56 +519,56 @@ a	?	a
 drop table if exists t2 ;
 create table t2 as select * from t1 ;
 set @query1= 'SELECT * FROM t2 join t1 on (t1.a=t2.a) order by t2.a ' ;
-set @query2= 'SELECT * FROM t2 natural join t1 order by t2.a ' ;
-set @query3= 'SELECT * FROM t2 join t1 using(a) order by t2.a ' ;
+set @query2= 'SELECT * FROM t2 natural join t1 order by a ' ;
+set @query3= 'SELECT * FROM t2 join t1 using(a) order by a ' ;
 set @query4= 'SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a ' ;
-set @query5= 'SELECT * FROM t2 natural left join t1 order by t2.a ' ;
-set @query6= 'SELECT * FROM t2 left join t1 using(a) order by t2.a ' ;
+set @query5= 'SELECT * FROM t2 natural left join t1 order by a ' ;
+set @query6= 'SELECT * FROM t2 left join t1 using(a) order by a ' ;
 set @query7= 'SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a ' ;
-set @query8= 'SELECT * FROM t2 natural right join t1 order by t2.a ' ;
-set @query9= 'SELECT * FROM t2 right join t1 using(a) order by t2.a ' ;
+set @query8= 'SELECT * FROM t2 natural right join t1 order by a ' ;
+set @query9= 'SELECT * FROM t2 right join t1 using(a) order by a ' ;
 the join statement is:
-SELECT * FROM t2 right join t1 using(a) order by t2.a 
+SELECT * FROM t2 right join t1 using(a) order by a 
 prepare stmt1 from @query9  ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
 the join statement is:
-SELECT * FROM t2 natural right join t1 order by t2.a 
+SELECT * FROM t2 natural right join t1 order by a 
 prepare stmt1 from @query8 ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 the join statement is:
 SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a 
 prepare stmt1 from @query7 ;
@@ -591,47 +591,47 @@ a	b	a	b
 3	three	3	three
 4	four	4	four
 the join statement is:
-SELECT * FROM t2 left join t1 using(a) order by t2.a 
+SELECT * FROM t2 left join t1 using(a) order by a 
 prepare stmt1 from @query6 ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
 the join statement is:
-SELECT * FROM t2 natural left join t1 order by t2.a 
+SELECT * FROM t2 natural left join t1 order by a 
 prepare stmt1 from @query5 ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 the join statement is:
 SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a 
 prepare stmt1 from @query4 ;
@@ -654,28 +654,28 @@ a	b	a	b
 3	three	3	three
 4	four	4	four
 the join statement is:
-SELECT * FROM t2 join t1 using(a) order by t2.a 
+SELECT * FROM t2 join t1 using(a) order by a 
 prepare stmt1 from @query3 ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
 the join statement is:
-SELECT * FROM t2 natural join t1 order by t2.a 
+SELECT * FROM t2 natural join t1 order by a 
 prepare stmt1 from @query2 ;
 execute stmt1 ;
 a	b
diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result
index da0421d2caa15e22d3aa43876e4b1606b4a9bd49..237072d72182684f5552ab7222eaf98ce7047292 100644
--- a/mysql-test/r/ps_3innodb.result
+++ b/mysql-test/r/ps_3innodb.result
@@ -519,56 +519,56 @@ a	?	a
 drop table if exists t2 ;
 create table t2 as select * from t1 ;
 set @query1= 'SELECT * FROM t2 join t1 on (t1.a=t2.a) order by t2.a ' ;
-set @query2= 'SELECT * FROM t2 natural join t1 order by t2.a ' ;
-set @query3= 'SELECT * FROM t2 join t1 using(a) order by t2.a ' ;
+set @query2= 'SELECT * FROM t2 natural join t1 order by a ' ;
+set @query3= 'SELECT * FROM t2 join t1 using(a) order by a ' ;
 set @query4= 'SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a ' ;
-set @query5= 'SELECT * FROM t2 natural left join t1 order by t2.a ' ;
-set @query6= 'SELECT * FROM t2 left join t1 using(a) order by t2.a ' ;
+set @query5= 'SELECT * FROM t2 natural left join t1 order by a ' ;
+set @query6= 'SELECT * FROM t2 left join t1 using(a) order by a ' ;
 set @query7= 'SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a ' ;
-set @query8= 'SELECT * FROM t2 natural right join t1 order by t2.a ' ;
-set @query9= 'SELECT * FROM t2 right join t1 using(a) order by t2.a ' ;
+set @query8= 'SELECT * FROM t2 natural right join t1 order by a ' ;
+set @query9= 'SELECT * FROM t2 right join t1 using(a) order by a ' ;
 the join statement is:
-SELECT * FROM t2 right join t1 using(a) order by t2.a 
+SELECT * FROM t2 right join t1 using(a) order by a 
 prepare stmt1 from @query9  ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
 the join statement is:
-SELECT * FROM t2 natural right join t1 order by t2.a 
+SELECT * FROM t2 natural right join t1 order by a 
 prepare stmt1 from @query8 ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 the join statement is:
 SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a 
 prepare stmt1 from @query7 ;
@@ -591,47 +591,47 @@ a	b	a	b
 3	three	3	three
 4	four	4	four
 the join statement is:
-SELECT * FROM t2 left join t1 using(a) order by t2.a 
+SELECT * FROM t2 left join t1 using(a) order by a 
 prepare stmt1 from @query6 ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
 the join statement is:
-SELECT * FROM t2 natural left join t1 order by t2.a 
+SELECT * FROM t2 natural left join t1 order by a 
 prepare stmt1 from @query5 ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 the join statement is:
 SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a 
 prepare stmt1 from @query4 ;
@@ -654,28 +654,28 @@ a	b	a	b
 3	three	3	three
 4	four	4	four
 the join statement is:
-SELECT * FROM t2 join t1 using(a) order by t2.a 
+SELECT * FROM t2 join t1 using(a) order by a 
 prepare stmt1 from @query3 ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
 the join statement is:
-SELECT * FROM t2 natural join t1 order by t2.a 
+SELECT * FROM t2 natural join t1 order by a 
 prepare stmt1 from @query2 ;
 execute stmt1 ;
 a	b
diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result
index ff52847a0dc89da44048bd7ed562e140f0088f5b..9b76003900af77ecd1776140134ade50caec6d8a 100644
--- a/mysql-test/r/ps_4heap.result
+++ b/mysql-test/r/ps_4heap.result
@@ -520,56 +520,56 @@ a	?	a
 drop table if exists t2 ;
 create table t2 as select * from t1 ;
 set @query1= 'SELECT * FROM t2 join t1 on (t1.a=t2.a) order by t2.a ' ;
-set @query2= 'SELECT * FROM t2 natural join t1 order by t2.a ' ;
-set @query3= 'SELECT * FROM t2 join t1 using(a) order by t2.a ' ;
+set @query2= 'SELECT * FROM t2 natural join t1 order by a ' ;
+set @query3= 'SELECT * FROM t2 join t1 using(a) order by a ' ;
 set @query4= 'SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a ' ;
-set @query5= 'SELECT * FROM t2 natural left join t1 order by t2.a ' ;
-set @query6= 'SELECT * FROM t2 left join t1 using(a) order by t2.a ' ;
+set @query5= 'SELECT * FROM t2 natural left join t1 order by a ' ;
+set @query6= 'SELECT * FROM t2 left join t1 using(a) order by a ' ;
 set @query7= 'SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a ' ;
-set @query8= 'SELECT * FROM t2 natural right join t1 order by t2.a ' ;
-set @query9= 'SELECT * FROM t2 right join t1 using(a) order by t2.a ' ;
+set @query8= 'SELECT * FROM t2 natural right join t1 order by a ' ;
+set @query9= 'SELECT * FROM t2 right join t1 using(a) order by a ' ;
 the join statement is:
-SELECT * FROM t2 right join t1 using(a) order by t2.a 
+SELECT * FROM t2 right join t1 using(a) order by a 
 prepare stmt1 from @query9  ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
 the join statement is:
-SELECT * FROM t2 natural right join t1 order by t2.a 
+SELECT * FROM t2 natural right join t1 order by a 
 prepare stmt1 from @query8 ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 the join statement is:
 SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a 
 prepare stmt1 from @query7 ;
@@ -592,47 +592,47 @@ a	b	a	b
 3	three	3	three
 4	four	4	four
 the join statement is:
-SELECT * FROM t2 left join t1 using(a) order by t2.a 
+SELECT * FROM t2 left join t1 using(a) order by a 
 prepare stmt1 from @query6 ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
 the join statement is:
-SELECT * FROM t2 natural left join t1 order by t2.a 
+SELECT * FROM t2 natural left join t1 order by a 
 prepare stmt1 from @query5 ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 the join statement is:
 SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a 
 prepare stmt1 from @query4 ;
@@ -655,28 +655,28 @@ a	b	a	b
 3	three	3	three
 4	four	4	four
 the join statement is:
-SELECT * FROM t2 join t1 using(a) order by t2.a 
+SELECT * FROM t2 join t1 using(a) order by a 
 prepare stmt1 from @query3 ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
 the join statement is:
-SELECT * FROM t2 natural join t1 order by t2.a 
+SELECT * FROM t2 natural join t1 order by a 
 prepare stmt1 from @query2 ;
 execute stmt1 ;
 a	b
diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result
index 9af8f6ed6ce6f20dd6a3a9ddead8ad911a506dd8..adb300fdcf1487da4f4b956f1f894db719923d72 100644
--- a/mysql-test/r/ps_5merge.result
+++ b/mysql-test/r/ps_5merge.result
@@ -562,56 +562,56 @@ a	?	a
 drop table if exists t2 ;
 create table t2 as select * from t1 ;
 set @query1= 'SELECT * FROM t2 join t1 on (t1.a=t2.a) order by t2.a ' ;
-set @query2= 'SELECT * FROM t2 natural join t1 order by t2.a ' ;
-set @query3= 'SELECT * FROM t2 join t1 using(a) order by t2.a ' ;
+set @query2= 'SELECT * FROM t2 natural join t1 order by a ' ;
+set @query3= 'SELECT * FROM t2 join t1 using(a) order by a ' ;
 set @query4= 'SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a ' ;
-set @query5= 'SELECT * FROM t2 natural left join t1 order by t2.a ' ;
-set @query6= 'SELECT * FROM t2 left join t1 using(a) order by t2.a ' ;
+set @query5= 'SELECT * FROM t2 natural left join t1 order by a ' ;
+set @query6= 'SELECT * FROM t2 left join t1 using(a) order by a ' ;
 set @query7= 'SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a ' ;
-set @query8= 'SELECT * FROM t2 natural right join t1 order by t2.a ' ;
-set @query9= 'SELECT * FROM t2 right join t1 using(a) order by t2.a ' ;
+set @query8= 'SELECT * FROM t2 natural right join t1 order by a ' ;
+set @query9= 'SELECT * FROM t2 right join t1 using(a) order by a ' ;
 the join statement is:
-SELECT * FROM t2 right join t1 using(a) order by t2.a 
+SELECT * FROM t2 right join t1 using(a) order by a 
 prepare stmt1 from @query9  ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
 the join statement is:
-SELECT * FROM t2 natural right join t1 order by t2.a 
+SELECT * FROM t2 natural right join t1 order by a 
 prepare stmt1 from @query8 ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 the join statement is:
 SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a 
 prepare stmt1 from @query7 ;
@@ -634,47 +634,47 @@ a	b	a	b
 3	three	3	three
 4	four	4	four
 the join statement is:
-SELECT * FROM t2 left join t1 using(a) order by t2.a 
+SELECT * FROM t2 left join t1 using(a) order by a 
 prepare stmt1 from @query6 ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
 the join statement is:
-SELECT * FROM t2 natural left join t1 order by t2.a 
+SELECT * FROM t2 natural left join t1 order by a 
 prepare stmt1 from @query5 ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 the join statement is:
 SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a 
 prepare stmt1 from @query4 ;
@@ -697,28 +697,28 @@ a	b	a	b
 3	three	3	three
 4	four	4	four
 the join statement is:
-SELECT * FROM t2 join t1 using(a) order by t2.a 
+SELECT * FROM t2 join t1 using(a) order by a 
 prepare stmt1 from @query3 ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
 the join statement is:
-SELECT * FROM t2 natural join t1 order by t2.a 
+SELECT * FROM t2 natural join t1 order by a 
 prepare stmt1 from @query2 ;
 execute stmt1 ;
 a	b
@@ -3574,56 +3574,56 @@ a	?	a
 drop table if exists t2 ;
 create table t2 as select * from t1 ;
 set @query1= 'SELECT * FROM t2 join t1 on (t1.a=t2.a) order by t2.a ' ;
-set @query2= 'SELECT * FROM t2 natural join t1 order by t2.a ' ;
-set @query3= 'SELECT * FROM t2 join t1 using(a) order by t2.a ' ;
+set @query2= 'SELECT * FROM t2 natural join t1 order by a ' ;
+set @query3= 'SELECT * FROM t2 join t1 using(a) order by a ' ;
 set @query4= 'SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a ' ;
-set @query5= 'SELECT * FROM t2 natural left join t1 order by t2.a ' ;
-set @query6= 'SELECT * FROM t2 left join t1 using(a) order by t2.a ' ;
+set @query5= 'SELECT * FROM t2 natural left join t1 order by a ' ;
+set @query6= 'SELECT * FROM t2 left join t1 using(a) order by a ' ;
 set @query7= 'SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a ' ;
-set @query8= 'SELECT * FROM t2 natural right join t1 order by t2.a ' ;
-set @query9= 'SELECT * FROM t2 right join t1 using(a) order by t2.a ' ;
+set @query8= 'SELECT * FROM t2 natural right join t1 order by a ' ;
+set @query9= 'SELECT * FROM t2 right join t1 using(a) order by a ' ;
 the join statement is:
-SELECT * FROM t2 right join t1 using(a) order by t2.a 
+SELECT * FROM t2 right join t1 using(a) order by a 
 prepare stmt1 from @query9  ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
 the join statement is:
-SELECT * FROM t2 natural right join t1 order by t2.a 
+SELECT * FROM t2 natural right join t1 order by a 
 prepare stmt1 from @query8 ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 the join statement is:
 SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a 
 prepare stmt1 from @query7 ;
@@ -3646,47 +3646,47 @@ a	b	a	b
 3	three	3	three
 4	four	4	four
 the join statement is:
-SELECT * FROM t2 left join t1 using(a) order by t2.a 
+SELECT * FROM t2 left join t1 using(a) order by a 
 prepare stmt1 from @query6 ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
 the join statement is:
-SELECT * FROM t2 natural left join t1 order by t2.a 
+SELECT * FROM t2 natural left join t1 order by a 
 prepare stmt1 from @query5 ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 the join statement is:
 SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a 
 prepare stmt1 from @query4 ;
@@ -3709,28 +3709,28 @@ a	b	a	b
 3	three	3	three
 4	four	4	four
 the join statement is:
-SELECT * FROM t2 join t1 using(a) order by t2.a 
+SELECT * FROM t2 join t1 using(a) order by a 
 prepare stmt1 from @query3 ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
 the join statement is:
-SELECT * FROM t2 natural join t1 order by t2.a 
+SELECT * FROM t2 natural join t1 order by a 
 prepare stmt1 from @query2 ;
 execute stmt1 ;
 a	b
diff --git a/mysql-test/r/ps_6bdb.result b/mysql-test/r/ps_6bdb.result
index b7d63b97c098ffb73f7e6f3b6fae9e832baddf1c..d5a15fb4265e4288262278df0c364d5661c70ca2 100644
--- a/mysql-test/r/ps_6bdb.result
+++ b/mysql-test/r/ps_6bdb.result
@@ -519,56 +519,56 @@ a	?	a
 drop table if exists t2 ;
 create table t2 as select * from t1 ;
 set @query1= 'SELECT * FROM t2 join t1 on (t1.a=t2.a) order by t2.a ' ;
-set @query2= 'SELECT * FROM t2 natural join t1 order by t2.a ' ;
-set @query3= 'SELECT * FROM t2 join t1 using(a) order by t2.a ' ;
+set @query2= 'SELECT * FROM t2 natural join t1 order by a ' ;
+set @query3= 'SELECT * FROM t2 join t1 using(a) order by a ' ;
 set @query4= 'SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a ' ;
-set @query5= 'SELECT * FROM t2 natural left join t1 order by t2.a ' ;
-set @query6= 'SELECT * FROM t2 left join t1 using(a) order by t2.a ' ;
+set @query5= 'SELECT * FROM t2 natural left join t1 order by a ' ;
+set @query6= 'SELECT * FROM t2 left join t1 using(a) order by a ' ;
 set @query7= 'SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a ' ;
-set @query8= 'SELECT * FROM t2 natural right join t1 order by t2.a ' ;
-set @query9= 'SELECT * FROM t2 right join t1 using(a) order by t2.a ' ;
+set @query8= 'SELECT * FROM t2 natural right join t1 order by a ' ;
+set @query9= 'SELECT * FROM t2 right join t1 using(a) order by a ' ;
 the join statement is:
-SELECT * FROM t2 right join t1 using(a) order by t2.a 
+SELECT * FROM t2 right join t1 using(a) order by a 
 prepare stmt1 from @query9  ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
 the join statement is:
-SELECT * FROM t2 natural right join t1 order by t2.a 
+SELECT * FROM t2 natural right join t1 order by a 
 prepare stmt1 from @query8 ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 the join statement is:
 SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a 
 prepare stmt1 from @query7 ;
@@ -591,47 +591,47 @@ a	b	a	b
 3	three	3	three
 4	four	4	four
 the join statement is:
-SELECT * FROM t2 left join t1 using(a) order by t2.a 
+SELECT * FROM t2 left join t1 using(a) order by a 
 prepare stmt1 from @query6 ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
 the join statement is:
-SELECT * FROM t2 natural left join t1 order by t2.a 
+SELECT * FROM t2 natural left join t1 order by a 
 prepare stmt1 from @query5 ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 the join statement is:
 SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a 
 prepare stmt1 from @query4 ;
@@ -654,28 +654,28 @@ a	b	a	b
 3	three	3	three
 4	four	4	four
 the join statement is:
-SELECT * FROM t2 join t1 using(a) order by t2.a 
+SELECT * FROM t2 join t1 using(a) order by a 
 prepare stmt1 from @query3 ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
 the join statement is:
-SELECT * FROM t2 natural join t1 order by t2.a 
+SELECT * FROM t2 natural join t1 order by a 
 prepare stmt1 from @query2 ;
 execute stmt1 ;
 a	b
diff --git a/mysql-test/r/ps_7ndb.result b/mysql-test/r/ps_7ndb.result
index c54c09cf6aabe14192481728867ee8f57a4083f3..33769f400ae6f6c4fc43c42665f0cc35dddfc9fb 100644
--- a/mysql-test/r/ps_7ndb.result
+++ b/mysql-test/r/ps_7ndb.result
@@ -519,56 +519,56 @@ a	?	a
 drop table if exists t2 ;
 create table t2 as select * from t1 ;
 set @query1= 'SELECT * FROM t2 join t1 on (t1.a=t2.a) order by t2.a ' ;
-set @query2= 'SELECT * FROM t2 natural join t1 order by t2.a ' ;
-set @query3= 'SELECT * FROM t2 join t1 using(a) order by t2.a ' ;
+set @query2= 'SELECT * FROM t2 natural join t1 order by a ' ;
+set @query3= 'SELECT * FROM t2 join t1 using(a) order by a ' ;
 set @query4= 'SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a ' ;
-set @query5= 'SELECT * FROM t2 natural left join t1 order by t2.a ' ;
-set @query6= 'SELECT * FROM t2 left join t1 using(a) order by t2.a ' ;
+set @query5= 'SELECT * FROM t2 natural left join t1 order by a ' ;
+set @query6= 'SELECT * FROM t2 left join t1 using(a) order by a ' ;
 set @query7= 'SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a ' ;
-set @query8= 'SELECT * FROM t2 natural right join t1 order by t2.a ' ;
-set @query9= 'SELECT * FROM t2 right join t1 using(a) order by t2.a ' ;
+set @query8= 'SELECT * FROM t2 natural right join t1 order by a ' ;
+set @query9= 'SELECT * FROM t2 right join t1 using(a) order by a ' ;
 the join statement is:
-SELECT * FROM t2 right join t1 using(a) order by t2.a 
+SELECT * FROM t2 right join t1 using(a) order by a 
 prepare stmt1 from @query9  ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
 the join statement is:
-SELECT * FROM t2 natural right join t1 order by t2.a 
+SELECT * FROM t2 natural right join t1 order by a 
 prepare stmt1 from @query8 ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 the join statement is:
 SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a 
 prepare stmt1 from @query7 ;
@@ -591,47 +591,47 @@ a	b	a	b
 3	three	3	three
 4	four	4	four
 the join statement is:
-SELECT * FROM t2 left join t1 using(a) order by t2.a 
+SELECT * FROM t2 left join t1 using(a) order by a 
 prepare stmt1 from @query6 ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
 the join statement is:
-SELECT * FROM t2 natural left join t1 order by t2.a 
+SELECT * FROM t2 natural left join t1 order by a 
 prepare stmt1 from @query5 ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b
+1	one
+2	two
+3	three
+4	four
 the join statement is:
 SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a 
 prepare stmt1 from @query4 ;
@@ -654,28 +654,28 @@ a	b	a	b
 3	three	3	three
 4	four	4	four
 the join statement is:
-SELECT * FROM t2 join t1 using(a) order by t2.a 
+SELECT * FROM t2 join t1 using(a) order by a 
 prepare stmt1 from @query3 ;
 execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
-execute stmt1 ;
-a	b	a	b
-1	one	1	one
-2	two	2	two
-3	three	3	three
-4	four	4	four
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
+execute stmt1 ;
+a	b	b
+1	one	one
+2	two	two
+3	three	three
+4	four	four
 the join statement is:
-SELECT * FROM t2 natural join t1 order by t2.a 
+SELECT * FROM t2 natural join t1 order by a 
 prepare stmt1 from @query2 ;
 execute stmt1 ;
 a	b
diff --git a/mysql-test/r/ps_grant.result b/mysql-test/r/ps_grant.result
index 651ac171e5dd9f8f6d704584d504dfb412e0d4e2..fdc1f97bb4c8ec230fa106e7327cca5c2b074665 100644
--- a/mysql-test/r/ps_grant.result
+++ b/mysql-test/r/ps_grant.result
@@ -54,6 +54,7 @@ my_col
 4
 execute s_t9 ;
 ERROR 42S02: Table 'mysqltest.t9' doesn't exist
+deallocate prepare s_t9;
 revoke all privileges on mysqltest.t1 from second_user@localhost
 identified by 'looser' ;
 show grants for second_user@localhost ;
@@ -87,8 +88,3 @@ revoke all privileges on test.t1 from drop_user@localhost ;
 prepare stmt3 from ' drop user drop_user@localhost ';
 ERROR HY000: This command is not supported in the prepared statement protocol yet
 drop user drop_user@localhost;
-prepare stmt4 from ' show full processlist ';
-execute stmt4;
-Id	User	Host	db	Command	Time	State	Info
-number	root	localhost	test	Execute	time	NULL	show full processlist
-deallocate prepare stmt4;
diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result
index 699d81d4cef3a14b459fe599d37a1f1319d52895..0efd5ac1566f09668c51f5819c4a738a8d6e3db9 100644
--- a/mysql-test/r/query_cache.result
+++ b/mysql-test/r/query_cache.result
@@ -152,82 +152,6 @@ show status like "Qcache_queries_in_cache";
 Variable_name	Value
 Qcache_queries_in_cache	0
 drop table t1, t2, t3;
-create table t1 (a int not null);
-insert into t1 values (1),(2),(3);
-create table t2 (a int not null);
-insert into t2 values (1),(2),(3);
-select * from t1;
-a
-1
-2
-3
-select * from t2;
-a
-1
-2
-3
-insert into t1 values (4);
-show status like "Qcache_free_blocks";
-Variable_name	Value
-Qcache_free_blocks	2
-flush query cache;
-show status like "Qcache_free_blocks";
-Variable_name	Value
-Qcache_free_blocks	1
-drop table t1, t2;
-create table t1 (a text not null);
-create table t11 (a text not null);
-create table t2 (a text not null);
-create table t21 (a text not null);
-create table t3 (a text not null);
-insert into t1 values("1111111111111111111111111111111111111111111111111111");
-insert into t2 select * from t1;
-insert into t1 select * from t2;
-insert into t2 select * from t1;
-insert into t1 select * from t2;
-insert into t2 select * from t1;
-insert into t1 select * from t2;
-insert into t2 select * from t1;
-insert into t1 select * from t2;
-insert into t2 select * from t1;
-insert into t1 select * from t2;
-insert into t2 select * from t1;
-insert into t1 select * from t2;
-insert into t2 select * from t1;
-insert into t1 select * from t2;
-insert into t2 select * from t1;
-insert into t11 select * from t1;
-insert into t21 select * from t1;
-insert into t1 select * from t2;
-insert into t2 select * from t1;
-insert into t1 select * from t2;
-insert into t3 select * from t1;
-insert into t3 select * from t2;
-insert into t3 select * from t1;
-select * from t11;
-select * from t21;
-show status like "Qcache_total_blocks";
-Variable_name	Value
-Qcache_total_blocks	7
-show status like "Qcache_free_blocks";
-Variable_name	Value
-Qcache_free_blocks	1
-insert into t11 values("");
-select * from t3;
-show status like "Qcache_total_blocks";
-Variable_name	Value
-Qcache_total_blocks	8
-show status like "Qcache_free_blocks";
-Variable_name	Value
-Qcache_free_blocks	1
-flush query cache;
-show status like "Qcache_total_blocks";
-Variable_name	Value
-Qcache_total_blocks	7
-show status like "Qcache_free_blocks";
-Variable_name	Value
-Qcache_free_blocks	1
-drop table t1, t2, t3, t11, t21;
 set query_cache_type=demand;
 create table t1 (a int not null);
 insert into t1 values (1),(2),(3);
@@ -852,6 +776,7 @@ Qcache_hits	6
 show status like "Qcache_queries_in_cache";
 Variable_name	Value
 Qcache_queries_in_cache	4
+SET NAMES default;
 DROP TABLE t1;
 CREATE TABLE t1 (a int(1));
 CREATE DATABASE mysqltest;
@@ -1007,6 +932,8 @@ abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzab
 zyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcba
 flush query cache;
 drop table t1, t2;
+set GLOBAL query_cache_size=1355776
+#;
 flush status;
 CREATE TABLE t1 (
 `date` datetime NOT NULL default '0000-00-00 00:00:00',
@@ -1014,24 +941,24 @@ KEY `date` (`date`)
 ) ENGINE=MyISAM;
 INSERT INTO t1 VALUES ('20050326');
 INSERT INTO t1 VALUES ('20050325');
-SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 0:0:0';
+SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 invalid';
 COUNT(*)
 0
 Warnings:
-Warning	1292	Incorrect datetime value: '20050327 0:0:0' for column 'date' at row 1
-Warning	1292	Incorrect datetime value: '20050327 0:0:0' for column 'date' at row 1
-SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050328 0:0:0';
+Warning	1292	Incorrect datetime value: '20050327 invalid' for column 'date' at row 1
+Warning	1292	Incorrect datetime value: '20050327 invalid' for column 'date' at row 1
+SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050328 invalid';
 COUNT(*)
 0
 Warnings:
-Warning	1292	Incorrect datetime value: '20050328 0:0:0' for column 'date' at row 1
-Warning	1292	Incorrect datetime value: '20050328 0:0:0' for column 'date' at row 1
-SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 0:0:0';
+Warning	1292	Incorrect datetime value: '20050328 invalid' for column 'date' at row 1
+Warning	1292	Incorrect datetime value: '20050328 invalid' for column 'date' at row 1
+SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 invalid';
 COUNT(*)
 0
 Warnings:
-Warning	1292	Incorrect datetime value: '20050327 0:0:0' for column 'date' at row 1
-Warning	1292	Incorrect datetime value: '20050327 0:0:0' for column 'date' at row 1
+Warning	1292	Incorrect datetime value: '20050327 invalid' for column 'date' at row 1
+Warning	1292	Incorrect datetime value: '20050327 invalid' for column 'date' at row 1
 show status like "Qcache_queries_in_cache";
 Variable_name	Value
 Qcache_queries_in_cache	0
@@ -1123,4 +1050,80 @@ a	f1()
 2	2
 drop procedure p1//
 drop table t1//
+flush query cache;
+reset query cache;
+flush status;
+create table t1 (s1 int)//
+create procedure f1 () begin
+select sql_cache * from t1;
+select sql_cache * from t1;
+end;//
+call f1();
+s1
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	1
+call f1();
+s1
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	1
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	3
+call f1();
+s1
+select sql_cache * from t1;
+s1
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	2
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	2
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	5
+insert into t1 values (1);
+select sql_cache * from t1;
+s1
+1
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	1
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	3
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	5
+call f1();
+s1
+1
+call f1();
+s1
+1
+select sql_cache * from t1;
+s1
+1
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	2
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	4
+show status like "Qcache_hits";
+Variable_name	Value
+Qcache_hits	9
+drop procedure f1;
+drop table t1;
 set GLOBAL query_cache_size=0;
diff --git a/mysql-test/r/query_cache_notembedded.result b/mysql-test/r/query_cache_notembedded.result
new file mode 100644
index 0000000000000000000000000000000000000000..e773a63525b2cbf18da682a013b3a3d29e7dedce
--- /dev/null
+++ b/mysql-test/r/query_cache_notembedded.result
@@ -0,0 +1,97 @@
+set GLOBAL query_cache_size=1355776;
+flush query cache;
+flush query cache;
+reset query cache;
+flush status;
+drop table if exists t1, t2, t3, t11, t21;
+create table t1 (a int not null);
+insert into t1 values (1),(2),(3);
+create table t2 (a int not null);
+insert into t2 values (1),(2),(3);
+select * from t1;
+a
+1
+2
+3
+select * from t2;
+a
+1
+2
+3
+insert into t1 values (4);
+show status like "Qcache_free_blocks";
+Variable_name	Value
+Qcache_free_blocks	2
+flush query cache;
+show status like "Qcache_free_blocks";
+Variable_name	Value
+Qcache_free_blocks	1
+drop table t1, t2;
+create table t1 (a text not null);
+create table t11 (a text not null);
+create table t2 (a text not null);
+create table t21 (a text not null);
+create table t3 (a text not null);
+insert into t1 values("1111111111111111111111111111111111111111111111111111");
+insert into t2 select * from t1;
+insert into t1 select * from t2;
+insert into t2 select * from t1;
+insert into t1 select * from t2;
+insert into t2 select * from t1;
+insert into t1 select * from t2;
+insert into t2 select * from t1;
+insert into t1 select * from t2;
+insert into t2 select * from t1;
+insert into t1 select * from t2;
+insert into t2 select * from t1;
+insert into t1 select * from t2;
+insert into t2 select * from t1;
+insert into t1 select * from t2;
+insert into t2 select * from t1;
+insert into t11 select * from t1;
+insert into t21 select * from t1;
+insert into t1 select * from t2;
+insert into t2 select * from t1;
+insert into t1 select * from t2;
+insert into t3 select * from t1;
+insert into t3 select * from t2;
+insert into t3 select * from t1;
+select * from t11;
+select * from t21;
+show status like "Qcache_total_blocks";
+Variable_name	Value
+Qcache_total_blocks	7
+show status like "Qcache_free_blocks";
+Variable_name	Value
+Qcache_free_blocks	1
+insert into t11 values("");
+select * from t3;
+show status like "Qcache_total_blocks";
+Variable_name	Value
+Qcache_total_blocks	8
+show status like "Qcache_free_blocks";
+Variable_name	Value
+Qcache_free_blocks	1
+flush query cache;
+show status like "Qcache_total_blocks";
+Variable_name	Value
+Qcache_total_blocks	7
+show status like "Qcache_free_blocks";
+Variable_name	Value
+Qcache_free_blocks	1
+drop table t1, t2, t3, t11, t21;
+CREATE TABLE t1 ( a INT NOT NULL PRIMARY KEY AUTO_INCREMENT ) ENGINE =
+MyISAM;
+LOCK TABLE t1 READ LOCAL;
+INSERT INTO t1 VALUES (), (), ();
+SELECT * FROM t1;
+a
+SELECT * FROM t1;
+a
+1
+2
+3
+SELECT * FROM t1;
+a
+drop table t1;
+set GLOBAL query_cache_size=0;
diff --git a/mysql-test/r/rpl_openssl.result b/mysql-test/r/rpl_openssl.result
index a4ed922d9d4b2f9b8ca1feede018e5a4fd374042..d916e9f2c5c3be9de8a1a21deb8c615aff3c2aaf 100644
--- a/mysql-test/r/rpl_openssl.result
+++ b/mysql-test/r/rpl_openssl.result
@@ -4,7 +4,7 @@ reset master;
 reset slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 start slave;
-grant replication slave on *.* to replssl@'%' require ssl;
+grant replication slave on *.* to replssl@localhost require ssl;
 create table t1 (t int);
 stop slave;
 change master to master_user='replssl',master_password='';
@@ -20,11 +20,11 @@ t
 1
 show slave status;
 Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master
-#	127.0.0.1	replssl	MASTER_MYPORT	1	master-bin.000001	392	#	#	master-bin.000001	Yes	Yes							0		0	392	#	None		0	Yes	MYSQL_TEST_DIR/std_data/cacert.pem		MYSQL_TEST_DIR/std_data/client-cert.pem		MYSQL_TEST_DIR/std_data/client-key.pem	#
+#	127.0.0.1	replssl	MASTER_MYPORT	1	master-bin.000001	398	#	#	master-bin.000001	Yes	Yes							0		0	398	#	None		0	Yes	MYSQL_TEST_DIR/std_data/cacert.pem		MYSQL_TEST_DIR/std_data/client-cert.pem		MYSQL_TEST_DIR/std_data/client-key.pem	#
 stop slave;
 change master to master_user='root',master_password='', master_ssl=0;
 start slave;
 drop table t1;
 show slave status;
 Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master
-#	127.0.0.1	root	MASTER_MYPORT	1	master-bin.000001	468	#	#	master-bin.000001	Yes	Yes							0		0	468	#	None		0	No	MYSQL_TEST_DIR/std_data/cacert.pem		MYSQL_TEST_DIR/std_data/client-cert.pem		MYSQL_TEST_DIR/std_data/client-key.pem	#
+#	127.0.0.1	root	MASTER_MYPORT	1	master-bin.000001	474	#	#	master-bin.000001	Yes	Yes							0		0	474	#	None		0	No	MYSQL_TEST_DIR/std_data/cacert.pem		MYSQL_TEST_DIR/std_data/client-cert.pem		MYSQL_TEST_DIR/std_data/client-key.pem	#
diff --git a/mysql-test/r/rpl_slave_status.result b/mysql-test/r/rpl_slave_status.result
new file mode 100644
index 0000000000000000000000000000000000000000..8badbab85ffcd4a469391a8f68eaed4d8f4ab9eb
--- /dev/null
+++ b/mysql-test/r/rpl_slave_status.result
@@ -0,0 +1,54 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl';
+stop slave;
+change master to master_user='rpl',master_password='rpl';
+start slave;
+drop table if exists t1;
+create table t1 (n int);
+insert into t1 values (1);
+select * from t1;
+n
+1
+delete from mysql.user where user='rpl';
+flush privileges;
+stop slave;
+start slave;
+show slave status;
+Slave_IO_State	Connecting to master
+Master_Host	127.0.0.1
+Master_User	rpl
+Master_Port	MASTER_MYPORT
+Connect_Retry	1
+Master_Log_File	master-bin.000001
+Read_Master_Log_Pos	#
+Relay_Log_File	#
+Relay_Log_Pos	#
+Relay_Master_Log_File	master-bin.000001
+Slave_IO_Running	No
+Slave_SQL_Running	Yes
+Replicate_Do_DB	
+Replicate_Ignore_DB	
+Replicate_Do_Table	
+Replicate_Ignore_Table	
+Replicate_Wild_Do_Table	
+Replicate_Wild_Ignore_Table	
+Last_Errno	0
+Last_Error	
+Skip_Counter	0
+Exec_Master_Log_Pos	#
+Relay_Log_Space	#
+Until_Condition	None
+Until_Log_File	
+Until_Log_Pos	0
+Master_SSL_Allowed	No
+Master_SSL_CA_File	
+Master_SSL_CA_Path	
+Master_SSL_Cert	
+Master_SSL_Cipher	
+Master_SSL_Key	
+Seconds_Behind_Master	NULL
diff --git a/mysql-test/r/rpl_sp.result b/mysql-test/r/rpl_sp.result
index 15180abe8fd09e458d994fbe74d37f93ada7c28c..b31951e93c5523c57789c8815b30d78b14135d29 100644
--- a/mysql-test/r/rpl_sp.result
+++ b/mysql-test/r/rpl_sp.result
@@ -109,6 +109,7 @@ call foo4();
 Got one of the listed errors
 show warnings;
 Level	Code	Message
+Error	1142	INSERT command denied to user 'zedjzlcsjhd'@'localhost' for table 't1'
 Warning	1417	A routine failed and has neither NO SQL nor READS SQL DATA in its declaration and binary logging is enabled; if non-transactional tables were updated, the binary log will miss their changes
 call foo3();
 show warnings;
@@ -117,6 +118,7 @@ call foo4();
 Got one of the listed errors
 show warnings;
 Level	Code	Message
+Error	1142	INSERT command denied to user 'zedjzlcsjhd'@'localhost' for table 't1'
 Warning	1417	A routine failed and has neither NO SQL nor READS SQL DATA in its declaration and binary logging is enabled; if non-transactional tables were updated, the binary log will miss their changes
 alter procedure foo4 sql security invoker;
 call foo4();
diff --git a/mysql-test/r/rpl_trigger.result b/mysql-test/r/rpl_trigger.result
new file mode 100644
index 0000000000000000000000000000000000000000..db824c9c423a3026cf18c4c02dc973ef5b3bf7b4
--- /dev/null
+++ b/mysql-test/r/rpl_trigger.result
@@ -0,0 +1,108 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+create table t1 (a int auto_increment, primary key (a), b int, rand_value double not null);
+create table t2 (a int auto_increment, primary key (a), b int);
+create table t3 (a int auto_increment, primary key (a), name varchar(64) not null, old_a int, old_b int, rand_value double not null);
+create trigger t1 before insert on t1 for each row
+begin
+insert into t3 values (NULL, "t1", new.a, new.b, rand());
+end|
+create trigger t2 after insert on t2 for each row
+begin
+insert into t3 values (NULL, "t2", new.a, new.b, rand());
+end|
+insert into t3 values(100,"log",0,0,0);
+SET @@RAND_SEED1=658490765, @@RAND_SEED2=635893186;
+insert into t1 values(1,1,rand()),(NULL,2,rand());
+insert into t2 (b) values(last_insert_id());
+insert into t2 values(3,0),(NULL,0);
+insert into t2 values(NULL,0),(500,0);
+select a,b, truncate(rand_value,4) from t1;
+a	b	truncate(rand_value,4)
+1	1	0.4320
+2	2	0.3055
+select * from t2;
+a	b
+1	2
+3	0
+4	0
+5	0
+500	0
+select a,name, old_a, old_b, truncate(rand_value,4) from t3;
+a	name	old_a	old_b	truncate(rand_value,4)
+100	log	0	0	0.0000
+101	t1	1	1	0.3203
+102	t1	0	2	0.5666
+103	t2	1	2	0.9164
+104	t2	3	0	0.8826
+105	t2	4	0	0.6635
+106	t2	5	0	0.6699
+107	t2	500	0	0.3593
+
+--- On slave --
+select a,b, truncate(rand_value,4) from t1;
+a	b	truncate(rand_value,4)
+1	1	0.4320
+2	2	0.3055
+select * from t2;
+a	b
+1	2
+3	0
+4	0
+5	0
+500	0
+select a,name, old_a, old_b, truncate(rand_value,4) from t3;
+a	name	old_a	old_b	truncate(rand_value,4)
+100	log	0	0	0.0000
+101	t1	1	1	0.3203
+102	t1	0	2	0.5666
+103	t2	1	2	0.9164
+104	t2	3	0	0.8826
+105	t2	4	0	0.6635
+106	t2	5	0	0.6699
+107	t2	500	0	0.3593
+drop table t1,t2,t3;
+select get_lock("bug12480",2);
+get_lock("bug12480",2)
+1
+create table t1 (a datetime,b  datetime, c datetime);
+drop function if exists bug12480;
+Warnings:
+Note	1305	FUNCTION bug12480 does not exist
+create function bug12480() returns datetime
+begin
+set @a=get_lock("bug12480",2);
+return now();
+end|
+create trigger t1_first before insert on t1
+for each row begin
+set @a=get_lock("bug12480",2);
+set new.b= now();
+set new.c= bug12480();
+end
+|
+insert into t1 set a = now();
+select a=b && a=c from t1;
+a=b && a=c
+1
+
+--- On slave --
+select a=b && a=c from t1;
+a=b && a=c
+1
+test
+1
+truncate table t1;
+drop trigger t1_first;
+insert into t1 values ("2003-03-03","2003-03-03","2003-03-03"),(bug12480(),bug12480(),bug12480()),(now(),now(),now());
+select a=b && a=c from t1;
+a=b && a=c
+1
+1
+1
+drop function bug12480;
+drop table t1;
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index 14c45270b04707d322e1159dcd7a9c17ed15cb6e..1b35df534a0ed07a4ca7ad2cae4a752997cc8576 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -1350,45 +1350,42 @@ fld1	fld1
 250504	250505
 250505	250505
 insert into t2 (fld1, companynr) values (999999,99);
-select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null;
+select companynr,companyname from t2 left join t4 using (companynr) where companynr is null;
 companynr	companyname
-99	NULL
-select count(*) from t2 left join t4 using (companynr) where t4.companynr is not null;
+select count(*) from t2 left join t4 using (companynr) where companynr is not null;
 count(*)
-1199
-explain select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null;
+1200
+explain select companynr,companyname from t2 left join t4 using (companynr) where companynr is null;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1200	
-1	SIMPLE	t4	eq_ref	PRIMARY	PRIMARY	1	test.t2.companynr	1	Using where; Not exists
-explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr is null;
+1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE
+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr is null;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t4	ALL	NULL	NULL	NULL	NULL	12	
-1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1200	Using where; Not exists
+1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE
 delete from t2 where fld1=999999;
-explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0;
+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	Using where
-1	SIMPLE	t4	eq_ref	PRIMARY	PRIMARY	1	test.t2.companynr	1	
-explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0;
+1	SIMPLE	t4	ALL	PRIMARY	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	
+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	Using where
-1	SIMPLE	t4	eq_ref	PRIMARY	PRIMARY	1	test.t2.companynr	1	
-explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 and t4.companynr > 0;
+1	SIMPLE	t4	ALL	PRIMARY	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	
+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 and companynr > 0;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	Using where
-1	SIMPLE	t4	eq_ref	PRIMARY	PRIMARY	1	test.t2.companynr	1	
-explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr is null;
+1	SIMPLE	t4	ALL	PRIMARY	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	
+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr is null;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t4	ALL	NULL	NULL	NULL	NULL	12	
-1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	Using where
-explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0 or t4.companynr > 0;
+1	SIMPLE	t4	ALL	PRIMARY	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	
+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0 or companynr > 0;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t4	ALL	PRIMARY	NULL	NULL	NULL	12	
-1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	Using where
-explain select t2.companynr,companyname from t4 left join t2 using (companynr) where ifnull(t2.companynr,1)>0;
+1	SIMPLE	t4	ALL	PRIMARY	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	
+explain select companynr,companyname from t4 left join t2 using (companynr) where ifnull(companynr,1)>0;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t4	ALL	NULL	NULL	NULL	NULL	12	
-1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	Using where
+1	SIMPLE	t4	ALL	NULL	NULL	NULL	NULL	12	Using where
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	1199	
 select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
 companynr	companynr
 37	36
@@ -2115,159 +2112,159 @@ insert into t1 values ();
 insert into t1 values ();
 insert into t1 values ();
 select * from (t1 as t2 left join t1 as t3 using (a)), t1;
-a	a	a
-1	1	1
-2	2	1
-3	3	1
-1	1	2
-2	2	2
-3	3	2
-1	1	3
-2	2	3
-3	3	3
+a	a
+1	1
+2	1
+3	1
+1	2
+2	2
+3	2
+1	3
+2	3
+3	3
 select * from t1, (t1 as t2 left join t1 as t3 using (a));
-a	a	a
-1	1	1
-2	1	1
-3	1	1
-1	2	2
-2	2	2
-3	2	2
-1	3	3
-2	3	3
-3	3	3
+a	a
+1	1
+2	1
+3	1
+1	2
+2	2
+3	2
+1	3
+2	3
+3	3
 select * from (t1 as t2 left join t1 as t3 using (a)) straight_join t1;
-a	a	a
-1	1	1
-2	2	1
-3	3	1
-1	1	2
-2	2	2
-3	3	2
-1	1	3
-2	2	3
-3	3	3
+a	a
+1	1
+2	1
+3	1
+1	2
+2	2
+3	2
+1	3
+2	3
+3	3
 select * from t1 straight_join (t1 as t2 left join t1 as t3 using (a));
-a	a	a
-1	1	1
-2	1	1
-3	1	1
-1	2	2
-2	2	2
-3	2	2
-1	3	3
-2	3	3
-3	3	3
+a	a
+1	1
+2	1
+3	1
+1	2
+2	2
+3	2
+1	3
+2	3
+3	3
 select * from (t1 as t2 left join t1 as t3 using (a)) inner join t1 on t1.a>1;
-a	a	a
-1	1	2
-2	2	2
-3	3	2
-1	1	3
-2	2	3
-3	3	3
+a	a
+1	2
+2	2
+3	2
+1	3
+2	3
+3	3
 select * from t1 inner join (t1 as t2 left join t1 as t3 using (a)) on t1.a>1;
-a	a	a
-2	1	1
-3	1	1
-2	2	2
-3	2	2
-2	3	3
-3	3	3
+a	a
+2	1
+3	1
+2	2
+3	2
+2	3
+3	3
 select * from (t1 as t2 left join t1 as t3 using (a)) inner join t1 using ( a );
-a	a	a
-1	1	1
-2	2	2
-3	3	3
+a
+1
+2
+3
 select * from t1 inner join (t1 as t2 left join t1 as t3 using (a)) using ( a );
-a	a	a
-1	1	1
-2	2	2
-3	3	3
+a
+1
+2
+3
 select * from (t1 as t2 left join t1 as t3 using (a)) left outer join t1 on t1.a>1;
-a	a	a
-1	1	2
-1	1	3
-2	2	2
-2	2	3
-3	3	2
-3	3	3
+a	a
+1	2
+1	3
+2	2
+2	3
+3	2
+3	3
 select * from t1 left outer join (t1 as t2 left join t1 as t3 using (a)) on t1.a>1;
-a	a	a
-1	NULL	NULL
-2	1	1
-2	2	2
-2	3	3
-3	1	1
-3	2	2
-3	3	3
+a	a
+1	NULL
+2	1
+2	2
+2	3
+3	1
+3	2
+3	3
 select * from (t1 as t2 left join t1 as t3 using (a)) left join t1 using ( a );
-a	a	a
-1	1	1
-2	2	2
-3	3	3
+a
+1
+2
+3
 select * from t1 left join (t1 as t2 left join t1 as t3 using (a)) using ( a );
-a	a	a
-1	1	1
-2	2	2
-3	3	3
+a
+1
+2
+3
 select * from (t1 as t2 left join t1 as t3 using (a)) natural left join t1;
-a	a	a
-1	1	1
-2	2	2
-3	3	3
+a
+1
+2
+3
 select * from t1 natural left join (t1 as t2 left join t1 as t3 using (a));
-a	a	a
-1	1	1
-2	2	2
-3	3	3
+a
+1
+2
+3
 select * from (t1 as t2 left join t1 as t3 using (a)) right join t1 on t1.a>1;
-a	a	a
-NULL	NULL	1
-1	1	2
-2	2	2
-3	3	2
-1	1	3
-2	2	3
-3	3	3
+a	a
+NULL	1
+1	2
+2	2
+3	2
+1	3
+2	3
+3	3
 select * from t1 right join (t1 as t2 left join t1 as t3 using (a)) on t1.a>1;
-a	a	a
-2	1	1
-3	1	1
-2	2	2
-3	2	2
-2	3	3
-3	3	3
+a	a
+2	1
+3	1
+2	2
+3	2
+2	3
+3	3
 select * from (t1 as t2 left join t1 as t3 using (a)) right outer join t1 using ( a );
-a	a	a
-1	1	1
-2	2	2
-3	3	3
+a
+1
+2
+3
 select * from t1 right outer join (t1 as t2 left join t1 as t3 using (a)) using ( a );
-a	a	a
-1	1	1
-2	2	2
-3	3	3
+a
+1
+2
+3
 select * from (t1 as t2 left join t1 as t3 using (a)) natural right join t1;
-a	a	a
-1	1	1
-2	2	2
-3	3	3
+a
+1
+2
+3
 select * from t1 natural right join (t1 as t2 left join t1 as t3 using (a));
-a	a	a
-1	1	1
-2	2	2
-3	3	3
+a
+1
+2
+3
 select * from t1 natural join (t1 as t2 left join t1 as t3 using (a));
-a	a
-1	1
-2	2
-3	3
+a
+1
+2
+3
 select * from (t1 as t2 left join t1 as t3 using (a)) natural join t1;
-a	a
-1	1
-2	2
-3	3
+a
+1
+2
+3
 drop table t1;
 CREATE TABLE t1 (  aa char(2),  id int(11) NOT NULL auto_increment,  t2_id int(11) NOT NULL default '0',  PRIMARY KEY  (id),  KEY replace_id (t2_id)) ENGINE=MyISAM;
 INSERT INTO t1 VALUES ("1",8264,2506),("2",8299,2517),("3",8301,2518),("4",8302,2519),("5",8303,2520),("6",8304,2521),("7",8305,2522);
@@ -2492,6 +2489,99 @@ select * from t3 left join t1 on t3.id = t1.uid, t2 where t2.ident in (0, t1.gid
 id	name	gid	uid	ident	level
 1	fs	NULL	NULL	0	READ
 drop table t1,t2,t3;
+CREATE TABLE t1 (
+acct_id int(11) NOT NULL default '0',
+profile_id smallint(6) default NULL,
+UNIQUE KEY t1$acct_id (acct_id),
+KEY t1$profile_id (profile_id)
+);
+INSERT INTO t1 VALUES (132,17),(133,18);
+CREATE TABLE t2 (
+profile_id smallint(6) default NULL,
+queue_id int(11) default NULL,
+seq int(11) default NULL,
+KEY t2$queue_id (queue_id)
+);
+INSERT INTO t2 VALUES (17,31,4),(17,30,3),(17,36,2),(17,37,1);
+CREATE TABLE t3 (
+id int(11) NOT NULL default '0',
+qtype int(11) default NULL,
+seq int(11) default NULL,
+warn_lvl int(11) default NULL,
+crit_lvl int(11) default NULL,
+rr1 tinyint(4) NOT NULL default '0',
+rr2 int(11) default NULL,
+default_queue tinyint(4) NOT NULL default '0',
+KEY t3$qtype (qtype),
+KEY t3$id (id)
+);
+INSERT INTO t3 VALUES (30,1,29,NULL,NULL,0,NULL,0),(31,1,28,NULL,NULL,0,NULL,0),
+(36,1,34,NULL,NULL,0,NULL,0),(37,1,35,NULL,NULL,0,121,0);
+SELECT COUNT(*) FROM t1 a STRAIGHT_JOIN t2 pq STRAIGHT_JOIN t3 q 
+WHERE 
+(pq.profile_id = a.profile_id) AND (a.acct_id = 132) AND 
+(pq.queue_id = q.id) AND (q.rr1 <> 1);
+COUNT(*)
+4
+drop table t1,t2,t3;
+create table t1 (f1 int);
+insert into t1 values (1),(NULL);
+create table t2 (f2 int, f3 int, f4 int);
+create index idx1 on t2 (f4);
+insert into t2 values (1,2,3),(2,4,6);
+select A.f2 from t1 left join t2 A on A.f2 = f1 where A.f3=(select min(f3)
+from  t2 C where A.f4 = C.f4) or A.f3 IS NULL;
+f2
+1
+NULL
+drop table t1,t2;
+create table t2 (a tinyint unsigned);
+create index t2i on t2(a);
+insert into t2 values (0), (254), (255);
+explain select * from t2 where a > -1;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t2	index	t2i	t2i	2	NULL	3	Using where; Using index
+select * from t2 where a > -1;
+a
+0
+254
+255
+drop table t2;
+CREATE TABLE t1 (a int, b int, c int);
+INSERT INTO t1
+SELECT 50, 3, 3 FROM DUAL
+WHERE NOT EXISTS
+(SELECT * FROM t1 WHERE a = 50 AND b = 3);
+SELECT * FROM t1;
+a	b	c
+50	3	3
+INSERT INTO t1
+SELECT 50, 3, 3 FROM DUAL
+WHERE NOT EXISTS
+(SELECT * FROM t1 WHERE a = 50 AND b = 3);
+select found_rows();
+found_rows()
+0
+SELECT * FROM t1;
+a	b	c
+50	3	3
+select count(*) from t1;
+count(*)
+1
+select found_rows();
+found_rows()
+1
+select count(*) from t1 limit 2,3;
+count(*)
+select found_rows();
+found_rows()
+0
+select SQL_CALC_FOUND_ROWS count(*) from t1 limit 2,3;
+count(*)
+select found_rows();
+found_rows()
+1
+DROP TABLE t1;
 CREATE TABLE t1 ( city char(30) );
 INSERT INTO t1 VALUES ('London');
 INSERT INTO t1 VALUES ('Paris');
@@ -2579,25 +2669,6 @@ K2C4	K4N4	F2I4
 WART	0100	1
 WART	0200	1
 WART	0300	3
-select found_rows();
-found_rows()
-3
-select count(*) from t1;
-count(*)
-15
-select found_rows();
-found_rows()
-1
-select count(*) from t1 limit 2,3;
-count(*)
-select found_rows();
-found_rows()
-0
-select SQL_CALC_FOUND_ROWS count(*) from t1 limit 2,3;
-count(*)
-select found_rows();
-found_rows()
-1
 DROP TABLE t1;
 CREATE TABLE t1 ( a BLOB, INDEX (a(20)) );
 CREATE TABLE t2 ( a BLOB, INDEX (a(20)) );
@@ -2612,51 +2683,6 @@ id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	5	
 1	SIMPLE	t2	ref	a	a	23	test.t1.a	2	
 DROP TABLE t1, t2;
-CREATE TABLE t1 ( city char(30) );
-INSERT INTO t1 VALUES ('London');
-INSERT INTO t1 VALUES ('Paris');
-SELECT * FROM t1 WHERE city='London';
-city
-London
-SELECT * FROM t1 WHERE city='london';
-city
-London
-EXPLAIN SELECT * FROM t1 WHERE city='London' AND city='london';
-id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	2	Using where
-SELECT * FROM t1 WHERE city='London' AND city='london';
-city
-London
-EXPLAIN SELECT * FROM t1 WHERE city LIKE '%london%' AND city='London';
-id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	2	Using where
-SELECT * FROM t1 WHERE city LIKE '%london%' AND city='London';
-city
-London
-DROP TABLE t1;
-create table t1 (a int(11) unsigned, b int(11) unsigned);
-insert into t1 values (1,0), (1,1), (1,2);
-select a-b  from t1 order by 1;
-a-b
-0
-1
-18446744073709551615
-select a-b , (a-b < 0)  from t1 order by 1;
-a-b	(a-b < 0)
-0	0
-1	0
-18446744073709551615	0
-select a-b as d, (a-b >= 0), b from t1 group by b having d >= 0;
-d	(a-b >= 0)	b
-1	1	0
-0	1	1
-18446744073709551615	1	2
-select cast((a - b) as unsigned) from t1 order by 1;
-cast((a - b) as unsigned)
-0
-1
-18446744073709551615
-drop table t1;
 create table t1 (a int, b int);
 create table t2 like t1;
 select t1.a from (t1 inner join t2 on t1.a=t2.a) where t2.a=1;
@@ -2730,77 +2756,14 @@ DROP TABLE t1,t2;
 select x'10' + 0, X'10' + 0, b'10' + 0, B'10' + 0;
 x'10' + 0	X'10' + 0	b'10' + 0	B'10' + 0
 16	16	2	2
-CREATE TABLE t1 (
-acct_id int(11) NOT NULL default '0',
-profile_id smallint(6) default NULL,
-UNIQUE KEY t1$acct_id (acct_id),
-KEY t1$profile_id (profile_id)
-);
-INSERT INTO t1 VALUES (132,17),(133,18);
-CREATE TABLE t2 (
-profile_id smallint(6) default NULL,
-queue_id int(11) default NULL,
-seq int(11) default NULL,
-KEY t2$queue_id (queue_id)
-);
-INSERT INTO t2 VALUES (17,31,4),(17,30,3),(17,36,2),(17,37,1);
-CREATE TABLE t3 (
-id int(11) NOT NULL default '0',
-qtype int(11) default NULL,
-seq int(11) default NULL,
-warn_lvl int(11) default NULL,
-crit_lvl int(11) default NULL,
-rr1 tinyint(4) NOT NULL default '0',
-rr2 int(11) default NULL,
-default_queue tinyint(4) NOT NULL default '0',
-KEY t3$qtype (qtype),
-KEY t3$id (id)
-);
-INSERT INTO t3 VALUES (30,1,29,NULL,NULL,0,NULL,0),(31,1,28,NULL,NULL,0,NULL,0),
-(36,1,34,NULL,NULL,0,NULL,0),(37,1,35,NULL,NULL,0,121,0);
-SELECT COUNT(*) FROM t1 a STRAIGHT_JOIN t2 pq STRAIGHT_JOIN t3 q 
-WHERE 
-(pq.profile_id = a.profile_id) AND (a.acct_id = 132) AND 
-(pq.queue_id = q.id) AND (q.rr1 <> 1);
-COUNT(*)
-4
-drop table t1,t2,t3;
-create table t1 (f1 int);
-insert into t1 values (1),(NULL);
-create table t2 (f2 int, f3 int, f4 int);
-create index idx1 on t2 (f4);
-insert into t2 values (1,2,3),(2,4,6);
-select A.f2 from t1 left join t2 A on A.f2 = f1 where A.f3=(select min(f3)
-from  t2 C where A.f4 = C.f4) or A.f3 IS NULL;
-f2
-1
-NULL
-drop table t1,t2;
-create table t2 (a tinyint unsigned);
-create index t2i on t2(a);
-insert into t2 values (0), (254), (255);
-explain select * from t2 where a > -1;
-id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	index	t2i	t2i	2	NULL	3	Using where; Using index
-select * from t2 where a > -1;
+CREATE TABLE BUG_12595(a varchar(100));
+INSERT INTO BUG_12595 VALUES ('hakan%'), ('hakank'), ("ha%an");
+SELECT * FROM BUG_12595 WHERE a LIKE 'hakan*%' ESCAPE '*';
 a
-0
-254
-255
-drop table t2;
-CREATE TABLE t1 (a int, b int, c int);
-INSERT INTO t1
-SELECT 50, 3, 3 FROM DUAL
-WHERE NOT EXISTS
-(SELECT * FROM t1 WHERE a = 50 AND b = 3);
-SELECT * FROM t1;
-a	b	c
-50	3	3
-INSERT INTO t1
-SELECT 50, 3, 3 FROM DUAL
-WHERE NOT EXISTS
-(SELECT * FROM t1 WHERE a = 50 AND b = 3);
-SELECT * FROM t1;
-a	b	c
-50	3	3
-DROP TABLE t1;
+hakan%
+SELECT * FROM BUG_12595 WHERE a LIKE 'hakan**%' ESCAPE '**';
+ERROR HY000: Incorrect arguments to ESCAPE
+SELECT * FROM BUG_12595 WHERE a LIKE 'ha%%an' ESCAPE '%';
+a
+ha%an
+DROP TABLE BUG_12595;
diff --git a/mysql-test/r/select_safe.result b/mysql-test/r/select_safe.result
index 7a29db42dd94b9667936775bedf8f4fed6600b75..feac9efcb133d3ab92c14215cd392b49f3fb84ec 100644
--- a/mysql-test/r/select_safe.result
+++ b/mysql-test/r/select_safe.result
@@ -60,9 +60,6 @@ a	b
 3	a
 4	a
 5	a
-SELECT @@MAX_SEEKS_FOR_KEY;
-@@MAX_SEEKS_FOR_KEY
-4294967295
 analyze table t1;
 Table	Op	Msg_type	Msg_text
 test.t1	analyze	status	OK
@@ -87,7 +84,7 @@ set local  max_join_size=8;
 select * from (select * from t1) x;
 ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
 set local  max_join_size=1;
-select * from (select * from t1 a, t1 b) x;
+select * from (select a.a as aa, b.a as ba from t1 a, t1 b) x;
 ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
 set local  max_join_size=1;
 select * from (select 1 union select 2 union select 3) x;
diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result
index f1c536ed1da8ff859295c9de2524e4ac81e84250..94d1ac7ac112c45ef81f520ce9236517d109d32e 100644
--- a/mysql-test/r/show_check.result
+++ b/mysql-test/r/show_check.result
@@ -512,3 +512,46 @@ t1	CREATE TABLE `t1` (
   KEY `c2` USING BTREE (`c2`)
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
 DROP TABLE t1;
+CREATE TABLE txt1(a int);
+CREATE TABLE tyt2(a int);
+CREATE TABLE urkunde(a int);
+FLUSH TABLES;
+SELECT 1 FROM mysql.db, mysql.proc, mysql.user, mysql.time_zone, mysql.time_zone_name, txt1, tyt2, urkunde LIMIT 0;
+1
+SHOW OPEN TABLES;
+Database	Table	In_use	Name_locked
+mysql	db	0	0
+test	urkunde	0	0
+mysql	time_zone	0	0
+mysql	user	0	0
+test	txt1	0	0
+mysql	proc	0	0
+test	tyt2	0	0
+mysql	time_zone_name	0	0
+SHOW OPEN TABLES FROM mysql;
+Database	Table	In_use	Name_locked
+mysql	db	0	0
+mysql	time_zone	0	0
+mysql	user	0	0
+mysql	proc	0	0
+mysql	time_zone_name	0	0
+SHOW OPEN TABLES FROM mysql LIKE 'u%';
+Database	Table	In_use	Name_locked
+mysql	user	0	0
+SHOW OPEN TABLES LIKE 't%';
+Database	Table	In_use	Name_locked
+mysql	time_zone	0	0
+test	txt1	0	0
+test	tyt2	0	0
+mysql	time_zone_name	0	0
+SHOW OPEN TABLES LIKE '%o%';
+Database	Table	In_use	Name_locked
+mysql	time_zone	0	0
+mysql	proc	0	0
+mysql	time_zone_name	0	0
+FLUSH TABLES;
+SHOW OPEN TABLES;
+Database	Table	In_use	Name_locked
+DROP TABLE txt1;
+DROP TABLE tyt2;
+DROP TABLE urkunde;
diff --git a/mysql-test/r/sp-big.result b/mysql-test/r/sp-big.result
new file mode 100644
index 0000000000000000000000000000000000000000..004ff586aabb11af91e84c4ee83d30940a91baff
--- /dev/null
+++ b/mysql-test/r/sp-big.result
@@ -0,0 +1,15 @@
+drop procedure if exists test.longprocedure;
+drop table if exists t1;
+create table t1 (a int);
+insert into t1 values (1),(2),(3);
+length
+107520
+select length(routine_definition) from information_schema.routines where routine_schema = 'test' and routine_name = 'longprocedure';
+length(routine_definition)
+107530
+call test.longprocedure(@value);
+select @value;
+@value
+3
+drop procedure test.longprocedure;
+drop table t1;
diff --git a/mysql-test/r/sp-error.result b/mysql-test/r/sp-error.result
index 13f46e507bac63854401222201fa17fd815e8235..bd383379abc97ca9799bf54aa9ad10598456ec9f 100644
--- a/mysql-test/r/sp-error.result
+++ b/mysql-test/r/sp-error.result
@@ -247,7 +247,7 @@ end|
 ERROR 42000: Duplicate cursor: c
 create procedure u()
 use sptmp|
-ERROR 42000: USE is not allowed in a stored procedure
+ERROR 0A000: USE is not allowed in stored procedures
 create procedure p()
 begin
 declare c cursor for select * from t1;
@@ -616,7 +616,7 @@ begin
 flush tables;
 return 5;
 end|
-ERROR 0A000: FLUSH is not allowed in stored procedures
+ERROR 0A000: FLUSH is not allowed in stored function or trigger
 create procedure bug9529_90123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123()
 begin
 end|
diff --git a/mysql-test/r/sp-prelocking.result b/mysql-test/r/sp-prelocking.result
new file mode 100644
index 0000000000000000000000000000000000000000..32d6d4e62643197ea7fd92dda4d228f6f229dd31
--- /dev/null
+++ b/mysql-test/r/sp-prelocking.result
@@ -0,0 +1,215 @@
+drop database if exists mysqltest;
+drop table if exists t1, t2, t3, t4;
+drop procedure if exists sp1;
+drop procedure if exists sp2;
+drop procedure if exists sp3;
+drop procedure if exists sp4;
+drop function if exists f1;
+drop function if exists f2;
+drop function if exists f3;
+create database mysqltest;
+use mysqltest//
+create procedure sp1 () 
+begin
+drop table if exists t1;
+select 1 as "my-col";
+end;
+//
+select database();
+database()
+mysqltest
+call sp1();
+my-col
+1
+Warnings:
+Note	1051	Unknown table 't1'
+select database();
+database()
+mysqltest
+use test;
+select database();
+database()
+test
+call mysqltest.sp1();
+my-col
+1
+Warnings:
+Note	1051	Unknown table 't1'
+select database();
+database()
+test
+drop procedure mysqltest.sp1;
+drop database mysqltest;
+create procedure sp1() 
+begin 
+create table t1 (a int); 
+insert into t1 values (10); 
+end//
+create procedure sp2()
+begin
+create table t2(a int);
+insert into t2 values(1);
+call sp1();
+end//
+create function f1() returns int
+begin 
+return (select max(a) from t1);
+end//
+create procedure sp3()
+begin 
+call sp1();
+select 'func', f1();
+end//
+call sp1();
+select 't1',a from t1;
+t1	a
+t1	10
+drop table t1;
+call sp2();
+select 't1',a from t1;
+t1	a
+t1	10
+select 't2',a from t2;
+t2	a
+t2	1
+drop table t1, t2;
+call sp3();
+func	f1()
+func	10
+select 't1',a from t1;
+t1	a
+t1	10
+drop table t1;
+drop procedure sp1;
+drop procedure sp2;
+drop procedure sp3;
+drop function f1;
+create procedure sp1()
+begin
+create temporary table t2(a int);
+insert into t2 select * from t1;
+end//
+create procedure sp2()
+begin
+create temporary table t1 (a int);
+insert into t1 values(1);
+call sp1();
+select 't1', a from t1;
+select 't2', a from t2;
+drop table t1;
+drop table t2;
+end//
+call sp2();
+t1	a
+t1	1
+t2	a
+t2	1
+drop procedure sp1;
+drop procedure sp2;
+create table t1 (a int);
+insert into t1 values(1),(2);
+create table t2 as select * from t1;
+create table t3 as select * from t1;
+create table t4 as select * from t1;
+create procedure sp1(a int)
+begin
+select a;
+end //
+create function f1() returns int
+begin
+return (select max(a) from t1);
+end //
+CALL sp1(f1());
+a
+2
+create procedure sp2(a int)
+begin
+select * from t3;
+select a;
+end //
+create procedure sp3()
+begin 
+select * from t1;
+call sp2(5);
+end //
+create procedure sp4()
+begin 
+select * from t2;
+call sp3();
+end //
+call sp4();
+a
+1
+2
+a
+1
+2
+a
+1
+2
+a
+5
+drop procedure sp1;
+drop procedure sp2;
+drop procedure sp3;
+drop procedure sp4;
+drop function f1;
+drop view if exists v1;
+create function f1(ab int) returns int
+begin
+declare i int;
+set i= (select max(a) from t1 where a < ab) ;
+return i;
+end //
+create function f2(ab int) returns int
+begin
+declare i int;
+set i= (select max(a) from t2 where a < ab) ;
+return i;
+end //
+create view v1 as 
+select t3.a as x, t4.a as y, f2(3) as z
+from t3, t4 where t3.a = t4.a //
+create procedure sp1()
+begin
+declare a int;
+set a= (select f1(4) + count(*) A from t1, v1);
+end //
+create function f3() returns int
+begin
+call sp1();
+return 1;
+end //
+call sp1() //
+select f3() //
+f3()
+1
+select f3() //
+f3()
+1
+call sp1() //
+drop procedure sp1//
+drop function f3//
+create procedure sp1() 
+begin 
+declare x int;
+declare c cursor for select f1(3) + count(*) from v1;
+open c;
+fetch c into x;
+end;//
+create function f3() returns int
+begin
+call sp1();
+return 1;
+end //
+call sp1() //
+call sp1() //
+select f3() //
+f3()
+1
+call sp1() //
+drop table t1,t2,t3;
+drop function f1;
+drop function f2;
+drop function f3;
+drop procedure sp1;
diff --git a/mysql-test/r/sp-security.result b/mysql-test/r/sp-security.result
index 184978e4a0da75bff71b5d82fcce1e2f49a7e0ea..d78f5fc36ea2d15f73ec9ce1865a05de3bfb75cd 100644
--- a/mysql-test/r/sp-security.result
+++ b/mysql-test/r/sp-security.result
@@ -236,3 +236,16 @@ drop procedure bug7291_2;
 drop procedure bug7291_0;
 REVOKE ALL PRIVILEGES, GRANT OPTION FROM user1@localhost;
 drop user user1@localhost;
+drop database if exists mysqltest_1;
+create database mysqltest_1;
+create procedure mysqltest_1.p1()
+begin
+select 1 from dual;
+end//
+grant usage on *.* to mysqltest_1@localhost;
+call mysqltest_1.p1();
+ERROR 42000: execute command denied to user 'mysqltest_1'@'localhost' for routine 'mysqltest_1.p1'
+drop procedure mysqltest_1.p1;
+drop database mysqltest_1;
+revoke usage on *.* from mysqltest_1@localhost;
+drop user mysqltest_1@localhost;
diff --git a/mysql-test/r/sp-threads.result b/mysql-test/r/sp-threads.result
index e6b8128c336bb8b6f835d56015e4a717b51014e6..c516d7a643f06f739f868e0d311363e2b3fc4b70 100644
--- a/mysql-test/r/sp-threads.result
+++ b/mysql-test/r/sp-threads.result
@@ -35,8 +35,9 @@ lock tables t2 write;
 show processlist;
 Id	User	Host	db	Command	Time	State	Info
 #	root	localhost	test	Sleep	#		NULL
-#	root	localhost	test	Query	#	Locked	call bug9486()
+#	root	localhost	test	Query	#	Locked	update t1, t2 set val= 1 where id1=id2
 #	root	localhost	test	Query	#	NULL	show processlist
+#	root	localhost	test	Sleep	#		NULL
 unlock tables;
 drop procedure bug9486;
 drop table t1, t2;
@@ -64,3 +65,27 @@ insert into t1 (select f from v1);
 drop function bug11554;
 drop table t1;
 drop view v1;
+drop procedure if exists p1;
+drop procedure if exists p2;
+create table t1 (s1 int)|
+create procedure p1() select * from t1|
+create procedure p2()
+begin
+insert into t1 values (1);
+call p1();
+select * from t1;
+end|
+use test;
+lock table t1 write;
+ call p2();
+use test;
+drop procedure p1;
+create procedure p1() select * from t1;
+unlock tables;
+s1
+1
+s1
+1
+drop procedure p1;
+drop procedure p2;
+drop table t1;
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index fd63204e32fbb2830e75e8bdd2d977afbcbe983e..78bf22d0b2729a200ca16d7cb122ad94895237ed 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -1,10 +1,9 @@
 use test;
-drop table if exists t1;
+drop table if exists t1,t2,t3,t4;
 create table t1 (
 id   char(16) not null default '',
 data int not null
 );
-drop table if exists t2;
 create table t2 (
 s   char(16),
 i   int,
@@ -85,7 +84,6 @@ foo	1
 kaka	3
 delete from t1|
 drop procedure setcontext|
-drop table if exists t3|
 create table t3 ( d date, i int, f double, s varchar(32) )|
 drop procedure if exists nullset|
 create procedure nullset()
@@ -521,7 +519,6 @@ select data into x from test.t1 limit 1;
 insert into test.t3 values ("into4", x);
 end|
 delete from t1|
-drop table if exists t3|
 create table t3 ( s char(16), d int)|
 call into_test4()|
 Warnings:
@@ -565,13 +562,12 @@ insert into test.t1 values (x, y);
 create temporary table test.t3 select * from test.t1;
 insert into test.t3 values (concat(x, "2"), y+2);
 end|
-drop table if exists t3|
 call create_select("cs", 90)|
 select * from t1, t3|
 id	data	id	data
 cs	90	cs	90
 cs	90	cs2	92
-drop table if exists t3|
+drop table t3|
 delete from t1|
 drop procedure create_select|
 drop function if exists e|
@@ -702,7 +698,6 @@ id	data
 hndlr3	13
 delete from t1|
 drop procedure hndlr3|
-drop table if exists t3|
 create table t3 ( id   char(16), data int )|
 drop procedure if exists hndlr4|
 create procedure hndlr4()
@@ -745,7 +740,6 @@ foo	40
 bar	15
 zap	663
 drop procedure cur1|
-drop table if exists t3|
 create table t3 ( s char(16), i int )|
 drop procedure if exists cur2|
 create procedure cur2()
@@ -1309,7 +1303,6 @@ select t1max()|
 t1max()
 5
 drop function t1max|
-drop table if exists t3|
 create table t3 (
 v char(16) not null primary key,
 c int unsigned not null
@@ -1430,7 +1423,6 @@ select @1, @2|
 2	NULL
 drop table t70|
 drop procedure bug1656|
-drop table if exists t3|
 create table t3(a int)|
 drop procedure if exists bug1862|
 create procedure bug1862()
@@ -1555,7 +1547,6 @@ select @x|
 42
 drop procedure bug2776_1|
 drop procedure bug2776_2|
-drop table if exists t3|
 create table t3 (s1 smallint)|
 insert into t3 values (123456789012)|
 Warnings:
@@ -1616,7 +1607,6 @@ f1	rc	t3
 drop procedure bug1863|
 drop temporary table temp_t1;
 drop table t3, t4|
-drop table if exists t3, t4|
 create table t3 ( 
 OrderID  int not null,
 MarketID int,
@@ -1694,7 +1684,6 @@ select @i, from_unixtime(@stamped_time, '%d-%m-%Y %h:%i:%s') as time|
 @i	time
 2	01-01-1970 03:16:40
 drop procedure bug3426|
-drop table if exists t3, t4|
 create table t3 (
 a int primary key, 
 ach char(1)
@@ -1724,7 +1713,6 @@ a	ach	b	bch
 1	a	1	b
 drop procedure bug3448|
 drop table t3, t4|
-drop table if exists t3|
 create table t3 (
 id int unsigned auto_increment not null primary key,
 title VARCHAR(200),
@@ -1873,7 +1861,6 @@ select 1+2|
 1+2
 3
 drop procedure bug3843|
-drop table if exists t3|
 create table t3 ( s1 char(10) )|
 insert into t3 values ('a'), ('b')|
 drop procedure if exists bug3368|
@@ -1889,7 +1876,6 @@ group_concat(v)
 yz,yz
 drop procedure bug3368|
 drop table t3|
-drop table if exists t3|
 create table t3 (f1 int, f2 int)|
 insert into t3 values (1,1)|
 drop procedure if exists bug4579_1|
@@ -1914,7 +1900,6 @@ Warning	1329	No data to FETCH
 drop procedure bug4579_1|
 drop procedure bug4579_2|
 drop table t3|
-drop table if exists t3|
 drop procedure if exists bug2773|
 create function bug2773() returns int return null|
 create table t3 as select bug2773()|
@@ -1936,7 +1921,6 @@ select bug3788()|
 bug3788()
 5
 drop function bug3788|
-drop table if exists t3|
 create table t3 (f1 int, f2 int, f3 int)|
 insert into t3 values (1,1,1)|
 drop procedure if exists bug4726|
@@ -2097,7 +2081,6 @@ call bug4902_2()|
 Id	User	Host	db	Command	Time	State	Info
 #	root	localhost	test	Query	#	NULL	show processlist
 drop procedure bug4902_2|
-drop table if exists t3|
 drop procedure if exists bug4904|
 create procedure bug4904()
 begin
@@ -2286,7 +2269,6 @@ flush status|
 flush query cache|
 delete from t1|
 drop procedure bug3583|
-drop table if exists t3|
 drop procedure if exists bug4905|
 create table t3 (s1 int,primary key (s1))|
 drop procedure if exists bug4905|
@@ -2344,7 +2326,6 @@ call bug8540()|
 y	z
 1	1
 drop procedure bug8540|
-drop table if exists t3|
 create table t3 (s1 int)|
 drop procedure if exists bug6642|
 create procedure bug6642()
@@ -2427,7 +2408,6 @@ call bug7992_2()|
 drop procedure bug7992_1|
 drop procedure bug7992_2|
 drop table t3|
-drop table if exists t3|
 create table t3 (  userid bigint(20) not null default 0 )|
 drop procedure if exists bug8116|
 create procedure bug8116(in _userid int)
@@ -2588,7 +2568,6 @@ delete from t1|
 drop procedure if exists bug6900|
 drop procedure if exists bug9074|
 drop procedure if exists bug6900_9074|
-drop table if exists t3|
 create table t3 (w char unique, x char)|
 insert into t3 values ('a', 'b')|
 create procedure bug6900()
@@ -2658,20 +2637,20 @@ call avg ()|
 drop procedure avg|
 drop procedure if exists bug6129|
 set @old_mode= @@sql_mode;
-set @@sql_mode= "";
+set @@sql_mode= "ERROR_FOR_DIVISION_BY_ZERO";
 create procedure bug6129()
 select @@sql_mode|
 call bug6129()|
 @@sql_mode
-
+ERROR_FOR_DIVISION_BY_ZERO
 set @@sql_mode= "NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO"|
 call bug6129()|
 @@sql_mode
-NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO
+ERROR_FOR_DIVISION_BY_ZERO
 set @@sql_mode= "NO_ZERO_IN_DATE"|
 call bug6129()|
 @@sql_mode
-NO_ZERO_IN_DATE
+ERROR_FOR_DIVISION_BY_ZERO
 set @@sql_mode=@old_mode;
 drop procedure bug6129|
 drop procedure if exists bug9856|
@@ -3042,32 +3021,6 @@ drop procedure bug11529|
 drop procedure if exists bug6063|
 drop procedure if exists bug7088_1|
 drop procedure if exists bug7088_2|
-create procedure bug6063()
-lâbel: begin end|
-call bug6063()|
-show create procedure bug6063|
-Procedure	sql_mode	Create Procedure
-bug6063		CREATE PROCEDURE `test`.`bug6063`()
-l?bel: begin end
-set character set utf8|
-create procedure bug7088_1()
-label1: begin end label1|
-create procedure bug7088_2()
-läbel1: begin end|
-call bug7088_1()|
-call bug7088_2()|
-set character set default|
-show create procedure bug7088_1|
-Procedure	sql_mode	Create Procedure
-bug7088_1		CREATE PROCEDURE `test`.`bug7088_1`()
-label1: begin end label1
-show create procedure bug7088_2|
-Procedure	sql_mode	Create Procedure
-bug7088_2		CREATE PROCEDURE `test`.`bug7088_2`()
-läbel1: begin end
-drop procedure bug6063|
-drop procedure bug7088_1|
-drop procedure bug7088_2|
 drop procedure if exists bug9565_sub|
 drop procedure if exists bug9565|
 create procedure bug9565_sub()
@@ -3099,4 +3052,52 @@ select @@sort_buffer_size|
 1000000
 set @@sort_buffer_size = @x|
 drop procedure bug9538|
+drop procedure if exists bug8692|
+create table t3 (c1 varchar(5), c2 char(5), c3 enum('one','two'), c4 text, c5 blob, c6 char(5), c7 varchar(5))|
+insert into t3 values ('', '', '', '', '', '', NULL)|
+Warnings:
+Warning	1265	Data truncated for column 'c3' at row 1
+create procedure bug8692()
+begin 
+declare v1 VARCHAR(10); 
+declare v2 VARCHAR(10); 
+declare v3 VARCHAR(10); 
+declare v4 VARCHAR(10); 
+declare v5 VARCHAR(10); 
+declare v6 VARCHAR(10); 
+declare v7 VARCHAR(10); 
+declare c8692 cursor for select c1,c2,c3,c4,c5,c6,c7 from t3; 
+open c8692; 
+fetch c8692 into v1,v2,v3,v4,v5,v6,v7;
+select v1, v2, v3, v4, v5, v6, v7;
+end|
+call bug8692()|
+v1	v2	v3	v4	v5	v6	v7
+						NULL
+drop procedure bug8692|
+drop table t3|
+drop function if exists bug10055|
+create function bug10055(v char(255)) returns char(255) return lower(v)|
+select t.column_name, bug10055(t.column_name)
+from information_schema.columns as t
+where t.table_schema = 'test' and t.table_name = 't1'|
+column_name	bug10055(t.column_name)
+id	id
+data	data
+drop function bug10055|
+drop function if exists f_bug11247|
+drop procedure if exists p_bug11247|
+create function f_bug11247(param int)
+returns int
+return param + 1|
+create procedure p_bug11247(lim int)
+begin
+declare v int default 0;
+while v < lim do
+set v= f_bug11247(v);
+end while;
+end|
+call p_bug11247(10)|
+drop function f_bug11247|
+drop procedure p_bug11247|
 drop table t1,t2;
diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result
index 49f118b1d9604aa238afca9dd8eb3c9fcd06aafb..6299e8dcc88894d20d24581bb9b56cc62c638b14 100644
--- a/mysql-test/r/strict.result
+++ b/mysql-test/r/strict.result
@@ -1258,3 +1258,31 @@ select * from t1;
 d
 2000-10-01
 drop table t1;
+set @@sql_mode='traditional';
+create table t1(a int, b timestamp);
+alter table t1 add primary key(a);
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) NOT NULL default '0',
+  `b` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
+  PRIMARY KEY  (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+create table t1(a int, b timestamp default 20050102030405);
+alter table t1 add primary key(a);
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) NOT NULL default '0',
+  `b` timestamp NOT NULL default '2005-01-02 03:04:05',
+  PRIMARY KEY  (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+set @@sql_mode='traditional';
+create table t1(a bit(2));
+insert into t1 values(b'101');
+ERROR 22001: Data too long for column 'a' at row 1
+select * from t1;
+a
+drop table t1;
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index 693146c869e4cf6397227e5b6656dbdf022e6ae1..bbfdeb970a652b0fc2b9e355610028d3c45306ca 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -942,7 +942,7 @@ ROW(1, 1, 'a') IN (select a,b,c from t1)
 1
 select ROW(1, 2, 'a') IN (select a,b,c from t1);
 ROW(1, 2, 'a') IN (select a,b,c from t1)
-NULL
+0
 select ROW(1, 1, 'a') IN (select b,a,c from t1);
 ROW(1, 1, 'a') IN (select b,a,c from t1)
 1
@@ -960,7 +960,7 @@ ROW(1, 1, 'a') IN (select a,b,c from t1 where c='b' or c='a')
 1
 select ROW(1, 2, 'a') IN (select a,b,c from t1 where c='b' or c='a');
 ROW(1, 2, 'a') IN (select a,b,c from t1 where c='b' or c='a')
-NULL
+0
 select ROW(1, 1, 'a') IN (select b,a,c from t1 where c='b' or c='a');
 ROW(1, 1, 'a') IN (select b,a,c from t1 where c='b' or c='a')
 1
@@ -1087,24 +1087,24 @@ CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT 1)) a;
 SHOW CREATE TABLE t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
-  `a` bigint(20) NOT NULL default '0',
-  `(SELECT 1)` bigint(20) NOT NULL default '0'
+  `a` bigint(1) NOT NULL default '0',
+  `(SELECT 1)` bigint(1) NOT NULL default '0'
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
 drop table t1;
 CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT a)) a;
 SHOW CREATE TABLE t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
-  `a` bigint(20) NOT NULL default '0',
-  `(SELECT a)` bigint(20) NOT NULL default '0'
+  `a` bigint(1) NOT NULL default '0',
+  `(SELECT a)` bigint(1) NOT NULL default '0'
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
 drop table t1;
 CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT a+0)) a;
 SHOW CREATE TABLE t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
-  `a` bigint(20) NOT NULL default '0',
-  `(SELECT a+0)` bigint(20) NOT NULL default '0'
+  `a` bigint(1) NOT NULL default '0',
+  `(SELECT a+0)` bigint(3) NOT NULL default '0'
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
 drop table t1;
 CREATE TABLE t1 SELECT (SELECT 1 as a UNION SELECT 1+1 limit 1,1) as a;
@@ -1200,7 +1200,7 @@ INSERT INTO t1 VALUES (1);
 UPDATE t1 SET i=i+(SELECT MAX(i) FROM (SELECT 1) t) WHERE i=(SELECT MAX(i));
 UPDATE t1 SET i=i+1 WHERE i=(SELECT MAX(i));
 UPDATE t1 SET t.i=i+(SELECT MAX(i) FROM (SELECT 1) t);
-ERROR 42S02: Unknown table 't' in field list
+ERROR 42S22: Unknown column 't.i' in 'field list'
 select * from t1;
 i
 1
@@ -1638,7 +1638,7 @@ ERROR 42S22: Unknown column 't1.s2' in 'where clause'
 select * from t1 where (select count(*) from t2 group by t1.s2) = 1;
 ERROR 42S22: Unknown column 't1.s2' in 'group statement'
 select count(*) from t2 group by t1.s2;
-ERROR 42S02: Unknown table 't1' in group statement
+ERROR 42S22: Unknown column 't1.s2' in 'group statement'
 drop table t1, t2;
 CREATE TABLE t1(COLA FLOAT NOT NULL,COLB FLOAT NOT NULL,COLC VARCHAR(20) DEFAULT NULL,PRIMARY KEY (COLA, COLB));
 CREATE TABLE t2(COLA FLOAT NOT NULL,COLB FLOAT NOT NULL,COLC CHAR(1) NOT NULL,PRIMARY KEY (COLA));
@@ -1789,11 +1789,11 @@ CREATE TABLE t1 (id INT);
 CREATE TABLE t2 (id INT);
 INSERT INTO t1 VALUES (1), (2);
 INSERT INTO t2 VALUES (1);
-SELECT t1.id, ( SELECT COUNT(t.id) FROM t2 AS t WHERE t.id = t1.id ) AS c FROM t1 LEFT JOIN t2 USING (id);
+SELECT id, ( SELECT COUNT(t.id) FROM t2 AS t WHERE t.id = t1.id ) AS c FROM t1 LEFT JOIN t2 USING (id);
 id	c
 1	1
 2	0
-SELECT t1.id, ( SELECT COUNT(t.id) FROM t2 AS t WHERE t.id = t1.id ) AS c FROM t1 LEFT JOIN t2 USING (id) ORDER BY t1.id;
+SELECT id, ( SELECT COUNT(t.id) FROM t2 AS t WHERE t.id = t1.id ) AS c FROM t1 LEFT JOIN t2 USING (id) ORDER BY id;
 id	c
 1	1
 2	0
@@ -2709,7 +2709,143 @@ select (1,2,3) = (select * from t1);
 ERROR 21000: Operand should contain 3 column(s)
 select (select * from t1) = (1,2,3);
 ERROR 21000: Operand should contain 2 column(s)
+drop table t1
+#;
+CREATE TABLE `t1` (
+`itemid` bigint(20) unsigned NOT NULL auto_increment,
+`sessionid` bigint(20) unsigned default NULL,
+`time` int(10) unsigned NOT NULL default '0',
+`type` set('A','D','E','F','G','I','L','N','U') collate latin1_general_ci NOT
+NULL default '',
+`data` text collate latin1_general_ci NOT NULL,
+PRIMARY KEY  (`itemid`)
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+INSERT INTO `t1` VALUES (1, 1, 1, 'D', '');
+CREATE TABLE `t2` (
+`sessionid` bigint(20) unsigned NOT NULL auto_increment,
+`pid` int(10) unsigned NOT NULL default '0',
+`date` int(10) unsigned NOT NULL default '0',
+`ip` varchar(15) collate latin1_general_ci NOT NULL default '',
+PRIMARY KEY  (`sessionid`)
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+INSERT INTO `t2` VALUES (1, 1, 1, '10.10.10.1');
+SELECT s.ip, count( e.itemid ) FROM `t1` e JOIN t2 s ON s.sessionid = e.sessionid WHERE e.sessionid = ( SELECT sessionid FROM t2 ORDER BY sessionid DESC LIMIT 1 ) GROUP BY s.ip HAVING count( e.itemid ) >0 LIMIT 0 , 30;
+ip	count( e.itemid )
+10.10.10.1	1
+drop tables t1,t2;
+create table t1 (fld enum('0','1'));
+insert into t1 values ('1');
+select * from (select max(fld) from t1) as foo;
+max(fld)
+1
 drop table t1;
+CREATE TABLE t1 (one int, two int, flag char(1));
+CREATE TABLE t2 (one int, two int, flag char(1));
+INSERT INTO t1 VALUES(1,2,'Y'),(2,3,'Y'),(3,4,'Y'),(5,6,'N'),(7,8,'N');
+INSERT INTO t2 VALUES(1,2,'Y'),(2,3,'Y'),(3,4,'Y'),(5,6,'N'),(7,8,'N');
+SELECT * FROM t1
+WHERE ROW(one,two) IN (SELECT DISTINCT one,two FROM t2 WHERE flag = 'N');
+one	two	flag
+5	6	N
+7	8	N
+SELECT * FROM t1
+WHERE ROW(one,two) IN (SELECT DISTINCT one,two FROM t1 WHERE flag = 'N');
+one	two	flag
+5	6	N
+7	8	N
+insert into t2 values (null,null,'N');
+insert into t2 values (null,3,'0');
+insert into t2 values (null,5,'0');
+insert into t2 values (10,null,'0');
+insert into t1 values (10,3,'0');
+insert into t1 values (10,5,'0');
+insert into t1 values (10,10,'0');
+SELECT one,two,ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = 'N') as 'test' from t1;
+one	two	test
+1	2	NULL
+2	3	NULL
+3	4	NULL
+5	6	1
+7	8	1
+10	3	NULL
+10	5	NULL
+10	10	NULL
+SELECT one,two from t1 where ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = 'N');
+one	two
+5	6
+7	8
+SELECT one,two,ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = 'N' group by one,two) as 'test' from t1;
+one	two	test
+1	2	NULL
+2	3	NULL
+3	4	NULL
+5	6	1
+7	8	1
+10	3	NULL
+10	5	NULL
+10	10	NULL
+SELECT one,two,ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = '0') as 'test' from t1;
+one	two	test
+1	2	0
+2	3	NULL
+3	4	0
+5	6	0
+7	8	0
+10	3	NULL
+10	5	NULL
+10	10	NULL
+SELECT one,two,ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = '0' group by one,two) as 'test' from t1;
+one	two	test
+1	2	0
+2	3	NULL
+3	4	0
+5	6	0
+7	8	0
+10	3	NULL
+10	5	NULL
+10	10	NULL
+explain extended SELECT one,two,ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = '0') as 'test' from t1;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	8	
+2	DEPENDENT SUBQUERY	t2	ALL	NULL	NULL	NULL	NULL	9	Using where
+Warnings:
+Note	1003	select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two`,<in_optimizer>((`test`.`t1`.`one`,`test`.`t1`.`two`),<exists>(select `test`.`t2`.`one` AS `one`,`test`.`t2`.`two` AS `two` from `test`.`t2` where ((`test`.`t2`.`flag` = _latin1'0') and ((<cache>(`test`.`t1`.`one`) = `test`.`t2`.`one`) or isnull(`test`.`t2`.`one`)) and ((<cache>(`test`.`t1`.`two`) = `test`.`t2`.`two`) or isnull(`test`.`t2`.`two`))) having (<is_not_null_test>(`test`.`t2`.`one`) and <is_not_null_test>(`test`.`t2`.`two`)))) AS `test` from `test`.`t1`
+explain extended SELECT one,two from t1 where ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = 'N');
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	8	Using where
+2	DEPENDENT SUBQUERY	t2	ALL	NULL	NULL	NULL	NULL	9	Using where
+Warnings:
+Note	1003	select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two` from `test`.`t1` where <in_optimizer>((`test`.`t1`.`one`,`test`.`t1`.`two`),<exists>(select `test`.`t2`.`one` AS `one`,`test`.`t2`.`two` AS `two` from `test`.`t2` where ((`test`.`t2`.`flag` = _latin1'N') and (<cache>(`test`.`t1`.`one`) = `test`.`t2`.`one`) and (<cache>(`test`.`t1`.`two`) = `test`.`t2`.`two`))))
+explain extended SELECT one,two,ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = '0' group by one,two) as 'test' from t1;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	8	
+2	DEPENDENT SUBQUERY	t2	ALL	NULL	NULL	NULL	NULL	9	Using where; Using temporary; Using filesort
+Warnings:
+Note	1003	select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two`,<in_optimizer>((`test`.`t1`.`one`,`test`.`t1`.`two`),<exists>(select `test`.`t2`.`one` AS `one`,`test`.`t2`.`two` AS `two` from `test`.`t2` where (`test`.`t2`.`flag` = _latin1'0') group by `test`.`t2`.`one`,`test`.`t2`.`two` having (((<cache>(`test`.`t1`.`one`) = `test`.`t2`.`one`) or isnull(`test`.`t2`.`one`)) and ((<cache>(`test`.`t1`.`two`) = `test`.`t2`.`two`) or isnull(`test`.`t2`.`two`)) and <is_not_null_test>(`test`.`t2`.`one`) and <is_not_null_test>(`test`.`t2`.`two`)))) AS `test` from `test`.`t1`
+DROP TABLE t1,t2;
+CREATE TABLE t1 (a char(5), b char(5));
+INSERT INTO t1 VALUES (NULL,'aaa'), ('aaa','aaa');
+SELECT * FROM t1 WHERE (a,b) IN (('aaa','aaa'), ('aaa','bbb'));
+a	b
+aaa	aaa
+DROP TABLE t1;
+CREATE TABLE t1 (a int);
+CREATE TABLE t2 (a int, b int);
+CREATE TABLE t3 (b int NOT NULL);
+INSERT INTO t1 VALUES (1), (2), (3), (4);
+INSERT INTO t2 VALUES (1,10), (3,30);
+SELECT * FROM t2 LEFT JOIN t3 ON t2.b=t3.b
+WHERE t3.b IS NOT NULL OR t2.a > 10;
+a	b	b
+SELECT * FROM t1
+WHERE t1.a NOT IN (SELECT a FROM t2 LEFT JOIN t3 ON t2.b=t3.b
+WHERE t3.b IS NOT NULL OR t2.a > 10);
+a
+1
+2
+3
+4
+DROP TABLE t1,t2,t3;
 create table t1 (df decimal(5,1));
 insert into t1 values(1.1);
 insert into t1 values(2.2);
diff --git a/mysql-test/r/system_mysql_db.result b/mysql-test/r/system_mysql_db.result
index 277115733d46011bd0ce567dc34ee352631cc430..d2872878cb9d2c5adcf56a33fca630dec8c1446f 100644
--- a/mysql-test/r/system_mysql_db.result
+++ b/mysql-test/r/system_mysql_db.result
@@ -172,7 +172,7 @@ proc	CREATE TABLE `proc` (
   `security_type` enum('INVOKER','DEFINER') NOT NULL default 'DEFINER',
   `param_list` blob NOT NULL,
   `returns` char(64) NOT NULL default '',
-  `body` blob NOT NULL,
+  `body` longblob NOT NULL,
   `definer` char(77) character set utf8 collate utf8_bin NOT NULL default '',
   `created` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
   `modified` timestamp NOT NULL default '0000-00-00 00:00:00',
diff --git a/mysql-test/r/trigger.result b/mysql-test/r/trigger.result
index 7e3a6fa65d41cde3db313ee1f2f9910566962102..6a5063f54c96112376664b9169eb6a1b0840bfce 100644
--- a/mysql-test/r/trigger.result
+++ b/mysql-test/r/trigger.result
@@ -2,6 +2,7 @@ drop table if exists t1, t2, t3;
 drop view if exists v1;
 drop database if exists mysqltest;
 drop function if exists f1;
+drop procedure if exists p1;
 create table t1 (i int);
 create trigger trg before insert on t1 for each row set @a:=1;
 set @a:=0;
@@ -595,3 +596,104 @@ update t1 set col2 = 4;
 ERROR 42000: FUNCTION test.bug5893 does not exist
 drop trigger t1_bu;
 drop table t1;
+set sql_mode='ansi';
+create table t1 ("t1 column" int);
+create trigger t1_bi before insert on t1 for each row set new."t1 column" = 5;
+set sql_mode="";
+insert into t1 values (0);
+create trigger t1_af after insert on t1 for each row set @a=10;
+insert into t1 values (0);
+select * from t1;
+t1 column
+5
+5
+select @a;
+@a
+10
+show triggers;
+Trigger	Event	Table	Statement	Timing	Created	sql_mode
+t1_bi	INSERT	t1	set new."t1 column" = 5	BEFORE	#	REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI
+t1_af	INSERT	t1	 set @a=10	AFTER	#	
+drop table t1;
+set sql_mode="traditional";
+create table t1 (a date);
+insert into t1 values ('2004-01-00');
+ERROR 22007: Incorrect date value: '2004-01-00' for column 'a' at row 1
+set sql_mode="";
+create trigger t1_bi before insert on t1 for each row set new.a = '2004-01-00';
+set sql_mode="traditional";
+insert into t1 values ('2004-01-01');
+select * from t1;
+a
+2004-01-00
+set sql_mode=default;
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` date default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show triggers;
+Trigger	Event	Table	Statement	Timing	Created	sql_mode
+t1_bi	INSERT	t1	 set new.a = '2004-01-00'	BEFORE	#	
+drop table t1;
+create table t1 (id int);
+create trigger t1_ai after insert on t1 for each row flush tables;
+ERROR 0A000: FLUSH is not allowed in stored function or trigger
+create trigger t1_ai after insert on t1 for each row flush privileges;
+ERROR 0A000: FLUSH is not allowed in stored function or trigger
+create procedure p1() flush tables;
+create trigger t1_ai after insert on t1 for each row call p1();
+insert into t1 values (0);
+ERROR 0A000: FLUSH is not allowed in stored function or trigger
+drop procedure p1;
+create procedure p1() flush privileges;
+insert into t1 values (0);
+ERROR 0A000: FLUSH is not allowed in stored function or trigger
+drop procedure p1;
+drop table t1;
+create table t1 (id int, data int, username varchar(16));
+insert into t1 (id, data) values (1, 0);
+create trigger t1_whoupdated before update on t1 for each row
+begin
+declare user varchar(32);
+declare i int;
+select user() into user;
+set NEW.username = user;
+select count(*) from ((select 1) union (select 2)) as d1 into i;
+end|
+update t1 set data = 1;
+update t1 set data = 2;
+drop table t1;
+create table t1 (c1 int, c2 datetime);
+create trigger tr1 before insert on t1 for each row 
+begin 
+set new.c2= '2004-04-01';
+select 'hello';
+end|
+ERROR 0A000: Not allowed to return a result set from a trigger
+insert into t1 (c1) values (1),(2),(3);
+select * from t1;
+c1	c2
+1	NULL
+2	NULL
+3	NULL
+drop procedure if exists bug11587;
+create procedure bug11587(x char(16))
+begin
+select "hello";
+select "hello again";
+end|
+create trigger tr1 before insert on t1 for each row 
+begin 
+call bug11587();
+set new.c2= '2004-04-02';
+end|
+insert into t1 (c1) values (4),(5),(6);
+ERROR 0A000: PROCEDURE test.bug11587 can't return a result set in the given context
+select * from t1;
+c1	c2
+1	NULL
+2	NULL
+3	NULL
+drop procedure bug11587;
+drop table t1;
diff --git a/mysql-test/r/type_bit.result b/mysql-test/r/type_bit.result
index 4aa8587d6e14d5376617bcc398995da9525e041c..5988b4f745eca1ce136b7ad34ffca610e6353dac 100644
--- a/mysql-test/r/type_bit.result
+++ b/mysql-test/r/type_bit.result
@@ -34,9 +34,9 @@ select 0 + b'1111111111111111';
 select 0 + b'1000000000000001';
 0 + b'1000000000000001'
 32769
-drop table if exists t1;
+drop table if exists t1,t2;
 create table t1 (a bit(65));
-ERROR 42000: Column length too big for column 'a' (max = 64); use BLOB or TEXT instead
+ERROR 42000: Display width out of range for column 'a' (max = 64)
 create table t1 (a bit(0));
 show create table t1;
 Table	Create Table
diff --git a/mysql-test/r/type_bit_innodb.result b/mysql-test/r/type_bit_innodb.result
index f3e9dad3baa1afdaae82351371afd3531c825c57..8d9c9756a337128ec2f3f9fad7a50b3156b2ae2c 100644
--- a/mysql-test/r/type_bit_innodb.result
+++ b/mysql-test/r/type_bit_innodb.result
@@ -36,7 +36,7 @@ select 0 + b'1000000000000001';
 32769
 drop table if exists t1;
 create table t1 (a bit(65)) engine=innodb;
-ERROR 42000: Column length too big for column 'a' (max = 64); use BLOB or TEXT instead
+ERROR 42000: Display width out of range for column 'a' (max = 64)
 create table t1 (a bit(0)) engine=innodb;
 show create table t1;
 Table	Create Table
diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result
index 33c7e837997d35520e27e8f2a8ac3e5599d966ac..85f899be5d88a3f36a582d3dcf6624545229fa48 100644
--- a/mysql-test/r/type_datetime.result
+++ b/mysql-test/r/type_datetime.result
@@ -26,6 +26,8 @@ Table	Op	Msg_type	Msg_text
 test.t1	check	status	OK
 delete from t1;
 insert into t1 values("000101"),("691231"),("700101"),("991231"),("00000101"),("00010101"),("99991231"),("00101000000"),("691231000000"),("700101000000"),("991231235959"),("10000101000000"),("99991231235959"),("20030100000000"),("20030000000000");
+insert into t1 values ("2003-003-03");
+insert into t1 values ("20030102T131415"),("2001-01-01T01:01:01"), ("2001-1-1T1:01:01");
 select * from t1;
 t
 2000-01-01 00:00:00
@@ -43,6 +45,17 @@ t
 9999-12-31 23:59:59
 2003-01-00 00:00:00
 2003-00-00 00:00:00
+2003-03-03 00:00:00
+2003-01-02 13:14:15
+2001-01-01 01:01:01
+2001-01-01 01:01:01
+truncate table t1;
+insert into t1 values("2003-0303 12:13:14");
+Warnings:
+Warning	1264	Out of range value adjusted for column 't' at row 1
+select * from t1;
+t
+0000-00-00 00:00:00
 drop table t1;
 CREATE TABLE t1 (a timestamp, b date, c time, d datetime);
 insert into t1 (b,c,d) values(now(),curtime(),now());
diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result
index c1039189a435b3cfb453bac5c227e45993739c51..d39d2e3401dcb8c2980727e3aaef3c1efd596356 100644
--- a/mysql-test/r/type_newdecimal.result
+++ b/mysql-test/r/type_newdecimal.result
@@ -946,6 +946,13 @@ t1	CREATE TABLE `t1` (
   `sl` decimal(5,5) default NULL
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
 drop table t1;
+create table t1 (sl decimal(65, 30));
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `sl` decimal(65,30) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
 create table t1 (
 f1 decimal unsigned not null default 17.49, 
 f2 decimal unsigned not null default 17.68, 
@@ -969,3 +976,13 @@ select * from t1;
 f1	f2	f3	f4	f5	f6	f7	f8
 1	18	99	100	104	200	1000	10000
 drop table t1;
+create table t1 (
+f0 decimal (30,30) zerofill not null DEFAULT 0,
+f1 decimal (0,0) zerofill not null default 0);
+show create table t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `f0` decimal(30,30) unsigned zerofill NOT NULL default '0.000000000000000000000000000000',
+  `f1` decimal(10,0) unsigned zerofill NOT NULL default '0000000000'
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
diff --git a/mysql-test/r/type_ranges.result b/mysql-test/r/type_ranges.result
index 3da8d76e0f23aedd7364ecf92ed2f663e691a4bd..39c55206c602264a184f4d1c0e818481b92ac60f 100644
--- a/mysql-test/r/type_ranges.result
+++ b/mysql-test/r/type_ranges.result
@@ -307,18 +307,18 @@ create table t1 ( id integer unsigned not null primary key );
 create table t2 ( id integer unsigned not null primary key );
 insert into t1 values (1), (2);
 insert into t2 values (1);
-select  t1.id as id_A,  t2.id as id_B from t1 left join t2 using ( id );
+select  t1.id as id_A,  t2.id as id_B from t1 left join t2 on (t1.id = t2.id);
 id_A	id_B
 1	1
 2	NULL
 create table t3 (id_A integer unsigned not null, id_B integer unsigned null  );
-insert into t3 select t1.id as id_A,  t2.id as id_B from t1 left join t2 using ( id );
+insert into t3 select t1.id as id_A,  t2.id as id_B from t1 left join t2 on (t1.id = t2.id);
 select * from t3;
 id_A	id_B
 1	1
 2	NULL
 drop table t3;
-create table t3 select t1.id as id_A,  t2.id as id_B from t1 left join t2 using ( id );
+create table t3 select t1.id as id_A,  t2.id as id_B from t1 left join t2 on (t1.id = t2.id);
 select * from t3;
 id_A	id_B
 1	1
diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result
index 1f45d238ea50887268bd5abbc1e5718f6bc6b74b..eb129e329832590cc97a22d1db0310d7b5e9fea4 100644
--- a/mysql-test/r/union.result
+++ b/mysql-test/r/union.result
@@ -430,7 +430,7 @@ drop temporary table t1;
 create table t1 select a from t1 union select a from t2;
 ERROR HY000: You can't specify target table 't1' for update in FROM clause
 select a from t1 union select a from t2 order by t2.a;
-ERROR 42S02: Unknown table 't2' in order clause
+ERROR 42S22: Unknown column 't2.a' in 'order clause'
 drop table t1,t2;
 select length(version()) > 1 as `*` UNION select 2;
 *
diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result
index df71c97033f5000be4c6ff288df5385214c735a3..acdc793fb691e2cb8f49262ba2e9c5e6b13f64b9 100644
--- a/mysql-test/r/user_var.result
+++ b/mysql-test/r/user_var.result
@@ -183,6 +183,30 @@ set session @honk=99;
 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@honk=99' at line 1
 set one_shot @honk=99;
 ERROR HY000: The 'SET ONE_SHOT' syntax is reserved for purposes internal to the MySQL server
+select @@local.max_allowed_packet;
+@@local.max_allowed_packet
+#
+select @@session.max_allowed_packet;
+@@session.max_allowed_packet
+#
+select @@global.max_allowed_packet;
+@@global.max_allowed_packet
+#
+select @@max_allowed_packet;
+@@max_allowed_packet
+#
+select @@Max_Allowed_Packet;
+@@Max_Allowed_Packet
+#
+select @@version;
+@@version
+#
+select @@global.version;
+@@global.version
+#
+select @@session.VERSION;
+@@session.VERSION
+#
 set @first_var= NULL;
 create table t1 select @first_var;
 show create table t1;
diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result
index 5468508165ccf5a939f39f0b6e5a1658585c0055..a7c96d89f0d240aa29ed9e37f07f1e552d418fa6 100644
--- a/mysql-test/r/variables.result
+++ b/mysql-test/r/variables.result
@@ -92,7 +92,7 @@ Variable_name	Value
 max_join_size	HA_POS_ERROR
 set @@max_join_size=1000, @@global.max_join_size=2000;
 select @@local.max_join_size, @@global.max_join_size;
-@@session.max_join_size	@@global.max_join_size
+@@local.max_join_size	@@global.max_join_size
 1000	2000
 select @@identity,  length(@@version)>0;
 @@identity	length(@@version)>0
@@ -428,23 +428,23 @@ Variable_name	Value
 myisam_max_sort_file_size	MAX_FILE_SIZE
 set global myisam_max_sort_file_size=default;
 select @@global.max_user_connections,@@local.max_join_size;
-@@global.max_user_connections	@@session.max_join_size
+@@global.max_user_connections	@@local.max_join_size
 100	200
 set @svc=@@global.max_user_connections, @svj=@@local.max_join_size;
 select @@global.max_user_connections,@@local.max_join_size;
-@@global.max_user_connections	@@session.max_join_size
+@@global.max_user_connections	@@local.max_join_size
 100	200
 set @@global.max_user_connections=111,@@local.max_join_size=222;
 select @@global.max_user_connections,@@local.max_join_size;
-@@global.max_user_connections	@@session.max_join_size
+@@global.max_user_connections	@@local.max_join_size
 111	222
 set @@global.max_user_connections=@@local.max_join_size,@@local.max_join_size=@@global.max_user_connections;
 select @@global.max_user_connections,@@local.max_join_size;
-@@global.max_user_connections	@@session.max_join_size
+@@global.max_user_connections	@@local.max_join_size
 222	111
 set @@global.max_user_connections=@svc, @@local.max_join_size=@svj;
 select @@global.max_user_connections,@@local.max_join_size;
-@@global.max_user_connections	@@session.max_join_size
+@@global.max_user_connections	@@local.max_join_size
 100	200
 set @a=1, @b=2;
 set @a=@b, @b=@a;
@@ -525,3 +525,15 @@ set @@warning_count=1;
 ERROR HY000: Variable 'warning_count' is a read only variable
 set @@global.error_count=1;
 ERROR HY000: Variable 'error_count' is a read only variable
+set @@max_heap_table_size= 4294967296;
+select @@max_heap_table_size > 0;
+@@max_heap_table_size > 0
+1
+set global max_heap_table_size= 4294967296;
+select @@max_heap_table_size > 0;
+@@max_heap_table_size > 0
+1
+set @@max_heap_table_size= 4294967296;
+select @@max_heap_table_size > 0;
+@@max_heap_table_size > 0
+1
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index c8078a0604e6307a8fcf8caa29adfb517270a4cf..2af2f06ad524612b3c2135a6bda8253735f089ed 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -566,7 +566,7 @@ select * from v1;
 col1
 describe v1;
 Field	Type	Null	Key	Default	Extra
-col1	varchar(2)	YES		NULL	
+col1	char(2)	YES		NULL	
 drop view v1;
 drop table `t1a``b`;
 create table t1 (col1 char(5),col2 char(5));
@@ -581,6 +581,11 @@ ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function
 drop view v1;
 create view v1 (a,a) as select 'a','a';
 ERROR 42S21: Duplicate column name 'a'
+drop procedure if exists p1;
+create procedure p1 () begin declare v int; create view v1 as select v; end;//
+call p1();
+ERROR HY000: View's SELECT contains a variable or parameter
+drop procedure p1;
 create table t1 (col1 int,col2 char(22));
 insert into t1 values(5,'Hello, world of views');
 create view v1 as select * from t1;
@@ -1875,6 +1880,8 @@ test.v5	check	error	View 'test.v5' references invalid table(s) or column(s) or f
 test.v6	check	status	OK
 drop view v1, v2, v3, v4, v5, v6;
 drop table t2;
+drop function if exists f1;
+drop function if exists f2;
 CREATE TABLE t1 (col1 time);
 CREATE TABLE t2 (col1 time);
 CREATE TABLE t3 (col1 time);
@@ -2016,6 +2023,17 @@ CALL p1();
 DROP PROCEDURE p1;
 DROP VIEW v1;
 DROP TABLE t1;
+create table t1 (f1 tinyint(1), f2 char(1), f3 varchar(1), f4 geometry, f5 datetime);
+create view v1 as select * from t1;
+desc v1;
+Field	Type	Null	Key	Default	Extra
+f1	tinyint(1)	YES		NULL	
+f2	char(1)	YES		NULL	
+f3	varchar(1)	YES		NULL	
+f4	geometry	YES		NULL	
+f5	datetime	YES		NULL	
+drop view v1;
+drop table t1;
 create table t1(f1 datetime);
 insert into t1 values('2005.01.01 12:0:0');
 create view v1 as select f1, subtime(f1, '1:1:1') as sb from t1;
@@ -2024,3 +2042,58 @@ f1	sb
 2005-01-01 12:00:00	2005-01-01 10:58:59
 drop view v1;
 drop table t1;
+CREATE TABLE t1 (
+aid int PRIMARY KEY,
+fn varchar(20) NOT NULL,
+ln varchar(20) NOT NULL
+);
+CREATE TABLE t2 (
+aid int NOT NULL,
+pid int NOT NULL
+);
+INSERT INTO t1 VALUES(1,'a','b'), (2,'c','d');
+INSERT INTO t2 values (1,1), (2,1), (2,2);
+CREATE VIEW v1 AS SELECT t1.*,t2.pid FROM t1,t2 WHERE t1.aid = t2.aid;
+SELECT pid,GROUP_CONCAT(CONCAT(fn,' ',ln) ORDER BY 1) FROM t1,t2 
+WHERE t1.aid = t2.aid GROUP BY pid;
+pid	GROUP_CONCAT(CONCAT(fn,' ',ln) ORDER BY 1)
+1	a b,c d
+2	c d
+SELECT pid,GROUP_CONCAT(CONCAT(fn,' ',ln) ORDER BY 1) FROM v1 GROUP BY pid;
+pid	GROUP_CONCAT(CONCAT(fn,' ',ln) ORDER BY 1)
+1	a b,c d
+2	c d
+DROP VIEW v1;
+DROP TABLE t1,t2;
+CREATE TABLE t1 (id int PRIMARY KEY, f varchar(255));
+CREATE VIEW v1 AS SELECT id, f FROM t1 WHERE id <= 2;
+INSERT INTO t1 VALUES (2, 'foo2');
+INSERT INTO t1 VALUES (1, 'foo1');
+SELECT * FROM v1;
+id	f
+1	foo1
+2	foo2
+SELECT * FROM v1;
+id	f
+1	foo1
+2	foo2
+DROP VIEW v1;
+DROP TABLE t1;
+CREATE TABLE t1 (pk int PRIMARY KEY, b int);
+CREATE TABLE t2 (pk int PRIMARY KEY, fk int, INDEX idx(fk));
+CREATE TABLE t3 (pk int PRIMARY KEY, fk int, INDEX idx(fk));
+CREATE TABLE t4 (pk int PRIMARY KEY, fk int, INDEX idx(fk));
+CREATE TABLE t5 (pk int PRIMARY KEY, fk int, INDEX idx(fk));
+CREATE VIEW v1 AS
+SELECT t1.pk as a FROM t1,t2,t3,t4,t5
+WHERE t1.b IS NULL AND
+t1.pk=t2.fk AND t2.pk=t3.fk AND t3.pk=t4.fk AND t4.pk=t5.fk;
+SELECT a FROM v1;
+a
+DROP VIEW v1;
+DROP TABLE t1,t2,t3,t4,t5;
+create view v1 as select timestampdiff(day,'1997-01-01 00:00:00','1997-01-02 00:00:00') as f1;
+select * from v1;
+f1
+1
+drop view v1;
diff --git a/mysql-test/r/view_grant.result b/mysql-test/r/view_grant.result
index b77ee59b3ff509e0b46cf914ad8be501776ec90d..71f0f28e59fde4f9d9ca4ab172ba490349f71871 100644
--- a/mysql-test/r/view_grant.result
+++ b/mysql-test/r/view_grant.result
@@ -72,12 +72,12 @@ select c from mysqltest.v4;
 c
 show columns from mysqltest.v1;
 Field	Type	Null	Key	Default	Extra
-c	bigint(20)	YES		NULL	
-d	bigint(20)	YES		NULL	
+c	bigint(12)	YES		NULL	
+d	bigint(12)	YES		NULL	
 show columns from mysqltest.v2;
 Field	Type	Null	Key	Default	Extra
-c	bigint(20)	YES		NULL	
-d	bigint(20)	YES		NULL	
+c	bigint(12)	YES		NULL	
+d	bigint(12)	YES		NULL	
 explain select c from mysqltest.v1;
 ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
 show create view mysqltest.v1;
diff --git a/mysql-test/r/xa.result b/mysql-test/r/xa.result
index 1dde495d6aed99a8680297c1047cbc5f22720e8c..f3d7e15162819fe7b6e0dd41955659f1fc4bbe94 100644
--- a/mysql-test/r/xa.result
+++ b/mysql-test/r/xa.result
@@ -22,6 +22,8 @@ a
 xa start 'testa','testb';
 insert t1 values (30);
 xa end 'testa','testb';
+xa start 'testa','testb';
+ERROR XAE08: XAER_DUPID: The XID already exists
 xa start 0x7465737462, 0x2030405060, 0xb;
 insert t1 values (40);
 xa end 'testb',' 0@P`',11;
@@ -35,11 +37,11 @@ formatID	gtrid_length	bqual_length	data
 11	5	5	testb 0@P`
 1	5	5	testatestb
 xa commit 'testb',0x2030405060,11;
+ERROR XAE04: XAER_NOTA: Unknown XID
 xa rollback 'testa','testb';
 xa start 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz';
 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
 select * from t1;
 a
 20
-40
 drop table t1;
diff --git a/mysql-test/t/alias.test b/mysql-test/t/alias.test
index cfa8ec7f18ab9972ec49b1d9c888148e155eca84..2746409c7e5e4c0ba0edbc15d8fefeee10c70760 100644
--- a/mysql-test/t/alias.test
+++ b/mysql-test/t/alias.test
@@ -86,3 +86,5 @@ UPDATE t1 SET t1.xstatus_vor = Greatest(t1.xstatus_vor,1) WHERE t1.aufnr =
 ASC LIMIT 1;
 
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test
index c3ba2c8a7a4ef7733d7fb290439db6b21f6e32a3..a237b21f403941eaaa90551a35d4789e3c1a5819 100644
--- a/mysql-test/t/alter_table.test
+++ b/mysql-test/t/alter_table.test
@@ -360,3 +360,5 @@ create table t1 ( a timestamp );
 --error 1089
 alter table t1 add unique ( a(1) );
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/analyse.test b/mysql-test/t/analyse.test
index f5523f832269b7370161adf27c2617d8ca627b57..2003feee163ac5ebb00dae445bb4ad60c6e8fe61 100644
--- a/mysql-test/t/analyse.test
+++ b/mysql-test/t/analyse.test
@@ -48,6 +48,8 @@ insert into t1 values ('abc'),('abc\'def\\hij\"klm\0opq'),('\''),('\"'),('\\'),(
 select * from t1 procedure analyse();
 drop table t1;
 
+# End of 4.1 tests
+
 #decimal-related test
 
 create table t1 (df decimal(5,1));
diff --git a/mysql-test/t/analyze.test b/mysql-test/t/analyze.test
index faf30279c68fd002beebd853ad097174e94658ca..3c3b3933bc35494d50af5b6f8629c80979678a70 100644
--- a/mysql-test/t/analyze.test
+++ b/mysql-test/t/analyze.test
@@ -1,16 +1,18 @@
 #
 # Bug #10901 Analyze Table on new table destroys table
 # This is minimal test case to get error
-# The problem was that analyze table wrote the shared state to the file and this
-# didn't include the inserts while locked. A check was needed to ensure that
-# state information was not updated when executing analyze table for a locked table.
-# The analyze table had to be within locks and check table had to be after unlocking
-# since then it brings the wrong state from disk rather than from the currently
-# correct internal state. The insert is needed since it changes the file state,
-# number of records.
-# The fix is to synchronise the state of the shared state and the current state before
-# calling mi_state_info_write
+# The problem was that analyze table wrote the shared state to the
+# file and this didn't include the inserts while locked. A check was
+# needed to ensure that state information was not updated when
+# executing analyze table for a locked table.  The analyze table had
+# to be within locks and check table had to be after unlocking since
+# then it brings the wrong state from disk rather than from the
+# currently correct internal state. The insert is needed since it
+# changes the file state, number of records.  The fix is to
+# synchronise the state of the shared state and the current state
+# before calling mi_state_info_write
 #
+
 create table t1 (a bigint);
 lock tables t1 write;
 insert into t1 values(0);
@@ -37,3 +39,4 @@ check table t1;
 
 drop table t1;
 
+# End of 4.1 tests
diff --git a/mysql-test/t/ansi.test b/mysql-test/t/ansi.test
index 9d235df5b46c6d86ec3a67a47b9601a42a04432d..444bf982b8a65c123075b2c9b2d19f36f5a6353b 100644
--- a/mysql-test/t/ansi.test
+++ b/mysql-test/t/ansi.test
@@ -25,3 +25,5 @@ SELECT id FROM t1 GROUP BY id2;
 drop table t1;
 
 SET @@SQL_MODE="";
+
+# End of 4.1 tests
diff --git a/mysql-test/t/archive.test b/mysql-test/t/archive.test
index a42a42b2a4e527d8e4b60866de1788eac871142a..d756bf765be19358d77efef90a61d7991f458eeb 100644
--- a/mysql-test/t/archive.test
+++ b/mysql-test/t/archive.test
@@ -1333,3 +1333,5 @@ INSERT DELAYED INTO t2 VALUES (4,011403,37,'intercepted','audiology','tinily',''
 # Cleanup, test is over
 #
 drop table t1, t2, t4;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/auto_increment.test b/mysql-test/t/auto_increment.test
index afc4c72205165696229fcd7478908b60ae49121a..b20fe80303db55d4063aacf22908ec17ff5400a1 100644
--- a/mysql-test/t/auto_increment.test
+++ b/mysql-test/t/auto_increment.test
@@ -219,6 +219,8 @@ INSERT INTO t1 (b) VALUES ('bbbb');
 CHECK TABLE t1;
 DROP TABLE IF EXISTS t1;
 
+# End of 4.1 tests
+
 #
 # Bug #11080 & #11005  Multi-row REPLACE fails on a duplicate key error
 # 
diff --git a/mysql-test/t/backup.test b/mysql-test/t/backup.test
index 8b3a46724aba06009d4499ea0acff3680d1bf89e..3034129ad4b2f704224611bd396e5fa045d1a42a 100644
--- a/mysql-test/t/backup.test
+++ b/mysql-test/t/backup.test
@@ -52,3 +52,5 @@ unlock tables;
 connection con1;
 reap;
 drop table t5;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/bdb-alter-table-1.test b/mysql-test/t/bdb-alter-table-1.test
index 18b6c70758f2ee39175b718c8389ca1c5028b6b5..9cb469a8df6c4587acbd045368638f36057f00cb 100644
--- a/mysql-test/t/bdb-alter-table-1.test
+++ b/mysql-test/t/bdb-alter-table-1.test
@@ -14,3 +14,5 @@ select * from t1;
 alter table t1 drop column test;
 
 # Now we do a reboot and continue with the next test
+
+# End of 4.1 tests
diff --git a/mysql-test/t/bdb-alter-table-2.test b/mysql-test/t/bdb-alter-table-2.test
index a474efe42e1e50dc72a9be55f975c14ee1ecaadc..15b8938a11d49f09858c8a68c2b2d1822af10467 100644
--- a/mysql-test/t/bdb-alter-table-2.test
+++ b/mysql-test/t/bdb-alter-table-2.test
@@ -6,3 +6,5 @@
 -- source include/have_bdb.inc
 select * from t1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/bdb-crash.test b/mysql-test/t/bdb-crash.test
index 3cd78821000b064b65a69f3d4c18f9c0023bc03a..75f4d04d5df4758649f202f3523d9a2907316e00 100644
--- a/mysql-test/t/bdb-crash.test
+++ b/mysql-test/t/bdb-crash.test
@@ -47,3 +47,5 @@ set autocommit=0;
 insert into t1 values(1);
 analyze table t1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/bdb-deadlock.test b/mysql-test/t/bdb-deadlock.test
index 5e6ca666cc2f3a35f1755a425e404a59e00d059c..88243cfc860dddefc5b9a9db33b1042402a34331 100644
--- a/mysql-test/t/bdb-deadlock.test
+++ b/mysql-test/t/bdb-deadlock.test
@@ -55,3 +55,5 @@ select * from t2;
 commit;
 
 drop table t1,t2;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/bdb-deadlock.tminus b/mysql-test/t/bdb-deadlock.tminus
index d86403fcffcfe3c8e30adcd3b7ec331b8f0c1695..3918a8ffe9d83636c85b2b427b57d356ad0200f4 100644
--- a/mysql-test/t/bdb-deadlock.tminus
+++ b/mysql-test/t/bdb-deadlock.tminus
@@ -55,3 +55,5 @@ select * from t2;
 commit;
 
 drop table t1,t2;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/bdb.test b/mysql-test/t/bdb.test
index f489531881843f0f92143c5810f51b10d1dd57f5..5e487bd80361a624ce6e660b9ef90554dc7ac4f0 100644
--- a/mysql-test/t/bdb.test
+++ b/mysql-test/t/bdb.test
@@ -400,7 +400,7 @@ drop table t1;
 set @a:=now();
 CREATE TABLE t1 (a int not null, b timestamp not null, primary key (a)) engine=bdb;
 insert into t1 (a) values(1),(2),(3);
-select t1.a from t1 natural join t1 as t2 where t1.b >= @a order by t1.a;
+select a from t1 natural join t1 as t2 where b >= @a order by a;
 update t1 set a=5 where a=1;
 select a from t1;
 drop table t1;
@@ -571,7 +571,7 @@ create temporary table tmp1
         select branch_id, target_id, platform_id, product_id
         from t1, t2, t3, t4 ;
 create temporary table tmp2 
-        select tmp1.branch_id, tmp1.target_id, tmp1.platform_id, tmp1.product_id 
+        select branch_id, target_id, platform_id, product_id 
         from tmp1 left join t8 
         using (branch_id,target_id,platform_id,product_id) 
         where t8.archive_id is null ;
@@ -937,6 +937,8 @@ SELECT id FROM t1 WHERE (list_id = 1) AND (term = "lettera");
 SELECT id FROM t1 WHERE (list_id = 1) AND (term = "letterd");
 DROP TABLE t1;
 
+# End of 4.1 tests
+
 #
 # alter temp table
 #
diff --git a/mysql-test/t/bdb_cache.test b/mysql-test/t/bdb_cache.test
index 401456711ac15f706e40f0598720218dd2ebc263..85328920d7129ede1f03d5d1c9c54fec3e43befd 100644
--- a/mysql-test/t/bdb_cache.test
+++ b/mysql-test/t/bdb_cache.test
@@ -49,3 +49,5 @@ show status like "Qcache_hits";
 commit;
 show status like "Qcache_queries_in_cache";
 drop table if exists t1, t2, t3;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/bench_count_distinct.test b/mysql-test/t/bench_count_distinct.test
index 3ffb95a69c24af8c77cbe4017e5c7244c905cd2b..131208f1fa146c695dfe4963d4c1f1715e2475a0 100644
--- a/mysql-test/t/bench_count_distinct.test
+++ b/mysql-test/t/bench_count_distinct.test
@@ -18,3 +18,5 @@ enable_query_log;
 select count(distinct n) from t1;
 explain extended select count(distinct n) from t1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/bigint.test b/mysql-test/t/bigint.test
index 99c8a13d0b56e2db4c37337e07ec551005768f1a..5f21d2b581339d5604bcc177edf37a2f7b83f733 100644
--- a/mysql-test/t/bigint.test
+++ b/mysql-test/t/bigint.test
@@ -14,6 +14,9 @@ select +9999999999999999999,-9999999999999999999;
 select cast(9223372036854775808 as unsigned)+1;
 select 9223372036854775808+1;
 select -(0-3),round(-(0-3)), round(9999999999999999999);
+select 1,11,101,1001,10001,100001,1000001,10000001,100000001,1000000001,10000000001,100000000001,1000000000001,10000000000001,100000000000001,1000000000000001,10000000000000001,100000000000000001,1000000000000000001,10000000000000000001;
+select -1,-11,-101,-1001,-10001,-100001,-1000001,-10000001,-100000001,-1000000001,-10000000001,-100000000001,-1000000000001,-10000000000001,-100000000000001,-1000000000000001,-10000000000000001,-100000000000000001,-1000000000000000001,-10000000000000000001;
+select conv(1,10,16),conv((1<<2)-1,10,16),conv((1<<10)-2,10,16),conv((1<<16)-3,10,16),conv((1<<25)-4,10,16),conv((1<<31)-5,10,16),conv((1<<36)-6,10,16),conv((1<<47)-7,10,16),conv((1<<48)-8,10,16),conv((1<<55)-9,10,16),conv((1<<56)-10,10,16),conv((1<<63)-11,10,16);
 
 #
 # In 3.23 we have to disable the test of column to bigint as
@@ -104,6 +107,8 @@ t2.value64=t1.value64;
 
 drop table t1, t2;
 
+# End of 4.1 tests
+
 #
 # Test of CREATE ... SELECT and unsigned integers
 #
diff --git a/mysql-test/t/binary.test b/mysql-test/t/binary.test
index 54ad8e922373b23c8ff4f1c6d1553115ad3a4423..02773b323029598bc08f74677c9308be35f7b5ab 100644
--- a/mysql-test/t/binary.test
+++ b/mysql-test/t/binary.test
@@ -87,3 +87,5 @@ drop table t1;
 create table t1 (a binary);
 show create table t1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/blackhole.test b/mysql-test/t/blackhole.test
index d1fcfc971a9f645df2857039bb06be6db4cfe918..257770d311cf3011d73f7fa30ba769dc83d05856 100644
--- a/mysql-test/t/blackhole.test
+++ b/mysql-test/t/blackhole.test
@@ -125,3 +125,5 @@ let $VERSION=`select version()`;
 show binlog events;
 
 drop table t1,t2,t3;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/bool.test b/mysql-test/t/bool.test
index 53230dd5fa3356c110b0727984fda29320418606..34c51c648d38e4264cf1269de2b32e5f43dcc1fb 100644
--- a/mysql-test/t/bool.test
+++ b/mysql-test/t/bool.test
@@ -58,3 +58,5 @@ select ifnull(A, 'N') as A, ifnull(B, 'N') as B, ifnull(not A, 'N') as nA, ifnul
 select ifnull(A=1, 'N') as A, ifnull(B=1, 'N') as B, ifnull(not (A=1), 'N') as nA, ifnull(not (B=1), 'N') as nB, ifnull((A=1) and (B=1), 'N') as AB, ifnull(not ((A=1) and (B=1)), 'N') as `n(AB)`, ifnull((not (A=1) or not (B=1)), 'N') as nAonB, ifnull((A=1) or (B=1), 'N') as AoB, ifnull(not((A=1) or (B=1)), 'N') as `n(AoB)`, ifnull(not (A=1) and not (B=1), 'N') as nAnB from t1;
 
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/bulk_replace.test b/mysql-test/t/bulk_replace.test
index 755d34083f82b8a5942360f924ede8ef0b8250f6..4e567c431040f69945eae9e91447b6d1d0a2e4c2 100644
--- a/mysql-test/t/bulk_replace.test
+++ b/mysql-test/t/bulk_replace.test
@@ -11,3 +11,4 @@ select * from t1;
 check table t1;
 drop table t1;
 
+# End of 4.1 tests
diff --git a/mysql-test/t/case.test b/mysql-test/t/case.test
index e942333d5fef70c647c012d4692286aa2fc94a78..555e34d5cf25ab564a375ad008d5a85df7b33e8e 100644
--- a/mysql-test/t/case.test
+++ b/mysql-test/t/case.test
@@ -122,6 +122,9 @@ SELECT 'case+union+test'
 UNION 
 SELECT CASE '1' WHEN '2' THEN 'BUG' ELSE 'nobug' END;
 
+# End of 4.1 tests
+
+
 #
 # Tests for bug #9939: conversion of the arguments for COALESCE and IFNULL
 #
diff --git a/mysql-test/t/cast.test b/mysql-test/t/cast.test
index 356b69daf380930b02a3a46509ebed199240f46d..2049c17580eb00eebe8580da463a17ca3ce5ca3b 100644
--- a/mysql-test/t/cast.test
+++ b/mysql-test/t/cast.test
@@ -156,6 +156,9 @@ select cast(concat('184467440','73709551615') as signed);
 select cast(repeat('1',20) as unsigned);
 select cast(repeat('1',20) as signed);
 
+# End of 4.1 tests
+
+
 #decimal-related additions
 select cast('1.2' as decimal(3,2));
 select 1e18 * cast('1.2' as decimal(3,2));
diff --git a/mysql-test/t/check.test b/mysql-test/t/check.test
index c502655818db60e570fdd87f47649cf0c0bab643..8d9d70bd29a38c32e753534fa83a5417dac395d2 100644
--- a/mysql-test/t/check.test
+++ b/mysql-test/t/check.test
@@ -22,6 +22,8 @@ connection con1;
 reap;
 drop table t1;
 
+# End of 4.1 tests
+
 #
 # Bug #9897  Views: 'Check Table' crashes MySQL, with a view and a table 
 # in the statement
diff --git a/mysql-test/t/comments.test b/mysql-test/t/comments.test
index 087df60f3f50306125531335261f7e81cd89c90b..52273ec9523bb73767f84e8eea94b7d6d696d88f 100644
--- a/mysql-test/t/comments.test
+++ b/mysql-test/t/comments.test
@@ -17,3 +17,5 @@ select 1 --2
 select 1 # The rest of the row will be ignored
 ;
 /* line with only comment */;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/compare.test b/mysql-test/t/compare.test
index bc20786227bd301aa0d762ced5ffc3df76025f5b..a42ba5ac88adfa2b7cd776395b386a2b73a02521 100644
--- a/mysql-test/t/compare.test
+++ b/mysql-test/t/compare.test
@@ -35,3 +35,5 @@ DROP TABLE t1;
 SELECT CHAR(31) = '', '' = CHAR(31);
 # Extra test
 SELECT CHAR(30) = '', '' = CHAR(30);
+
+# End of 4.1 tests
diff --git a/mysql-test/t/connect.test b/mysql-test/t/connect.test
index 5d2d53a2a90dc719a8de4270ed3c7f9a95ba3609..64b170970ca26231211b3ee8c5d59df7507dcc54 100644
--- a/mysql-test/t/connect.test
+++ b/mysql-test/t/connect.test
@@ -76,3 +76,5 @@ show tables;
 
 delete from mysql.user where user=_binary"test";
 flush privileges;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/consistent_snapshot.test b/mysql-test/t/consistent_snapshot.test
index 7afdae363257475a7c8b69758378075de4ccbad7..8da8e9ce660c270008007b284bcc12fb51546130 100644
--- a/mysql-test/t/consistent_snapshot.test
+++ b/mysql-test/t/consistent_snapshot.test
@@ -39,3 +39,5 @@ select * from t1; # if consistent snapshot was not set, as expected, we
 commit;
 
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/constraints.test b/mysql-test/t/constraints.test
index dbc34a0dff16473dc3956b689337732047551518..ed268ab5846c15d06b16009939a3b77784e2a67c 100644
--- a/mysql-test/t/constraints.test
+++ b/mysql-test/t/constraints.test
@@ -27,3 +27,5 @@ alter table t1 add constraint unique key_1(a);
 alter table t1 add constraint constraint_2 unique key_2(a);
 show create table t1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/count_distinct.test b/mysql-test/t/count_distinct.test
index be67026e268f4f28c61516232b20dbefb6e454ff..e63bdabdb95f709e5fc863776ef08c587ec449fd 100644
--- a/mysql-test/t/count_distinct.test
+++ b/mysql-test/t/count_distinct.test
@@ -55,6 +55,8 @@ create table t1 (f int);
 select count(distinct f) from t1;
 drop table t1;
 
+# End of 4.1 tests
+
 #
 # Bug #6515
 #
diff --git a/mysql-test/t/count_distinct2.test b/mysql-test/t/count_distinct2.test
index 2b982e3e6207b6475594d31713b77f47d2ccd272..8dcb2a70065f1b5b5b2b7dbb8b6fc66a632e7521 100644
--- a/mysql-test/t/count_distinct2.test
+++ b/mysql-test/t/count_distinct2.test
@@ -79,3 +79,4 @@ select count(distinct s) from t1;
 show status like 'Created_tmp_disk_tables';
 drop table t1;
 
+# End of 4.1 tests
diff --git a/mysql-test/t/count_distinct3.test b/mysql-test/t/count_distinct3.test
index 9d2bb0d139a9729c9e87670f5e5e4c305b27229d..52a4f271dac2b9585c973ec3622272718840f926 100644
--- a/mysql-test/t/count_distinct3.test
+++ b/mysql-test/t/count_distinct3.test
@@ -56,3 +56,5 @@ SELECT COUNT(DISTINCT id) FROM t1 GROUP BY grp;
 DROP TABLE t1;
 
 set @@read_buffer_size=default;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test
index d870ff368d3f9e8e206f829f7f58edf538f2d947..bc281d1e0274c906af4f747be5cd32e9ef8da367 100644
--- a/mysql-test/t/create.test
+++ b/mysql-test/t/create.test
@@ -39,7 +39,7 @@ drop table if exists t1;
 --error 1075
 create table t1 (ordid int(8) not null auto_increment, ord  varchar(50) not null, primary key (ord,ordid)) engine=heap;
 
--- error 1044,1
+-- error 1049
 create table not_existing_database.test (a int);
 --error 1103
 create table `a/a` (a int);
@@ -305,7 +305,7 @@ select * from t2;
 create table t3 like t1;
 --error 1050
 create table t3 like mysqltest.t3;
---error ER_DBACCESS_DENIED_ERROR,1
+--error 1049
 create table non_existing_database.t1 like t1;
 --error 1051
 create table t3 like non_existing_table;
@@ -514,3 +514,15 @@ create table test.t1 like x;
 --disable_warnings
 drop table if exists test.t1;
 --enable_warnings
+
+#
+# Bug #6859: Bogus error message on attempt to CREATE TABLE t LIKE view
+#
+create database mysqltest;
+use mysqltest;
+create view v1 as select 'foo' from dual;
+--error 1347
+create table t1 like v1;
+drop view v1;
+drop database mysqltest;
+# End of 4.1 tests
diff --git a/mysql-test/t/create_select_tmp.test b/mysql-test/t/create_select_tmp.test
index d81a3799d9887042b3a790d03029e125b3f81775..2e4c0f22997a6b143de3bef510d2ae58a0f49ba8 100644
--- a/mysql-test/t/create_select_tmp.test
+++ b/mysql-test/t/create_select_tmp.test
@@ -27,3 +27,5 @@ select * from t2;
 CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1;
 --error 1146;
 select * from t2;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/csv.test b/mysql-test/t/csv.test
index 591fab3961a02e7129f07a451ad4f7d817b421fc..2ac46d75f9a8f0aea8f789f3fd868d9b79d0d72d 100644
--- a/mysql-test/t/csv.test
+++ b/mysql-test/t/csv.test
@@ -1313,3 +1313,5 @@ INSERT INTO t1 VALUES (9410,9412);
 select period from t1;
 
 drop table if exists t1,t2,t3,t4;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ctype_big5.test b/mysql-test/t/ctype_big5.test
index da31a8f324548aa8544dcb1517305f7aa2ea4db5..73d9f06042c7e6a4ef23f3b498dc5fde4a0e1e59 100644
--- a/mysql-test/t/ctype_big5.test
+++ b/mysql-test/t/ctype_big5.test
@@ -27,3 +27,13 @@ CREATE TABLE t1 (a text) character set big5;
 INSERT INTO t1 VALUES ('ùØ');
 SELECT * FROM t1;
 DROP TABLE t1;
+
+#
+# BUG#12075 - FULLTEXT non-functional for big5 strings
+#
+CREATE TABLE t1 (a CHAR(50) CHARACTER SET big5 NOT NULL, FULLTEXT(a));
+INSERT INTO t1 VALUES(0xA741ADCCA66EB6DC20A7DAADCCABDCA66E);
+SELECT HEX(a) FROM t1 WHERE MATCH(a) AGAINST (0xA741ADCCA66EB6DC IN BOOLEAN MODE);
+DROP TABLE t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ctype_collate.test b/mysql-test/t/ctype_collate.test
index b65067a36cf2ccfcc75f308d856dd178d10ecee0..e59693680bf7903c2b17f46457c8145adc81d0be 100644
--- a/mysql-test/t/ctype_collate.test
+++ b/mysql-test/t/ctype_collate.test
@@ -206,3 +206,5 @@ EXPLAIN SELECT * FROM t1 WHERE s1 LIKE 'a' COLLATE latin1_german1_ci;
 EXPLAIN SELECT * FROM t1 WHERE s2 LIKE 'a' COLLATE latin1_german1_ci;
 
 DROP TABLE t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ctype_cp1250_ch.test b/mysql-test/t/ctype_cp1250_ch.test
index 814da628fb7ba9d353e3483344e2d4f062b38f49..ea4b35a44a3e297f8f70359cb569a9191ff7b8ba 100644
--- a/mysql-test/t/ctype_cp1250_ch.test
+++ b/mysql-test/t/ctype_cp1250_ch.test
@@ -22,3 +22,5 @@ INSERT INTO t1 VALUES ('2005-01-1');
 SELECT * FROM t1 WHERE popisek = '2005-01-1';
 SELECT * FROM t1 WHERE popisek LIKE '2005-01-1';
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ctype_cp1251.test b/mysql-test/t/ctype_cp1251.test
index 76873e6fa0e3d50582dea789995f466b302907b4..1aafe7b7266218c0037c4efac907f8a96baee768 100644
--- a/mysql-test/t/ctype_cp1251.test
+++ b/mysql-test/t/ctype_cp1251.test
@@ -46,3 +46,5 @@ insert into t1 (a) values ('air'),
 
 select * from t1 where a like 'we_%';
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ctype_create.test b/mysql-test/t/ctype_create.test
index e97017ab416cbd4e973a02d5457969325709aa26..e88004bbb8c4094409e9363795a6cc55b079ad92 100644
--- a/mysql-test/t/ctype_create.test
+++ b/mysql-test/t/ctype_create.test
@@ -98,3 +98,5 @@ show create database mysqltest2;
 drop database mysqltest2;
 --error 1046
 ALTER DATABASE DEFAULT CHARACTER SET latin2;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ctype_gbk.test b/mysql-test/t/ctype_gbk.test
new file mode 100644
index 0000000000000000000000000000000000000000..2210891454e6fbde8772568dcf1cd139b13ad242
--- /dev/null
+++ b/mysql-test/t/ctype_gbk.test
@@ -0,0 +1,32 @@
+-- source include/have_gbk.inc
+
+#
+# Tests with the gbk character set
+#
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+SET @test_character_set= 'gbk';
+SET @test_collation= 'gbk_chinese_ci';
+-- source include/ctype_common.inc
+
+SET NAMES gbk;
+SET collation_connection='gbk_chinese_ci';
+-- source include/ctype_filesort.inc
+-- source include/ctype_innodb_like.inc
+SET collation_connection='gbk_bin';
+-- source include/ctype_filesort.inc
+-- source include/ctype_innodb_like.inc
+
+#
+# Bug#11987 mysql will truncate the text when
+# the text contain GBK char:"0xA3A0" and "0xA1"
+#
+SET NAMES gbk;
+CREATE TABLE t1 (a text) character set gbk;
+INSERT INTO t1 VALUES (0xA3A0),(0xA1A1);
+SELECT hex(a) FROM t1 ORDER BY a;
+DROP TABLE t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ctype_latin1.test b/mysql-test/t/ctype_latin1.test
index 6006ee4c5277748cb4a3fe079d22fd6141400d38..1b83373da298268ce849b64798e37e0d3ae41b89 100644
--- a/mysql-test/t/ctype_latin1.test
+++ b/mysql-test/t/ctype_latin1.test
@@ -75,3 +75,5 @@ SET collation_connection='latin1_bin';
 --error 1064
 CREATE TABLE „a (a int);
 SELECT '„a' as str;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ctype_latin1_de.test b/mysql-test/t/ctype_latin1_de.test
index 88eb840a78742d8794dabbc7bdaa2b000fce6537..d6a11a22857946a39f5b34e181d9e8d51e07747f 100644
--- a/mysql-test/t/ctype_latin1_de.test
+++ b/mysql-test/t/ctype_latin1_de.test
@@ -133,6 +133,8 @@ ALTER TABLE t1 ADD KEY ifword(col1);
 SELECT * FROM t1 WHERE col1='ß' ORDER BY col1, BINARY col1;
 DROP TABLE t1;
 
+# End of 4.1 tests
+
 #
 # Bug#9509
 #
diff --git a/mysql-test/t/ctype_latin2.test b/mysql-test/t/ctype_latin2.test
index cc232adeaec9e00e9a87e3951c2bc58d1a4faa7d..676b472e7b818a2e8dedf30e200be7d7598efc37 100644
--- a/mysql-test/t/ctype_latin2.test
+++ b/mysql-test/t/ctype_latin2.test
@@ -48,3 +48,5 @@ a, lower(a) l, upper(a) u from t1 order by ha;
 #
 SELECT group_concat(a collate latin2_croatian_ci order by binary a) from t1 group by a collate latin2_croatian_ci;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ctype_many.test b/mysql-test/t/ctype_many.test
index 454e2c63cbb930e1b57abe41e11b4459711b1f41..22e844c68682cda0f402d4c51f7e8f368d0800db 100644
--- a/mysql-test/t/ctype_many.test
+++ b/mysql-test/t/ctype_many.test
@@ -209,3 +209,5 @@ SET CHARACTER SET 'binary';
 SELECT * FROM t1;
 SELECT min(comment),count(*) FROM t1 GROUP BY ucs2_f;
 DROP TABLE t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ctype_mb.test b/mysql-test/t/ctype_mb.test
index b0ccab8e34546799e6df86d56145bc0829fda5c6..6e369e3fa0b0fe1618b912a5b720ae045edd7a72 100644
--- a/mysql-test/t/ctype_mb.test
+++ b/mysql-test/t/ctype_mb.test
@@ -24,3 +24,5 @@ ALTER TABLE t1 CHANGE a a CHAR(4) CHARACTER SET utf8;
 SHOW CREATE TABLE t1;
 SHOW KEYS FROM t1;
 DROP TABLE t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ctype_recoding.test b/mysql-test/t/ctype_recoding.test
index 0e5e954c72048829a8de7eedbda51b2e403f88ad..9949ef88da48f1e6175c40a3b79fd0c965811487 100644
--- a/mysql-test/t/ctype_recoding.test
+++ b/mysql-test/t/ctype_recoding.test
@@ -179,3 +179,5 @@ select rpad(c1,3,'
 # TODO
 #select case c1 when 'ß' then 'ß' when 'ö' then 'ö' else 'c' end from t1;
 #select export_set(5,c1,'ö'), export_set(5,'ö',c1) from t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ctype_sjis.test b/mysql-test/t/ctype_sjis.test
index 9b53d448374680860f9f40386e89532f46b6fbf7..252f0a0b6c86b97d2594fd3a878710645c8632d8 100644
--- a/mysql-test/t/ctype_sjis.test
+++ b/mysql-test/t/ctype_sjis.test
@@ -77,3 +77,5 @@ SET collation_connection='sjis_bin';
 --character_set sjis
 SET NAMES sjis;
 SELECT HEX('²“‘@\Œ\') FROM DUAL;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ctype_tis620.test b/mysql-test/t/ctype_tis620.test
index 87047db9b5470ab0417c48ed56c7e44574ea85c0..d649828eda3cb17d94454383fd2f72339c233fa8 100644
--- a/mysql-test/t/ctype_tis620.test
+++ b/mysql-test/t/ctype_tis620.test
@@ -157,3 +157,5 @@ SET collation_connection='tis620_thai_ci';
 -- source include/ctype_filesort.inc
 SET collation_connection='tis620_bin';
 -- source include/ctype_filesort.inc
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ctype_uca.test b/mysql-test/t/ctype_uca.test
index e5c2acc8b4ec57f85c986bc5a8f8c223951a425a..098ea33c6b2bfeb7c602367c1d1e352b3362bc81 100644
--- a/mysql-test/t/ctype_uca.test
+++ b/mysql-test/t/ctype_uca.test
@@ -456,6 +456,8 @@ drop table t1;
 SET collation_connection='utf8_unicode_ci';
 -- source include/ctype_filesort.inc
 
+# End of 4.1 tests
+
 #
 # Check UPPER/LOWER changeing length
 #
diff --git a/mysql-test/t/ctype_ucs.test b/mysql-test/t/ctype_ucs.test
index d032c1249dfb41a0ed7c58c5d794dff121fdb33d..668edb3fafe858faaceb43d6fa19a593521b0dd9 100644
--- a/mysql-test/t/ctype_ucs.test
+++ b/mysql-test/t/ctype_ucs.test
@@ -419,6 +419,8 @@ insert into t1 values (0x005b);
 select hex(a) from t1;
 drop table t1;
 
+# End of 4.1 tests
+
 #
 # Conversion from an UCS2 string to a decimal column
 #
diff --git a/mysql-test/t/ctype_ucs_binlog.test b/mysql-test/t/ctype_ucs_binlog.test
index 226f128c1c2082f8981ca031faf416e5f73498f6..1ce55edd469c101b4702d5329a38ba5a5219015d 100644
--- a/mysql-test/t/ctype_ucs_binlog.test
+++ b/mysql-test/t/ctype_ucs_binlog.test
@@ -17,4 +17,4 @@ show binlog events from 98;
 --exec $MYSQL_BINLOG --short-form $MYSQL_TEST_DIR/var/log/master-bin.000001 
 drop table t2;
 
-
+# End of 4.1 tests
diff --git a/mysql-test/t/ctype_ujis.test b/mysql-test/t/ctype_ujis.test
index 8657d5eaa86a7988e1306fb85cf615344ca81941..88386500c9f88a15301c2bfa34161f39640ebf5e 100644
--- a/mysql-test/t/ctype_ujis.test
+++ b/mysql-test/t/ctype_ujis.test
@@ -1149,3 +1149,5 @@ SET collation_connection='ujis_japanese_ci';
 SET collation_connection='ujis_bin';
 -- source include/ctype_filesort.inc
 -- source include/ctype_innodb_like.inc
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test
index b361b05633291b3d62f09763599b4f654a13a210..ce259f465d93de0505ec8a2fa6604b14aac478f0 100644
--- a/mysql-test/t/ctype_utf8.test
+++ b/mysql-test/t/ctype_utf8.test
@@ -843,6 +843,8 @@ insert into t1 values (_utf8 0x5b);
 select hex(a) from t1;
 drop table t1;
 
+# End of 4.1 tests
+
 #
 # Test for bug #11484: wrong results for a DISTINCT varchar column in uft8. 
 #
diff --git a/mysql-test/t/date_formats.test b/mysql-test/t/date_formats.test
index e8bd8965b9695504c7877cb98376809c2a28e07c..f76f51fd12dfe8f6d7cca7a847c9852c4bfaf7cc 100644
--- a/mysql-test/t/date_formats.test
+++ b/mysql-test/t/date_formats.test
@@ -260,3 +260,5 @@ select str_to_date("2003-01-02 10:11:12.0012ABCD", "%Y-%m-%d %H:%i:%S.%f") as f1
 select str_to_date("2003-04-05  g", "%Y-%m-%d") as f1,
        str_to_date("2003-04-05 10:11:12.101010234567", "%Y-%m-%d %H:%i:%S.%f") as f2;
 --enable_ps_protocol
+
+# End of 4.1 tests
diff --git a/mysql-test/t/delayed.test b/mysql-test/t/delayed.test
index 513de99016517bcafb3a71534a72ceeca0e9a50a..ca34cc020f34ae14a0dd1a4660d42c594bc1e3df 100644
--- a/mysql-test/t/delayed.test
+++ b/mysql-test/t/delayed.test
@@ -36,3 +36,14 @@ insert delayed into t1 values (3,"this will give an","error");
 show status like 'not_flushed_delayed_rows';
 select * from t1;
 drop table t1;
+
+# End of 4.1 tests
+
+#
+# Bug #12226: Crash when a delayed insert fails due to a duplicate key
+#
+create table t1 (a int not null primary key);
+insert into t1 values (1);
+insert delayed into t1 values (1);
+select * from t1;
+drop table t1;
diff --git a/mysql-test/t/delete.test b/mysql-test/t/delete.test
index 265089adfa2f3750dd13652065fea400d728da92..4284bd2a06d1b04dfef29f426db7373142a1ea10 100644
--- a/mysql-test/t/delete.test
+++ b/mysql-test/t/delete.test
@@ -153,6 +153,8 @@ DELETE FROM t1 WHERE t1.a > 0 ORDER BY t1.a LIMIT 1;
 SELECT * FROM t1;
 DROP TABLE t1;
 
+# End of 4.1 tests
+
 #
 # Test of multi-delete where we are not scanning the first table
 #
diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test
index 1e3ffd5160b49e70a73bb0be0680bbb09e00c7f2..f52e12849e4459705e65c491d070d6f6d958c7fe 100644
--- a/mysql-test/t/derived.test
+++ b/mysql-test/t/derived.test
@@ -42,7 +42,7 @@ CREATE TABLE t2 (a int not null);
 insert into t2 values(1);
 select * from (select * from t1 where t1.a=(select a from t2 where t2.a=t1.a)) a;
 select * from (select * from t1 where t1.a=(select t2.a from t2 where t2.a=t1.a) union select t1.a, t1.b from t1) a;
-explain select * from (select * from t1,t2 where t1.a=t2.a) t1;
+explain select * from (select t1.*, t2.a as t2a from t1,t2 where t1.a=t2.a) t1;
 drop table t1, t2;
 create table t1(a int not null, t char(8), index(a));
 disable_query_log;
@@ -248,3 +248,14 @@ insert into t3 values(3),(3);
 select * from t1 union distinct select * from t2 union all select * from t3;
 select * from (select * from t1 union distinct select * from t2 union all select * from t3) X;
 drop table t1, t2, t3;
+
+#
+# Bug #11864 non unique names are allowed in subquery
+#
+create table t1 (a int);
+create table t2 (a int);
+--error 1060
+select * from (select * from t1,t2) foo;
+drop table t1,t2;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/dirty_close.test b/mysql-test/t/dirty_close.test
index f965df8cfea4cb553f0f53b9fc280f1c4f14222a..f1c2c88ae830c8ab2c61f98f532778e10e56fd77 100644
--- a/mysql-test/t/dirty_close.test
+++ b/mysql-test/t/dirty_close.test
@@ -12,3 +12,5 @@ create table t1 (n int);
 insert into t1 values (1),(2),(3);
 select * from t1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def
index 7d397ff21126b02a6e06b1938601e337d7d48a78..60543fe55f91bede3b79990d19ce58b54b5054e3 100644
--- a/mysql-test/t/disabled.def
+++ b/mysql-test/t/disabled.def
@@ -11,4 +11,4 @@
 ##############################################################################
 
 sp-goto:GOTO is currently is disabled - will be fixed in the future
-ndb_condition_pushdown:Bug #12021
+
diff --git a/mysql-test/t/distinct.test b/mysql-test/t/distinct.test
index 057c9bd9239d4606792eeb886e6505fc7e2907d1..562926d160ccb2949115f8e7df7d0a9311b922db 100644
--- a/mysql-test/t/distinct.test
+++ b/mysql-test/t/distinct.test
@@ -340,3 +340,5 @@ create table t1 (id int, dsc varchar(50));
 insert into t1 values (1, "line number one"), (2, "line number two"), (3, "line number three");
 select distinct id, IFNULL(dsc, '-') from t1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/drop.test b/mysql-test/t/drop.test
index 5e123ca0de893c73071ceb3f046bfc4382c63c01..2cd7866caf57e72e398f4e0f0675317eb0322c76 100644
--- a/mysql-test/t/drop.test
+++ b/mysql-test/t/drop.test
@@ -79,3 +79,5 @@ unlock tables;
 create table t1(n int);
 show tables;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/drop_temp_table.test b/mysql-test/t/drop_temp_table.test
index dbe7959acb2f8822fb6a5771200e2e758423f7a5..38c13e3e5e43007e1917d86256a14b84cdc44c71 100644
--- a/mysql-test/t/drop_temp_table.test
+++ b/mysql-test/t/drop_temp_table.test
@@ -23,3 +23,5 @@ let $VERSION=`select version()`;
 --replace_column 2 # 5 #
 show binlog events;
 drop database `drop-temp+table-test`;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/empty_table.test b/mysql-test/t/empty_table.test
index db0a8e6a24714395ce72457f793f0eedd1f3cdb7..e8e532832f4f5efeb1cf83ed37dd8d1e447dac6b 100644
--- a/mysql-test/t/empty_table.test
+++ b/mysql-test/t/empty_table.test
@@ -11,3 +11,5 @@ select count(*) from t1;
 select * from t1;
 select * from t1 limit 0;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/endspace.test b/mysql-test/t/endspace.test
index 3d27c44c3b93cdd5b8352d8ebc5514c0574f8272..c4d53450910b52054726020f387a908d879cfc08 100644
--- a/mysql-test/t/endspace.test
+++ b/mysql-test/t/endspace.test
@@ -94,3 +94,5 @@ select text1, length(text1) from t1 where text1='teststring' or text1 like 'test
 select text1, length(text1) from t1 where text1='teststring' or text1 >= 'teststring\t';
 select concat('|', text1, '|') from t1 order by text1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/errors.test b/mysql-test/t/errors.test
index b558c90b0c67b634b5618d78b68e686d29eaf6db..f5647a293e8aa9052be80d0b80a8b05de32e7529 100644
--- a/mysql-test/t/errors.test
+++ b/mysql-test/t/errors.test
@@ -14,9 +14,9 @@ update t1 set a=1;
 create table t1 (a int);
 --error 1054
 select count(test.t1.b) from t1;
---error 1109
+--error 1054
 select count(not_existing_database.t1) from t1;
---error 1109
+--error 1054
 select count(not_existing_database.t1.a) from t1;
 --error 1044,1146
 select count(not_existing_database.t1.a) from not_existing_database.t1;
@@ -29,3 +29,16 @@ select 1 from t1 order by t1.b;
 --error 1054
 select count(*),b from t1;
 drop table t1;
+
+# End of 4.1 tests
+
+#
+# Bug #6080: Error message for a field with a display width that is too long
+#
+--error 1439
+create table t1 (a int(256));
+set sql_mode='traditional';
+--error 1074
+create table t1 (a varchar(66000));
+
+# End of 5.0 tests
diff --git a/mysql-test/t/exampledb.test b/mysql-test/t/exampledb.test
index c60a9d7f93028b9e8e14c6752a92efc0e807e85f..946d25325dc99797aebaa995cb9217e329971341 100644
--- a/mysql-test/t/exampledb.test
+++ b/mysql-test/t/exampledb.test
@@ -14,3 +14,5 @@ CREATE TABLE t1 (
 ) ENGINE=example;
 
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/explain.test b/mysql-test/t/explain.test
index 050939e5ad2513c0c04e72a33d1c35022cae228d..2a3a23c5f961c6596d5df84a0f0a7a365979be23 100644
--- a/mysql-test/t/explain.test
+++ b/mysql-test/t/explain.test
@@ -41,3 +41,5 @@ insert into 
 explain select ËÏÌ0 from ÔÁÂ where ËÏÌ0=1;
 drop table ÔÁÂ;
 set names latin1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/flush.test b/mysql-test/t/flush.test
index 62af9d4932bbaed01de3ff56b5bad1a040cbf978..f5fd9fcadf27107edb3706f75663237decf52c53 100644
--- a/mysql-test/t/flush.test
+++ b/mysql-test/t/flush.test
@@ -69,3 +69,36 @@ connection con2;
 insert into t1 values (345);
 select * from t1;
 drop table t1;
+
+#
+# Bug#9459 - deadlock with flush with lock, and lock table write
+#
+create table t1 (c1 int);
+lock table t1 write;
+# Cannot get the global read lock with write locked tables.
+--error 1192
+flush tables with read lock;
+lock table t1 read;
+# Can get the global read lock with read locked tables.
+flush tables with read lock;
+--error 1223
+lock table t1 write;
+lock table t1 read;
+--error 1223
+lock table t1 write;
+# Release all table locks and the global read lock.
+unlock tables;
+create table t2 (c1 int);
+create table t3 (c1 int);
+lock table t1 read, t2 read, t3 write;
+# Cannot get the global read lock with write locked tables.
+--error 1192
+flush tables with read lock;
+lock table t1 read, t2 read, t3 read;
+# Can get the global read lock with read locked tables.
+flush tables with read lock;
+# Release all table locks and the global read lock.
+unlock tables;
+drop table t1, t2, t3;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/flush_block_commit.test b/mysql-test/t/flush_block_commit.test
index 29ef7b8a0b97e9fcb54be4ca1124030251604ccc..ebb48242a4da158ca84962771ad08fbae2373f1b 100644
--- a/mysql-test/t/flush_block_commit.test
+++ b/mysql-test/t/flush_block_commit.test
@@ -77,6 +77,8 @@ show create database test;
 
 drop table t1;
 
+# End of 4.1 tests
+
 # FLUSH TABLES WITH READ LOCK should block writes to binlog too
 connection con1;
 create table t1 (a int) engine=innodb;
diff --git a/mysql-test/t/flush_table.test b/mysql-test/t/flush_table.test
index afb30d21da7723f232f5a33c409478e76e279a72..e46b67ad3d0f5fe734335c215729b16e50e9395f 100644
--- a/mysql-test/t/flush_table.test
+++ b/mysql-test/t/flush_table.test
@@ -72,3 +72,12 @@ handler t1 read next limit 1;
 handler t1 read next limit 1;
 handler t1 close;
 drop table t1;
+
+#
+# Bug #11934 Two sequential FLUSH TABLES WITH READ LOCK hangs client
+#
+FLUSH TABLES WITH READ LOCK ;
+FLUSH TABLES WITH READ LOCK ;
+UNLOCK TABLES;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/foreign_key.test b/mysql-test/t/foreign_key.test
index 8c35fd65f744e3672399e01f6c401aeee18f6fae..0a3708e6dc8d013f7f00486f6fcaee8953473a39 100644
--- a/mysql-test/t/foreign_key.test
+++ b/mysql-test/t/foreign_key.test
@@ -21,3 +21,5 @@ create table t1 (
 create index a on t1 (a);
 create unique index b on t1 (a,b);
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test
index 3c4d5dc93daa29fb79be7efa28772c2ae3c649db..08648f4e0a650dce61f4e86e404c4515a32ed93e 100644
--- a/mysql-test/t/fulltext.test
+++ b/mysql-test/t/fulltext.test
@@ -128,14 +128,14 @@ WHERE ticket2.id = ttxt.ticket AND t1.id = ticket2.ticket and
 match(ttxt.inhalt) against ('foobar');
 
 # In the following query MySQL didn't use the fulltext index
-select t1.id FROM t2 as ttxt,t1 INNER JOIN t1 as ticket2 ON
-ticket2.id = ttxt.ticket
-WHERE t1.id = ticket2.ticket and match(ttxt.inhalt) against ('foobar');
+select ticket2.id FROM t2 as ttxt,t2 INNER JOIN t1 as ticket2 ON
+ticket2.id = t2.ticket
+WHERE ticket2.id = ticket2.ticket and match(ttxt.inhalt) against ('foobar');
 
 INSERT INTO t1 VALUES (3,3);
-select t1.id FROM t2 as ttxt,t1
-INNER JOIN t1 as ticket2 ON ticket2.id = ttxt.ticket
-WHERE t1.id = ticket2.ticket and
+select ticket2.id FROM t2 as ttxt,t2
+INNER JOIN t1 as ticket2 ON ticket2.id = t2.ticket
+WHERE ticket2.id = ticket2.ticket and
       match(ttxt.inhalt) against ('foobar');
 
 # Check that we get 'fulltext' index in SHOW CREATE
@@ -338,3 +338,16 @@ SET NAMES latin1;
 INSERT INTO t1 VALUES('Mit freundlichem Grüß aus Osnabrück');
 SELECT COUNT(*) FROM t1 WHERE MATCH(t) AGAINST ('"osnabrück"' IN BOOLEAN MODE);
 DROP TABLE t1;
+
+#
+# BUG#11684 - repair crashes mysql when table has fulltext index
+#
+
+CREATE TABLE t1 (a VARCHAR(30), FULLTEXT(a));
+INSERT INTO t1 VALUES('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb');
+SET myisam_repair_threads=2;
+REPAIR TABLE t1;
+SET myisam_repair_threads=@@global.myisam_repair_threads;
+DROP TABLE t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/fulltext2.test b/mysql-test/t/fulltext2.test
index 1d3a5307412c7502b86739c2ff5f45c2a2e5fa52..bcd39b9ea04e3313bea9148fbeadb7982a3efb94 100644
--- a/mysql-test/t/fulltext2.test
+++ b/mysql-test/t/fulltext2.test
@@ -182,3 +182,4 @@ select count(*) from t1 where match a against ('aaazzz' in boolean mode);
 
 drop table t1;
 
+# End of 4.1 tests
diff --git a/mysql-test/t/fulltext_cache.test b/mysql-test/t/fulltext_cache.test
index b01f0d18b766f1b0528268f1accf75cce3100a37..ea05f69950646de8cb0023aaa6c9e91147ae1002 100644
--- a/mysql-test/t/fulltext_cache.test
+++ b/mysql-test/t/fulltext_cache.test
@@ -42,3 +42,5 @@ SELECT t1.q, t2.item, t2.id, MATCH t2.item AGAINST ('sushi' IN BOOLEAN MODE)
 as x FROM t2, t1 WHERE (t2.id2 = t1.id) ORDER BY x DESC,t2.id;
 
 drop table t1, t2;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/fulltext_distinct.test b/mysql-test/t/fulltext_distinct.test
index 1f4cb8cd7bc2ff72a39be23022434b79fe25383c..bf773c36844f4c450ee342538ad5872a994cb584 100644
--- a/mysql-test/t/fulltext_distinct.test
+++ b/mysql-test/t/fulltext_distinct.test
@@ -42,3 +42,5 @@ WHERE MATCH (t1.value) AGAINST ('baz333' IN BOOLEAN MODE)
 AND t1.id = t2.id_t1;
 
 DROP TABLE t1, t2;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/fulltext_left_join.test b/mysql-test/t/fulltext_left_join.test
index 96751ef8678752f5bb41f281e201c065fe095399..3bb1f0b7309b5b6b6f037da06a9e7701bb692bcf 100644
--- a/mysql-test/t/fulltext_left_join.test
+++ b/mysql-test/t/fulltext_left_join.test
@@ -45,3 +45,4 @@ select * from t1 left join t2 on (venue_id = entity_id and match(name) against('
 select * from t1 left join t2 on (venue_id = entity_id and match(name) against('aberdeen')) where dt = '2003-05-23 19:30:00';
 drop table t1,t2;
 
+# End of 4.1 tests
diff --git a/mysql-test/t/fulltext_multi.test b/mysql-test/t/fulltext_multi.test
index 3a622a551bccaa767342b6ba2a6fbe8fff442dec..fe64fe88599cc39db6963e5f367f00baa346d8c9 100644
--- a/mysql-test/t/fulltext_multi.test
+++ b/mysql-test/t/fulltext_multi.test
@@ -21,3 +21,5 @@ SELECT a, round(MATCH  b  AGAINST ('lala lkjh'),5) FROM t1;
 SELECT a, round(MATCH  c  AGAINST ('lala lkjh'),5) FROM t1;
 SELECT a, round(MATCH b,c AGAINST ('lala lkjh'),5) FROM t1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/fulltext_order_by.test b/mysql-test/t/fulltext_order_by.test
index 3101242613a342d88318074a2214dd3656dac859..074aefbf9437f421c9ee6a0b8e800c66d89a0bc8 100644
--- a/mysql-test/t/fulltext_order_by.test
+++ b/mysql-test/t/fulltext_order_by.test
@@ -1,5 +1,5 @@
 --disable_warnings
-DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1,t2,t3;
 --enable_warnings
 
 CREATE TABLE t1 (
@@ -80,7 +80,7 @@ CREATE TABLE t3 (
   FULLTEXT KEY betreff (betreff)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=996 ;
 
---error 1109
+--error 1054
 select a.text, b.id, b.betreff
 from 
   t2 a inner join t3 b on a.id = b.forum inner join
@@ -100,7 +100,7 @@ group by
 order by 
   match(b.betreff) against ('+abc' in boolean mode) desc;
   
---error 1109
+--error 1054
 select a.text, b.id, b.betreff
 from 
   t2 a inner join t3 b on a.id = b.forum inner join
@@ -117,8 +117,6 @@ where
 order by 
   match(b.betreff) against ('+abc' in boolean mode) desc;
 
--- todo psergey: fix
---error 1214 
 select a.text, b.id, b.betreff
 from 
   t2 a inner join t3 b on a.id = b.forum inner join
@@ -135,5 +133,22 @@ where
 order by 
   match(betreff) against ('+abc' in boolean mode) desc;
 
+# BUG#11869 part2: used table type doesn't support FULLTEXT indexes error
+(select b.id, b.betreff from t3 b) union 
+(select b.id, b.betreff from t3 b) 
+order by match(betreff) against ('+abc' in boolean mode) desc;
+
+--error 1191
+(select b.id, b.betreff from t3 b) union 
+(select b.id, b.betreff from t3 b) 
+order by match(betreff) against ('+abc') desc;
+
+select distinct b.id, b.betreff from t3 b 
+order by match(betreff) against ('+abc' in boolean mode) desc;
+
+select b.id, b.betreff from t3 b group by b.id+1 
+order by match(betreff) against ('+abc' in boolean mode) desc;
+
 drop table t1,t2,t3;
 
+# End of 4.1 tests
diff --git a/mysql-test/t/fulltext_update.test b/mysql-test/t/fulltext_update.test
index a1d133ba3feb4b10ec60d84c6e886d3a2f909a47..14eb0de58a526c89b246c87a174e257298f4aa1c 100644
--- a/mysql-test/t/fulltext_update.test
+++ b/mysql-test/t/fulltext_update.test
@@ -25,3 +25,5 @@ update test set url='test', shortdesc='ggg', longdesc='mmm',
 description='ddd', name='nam' where gnr=2;
 check table test;
 drop table test;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/fulltext_var.test b/mysql-test/t/fulltext_var.test
index 8cc8acf60a631ce09275940cc0d27dcc0bd49bf1..6b0b8aa463b19f92802c5d8968ac7eb534b5a1a7 100644
--- a/mysql-test/t/fulltext_var.test
+++ b/mysql-test/t/fulltext_var.test
@@ -25,3 +25,4 @@ set global ft_boolean_syntax='@ -><()~*:""@|';
 set global ft_boolean_syntax='+ -><()~*:""@!|';
 drop table t1;
 
+# End of 4.1 tests
diff --git a/mysql-test/t/func_compress.test b/mysql-test/t/func_compress.test
index 9c32313e9672b4c7fa04c469a75ca1bca0e4dcb7..a78017ddb2f4efa883baf9cbbc1ee719dc97296c 100644
--- a/mysql-test/t/func_compress.test
+++ b/mysql-test/t/func_compress.test
@@ -47,3 +47,4 @@ set @@max_allowed_packet=1048576*100;
 --replace_result "''" XXX "'1'" XXX
 eval select compress(repeat('aaaaaaaaaa', IF('$LOW_MEMORY', 10, 10000000))) is null;
 
+# End of 4.1 tests
diff --git a/mysql-test/t/func_concat.test b/mysql-test/t/func_concat.test
index 4f13ce7513c64b501dfa5d8121832388b74f618d..37fc0e105b81fea6eadad025004b825e136454b1 100644
--- a/mysql-test/t/func_concat.test
+++ b/mysql-test/t/func_concat.test
@@ -52,3 +52,4 @@ select 'a' union select concat('a', -0.0);
 --replace_result a-0.0000 a0.0000
 select 'a' union select concat('a', -0.0000);
 
+# End of 4.1 tests
diff --git a/mysql-test/t/func_crypt.test b/mysql-test/t/func_crypt.test
index f352a98e3cd91de04b1aa3c8648f2a1bff47db1d..5e0283feb285cae6341cdebbd58de6a2d4b06d40 100644
--- a/mysql-test/t/func_crypt.test
+++ b/mysql-test/t/func_crypt.test
@@ -48,3 +48,5 @@ select old_password('idkfa');
 select old_password(' i 	 d k f a ');
 
 explain extended select password('idkfa '), old_password('idkfa');
+
+# End of 4.1 tests
diff --git a/mysql-test/t/func_date_add.test b/mysql-test/t/func_date_add.test
index 29c13793b78d5c25e9d657e6fc5f27926f10b3df..e01fce305776c4d303e9b8a1e5ecf99a805d2884 100644
--- a/mysql-test/t/func_date_add.test
+++ b/mysql-test/t/func_date_add.test
@@ -40,3 +40,28 @@ having mts < DATE_SUB(NOW(),INTERVAL 3 MONTH);
 select visitor_id,max(ts) as mts from t1 group by visitor_id
 having DATE_ADD(mts,INTERVAL 3 MONTH) < NOW();
 drop table t1;
+
+#
+# Bug #10627: Invalid date turned to NULL from date_sub/date_add in
+# traditional mode
+#
+set sql_mode='traditional';
+create table t1 (d date);
+--error S22008
+insert into t1 (d) select date_sub('2000-01-01', INTERVAL 2001 YEAR);
+--error S22008
+insert into t1 (d) select date_add('2000-01-01',interval 8000 year);
+# No warnings/errors from the next two
+insert into t1 values (date_add(NULL, INTERVAL 1 DAY));
+insert into t1 values (date_add('2000-01-04', INTERVAL NULL DAY));
+set sql_mode='';
+# These will all work now, and we'll end up with some NULL entries in the
+# table and some warnings.
+insert into t1 (d) select date_sub('2000-01-01', INTERVAL 2001 YEAR);
+insert into t1 (d) select date_add('2000-01-01',interval 8000 year);
+insert into t1 values (date_add(NULL, INTERVAL 1 DAY));
+insert into t1 values (date_add('2000-01-04', INTERVAL NULL DAY));
+select * from t1;
+drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/func_default.test b/mysql-test/t/func_default.test
index af7ebcf588be2807746e85817b1ddd61d29a16a8..7bebd4b4b729d803fa45606fd5551e960bf90029 100644
--- a/mysql-test/t/func_default.test
+++ b/mysql-test/t/func_default.test
@@ -18,6 +18,8 @@ explain select * from t1 where str <> default(str);
 
 drop table t1;
 
+# End of 4.1 tests
+
 #
 # Bug #11314 (HAVING DEFAULT() hangs)
 #
diff --git a/mysql-test/t/func_des_encrypt.test b/mysql-test/t/func_des_encrypt.test
index 201a0051c58797e5ce679508dd9b6e844ee1b7fc..5d102bd02ebe6171ebc2e0698b4e528e6615f85a 100644
--- a/mysql-test/t/func_des_encrypt.test
+++ b/mysql-test/t/func_des_encrypt.test
@@ -7,3 +7,5 @@
 # Bug #11643: des_encrypt() causes server to die
 #
 select des_encrypt('hello');
+
+# End of 4.1 tests
diff --git a/mysql-test/t/func_encrypt.test b/mysql-test/t/func_encrypt.test
index 52aca7f9dcb6f5f8ce46db55baf8d14a58b66bff..a7364fa43da5d9ff0e12dfbb47b227e8cd8f17d1 100644
--- a/mysql-test/t/func_encrypt.test
+++ b/mysql-test/t/func_encrypt.test
@@ -86,3 +86,5 @@ select hex(des_decrypt(des_encrypt("hello",4),'password2'));
 select hex(des_decrypt(des_encrypt("hello","hidden")));
 
 explain extended select des_decrypt(des_encrypt("hello",4),'password2'), des_decrypt(des_encrypt("hello","hidden"));
+
+# End of 4.1 tests
diff --git a/mysql-test/t/func_encrypt_nossl.test b/mysql-test/t/func_encrypt_nossl.test
index 95c104ce046136bfe9d6bce3626467784f5f392f..11866db1da751e56ffea1e21b916464764aa05ce 100644
--- a/mysql-test/t/func_encrypt_nossl.test
+++ b/mysql-test/t/func_encrypt_nossl.test
@@ -35,3 +35,4 @@ select hex("hello");
 select hex(des_decrypt(des_encrypt("hello",4),'password2'));
 select hex(des_decrypt(des_encrypt("hello","hidden")));
 
+# End of 4.1 tests
diff --git a/mysql-test/t/func_equal.test b/mysql-test/t/func_equal.test
index f446e277c92e24a8b38658864d1a554b2f6941de..4c88ed170a115ff9c1d5286ba93378ec00748fb0 100644
--- a/mysql-test/t/func_equal.test
+++ b/mysql-test/t/func_equal.test
@@ -33,3 +33,5 @@ select * from t1 where id <=>id;
 select * from t1 where value <=> value;
 select * from t1 where id <=> value or value<=>id;
 drop table t1,t2;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test
index 96cd51f58db718199d3a4f65d88cd43200672c23..e30dcfae973a2b0999b72bc89603b0225629c3f4 100644
--- a/mysql-test/t/func_gconcat.test
+++ b/mysql-test/t/func_gconcat.test
@@ -263,6 +263,24 @@ select group_concat(distinct b order by b) from t1 group by a;
 
 drop table t1;
 
+#
+# Bug#10201
+#
+create table t1 (a varchar(255) character set cp1250 collate cp1250_general_ci,
+                 b varchar(255) character set koi8r);
+insert into t1 values ('xxx','yyy');
+select collation(a) from t1;
+select collation(group_concat(a)) from t1;
+create table t2 select group_concat(a) as a from t1;
+show create table t2;
+select collation(group_concat(a,_koi8r'test')) from t1;
+--error 1267
+select collation(group_concat(a,_koi8r 0xC1C2)) from t1;
+--error 1267
+select collation(group_concat(a,b)) from t1;
+drop table t1;
+drop table t2;
+
 #
 # bug #7769: group_concat returning null is checked in having
 #
@@ -299,3 +317,37 @@ create table t1 (a char(3), b char(20), primary key (a, b));
 insert into t1 values ('ABW', 'Dutch'), ('ABW', 'English');
 select group_concat(a) from t1 group by b;
 drop table t1;
+#
+# Bug #12095: GROUP_CONCAT for one row table 
+#
+
+CREATE TABLE t1 (
+  aID smallint(5) unsigned NOT NULL auto_increment,
+  sometitle varchar(255) NOT NULL default '',
+  bID smallint(5) unsigned NOT NULL,
+  PRIMARY KEY  (aID),
+  UNIQUE KEY sometitle (sometitle)
+);
+INSERT INTO t1 SET sometitle = 'title1', bID = 1;
+INSERT INTO t1 SET sometitle = 'title2', bID = 1;
+
+CREATE TABLE t2 (
+  bID smallint(5) unsigned NOT NULL auto_increment,
+  somename varchar(255) NOT NULL default '',
+  PRIMARY KEY  (bID),
+  UNIQUE KEY somename (somename)
+);
+INSERT INTO t2 SET somename = 'test';
+
+SELECT COUNT(*), GROUP_CONCAT(DISTINCT t2.somename SEPARATOR ' |')
+  FROM t1 JOIN t2 ON t1.bID = t2.bID;
+INSERT INTO t2 SET somename = 'test2';
+SELECT COUNT(*), GROUP_CONCAT(DISTINCT t2.somename SEPARATOR ' |')
+  FROM t1 JOIN t2 ON t1.bID = t2.bID;
+DELETE FROM t2 WHERE somename = 'test2';
+SELECT COUNT(*), GROUP_CONCAT(DISTINCT t2.somename SEPARATOR ' |')
+  FROM t1 JOIN t2 ON t1.bID = t2.bID;
+
+DROP TABLE t1,t2;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test
index 459a40cfe8772f2c3acb1875841a331c607ed2e3..fb9470c16ddfd175da2bcceb9012a884a28a0047 100644
--- a/mysql-test/t/func_group.test
+++ b/mysql-test/t/func_group.test
@@ -509,7 +509,41 @@ create table t2 select f2 from (select now() f2 from t1) a;
 show columns from t2;
 drop table t2, t1;
 
+#
+# Bug 8893: wrong result for min/max optimization with 2 indexes
+#
+
+CREATE TABLE t1(
+  id int PRIMARY KEY,
+  a  int,
+  b  int,
+  INDEX i_b_id(a,b,id),
+  INDEX i_id(a,id)
+);
+INSERT INTO t1 VALUES 
+  (1,1,4), (2,2,1), (3,1,3), (4,2,1), (5,1,1);
+SELECT MAX(id) FROM t1 WHERE id < 3 AND a=2 AND b=6;
+DROP TABLE t1;
+
+# change the order of the last two index definitions
+
+CREATE TABLE t1(
+  id int PRIMARY KEY,
+  a  int,
+  b  int,
+  INDEX i_id(a,id),
+  INDEX i_b_id(a,b,id)
+);
+INSERT INTO t1 VALUES 
+  (1,1,4), (2,2,1), (3,1,3), (4,2,1), (5,1,1);
+SELECT MAX(id) FROM t1 WHERE id < 3 AND a=2 AND b=6;
+DROP TABLE t1;
+
+# End of 4.1 tests
+
+#
 # decimal-related tests
+#
 create table t2 (ff double);
 insert into t2 values (2.2);
 select cast(sum(distinct ff) as decimal(5,2)) from t2;
@@ -565,36 +599,6 @@ insert into t1 values (5.00000000001);
 select col1,sum(col1),max(col1),min(col1) from t1 group by col1;
 DROP TABLE t1;
 
-#
-# Bug 8893: wrong result for min/max optimization with 2 indexes
-#
-
-CREATE TABLE t1(
-  id int PRIMARY KEY,
-  a  int,
-  b  int,
-  INDEX i_b_id(a,b,id),
-  INDEX i_id(a,id)
-);
-INSERT INTO t1 VALUES 
-  (1,1,4), (2,2,1), (3,1,3), (4,2,1), (5,1,1);
-SELECT MAX(id) FROM t1 WHERE id < 3 AND a=2 AND b=6;
-DROP TABLE t1;
-
-# change the order of the last two index definitions
-
-CREATE TABLE t1(
-  id int PRIMARY KEY,
-  a  int,
-  b  int,
-  INDEX i_id(a,id),
-  INDEX i_b_id(a,b,id)
-);
-INSERT INTO t1 VALUES 
-  (1,1,4), (2,2,1), (3,1,3), (4,2,1), (5,1,1);
-SELECT MAX(id) FROM t1 WHERE id < 3 AND a=2 AND b=6;
-DROP TABLE t1;
-
 #
 # Test that new VARCHAR correctly works with COUNT(DISTINCT)
 #
diff --git a/mysql-test/t/func_if.test b/mysql-test/t/func_if.test
index 03590dea8d1ca4b2aac2edef97ddaef984d9d140..4e0f426c10bcc835ad84f27b18f37ceafa8e5d16 100644
--- a/mysql-test/t/func_if.test
+++ b/mysql-test/t/func_if.test
@@ -87,3 +87,5 @@ SELECT a, NULLIF(a,'') FROM t1;
 SELECT a, NULLIF(a,'') FROM t1 WHERE NULLIF(a,'') IS NULL;
 
 DROP TABLE t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/func_in.test b/mysql-test/t/func_in.test
index 3a6b6653098ae979596430531c3cdbd3a30bcc2e..7bf737402ef37212688f519bdde54b2652008053 100644
--- a/mysql-test/t/func_in.test
+++ b/mysql-test/t/func_in.test
@@ -102,6 +102,8 @@ insert into t1 values ('aa'), ('bb');
 select * from t1 where a in (NULL, 'aa');
 drop table t1;
 
+# End of 4.1 tests
+
 #
 # Bug #11885: WHERE condition with NOT IN (one element)          
 #             
diff --git a/mysql-test/t/func_isnull.test b/mysql-test/t/func_isnull.test
index 506efada0ebf506a03a13f738bdf7b3b65d246dc..6218efb882fe4b38cb93e2c48367ed57f3f77df9 100644
--- a/mysql-test/t/func_isnull.test
+++ b/mysql-test/t/func_isnull.test
@@ -11,3 +11,5 @@ insert into t1 values (0,"2002-05-01"),(0,"2002-05-01"),(0,"2002-05-01");
 flush tables;
 select * from t1 where isnull(to_days(mydate));
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/func_like.test b/mysql-test/t/func_like.test
index 4ca2f28fa6e99233974e2bc72d7af7cbb74a7fb6..684d7032038c56bfdd6acd72fd75c16cd1f4c81d 100644
--- a/mysql-test/t/func_like.test
+++ b/mysql-test/t/func_like.test
@@ -96,3 +96,4 @@ DROP TABLE t1;
 #
 select _cp866'aaaaaaaaa' like _cp866'%aaaa%' collate cp866_bin;
 
+# End of 4.1 tests
diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test
index da4b8335e07f6fa3e08906cca167858a3440ea03..bf692325a6a9e940129f5735431c5b5e07c62d6e 100644
--- a/mysql-test/t/func_math.test
+++ b/mysql-test/t/func_math.test
@@ -68,6 +68,8 @@ explain extended select degrees(pi()),radians(360);
 --error 1054
 select rand(rand);
 
+# End of 4.1 tests
+
 #
 # Bug #8459 (FORMAT returns incorrect result)
 #
@@ -91,3 +93,18 @@ select round(150, 2);
 select ceil(0.09);
 select ceil(0.000000000000000009);
 
+#
+# Bug #9837: problem with round()
+#
+
+create table t1 select round(1, 6);
+show create table t1;
+select * from t1;
+drop table t1;
+
+#
+# Bug #11402: abs() forces rest of calculation to unsigned
+#
+select abs(-2) * -2;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test
index 78ff0907b391c0ba2ff3e4bd9d21d2928bac14bc..f4cbacb93bbe6ce2b086123a0825e74c07c312d7 100644
--- a/mysql-test/t/func_misc.test
+++ b/mysql-test/t/func_misc.test
@@ -38,11 +38,20 @@ select a from t1 where mid(a+0,6,3) = ( mid(20040106123400,6,3) );
 
 drop table t1;
 
+# End of 4.1 tests
+
+#
 # Test for BUG#9535
+#
 create table t1 as select uuid(), length(uuid());
 show create table t1;
 drop table t1;
 
-
-
-
+# Bug #6760: Add SLEEP() function
+create table t1 (a timestamp default '2005-05-05 01:01:01',
+                 b timestamp default '2005-05-05 01:01:01');
+insert into t1 set a = now();
+select sleep(3);
+update t1 set b = now();
+select timediff(b, a) >= '00:00:03' from t1;
+drop table t1;
diff --git a/mysql-test/t/func_op.test b/mysql-test/t/func_op.test
index 33a2884b424d30e3021a5a3d64cea72de9ccc6b0..24266150e4c918b493e21a22a02b70a1855e1256 100644
--- a/mysql-test/t/func_op.test
+++ b/mysql-test/t/func_op.test
@@ -16,3 +16,5 @@ select  1 | -1,  1 ^ -1,  1 & -1;
 select  0 | -1,  0 ^ -1,  0 & -1;
 select -1 >> 0, -1 << 0;
 select -1 >> 1, -1 << 1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/func_regexp.test b/mysql-test/t/func_regexp.test
index 1a771d466fac2a38ef2a77273cdb38d8cb83764d..23070c71fe99a76ef099cc6809ce7630367793f3 100644
--- a/mysql-test/t/func_regexp.test
+++ b/mysql-test/t/func_regexp.test
@@ -73,3 +73,5 @@ set @a="^R.*";
 execute stmt1 using @a;
 deallocate prepare stmt1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/func_sapdb.test b/mysql-test/t/func_sapdb.test
index bb9159eefbead816448d3046c7a464eab75b38f6..6189712b5fe39e5cdc3398bc2e67fa5ac1d1a979 100644
--- a/mysql-test/t/func_sapdb.test
+++ b/mysql-test/t/func_sapdb.test
@@ -128,3 +128,5 @@ select date_add("1997-12-31",INTERVAL "10.09" SECOND_MICROSECOND) as a;
 --disable_ps_protocol
 select str_to_date("2003-01-02 10:11:12.0012", "%Y-%m-%d %H:%i:%S.%f");
 --enable_ps_protocol
+
+# End of 4.1 tests
diff --git a/mysql-test/t/func_set.test b/mysql-test/t/func_set.test
index 0c79dec7cc2de85a6b7e0d27c91f387a22f6775c..710b9b90a05cdba04027e4acb49fea0970dc51dc 100644
--- a/mysql-test/t/func_set.test
+++ b/mysql-test/t/func_set.test
@@ -54,3 +54,4 @@ select find_in_set(binary 'a', 'A,B,C');
 #
 select find_in_set('1','3,1,');
 
+# End of 4.1 tests
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test
index efad2721ae5a9e6e1fce39b95bbffbdb93d11770..4a6c98c8d7f141c8c6dd669f028e2d609b462a5f 100644
--- a/mysql-test/t/func_str.test
+++ b/mysql-test/t/func_str.test
@@ -23,6 +23,45 @@ select concat('',left(right(concat('what ',concat('is ','happening')),9),4),'',s
 select substring_index('www.tcx.se','.',-2),substring_index('www.tcx.se','.',1);
 select substring_index('www.tcx.se','tcx',1),substring_index('www.tcx.se','tcx',-1);
 select substring_index('.tcx.se','.',-2),substring_index('.tcx.se','.tcx',-1);
+select substring_index('aaaaaaaaa1','a',1);
+select substring_index('aaaaaaaaa1','aa',1);
+select substring_index('aaaaaaaaa1','aa',2);
+select substring_index('aaaaaaaaa1','aa',3);
+select substring_index('aaaaaaaaa1','aa',4);
+select substring_index('aaaaaaaaa1','aa',5);
+select substring_index('aaaaaaaaa1','aaa',1);
+select substring_index('aaaaaaaaa1','aaa',2);
+select substring_index('aaaaaaaaa1','aaa',3);
+select substring_index('aaaaaaaaa1','aaa',4);
+select substring_index('aaaaaaaaa1','aaaa',1);
+select substring_index('aaaaaaaaa1','aaaa',2);
+select substring_index('aaaaaaaaa1','1',1);
+select substring_index('aaaaaaaaa1','a',-1);
+select substring_index('aaaaaaaaa1','aa',-1);
+select substring_index('aaaaaaaaa1','aa',-2);
+select substring_index('aaaaaaaaa1','aa',-3);
+select substring_index('aaaaaaaaa1','aa',-4);
+select substring_index('aaaaaaaaa1','aa',-5);
+select substring_index('aaaaaaaaa1','aaa',-1);
+select substring_index('aaaaaaaaa1','aaa',-2);
+select substring_index('aaaaaaaaa1','aaa',-3);
+select substring_index('aaaaaaaaa1','aaa',-4);
+select substring_index('the king of thethe hill','the',-2);
+select substring_index('the king of the the hill','the',-2);
+select substring_index('the king of the  the hill','the',-2);
+select substring_index('the king of the  the hill',' the ',-1);
+select substring_index('the king of the  the hill',' the ',-2);
+select substring_index('the king of the  the hill',' ',-1);
+select substring_index('the king of the  the hill',' ',-2);
+select substring_index('the king of the  the hill',' ',-3);
+select substring_index('the king of the  the hill',' ',-4);
+select substring_index('the king of the  the hill',' ',-5);
+select substring_index('the king of the.the hill','the',-2);
+select substring_index('the king of thethethe.the hill','the',-3);
+select substring_index('the king of thethethe.the hill','the',-1);
+select substring_index('the king of the the hill','the',1);
+select substring_index('the king of the the hill','the',2);
+select substring_index('the king of the the hill','the',3);
 
 select concat(':',ltrim('  left  '),':',rtrim('  right  '),':');
 select concat(':',trim(leading from '  left  '),':',trim(trailing from '  right  '),':');
@@ -613,3 +652,16 @@ drop table t1;
 # Bug #9854  hex() and out of range handling
 #
 select hex(29223372036854775809), hex(-29223372036854775809);
+
+#
+# Bug #11311: Incorrect length returned from LPAD() and RPAD()
+#
+create table t1 (i int);
+insert into t1 values (1000000000),(1);
+--enable_metadata
+select lpad(i, 7, ' ') as t from t1;
+select rpad(i, 7, ' ') as t from t1;
+--disable_metadata
+drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/func_system.test b/mysql-test/t/func_system.test
index bbfef25bcfea1f5ac76be916c46483a982e6bc9f..4a52693549147be3958bd68fabde4a0a78adc2e4 100644
--- a/mysql-test/t/func_system.test
+++ b/mysql-test/t/func_system.test
@@ -31,6 +31,18 @@ drop table t1;
 
 select TRUE,FALSE,NULL;
 
+#
+# Bug#12351: CONCAT with USER()/DATEBASE() and
+# a constant and a column gets strange results
+#
+create table t1 (c1 char(5)) character set=latin1;
+insert into t1 values('row 1');
+insert into t1 values('row 2');
+insert into t1 values('row 3');
+select concat(user(), '--', c1) from t1;
+select concat(database(), '--', c1) from t1;
+drop table t1;
+
 #
 # Bug#8291 Illegal collation mix with USER() function
 #
@@ -41,3 +53,5 @@ select * from t1 where a=user();
 insert into t1 values ('a');
 select left(concat(a,version()),1) from t1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/func_test.test b/mysql-test/t/func_test.test
index 732cdc12cae295af302d5eca5a68fb63f567dbb2..424c0d1456ba108b3d2f78f4301e380a5eaf5654 100644
--- a/mysql-test/t/func_test.test
+++ b/mysql-test/t/func_test.test
@@ -108,6 +108,8 @@ select 5.1 mod 3, 5.1 mod -3, -5.1 mod 3, -5.1 mod -3;
 
 select 5 mod 3, 5 mod -3, -5 mod 3, -5 mod -3;
 
+# End of 4.1 tests
+
 #
 # Bug#6726: NOT BETWEEN parse failure
 #
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test
index 66ff460fc61dac6d27d4d14d54672aa6d02326a9..0538e6111b9257972b8e83242965e9864f77991b 100644
--- a/mysql-test/t/func_time.test
+++ b/mysql-test/t/func_time.test
@@ -334,6 +334,9 @@ INSERT INTO t1 VALUES (NOW());
 SELECT count(*) FROM t1 WHERE d>FROM_DAYS(TO_DAYS(@TMP)) AND d<=FROM_DAYS(TO_DAYS(@TMP)+1);
 DROP TABLE t1;
 
+
+# End of 4.1 tests
+
 explain extended select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01') as a1,
 			timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12:58:58.119999') as a2;
 
diff --git a/mysql-test/t/func_timestamp.test b/mysql-test/t/func_timestamp.test
index 8583c16073d5d1e0d9a7bda2560b9ee9e18f076f..e1bb7e878eeae86718de29a0aa26c28199f8603a 100644
--- a/mysql-test/t/func_timestamp.test
+++ b/mysql-test/t/func_timestamp.test
@@ -13,3 +13,5 @@ SELECT CONCAT(Jahr,'-',Monat,'-',Tag,' ',Zeit) AS Date,
    UNIX_TIMESTAMP(CONCAT(Jahr,'-',Monat,'-',Tag,' ',Zeit)) AS Unix
 FROM t1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/gcc296.test b/mysql-test/t/gcc296.test
index ebca4dbc897642fa81c4ed52d1ef5547fdaab402..bfcd56ff39639c9766b76e7f79f3d4b69232b913 100644
--- a/mysql-test/t/gcc296.test
+++ b/mysql-test/t/gcc296.test
@@ -18,3 +18,5 @@ INSERT INTO t1 VALUES ('0104000000','xxx','XXX');
 
 select * from t1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/gis-rtree.test b/mysql-test/t/gis-rtree.test
index 522f7a6f63717770531bdd6b0e5508c606de88d7..52fe6add3b8b7fbb1d511cdfbdcf4f6de3969e6b 100644
--- a/mysql-test/t/gis-rtree.test
+++ b/mysql-test/t/gis-rtree.test
@@ -171,3 +171,5 @@ CREATE TABLE t2 (geom GEOMETRY NOT NULL, SPATIAL KEY gk(geom));
 --error 1416
 INSERT INTO t2 SELECT GeomFromText(st) FROM t1;
 drop table t1, t2;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test
index b7071019e9dbba60a0fe0e83b8b200a14eb6f0c8..202042d0257fdf0232b6668fe9e437b5792f536c 100644
--- a/mysql-test/t/gis.test
+++ b/mysql-test/t/gis.test
@@ -371,3 +371,15 @@ insert into t1 values ("qwerty");
 insert into t1 values (pointfromtext('point(1,1)'));
 
 drop table t1;
+
+# End of 4.1 tests
+
+#
+# Bug #12281 (Geometry: crash in trigger)
+#
+
+create table t1 (s1 geometry not null,s2 char(100));
+create trigger t1_bu before update on t1 for each row set new.s1 = null;
+--error 1048
+insert into t1 values (null,null);
+drop table t1;
diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test
index bb21873a0c46b71ed359839fed88c01855dd4ec4..635c7a3f4e7d6b427799f05411734f45a9573b14 100644
--- a/mysql-test/t/grant.test
+++ b/mysql-test/t/grant.test
@@ -479,3 +479,12 @@ insert into tables_priv values ('','test_db','mysqltest_1','test_table','test_gr
 flush privileges;
 delete from tables_priv where host = '' and user = 'mysqltest_1';
 flush privileges;
+
+#
+# Bug #10892 user variables not auto cast for comparisons
+# Check that we don't get illegal mix of collations
+#
+set @user123="non-existent";
+select * from mysql.db where user=@user123;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/grant2.test b/mysql-test/t/grant2.test
index 07bd6d53c4e5a77769d17c405d4fe69a915ccb8c..c6b8bfe291618d7b82ff66fb2bcbb5e4e5fb40ba 100644
--- a/mysql-test/t/grant2.test
+++ b/mysql-test/t/grant2.test
@@ -312,3 +312,5 @@ connection default;
 REVOKE ALL ON mysqltest_1.t1 FROM mysqltest_1@'127.0.0.0/255.0.0.0';
 drop table mysqltest_1.t1;
 drop database mysqltest_1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/grant_cache.test b/mysql-test/t/grant_cache.test
index f4423a68717df4036415b31dec706f013aa6ee55..7e17a03ec2130a48c08450c09adff2c1550eae93 100644
--- a/mysql-test/t/grant_cache.test
+++ b/mysql-test/t/grant_cache.test
@@ -149,3 +149,5 @@ drop table test.t1,mysqltest.t1,mysqltest.t2;
 drop database mysqltest;
 
 set GLOBAL query_cache_size=default;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test
index 6f1880ae8fb84b7453cf8f21ab3045a0db6ded16..8300b502518bc158ad4bec267434709bdbd1a70b 100644
--- a/mysql-test/t/group_by.test
+++ b/mysql-test/t/group_by.test
@@ -575,12 +575,22 @@ CREATE TABLE t1 (id varchar(20) NOT NULL);
 INSERT INTO t1 VALUES ('trans1'), ('trans2');
 CREATE TABLE t2 (id varchar(20) NOT NULL, err_comment blob NOT NULL);
 INSERT INTO t2 VALUES ('trans1', 'a problem');
-
 SELECT COUNT(DISTINCT(t1.id)), LEFT(err_comment, 256) AS comment
   FROM t1 LEFT JOIN t2 ON t1.id=t2.id GROUP BY comment;
 
 DROP TABLE t1, t2;
 
+
+#
+# Bug #12266 GROUP BY expression on DATE column produces result with
+#            reduced length
+#
+create table t1 (f1 date);
+insert into t1 values('2005-06-06');
+insert into t1 values('2005-06-06'); 
+select date(left(f1+0,8)) from t1 group by 1;
+drop table t1;
+
 #
 # Test for bug #11414: crash on Windows for a simple GROUP BY query 
 #  
@@ -592,6 +602,8 @@ SELECT n+1 AS n FROM t1 GROUP BY n;
 --enable_ps_protocol
 DROP TABLE t1;
 
+# End of 4.1 tests
+
 #
 # Bug#11211: Ambiguous column reference in GROUP BY.
 #
diff --git a/mysql-test/t/handler.test b/mysql-test/t/handler.test
index 3de8e8ae78494d9a686c701385f9b5a066db5c9d..eb970e7a71032a1ce24483f0c7ac813b6bafd5f0 100644
--- a/mysql-test/t/handler.test
+++ b/mysql-test/t/handler.test
@@ -346,3 +346,5 @@ drop table t2;
 drop table t3;
 drop table t4;
 drop table t5;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/having.test b/mysql-test/t/having.test
index 3221b0d4624c7245459a263294850af01505ea07..fb223d2a9af96ae801821248f98630f45c2ea541 100644
--- a/mysql-test/t/having.test
+++ b/mysql-test/t/having.test
@@ -123,6 +123,7 @@ group by a.id, a.description
 having (a.description is not null) and (c=0);
 drop table t1,t2,t3;
 
+# End of 4.1 tests
 
 #
 # Tests for WL#1972 CORRECT EVALUATION OF COLUMN REFERENCES IN THE HAVING CLAUSE
@@ -233,7 +234,6 @@ where t1.col2 in
 group by col_t1
 having col_t1 <= 20;
 
-
 #
 # nested HAVING clauses
 #
diff --git a/mysql-test/t/heap.test b/mysql-test/t/heap.test
index 75ef5a73cb0dc2f842ade32cc469e897b2bf56cb..fcaa4c41ece8bcb87451bd663166d3c29d11a4e9 100644
--- a/mysql-test/t/heap.test
+++ b/mysql-test/t/heap.test
@@ -435,3 +435,16 @@ insert into t1 values ("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd
 --error 1062
 insert into t1 values ("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz");
 drop table t1;
+
+# End of 4.1 tests
+
+#
+# Bug #3094: Row format of memory tables should always be reported as Fixed
+#
+create table t1 (c char(10)) engine=memory;
+create table t2 (c varchar(10)) engine=memory;
+--replace_column 8 #
+show table status like 't_';
+drop table t1, t2;
+
+# End of 5.0 tests
diff --git a/mysql-test/t/heap_auto_increment.test b/mysql-test/t/heap_auto_increment.test
index 9d0fefa4d52b083e5b86d999508969b69b98364f..016bc946209592711dedf5d8ed5e5f57705fb203 100644
--- a/mysql-test/t/heap_auto_increment.test
+++ b/mysql-test/t/heap_auto_increment.test
@@ -31,3 +31,5 @@ insert into t1 values (NULL, "hey");
 select * from t1;
 select _rowid,t1._rowid,skey,sval from t1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/heap_btree.test b/mysql-test/t/heap_btree.test
index 6fec2ac17033683b8c0e0f7a4ae36dc50cd3c355..5e493c2643bc163bc2e87599c24855d964140141 100644
--- a/mysql-test/t/heap_btree.test
+++ b/mysql-test/t/heap_btree.test
@@ -163,3 +163,5 @@ INSERT into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11);
 DELETE from t1 where a < 100;
 SELECT * from t1;
 DROP TABLE t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/heap_hash.test b/mysql-test/t/heap_hash.test
index 21ac69ef3a17ce179a5f3a69efa2ef550d917324..28a75a5ee11ed5f895667f5543af8ccac5daadde 100644
--- a/mysql-test/t/heap_hash.test
+++ b/mysql-test/t/heap_hash.test
@@ -259,3 +259,5 @@ insert into t1 values (1),(2),(3),(4),(5);
 select a from t1 where a in (1,3);
 explain select a from t1 where a in (1,3);
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/help.test b/mysql-test/t/help.test
index 3f3e99e1556a873bcc8f6eae93d3e27ce48cd6a3..ff431fb4ebd32e1be2149cd79d3922007f1b7ceb 100644
--- a/mysql-test/t/help.test
+++ b/mysql-test/t/help.test
@@ -113,3 +113,5 @@ delete from mysql.help_relation where help_keyword_id=@keyword1_id and help_topi
 delete from mysql.help_relation where help_keyword_id=@keyword2_id and help_topic_id=@topic1_id;
 delete from mysql.help_relation where help_keyword_id=@keyword3_id and help_topic_id=@topic3_id;
 delete from mysql.help_relation where help_keyword_id=@keyword3_id and help_topic_id=@topic4_id;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test
index f13a29f07adb364afbde9a50d79396f47697b031..038104472991caf5d1610e76a8d909a0110dd2b4 100644
--- a/mysql-test/t/information_schema.test
+++ b/mysql-test/t/information_schema.test
@@ -5,7 +5,7 @@
 # show databases
 
 --disable_warnings
-DROP TABLE IF EXISTS t0,t1,t2;
+DROP TABLE IF EXISTS t0,t1,t2,t3,t5;
 --enable_warnings
 
 
@@ -30,6 +30,8 @@ create table mysqltest.t1(a int, b VARCHAR(30), KEY string_data (b));
 create table test.t2(a int);
 create table t3(a int, KEY a_data (a));
 create table mysqltest.t4(a int);
+create table t5 (id int auto_increment primary key);
+insert into t5 values (10);
 create view v1 (c) as select table_name from information_schema.TABLES;
 select * from v1;
 
@@ -76,7 +78,7 @@ where table_schema = 'mysqltest' and table_name = 'v1';
 connection default;
 
 drop view v1, mysqltest.v1;
-drop tables mysqltest.t4, mysqltest.t1, t2, t3;
+drop tables mysqltest.t4, mysqltest.t1, t2, t3, t5;
 drop database mysqltest;
 
 # Test for information_schema.CHARACTER_SETS &
@@ -249,25 +251,27 @@ flush privileges;
 
 # QQ This results in NULLs instead of the version numbers when
 # QQ a LOCK TABLES is in effect when selecting from
-# QQ information_schema.tables. Until this bug has been fixed,
-# QQ this test is disabled /pem
-#delimiter //;
-#create procedure px5 ()
-#begin
-#declare v int;
-#declare c cursor for select version from
-#information_schema.tables where table_schema <> 'information_schema';
-#open c;
-#fetch c into v;
-#select v;
-#close c;
-#end;//
-#
-#call px5()//
-#call px5()//
-#delimiter ;//
-#select sql_mode from information_schema.ROUTINES;
-#drop procedure px5;
+# QQ information_schema.tables.
+
+--disable_parsing until bug is fixes
+delimiter //;
+create procedure px5 ()
+begin
+declare v int;
+declare c cursor for select version from
+information_schema.tables where table_schema <> 'information_schema';
+open c;
+fetch c into v;
+select v;
+close c;
+end;//
+
+call px5()//
+call px5()//
+delimiter ;//
+select sql_mode from information_schema.ROUTINES;
+drop procedure px5;
+--enable_parsing
 
 create table t1 (a int not null auto_increment,b int, primary key (a));
 insert into t1 values (1,1),(NULL,3),(NULL,4);
@@ -409,6 +413,8 @@ show variables where variable_name like "skip_show_databas";
 #
 # Bug #7981:SHOW GLOBAL STATUS crashes server
 #
+# We don't actually care about the value, just that it doesn't crash.
+--replace_column 2 #
 show global status like "Threads_running";
 
 #
@@ -609,6 +615,7 @@ show create database information_schema;
 
 #
 # Bug #11057 information_schema: columns table has some questionable contents
+# Bug #12301 information_schema: NUMERIC_SCALE must be 0 for integer columns
 #
 create table t1(f1 LONGBLOB, f2 LONGTEXT);
 select column_name,data_type,CHARACTER_OCTET_LENGTH,
@@ -622,3 +629,24 @@ select column_name, NUMERIC_PRECISION, NUMERIC_SCALE
 from information_schema.columns
 where table_name='t1';
 drop table t1;
+
+#
+# Bug #12127 triggers do not show in info_schema before they are used if set to the database
+#
+create table t1 (f1 integer);
+create trigger tr1 after insert on t1 for each row set @test_var=42;
+use information_schema;
+select trigger_schema, trigger_name from triggers where
+trigger_name='tr1';
+use test;
+drop table t1;
+
+#
+# Bug#12518 COLUMN_DEFAULT has wrong value if NOT NULL is set
+#
+create table t1 (a int not null, b int);
+use information_schema;
+select column_name, column_default from columns
+  where table_schema='test' and table_name='t1';
+use test;
+drop table t1;
diff --git a/mysql-test/t/init_connect.test b/mysql-test/t/init_connect.test
index d9682eb8122ee25b6446aba085622ad0712c8e48..2e3c67a7d388febc9dde82943cca6d4559753d65 100644
--- a/mysql-test/t/init_connect.test
+++ b/mysql-test/t/init_connect.test
@@ -32,3 +32,5 @@ connection con5;
 select @a;
 connection con0;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/init_file.test b/mysql-test/t/init_file.test
index 604d0a017945605eb819ccf792b5cd5a94c31b8c..de6aca455bdd4eca7d406aba93ac4ef566af6805 100644
--- a/mysql-test/t/init_file.test
+++ b/mysql-test/t/init_file.test
@@ -5,3 +5,5 @@
 # See mysql-test/std_data/init_file.dat and
 # mysql-test/t/init_file-master.opt for the actual test
 # 
+
+# End of 4.1 tests
diff --git a/mysql-test/t/innodb-deadlock.test b/mysql-test/t/innodb-deadlock.test
index 7a7f657f35d38465295c94ef5a926d009b052d25..9d15a23da3ce92fe3a00c49fa2ee8a9dfaacdff0 100644
--- a/mysql-test/t/innodb-deadlock.test
+++ b/mysql-test/t/innodb-deadlock.test
@@ -113,3 +113,5 @@ select * from t1;
 commit;
 
 drop table t1, t2;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/innodb-lock.test b/mysql-test/t/innodb-lock.test
index 887a664e262039f5919b6f891f3bc829c4697132..dd7f431989299ded16c30779ef69f49e472fae9b 100644
--- a/mysql-test/t/innodb-lock.test
+++ b/mysql-test/t/innodb-lock.test
@@ -100,3 +100,5 @@ reap;
 commit;
 select * from t1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/innodb-replace.test b/mysql-test/t/innodb-replace.test
index 516f058a68ed2e04d1232e903813ec9739cce7c7..51b70f34b65fadd76e8aa84f4d2ae193ebf4befb 100644
--- a/mysql-test/t/innodb-replace.test
+++ b/mysql-test/t/innodb-replace.test
@@ -19,3 +19,4 @@ replace delayed into t1 (c1, c2)  values ( "text1","12"),( "text2","13"),( "text
 select * from t1;
 drop table t1;
 
+# End of 4.1 tests
diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test
index 2d0e2a4dd65486db17ea8475e66427b87886eb58..8d51af4f22f642ea3f017c6a672e69bf3c5e9a8f 100644
--- a/mysql-test/t/innodb.test
+++ b/mysql-test/t/innodb.test
@@ -440,7 +440,7 @@ drop table t1;
 set @a:=now();
 CREATE TABLE t1 (a int not null, b timestamp not null, primary key (a)) engine=innodb;
 insert into t1 (a) values(1),(2),(3);
-select t1.a from t1 natural join t1 as t2 where t1.b >= @a order by t1.a;
+select a from t1 natural join t1 as t2 where b >= @a order by a;
 update t1 set a=5 where a=1;
 select a from t1;
 drop table t1;
@@ -981,7 +981,7 @@ insert into `t3`values ( 1 ) ;
 delete t3,t2,t1 from t1,t2,t3 where t1.id =1 and t2.id = t1.id and t3.id = t2.id;
 --error 1217
 update t1,t2,t3 set t3.id=5, t2.id=6, t1.id=7  where t1.id =1 and t2.id = t1.id and t3.id = t2.id;
---error 1109
+--error 1054
 update t3 set  t3.id=7  where t1.id =1 and t2.id = t1.id and t3.id = t2.id;
 drop table t3,t2,t1;
 
@@ -1230,6 +1230,8 @@ SELECT * FROM (SELECT t1.*,GROUP_CONCAT(t2.b_id SEPARATOR ',') as b_list FROM (t
 DROP TABLE t2;
 DROP TABLE t1;
 
+# End of 4.1 tests
+
 #
 # range optimizer problem
 #
@@ -1368,7 +1370,6 @@ insert into t1 (val) values ('1'),('2');
 select * from t1;
 drop table t1;
 
-
 #
 # Test that update does not change internal auto-increment value
 #
@@ -1393,3 +1394,13 @@ SELECT GRADE  FROM t1 WHERE GRADE > 160 AND GRADE < 300;
 SELECT GRADE  FROM t1 WHERE GRADE= 151;
 DROP TABLE t1;
 
+#
+# Bug #12340 multitable delete deletes only one record
+#
+create table t1 (f1 varchar(10), f2 varchar(10), primary key (f1,f2)) engine=innodb;
+create table t2 (f3 varchar(10), f4 varchar(10), key (f4)) engine=innodb;
+insert into t2 values ('aa','cc');
+insert into t1 values ('aa','bb'),('aa','cc');
+delete t1 from t1,t2 where f1=f3 and f4='cc';
+select * from t1;
+drop table t1,t2;
diff --git a/mysql-test/t/innodb_cache.test b/mysql-test/t/innodb_cache.test
index 101dde37f89fe28e80eea4b848acd5244abea4ce..a811d660bd7906459c2f2512efbf2373011d5a30 100644
--- a/mysql-test/t/innodb_cache.test
+++ b/mysql-test/t/innodb_cache.test
@@ -80,3 +80,4 @@ commit;
 select t1.* from t1, t2, t3 where t3.state & 1 = 0 and t3.t1_id = t1.id and t3.t2_id = t2.id and t1.id = 1 order by t1.a asc;
 drop table t3,t2,t1;
 
+# End of 4.1 tests
diff --git a/mysql-test/t/innodb_handler.test b/mysql-test/t/innodb_handler.test
index 65728519e7b4963e14c9a1bd62de5bd5748090ad..18cec97af0d29c170eb356837dc6e04920f2cf98 100644
--- a/mysql-test/t/innodb_handler.test
+++ b/mysql-test/t/innodb_handler.test
@@ -93,3 +93,4 @@ HANDLER t1 READ `primary` = (1, 1000);
 HANDLER t1 READ `primary` PREV;
 DROP TABLE t1;
 
+# End of 4.1 tests
diff --git a/mysql-test/t/insert.test b/mysql-test/t/insert.test
index e977de948715c396ff9385db5df4a9949e94f899..51d936f5b4f9b1c5540a10f9cd93a9204ab7d772 100644
--- a/mysql-test/t/insert.test
+++ b/mysql-test/t/insert.test
@@ -151,6 +151,12 @@ insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@val
 drop table t1;
 --enable_ps_protocol
 
+# End of 4.1 tests
+
+#
+# Test automatic result buffering with INSERT INTO t1 ... SELECT ... FROM t1
+#
+
 create table t1(id1 int not null auto_increment primary key, t char(12));
 create table t2(id2 int not null, t char(12));
 create table t3(id3 int not null, t char(12), index(id3));
diff --git a/mysql-test/t/insert_select-binlog.test b/mysql-test/t/insert_select-binlog.test
index 9bb1ec274efa45995ff08bc294f9c858ed273439..d4041f86ab5dbfcae025220913f11cd029812fcc 100644
--- a/mysql-test/t/insert_select-binlog.test
+++ b/mysql-test/t/insert_select-binlog.test
@@ -32,3 +32,4 @@ let $VERSION=`select version()`;
 show binlog events;
 drop table t1;
 
+# End of 4.1 tests
diff --git a/mysql-test/t/insert_select.test b/mysql-test/t/insert_select.test
index 92e8c7f1231578d7fc726d5eebf7310f312f07ec..7116a25ff39a2741f05ab7b1b214c373e57cade0 100644
--- a/mysql-test/t/insert_select.test
+++ b/mysql-test/t/insert_select.test
@@ -196,8 +196,10 @@ insert into t1 select t2.a from t2 group by t2.a on duplicate key update a= a +
 #Some error cases
 --error 1052
 insert into t1 select t2.a from t2 on duplicate key update a= a + t2.b;
---error 1109
+--error 1054
 insert into t1 select t2.a from t2 on duplicate key update t2.a= a + t2.b;
---error 1109
+--error 1054
 insert into t1 select t2.a from t2 group by t2.a on duplicate key update a= t1.a + t2.b;
 drop table t1,t2,t3;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/insert_update.test b/mysql-test/t/insert_update.test
index 64a76aafa5e5f1b72ebc80821919976b7835dc81..eda768be1bc6a7490ddb86cb20e576dc5e8cc161 100644
--- a/mysql-test/t/insert_update.test
+++ b/mysql-test/t/insert_update.test
@@ -100,3 +100,19 @@ insert into t1 select a from t1 on duplicate key update a=a+1 ;
 --error 1052
 insert ignore into t1 select a from t1 on duplicate key update a=t1.a+1 ;
 drop table t1;
+
+#
+# Bug#10109 - INSERT .. SELECT ... ON DUPLICATE KEY UPDATE fails
+# Bogus "Duplicate columns" error message
+#
+
+CREATE TABLE t1 (
+  a BIGINT(20) NOT NULL DEFAULT 0,
+  PRIMARY KEY  (a)
+) ENGINE=MyISAM;
+
+INSERT INTO t1 ( a ) SELECT 0 ON DUPLICATE KEY UPDATE a = a + VALUES (a) ;
+
+DROP TABLE t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/join.test b/mysql-test/t/join.test
index 1d18e02054374356c78d65d2baa5c16f8723c21f..06e89e6cb9daf750ef83d5a18461b1b5ac26879e 100644
--- a/mysql-test/t/join.test
+++ b/mysql-test/t/join.test
@@ -111,10 +111,12 @@ drop table t1, t2;
 
 create table t1 (a int primary key);
 insert into t1 values(1),(2);
-select t1.a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a);
+# TODO: WL#2486 - the query fails in PS mode with error:
+#       Cross dependency found in OUTER JOIN; examine your ON conditions
+#select a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a);
 --replace_result "31 tables" "XX tables" "61 tables" "XX tables"
 --error 1116
-select t1.a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a) left join t1 as t32 using (a) left join t1 as t33 using (a) left join t1 as t34 using (a) left join t1 as t35 using (a) left join t1 as t36 using (a) left join t1 as t37 using (a) left join t1 as t38 using (a) left join t1 as t39 using (a) left join t1 as t40 using (a) left join t1 as t41 using (a) left join t1 as t42 using (a) left join t1 as t43 using (a) left join t1 as t44 using (a) left join t1 as t45 using (a) left join t1 as t46 using (a) left join t1 as t47 using (a) left join t1 as t48 using (a) left join t1 as t49 using (a) left join t1 as t50 using (a) left join t1 as t51 using (a) left join t1 as t52 using (a) left join t1 as t53 using (a) left join t1 as t54 using (a) left join t1 as t55 using (a) left join t1 as t56 using (a) left join t1 as t57 using (a) left join t1 as t58 using (a) left join t1 as t59 using (a) left join t1 as t60 using (a) left join t1 as t61 using (a) left join t1 as t62 using (a) left join t1 as t63 using (a) left join t1 as t64 using (a) left join t1 as t65 using (a);
+select a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a) left join t1 as t32 using (a) left join t1 as t33 using (a) left join t1 as t34 using (a) left join t1 as t35 using (a) left join t1 as t36 using (a) left join t1 as t37 using (a) left join t1 as t38 using (a) left join t1 as t39 using (a) left join t1 as t40 using (a) left join t1 as t41 using (a) left join t1 as t42 using (a) left join t1 as t43 using (a) left join t1 as t44 using (a) left join t1 as t45 using (a) left join t1 as t46 using (a) left join t1 as t47 using (a) left join t1 as t48 using (a) left join t1 as t49 using (a) left join t1 as t50 using (a) left join t1 as t51 using (a) left join t1 as t52 using (a) left join t1 as t53 using (a) left join t1 as t54 using (a) left join t1 as t55 using (a) left join t1 as t56 using (a) left join t1 as t57 using (a) left join t1 as t58 using (a) left join t1 as t59 using (a) left join t1 as t60 using (a) left join t1 as t61 using (a) left join t1 as t62 using (a) left join t1 as t63 using (a) left join t1 as t64 using (a) left join t1 as t65 using (a);
 drop table t1;
 
 #
@@ -144,7 +146,7 @@ DROP TABLE t1, t2;
 CREATE TABLE t1 (d DATE NOT NULL);
 CREATE TABLE t2 (d DATE NOT NULL);
 INSERT INTO t1 (d) VALUES ('2001-08-01'),('0000-00-00');
-SELECT * FROM t1 LEFT JOIN t2 USING (d) WHERE t2.d IS NULL;
+SELECT * FROM t1 LEFT JOIN t2 USING (d) WHERE d IS NULL;
 SELECT * from t1 WHERE t1.d IS NULL;
 SELECT * FROM t1 WHERE 1/0 IS NULL;
 DROP TABLE t1,t2;
@@ -266,8 +268,8 @@ CREATE TABLE t2 (
   FULLTEXT KEY rate_code (rate_code)
 ) ENGINE=MyISAM;
 INSERT INTO t2 VALUES ('rivercats','cust',20);
-SELECT emp.rate_code, lr.base_rate FROM t1 AS emp LEFT JOIN t2 AS lr USING (siteid, rate_code) WHERE emp.emp_id = 'psmith' AND lr.siteid = 'rivercats';
-SELECT emp.rate_code, lr.base_rate FROM t1 AS emp LEFT JOIN t2 AS lr USING (siteid, rate_code) WHERE lr.siteid = 'rivercats' AND emp.emp_id = 'psmith';
+SELECT rate_code, lr.base_rate FROM t1 AS emp LEFT JOIN t2 AS lr USING (siteid, rate_code) WHERE emp.emp_id = 'psmith' AND siteid = 'rivercats';
+SELECT rate_code, lr.base_rate FROM t1 AS emp LEFT JOIN t2 AS lr USING (siteid, rate_code) WHERE siteid = 'rivercats' AND emp.emp_id = 'psmith';
 drop table t1,t2;
 
 #
@@ -315,13 +317,15 @@ select * from t3 right join t2 on (t3.i=t2.i);
 select * from t3 natural right join t2 natural right join t1;
 select * from t3 right join t2 on (t3.i=t2.i) right join t1 on (t2.i=t1.i);
 
-select * from t1,t2 natural left join t3 order by t1.i,t2.i,t3.i;
+select * from t1,t2 natural left join t3 order by 1,2;
 select * from t1,t2 left join t3 on (t2.i=t3.i) order by t1.i,t2.i,t3.i;
-select t1.i,t2.i,t3.i from t2 natural left join t3,t1 order by t1.i,t2.i,t3.i;
+select * from t2 natural left join t3,t1 order by t1.i;
 select t1.i,t2.i,t3.i from t2 left join t3 on (t2.i=t3.i),t1 order by t1.i,t2.i,t3.i;
 
-select * from t1,t2 natural right join t3 order by t1.i,t2.i,t3.i;
+select * from t1,t2 natural right join t3 order by 1,2;
 select * from t1,t2 right join t3 on (t2.i=t3.i) order by t1.i,t2.i,t3.i;
-select t1.i,t2.i,t3.i from t2 natural right join t3,t1 order by t1.i,t2.i,t3.i;
+select * from t2 natural right join t3,t1 order by t1.i;
 select t1.i,t2.i,t3.i from t2 right join t3 on (t2.i=t3.i),t1 order by t1.i,t2.i,t3.i;
 drop table t1,t2,t3;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/join_crash.test b/mysql-test/t/join_crash.test
index 2d2222ad67ac5a41bc51fab45d6d0b1eceac5b9f..2ec96dc2c28eec0f0210f88e35edc027bb098438 100644
--- a/mysql-test/t/join_crash.test
+++ b/mysql-test/t/join_crash.test
@@ -92,18 +92,11 @@ select distinct
     t1.comments as comments,
     sum( t3.amount_received ) + sum( t3.adjustment ) as total_budget
 from
-    t1 ,
     t2 as client_period ,
-    t2 as project_period
-    left join
-        t3
-    on
-        t3.project_ptr = t1.project_id
-        and t3.date_received <= '2001-03-22 14:15:09'
-    left join
-        t4
-    on
-        t4.client_id = t1.client_ptr
+    t2 as project_period,
+    t3 left join t1 on (t3.project_ptr = t1.project_id and
+                        t3.date_received <= '2001-03-22 14:15:09')
+       left join t4 on t4.client_id = t1.client_ptr
    where
         1
         and ( client_period.period_type = 'client_table'
@@ -124,3 +117,5 @@ from
         client_name asc,
         project_name asc;
 DROP TABLE t1,t2,t3,t4;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/join_nested.test b/mysql-test/t/join_nested.test
index 992217d03913e1c5566887da7348ef8fa6893c55..f6b742371239348be5d907ec6d8079b72fa1d83c 100644
--- a/mysql-test/t/join_nested.test
+++ b/mysql-test/t/join_nested.test
@@ -130,15 +130,13 @@ SELECT t8.a,t8.b
 
 EXPLAIN EXTENDED
 SELECT t6.a,t6.b,t7.a,t7.b,t8.a,t8.b
-  FROM t6,
-       t7 
+  FROM (t6, t7)
        LEFT JOIN 
        t8
        ON t7.b=t8.b AND t6.b < 10;
 
 SELECT t6.a,t6.b,t7.a,t7.b,t8.a,t8.b
-  FROM t6,
-       t7 
+  FROM (t6, t7)
        LEFT JOIN 
        t8
        ON t7.b=t8.b AND t6.b < 10;
@@ -150,8 +148,7 @@ SELECT t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b
   FROM t5 
        LEFT JOIN 
        ( 
-         t6,
-         t7 
+         (t6, t7)
          LEFT JOIN 
          t8
          ON t7.b=t8.b AND t6.b < 10
@@ -162,8 +159,7 @@ SELECT t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b
   FROM t5 
        LEFT JOIN 
        ( 
-         t6,
-         t7 
+         (t6, t7)
          LEFT JOIN 
          t8
          ON t7.b=t8.b AND t6.b < 10
@@ -186,8 +182,7 @@ SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
        t5 
        LEFT JOIN 
        ( 
-         t6,
-         t7 
+         (t6, t7)
          LEFT JOIN 
          t8
          ON t7.b=t8.b AND t6.b < 10
@@ -203,8 +198,7 @@ SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
        t5 
        LEFT JOIN 
        ( 
-         t6,
-         t7 
+         (t6, t7)
          LEFT JOIN 
          t8
          ON t7.b=t8.b AND t6.b < 10
@@ -228,8 +222,7 @@ SELECT t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
          t5 
          LEFT JOIN 
          ( 
-           t6,
-           t7 
+           (t6, t7)
            LEFT JOIN 
            t8
            ON t7.b=t8.b AND t6.b < 10
@@ -252,8 +245,7 @@ SELECT t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
          t5 
          LEFT JOIN 
          ( 
-           t6,
-           t7 
+           (t6, t7)
            LEFT JOIN 
            t8
            ON t7.b=t8.b AND t6.b < 10
@@ -281,8 +273,7 @@ SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
          t5 
          LEFT JOIN 
          ( 
-           t6,
-           t7 
+           (t6, t7)
            LEFT JOIN 
            t8
            ON t7.b=t8.b AND t6.b < 10
@@ -308,8 +299,7 @@ SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
          t5 
          LEFT JOIN 
          ( 
-           t6,
-           t7 
+           (t6, t7)
            LEFT JOIN 
            t8
            ON t7.b=t8.b AND t6.b < 10
@@ -336,8 +326,7 @@ SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
          t5 
          LEFT JOIN 
          ( 
-           t6,
-           t7 
+           (t6, t7)
            LEFT JOIN 
            t8
            ON t7.b=t8.b AND t6.b < 10
@@ -375,8 +364,7 @@ SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
          t5 
          LEFT JOIN 
          ( 
-           t6,
-           t7 
+           (t6, t7)
            LEFT JOIN 
            t8
            ON t7.b=t8.b AND t6.b < 10
@@ -452,7 +440,7 @@ SELECT t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b
     WHERE t1.a <= 2;
 
 SELECT t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b
-  FROM t1, t3, t4 
+  FROM t1, (t3, t4)
        RIGHT JOIN              
        t2
        ON t3.a=1 AND t2.b=t4.b
@@ -460,7 +448,7 @@ SELECT t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b
 
 EXPLAIN EXTENDED
 SELECT t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b
-  FROM t1, t3, t4
+  FROM t1, (t3, t4)
        RIGHT JOIN
        t2
        ON t3.a=1 AND t2.b=t4.b
@@ -470,13 +458,13 @@ CREATE INDEX idx_b ON t2(b);
 
 EXPLAIN EXTENDED
 SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b
-  FROM t3,t4 
+  FROM (t3,t4)
        LEFT JOIN              
        (t1,t2)
        ON t3.a=1 AND t3.b=t2.b AND t2.b=t4.b;
 
 SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b
-  FROM t3,t4 
+  FROM (t3,t4)
        LEFT JOIN              
        (t1,t2)
        ON t3.a=1 AND t3.b=t2.b AND t2.b=t4.b;
@@ -494,8 +482,7 @@ SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
          t5 
          LEFT JOIN 
          ( 
-           t6,
-           t7 
+           (t6, t7)
            LEFT JOIN 
            t8
            ON t7.b=t8.b AND t6.b < 10
@@ -534,8 +521,7 @@ SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
          t5 
          LEFT JOIN 
          ( 
-           t6,
-           t7 
+           (t6, t7)
            LEFT JOIN 
            t8
            ON t7.b=t8.b AND t6.b < 10
@@ -573,8 +559,7 @@ SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
          t5 
          LEFT JOIN 
          ( 
-           t6,
-           t7 
+           (t6, t7)
            LEFT JOIN 
            t8
            ON t7.b=t8.b AND t6.b < 10
@@ -613,8 +598,7 @@ SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
          t5 
          LEFT JOIN 
          ( 
-           t6,
-           t7 
+           (t6, t7)
            LEFT JOIN 
            t8
            ON t7.b=t8.b AND t6.b < 10
@@ -649,8 +633,7 @@ SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
          t5 
          LEFT JOIN 
          ( 
-           t6,
-           t7 
+           (t6, t7)
            LEFT JOIN 
            t8
            ON t7.b=t8.b AND t6.b < 10
@@ -695,7 +678,7 @@ SELECT t2.a,t2.b,t3.a1,t3.b
   FROM t2 LEFT JOIN t3 ON t2.b=t3.b
     WHERE t2.a = 4 OR (t2.a > 4 AND t3.a1 IS NULL);
 
-SELECT t2.a,t2.b,t3.a1,t3.b
+SELECT *
   FROM t2 NATURAL LEFT JOIN t3
     WHERE t2.a = 4 OR (t2.a > 4 AND t3.a1 IS NULL);
 
@@ -770,3 +753,51 @@ SELECT * FROM t1 LEFT JOIN (t2 LEFT JOIN t3 ON c21=c31) ON c11=c21;
 EXPLAIN SELECT * FROM t1 LEFT JOIN (t2 LEFT JOIN t3 ON c21=c31) ON c11=c21;
 
 DROP TABLE t1,t2,t3;
+
+#
+# Bug #12154: creation of temp table for a query with nested outer join
+# 
+
+CREATE TABLE t1 (goods int(12) NOT NULL, price varchar(128) NOT NULL);
+INSERT INTO t1 VALUES (23, 2340), (26, 9900);
+
+CREATE TABLE t2 (goods int(12), name varchar(50), shop char(2));
+INSERT INTO t2 VALUES (23, 'as300', 'fr'), (26, 'as600', 'fr');
+
+create table t3 (groupid int(12) NOT NULL, goodsid int(12) NOT NULL);
+INSERT INTO t3 VALUES (3,23), (6,26);
+
+CREATE TABLE t4 (groupid int(12));
+INSERT INTO t4 VALUES (1), (2), (3), (4), (5), (6);
+
+SELECT * FROM
+(SELECT DISTINCT gl.groupid, gp.price
+  FROM t4 gl 
+       LEFT JOIN
+       (t3 g INNER JOIN t2 p ON g.goodsid = p.goods 
+             INNER JOIN t1 gp ON p.goods = gp.goods)
+       ON gl.groupid = g.groupid and p.shop = 'fr') t;
+
+CREATE VIEW v1 AS
+SELECT g.groupid groupid, p.goods goods,  
+       p.name name, p.shop shop, 
+       gp.price price
+  FROM t3 g INNER JOIN t2 p ON g.goodsid = p.goods
+            INNER JOIN t1 gp on p.goods = gp.goods;
+
+CREATE VIEW v2 AS
+SELECT DISTINCT g.groupid, fr.price
+  FROM t4 g
+       LEFT JOIN
+       v1 fr on g.groupid = fr.groupid and fr.shop = 'fr';
+
+SELECT * FROM v2;
+
+SELECT * FROM 
+(SELECT DISTINCT g.groupid, fr.price
+  FROM t4 g
+       LEFT JOIN
+       v1 fr on g.groupid = fr.groupid and fr.shop = 'fr') t;
+
+DROP VIEW v1,v2;
+DROP TABLE t1,t2,t3,t4;
diff --git a/mysql-test/t/join_outer.test b/mysql-test/t/join_outer.test
index 7dd35f164d557855ab8539a48ed35a2da45d8839..6a3b79f83545ce892721cc780aab63e5caea6dde 100644
--- a/mysql-test/t/join_outer.test
+++ b/mysql-test/t/join_outer.test
@@ -19,11 +19,11 @@ select t1.*,t2.* from t1 JOIN t2 where t1.a=t2.a;
 select t1.*,t2.* from t1 left join t2 on (t1.a=t2.a) order by t1.grp,t1.a,t2.c;
 select t1.*,t2.* from { oj t2 left outer join t1 on (t1.a=t2.a) };
 select t1.*,t2.* from t1 as t0,{ oj t2 left outer join t1 on (t1.a=t2.a) } WHERE t0.a=2;
-select t1.*,t2.* from t1 left join t2 using (a);
-select t1.*,t2.* from t1 left join t2 using (a) where t1.a=t2.a;
-select t1.*,t2.* from t1 left join t2 using (a,c);
-select t1.*,t2.* from t1 left join t2 using (c);
-select t1.*,t2.* from t1 natural left outer join t2;
+select * from t1 left join t2 using (a);
+select t1.*,t2.* from t1 left join t2 on t1.a=t2.a;
+select * from t1 left join t2 using (a,c);
+select * from t1 left join t2 using (c);
+select * from t1 natural left outer join t2;
 
 select t1.*,t2.* from t1 left join t2 on (t1.a=t2.a) where t2.id=3;
 select t1.*,t2.* from t1 left join t2 on (t1.a=t2.a) where t2.id is null;
@@ -34,19 +34,19 @@ explain select t1.*,t2.* from t1 left join t2 on t1.a=t2.a where isnull(t2.a)=1;
 select t1.*,t2.*,t3.a from t1 left join t2 on (t1.a=t2.a) left join t1 as t3 on (t2.a=t3.a);
 
 # The next query should rearange the left joins to get this to work
---error 1120
+--error 1054
 explain select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t1.a=t3.a);
---error 1120
+--error 1054
 select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t1.a=t3.a);
 
 # The next query should give an error in MySQL
---error 1120
+--error 1054
 select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t2.a=t3.a);
 
 # Test of inner join
-select t1.*,t2.* from t1 inner join t2 using (a);
+select * from t1 inner join t2 using (a);
 select t1.*,t2.* from t1 inner join t2 on (t1.a=t2.a);
-select t1.*,t2.* from t1 natural join t2;
+select * from t1 natural join t2;
 
 drop table t1,t2;
 
@@ -292,7 +292,7 @@ insert into t3 values (1);
 insert into t4 values (1,1);
 insert into t5 values (1,1);
 
---error 1120
+--error 1054
 explain select * from t3 left join t4 on t4.seq_1_id = t2.t2_id left join t1 on t1.t1_id = t4.seq_0_id left join t5 on t5.seq_0_id = t1.t1_id left join t2 on t2.t2_id = t5.seq_1_id where t3.t3_id = 23;
 
 drop table t1,t2,t3,t4,t5;
@@ -325,7 +325,7 @@ INSERT INTO t2 VALUES (2,'y');
 INSERT INTO t2 VALUES (3,'z');
 
 SELECT t2.id2 FROM t2 LEFT OUTER JOIN t1 ON t1.id2 = t2.id2 WHERE id1 IS NULL;
-SELECT t2.id2 FROM t2 NATURAL LEFT OUTER JOIN t1 WHERE id1 IS NULL;
+SELECT id2 FROM t2 NATURAL LEFT OUTER JOIN t1 WHERE id1 IS NULL;
 
 drop table t1,t2;
 
@@ -430,8 +430,8 @@ insert into t1 values(1),(2);
 insert into t2 values(2),(3);
 insert into t3 values(2),(4);
 select * from t1 natural left join t2 natural left join t3;
-select * from t1 natural left join t2 where (t2.i is not null)=0;
-select * from t1 natural left join t2 where (t2.i is not null) is not null;
+select * from t1 natural left join t2 where (i is not null)=0;
+select * from t1 natural left join t2 where (i is not null) is not null;
 drop table t1,t2,t3;
 
 #
@@ -440,7 +440,6 @@ drop table t1,t2,t3;
 create table t1 (f1 integer,f2 integer,f3 integer);
 create table t2 (f2 integer,f4 integer);
 create table t3 (f3 integer,f5 integer);
---error 1054
 select * from t1
          left outer join t2 using (f2)
          left outer join t3 using (f3);
@@ -657,11 +656,13 @@ create table t1 (a int, b varchar(20));
 create table t2 (a int, c varchar(20));
 insert into t1 values (1,"aaaaaaaaaa"),(2,"bbbbbbbbbb");
 insert into t2 values (1,"cccccccccc"),(2,"dddddddddd");
-select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by t1.a;
-select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by t1.a;
+select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by a;
+select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by a;
 drop table t1, t2;
 set group_concat_max_len=default;
 
+# End of 4.1 tests
+
 #
 # BUG#10162 - ON is merged with WHERE, left join is convered to a regular join
 #
@@ -706,8 +707,5 @@ CREATE TABLE t1 (c11 int);
 CREATE TABLE t2 (c21 int);
 INSERT INTO t1 VALUES (30), (40), (50);
 INSERT INTO t2 VALUES (300), (400), (500);
-
 SELECT * FROM t1 LEFT JOIN t2 ON (c11=c21 AND c21=30) WHERE c11=40;
-
 DROP TABLE t1, t2;
-
diff --git a/mysql-test/t/key.test b/mysql-test/t/key.test
index 9db1523be514c68c7768e762a34b4085b5ea1b1e..91bd1ada8a4ca55b44873b66f0f431e82e3972e9 100644
--- a/mysql-test/t/key.test
+++ b/mysql-test/t/key.test
@@ -337,3 +337,21 @@ show create table t1;
 alter table t1 modify a varchar(20);
 show create table t1;
 drop table t1;
+
+#
+# Bug #11227: Incorrectly reporting 'MUL' vs. 'UNI' on varchar
+#
+create table t1 (a int not null primary key, b varchar(20) not null unique);
+desc t1;
+drop table t1;
+create table t1 (a int not null primary key, b int not null unique);
+desc t1;
+drop table t1;
+create table t1 (a int not null primary key, b varchar(20) not null, unique (b(10)));
+desc t1;
+drop table t1;
+create table t1 (a int not null primary key, b varchar(20) not null, c varchar(20) not null, unique(b(10),c(10)));
+desc t1;
+drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/key_cache.test b/mysql-test/t/key_cache.test
index 5ff26b315e222ce852dbd8bc61f34bf908f46822..df584021af1f74e0b66c647ac1cc3039d4c35251 100644
--- a/mysql-test/t/key_cache.test
+++ b/mysql-test/t/key_cache.test
@@ -167,3 +167,12 @@ set GLOBAL key_cache_block_size=2048;
 check table t1;
 
 drop table t1;
+
+#
+# Bug#10473 - Can't set 'key_buffer_size' system variable to ZERO
+# (One cannot drop the default key cache.)
+#
+set @@global.key_buffer_size=0;
+select @@global.key_buffer_size;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/key_diff.test b/mysql-test/t/key_diff.test
index b4e4339ae33478c5c7dac234fdc65df9a62bf1b9..b490c613c611ffee8bbdba9336797c67fa12768a 100644
--- a/mysql-test/t/key_diff.test
+++ b/mysql-test/t/key_diff.test
@@ -20,3 +20,5 @@ explain select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B;
 select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B order by binary t1.a,t2.a;
 select * from t1 where a='a';
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/key_primary.test b/mysql-test/t/key_primary.test
index 816365c517c625c3c0051e4bfd5bc74451bd94bc..1ca2059b87148b93b1c6ee501de8629973e72487 100644
--- a/mysql-test/t/key_primary.test
+++ b/mysql-test/t/key_primary.test
@@ -16,3 +16,5 @@ select * from t1 where t1 like "a_\%";
 describe select * from t1 where t1="ABC";
 describe select * from t1 where t1="ABCD";
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/keywords.test b/mysql-test/t/keywords.test
index 3392bfa1b3b514fd8d4385c856dbb57940c7adb4..de0159a950e9b230db9773304186fb6549852512 100644
--- a/mysql-test/t/keywords.test
+++ b/mysql-test/t/keywords.test
@@ -17,3 +17,5 @@ create table events(binlog int);
 insert into events values(1);
 select events.binlog from events;
 drop table events;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/kill.test b/mysql-test/t/kill.test
index 37e11e14df52b720457efa18cf548408a4616917..3503d5fde1d37355a38010fbfa5639ab4c9e216c 100644
--- a/mysql-test/t/kill.test
+++ b/mysql-test/t/kill.test
@@ -15,6 +15,7 @@ connection con1;
 drop table if exists t1;
 --enable_warnings
 
+--disable_reconnect
 create table t1 (kill_id int);
 insert into t1 values(connection_id());
 
@@ -25,7 +26,6 @@ kill @id;
 
 connection con1;
 
---disable_reconnect
 # this statement should fail
 --error 2006,2013
 select 1;
@@ -39,6 +39,8 @@ connection con2;
 select 4;
 drop table t1;
 
+# End of 4.1 tests
+
 #
 # test of blocking of sending ERROR after OK or EOF
 #
diff --git a/mysql-test/t/limit.test b/mysql-test/t/limit.test
index 3dc562953750deaa0e787a23add23926139d6587..6df865278f66a42c0c75e20512d4a5255a7e5bcd 100644
--- a/mysql-test/t/limit.test
+++ b/mysql-test/t/limit.test
@@ -59,3 +59,5 @@ insert into t1 values (1);
 select 1 as a from t1 union all select 1 from dual limit 1;
 (select 1 as a from t1) union all (select 1 from dual) limit 1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test
index 14ef749c802bd7850f562b1789223b657c060f84..fe6828916a3e579efaa9fb067258abaa050d4b5c 100644
--- a/mysql-test/t/loaddata.test
+++ b/mysql-test/t/loaddata.test
@@ -31,6 +31,8 @@ load data infile '../../std_data/loaddata4.dat' into table t1 fields terminated
 select * from t1;
 drop table t1;
 
+# End of 4.1 tests
+
 #
 # Let us test extended LOAD DATA features
 #
diff --git a/mysql-test/t/lock.test b/mysql-test/t/lock.test
index 127cbb54a88590d8dac840ad4754b65615480c04..4815c1a30b76294c43496b5151b9500c16abe82b 100644
--- a/mysql-test/t/lock.test
+++ b/mysql-test/t/lock.test
@@ -73,3 +73,5 @@ delete from t2 using t1,t2 where t1.a=t2.a;
 --error 1099
 delete t2 from t1,t2 where t1.a=t2.a;
 drop table t1,t2;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/lock_multi.test b/mysql-test/t/lock_multi.test
index 43cff90332bbe98c9d52e073c8f7ebfd3253eefa..0d2266fc2ae57e21875e36a5bc680c32e5e6e299 100644
--- a/mysql-test/t/lock_multi.test
+++ b/mysql-test/t/lock_multi.test
@@ -95,10 +95,11 @@ reap;
 connection locker;
 drop table t1;
 
+# End of 4.1 tests
 
 #
 # BUG#9998 - MySQL client hangs on USE "database"
-
+#
 create table t1(a int);
 lock tables t1 write;
 connection reader;
diff --git a/mysql-test/t/lock_tables_lost_commit.test b/mysql-test/t/lock_tables_lost_commit.test
index 8c1ad97c0ccfdee3de5cc1bc830d437bb787c66e..d31b4b7dfb55a1f16030096abccd208340dd5aaf 100644
--- a/mysql-test/t/lock_tables_lost_commit.test
+++ b/mysql-test/t/lock_tables_lost_commit.test
@@ -20,3 +20,5 @@ connection con2;
 # binlog-ignore-db  
 select * from t1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/lowercase_table.test b/mysql-test/t/lowercase_table.test
index 9332c47cb2f708c20ff5843c8a75d4161b7d09a4..e6f681e4f90d57dd656e533dffce44bc61c79406 100644
--- a/mysql-test/t/lowercase_table.test
+++ b/mysql-test/t/lowercase_table.test
@@ -94,3 +94,4 @@ use com1;
 --error 1049
 use prn;
 
+# End of 4.1 tests
diff --git a/mysql-test/t/lowercase_table2.test b/mysql-test/t/lowercase_table2.test
index f5cf292482e5c725aa7580766652e45fcaf98089..c02ae8f507367109075481dc1d77f9726a3d2e3a 100644
--- a/mysql-test/t/lowercase_table2.test
+++ b/mysql-test/t/lowercase_table2.test
@@ -137,3 +137,5 @@ create table t2aA (col1 int);
 create table t1Aa (col1 int);
 select t1Aa.col1 from t1aA,t2Aa where t1Aa.col1 = t2aA.col1;
 drop table t2aA, t1Aa;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/lowercase_table3.test b/mysql-test/t/lowercase_table3.test
index 9841059a26b420073e2822b582d576e36301f554..75f6e5188c5a2b0f2e105746ecd71ec582c4f349 100644
--- a/mysql-test/t/lowercase_table3.test
+++ b/mysql-test/t/lowercase_table3.test
@@ -5,12 +5,8 @@
 #
 
 --source include/have_innodb.inc
---require r/lowercase0.require
-disable_query_log;
-show variables like "lower_case_%";
---require r/true.require
-select convert(@@version_compile_os using latin1) NOT IN ("NT","WIN2000","Win95/Win98","XP") as "TRUE";
-enable_query_log;
+--source include/have_lowercase0.inc
+--source include/not_windows.inc
 
 --disable_warnings
 DROP TABLE IF EXISTS t1,T1;
@@ -35,3 +31,5 @@ CREATE TABLE t1 (a int) ENGINE=INNODB;
 --error 1146
 SELECT * from T1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/lowercase_table_grant.test b/mysql-test/t/lowercase_table_grant.test
index 3d6adb477a35eedd2182771cd5885bdd8c97517d..7449231fca5a336ca89372190d15e2b4519e9ed3 100644
--- a/mysql-test/t/lowercase_table_grant.test
+++ b/mysql-test/t/lowercase_table_grant.test
@@ -26,3 +26,5 @@ flush privileges;
 drop user mysqltest_1@localhost;
 
 drop database MYSQLtest;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/lowercase_table_qcache.test b/mysql-test/t/lowercase_table_qcache.test
index 5077a41402aa0dfa422a0eb493436c4c5bc9cf40..e63ad3b2c16fc725e8cc0452909b21c7fae419bb 100644
--- a/mysql-test/t/lowercase_table_qcache.test
+++ b/mysql-test/t/lowercase_table_qcache.test
@@ -27,3 +27,5 @@ enable_result_log;
 show status like "Qcache_queries_in_cache";
 
 set GLOBAL query_cache_size=0;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test
index 165c16823a2a99e1dbb338691e283a681bab267f..7d708243a10caf7f21985e4d38e45a8d3f350cc1 100644
--- a/mysql-test/t/merge.test
+++ b/mysql-test/t/merge.test
@@ -320,3 +320,4 @@ INSERT INTO t2 (b) VALUES (1) ON DUPLICATE KEY UPDATE b=3;
 SELECT b FROM t2;
 DROP TABLE t1, t2;
 
+# End of 4.1 tests
diff --git a/mysql-test/t/metadata.test b/mysql-test/t/metadata.test
index ebd58ef4ebb63e94ae38c508c4c0e520421261dd..65338448555abe185af2c92c4cde310bda8d127c 100644
--- a/mysql-test/t/metadata.test
+++ b/mysql-test/t/metadata.test
@@ -48,3 +48,17 @@ select * from (select 1 union select 1) aaa;
 drop table t1;
 
 --disable_metadata
+
+#
+# Bug #11688: Bad mysql_info() results in multi-results
+#
+--enable_info
+delimiter //;
+create table t1 (i int);
+insert into t1 values (1),(2),(3);
+select * from t1 where i = 2;
+drop table t1;//
+delimiter ;//
+--disable_info
+
+# End of 4.1 tests
diff --git a/mysql-test/t/mix_innodb_myisam_binlog.test b/mysql-test/t/mix_innodb_myisam_binlog.test
index 0641acb552f5ee0d89d0139283bf07bb5c417908..2e804f4c98673561f445b8d0226afea97e966ad7 100644
--- a/mysql-test/t/mix_innodb_myisam_binlog.test
+++ b/mysql-test/t/mix_innodb_myisam_binlog.test
@@ -229,3 +229,5 @@ select (@after-@before) >= 2;
 
 # cleanup
 drop table t1,t2;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/multi_statement.test b/mysql-test/t/multi_statement.test
index 2abec33287816a2fd0b6a3258454b6217af508e3..eb8d867f3f03df175ab222c854e98e43faade302 100644
--- a/mysql-test/t/multi_statement.test
+++ b/mysql-test/t/multi_statement.test
@@ -29,3 +29,5 @@ show status like 'Slow_queries'||||
 drop table t1||||
 
 delimiter ;||||
+
+# End of 4.1 tests
diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test
index 0ca42e86204e5390b60b52d3faf8c64a52d7f21e..5e3be6d45ebc4552d8af9198912a29a6106d58f5 100644
--- a/mysql-test/t/multi_update.test
+++ b/mysql-test/t/multi_update.test
@@ -452,6 +452,8 @@ insert into t2 values(1,null);
 delete t2, t1 from t2 left join t1 on (t2.aclid=t1.aclid) where t2.refid='1';
 drop table t1, t2;
 
+# End of 4.1 tests
+
 #
 # Test for bug #1980.
 #
diff --git a/mysql-test/t/myisam-blob.test b/mysql-test/t/myisam-blob.test
index 7af8c661c0244e9540a7f2217485278eddc3ad5f..ac1b45b8c6cee67947422a8f967314a51226eb66 100644
--- a/mysql-test/t/myisam-blob.test
+++ b/mysql-test/t/myisam-blob.test
@@ -39,3 +39,5 @@ INSERT INTO t1 (data) VALUES (NULL);
 UPDATE t1 set data=repeat('a',18*1024*1024);
 select length(data) from t1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test
index fccc7642eb003dc49f17884c34890971a6188311..dfb00d5686c46ce13b7e7ca58e0463b85e83d917 100644
--- a/mysql-test/t/myisam.test
+++ b/mysql-test/t/myisam.test
@@ -479,7 +479,7 @@ drop table t1,t2;
 #
 # Test RTREE index
 #
---error 1235
+--error 1235, 1289
 CREATE TABLE t1 (`a` int(11) NOT NULL default '0', `b` int(11) NOT NULL default '0', UNIQUE KEY `a` USING RTREE (`a`,`b`)) ENGINE=MyISAM;
 # INSERT INTO t1 VALUES (1,1),(1,1);
 # DELETE FROM rt WHERE a<1;
@@ -675,3 +675,4 @@ show keys from t1;
 
 drop table t1;
 
+# End of 4.1 tests
diff --git a/mysql-test/t/mysql_client_test.test b/mysql-test/t/mysql_client_test.test
index 3639fc2e2621335d8bf743638dc3456aa8064817..ccf5e0bf66a4547c7bc966bda612f4ed09ec245e 100644
--- a/mysql-test/t/mysql_client_test.test
+++ b/mysql-test/t/mysql_client_test.test
@@ -8,3 +8,5 @@
 --disable_result_log
 --exec echo $MYSQL_CLIENT_TEST
 --exec $MYSQL_CLIENT_TEST
+
+# End of 4.1 tests
diff --git a/mysql-test/t/mysql_protocols.test b/mysql-test/t/mysql_protocols.test
index 6e2d4f20429a96782e2091bc36bc65fc2f6596ea..0253c2b5d1719d3862c5426fe40ad2c190fdf92b 100644
--- a/mysql-test/t/mysql_protocols.test
+++ b/mysql-test/t/mysql_protocols.test
@@ -10,3 +10,4 @@
 --exec echo "select ' ok' as 'MEMORY'"    | $MYSQL --protocol=MEMORY  2>&1 || true
 --exec echo "select ' ok' as 'NullS'"     | $MYSQL --protocol=NullS   2>&1 || true
 
+# End of 4.1 tests
diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test
index 49b8237d99f1c5a51513c5292ddd16535f88f431..e5bd8c554cb658b9a854489a7740e8ee3db64fee 100644
--- a/mysql-test/t/mysqlbinlog.test
+++ b/mysql-test/t/mysqlbinlog.test
@@ -110,3 +110,4 @@ select "--- reading stdin --" as "";
 # clean up
 drop table t1, t2;
 
+# End of 4.1 tests
diff --git a/mysql-test/t/mysqlbinlog2.test b/mysql-test/t/mysqlbinlog2.test
index 6e2eda076953bb57f899f4cd4f2573560a40e1ff..a2f1aba05b0ccf214d017da450f0ec605cba88cf 100644
--- a/mysql-test/t/mysqlbinlog2.test
+++ b/mysql-test/t/mysqlbinlog2.test
@@ -157,3 +157,5 @@ select "--- to-last-log --" as "";
 select "--- end of test --" as "";
 --enable_query_log
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test
index 81000c17d9858a9a873a24a1d8d12c3ae4fcd21e..27bea937dcfbe103cfcba3c44be65b3bfed97bd1 100644
--- a/mysql-test/t/mysqldump.test
+++ b/mysql-test/t/mysqldump.test
@@ -4,7 +4,6 @@
 --disable_warnings
 DROP TABLE IF EXISTS t1, `"t"1`, t1aa, t2, t2aa;
 drop database if exists mysqldump_test_db;
-drop database if exists db1;
 drop view if exists v1, v2, v3;
 --enable_warnings
 
@@ -134,15 +133,6 @@ insert into t1 values (1),(2),(3);
 --exec rm $MYSQL_TEST_DIR/var/tmp/t1.txt
 drop table t1;
 
-#
-# dump of view
-#
-create table t1(a int);
-create view v1 as select * from t1;
---exec $MYSQL_DUMP --skip-comments test
-drop view v1;
-drop table t1;
-
 #
 # Bug #6101: create database problem
 #
@@ -197,15 +187,6 @@ INSERT INTO `t1` VALUES (0x602010000280100005E71A);
 --exec $MYSQL_DUMP --skip-extended-insert --hex-blob test --skip-comments t1
 DROP TABLE t1;
 
-#
-# Bug #9756
-#
-
-CREATE TABLE t1 (a char(10));
-INSERT INTO t1 VALUES ('\'');
---exec $MYSQL_DUMP --skip-comments test t1
-DROP TABLE t1;
-
 #
 # Test for --insert-ignore
 #
@@ -564,29 +545,6 @@ CREATE TABLE t1 (a int);
 INSERT INTO t1 VALUES (1),(2),(3);
 --exec $MYSQL_DUMP --add-drop-database --skip-comments --databases test
 DROP TABLE t1;
-
-#
-# Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X)
-#
-
-create database db1;
-use db1;
-
-CREATE TABLE t2 (
-  a varchar(30) default NULL,
-  KEY a (a(5))
-);
-
-INSERT INTO t2 VALUES ('alfred');
-INSERT INTO t2 VALUES ('angie');
-INSERT INTO t2 VALUES ('bingo');
-INSERT INTO t2 VALUES ('waffle');
-INSERT INTO t2 VALUES ('lemon');
-create view v2 as select * from t2 where a like 'a%' with check option;
---exec $MYSQL_DUMP  --skip-comments db1
-drop table t2;
-drop view v2;
-drop database db1;
 #
 # Bug #9558 mysqldump --no-data db t1 t2 format still dumps data
 #
@@ -620,6 +578,7 @@ select '------ Testing with illegal table names ------' as test_sequence ;
 --enable_query_log
 --error 6
 --exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "\d-2-1.sql" 2>&1
+
 --error 6
 --exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db  "\t1" 2>&1
 
@@ -678,6 +637,50 @@ insert into t2 (a, b) values (NULL, NULL),(10, NULL),(NULL, "twenty"),(30, "thir
 --exec $MYSQL_DUMP  --skip-comments --xml --no-create-info test
 drop table t1, t2;
 
+# End of 4.1 tests
+
+#
+# dump of view
+#
+create table t1(a int);
+create view v1 as select * from t1;
+--exec $MYSQL_DUMP --skip-comments test
+drop view v1;
+drop table t1;
+
+#
+# Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X)
+#
+
+create database mysqldump_test_db;
+use mysqldump_test_db;
+
+CREATE TABLE t2 (
+  a varchar(30) default NULL,
+  KEY a (a(5))
+);
+
+INSERT INTO t2 VALUES ('alfred');
+INSERT INTO t2 VALUES ('angie');
+INSERT INTO t2 VALUES ('bingo');
+INSERT INTO t2 VALUES ('waffle');
+INSERT INTO t2 VALUES ('lemon');
+create view v2 as select * from t2 where a like 'a%' with check option;
+--exec $MYSQL_DUMP  --skip-comments mysqldump_test_db
+drop table t2;
+drop view v2;
+drop database mysqldump_test_db;
+use test;
+
+#
+# Bug #9756
+#
+
+CREATE TABLE t1 (a char(10));
+INSERT INTO t1 VALUES ('\'');
+--exec $MYSQL_DUMP --skip-comments test t1
+DROP TABLE t1;
+
 #
 # Bug #10927 mysqldump: Can't reload dump with view that consist of other view
 #
@@ -726,6 +729,7 @@ end|
 create trigger trg2 before update on t1 for each row begin
   if old.a % 2 = 0 then set new.b := 12; end if;
 end|
+set sql_mode="traditional"|
 create trigger trg3 after update on t1 for each row
 begin
   if new.a = -1 then
@@ -738,6 +742,7 @@ begin
     set @fired:= "No";
   end if;
 end|
+set sql_mode=default|
 delimiter ;|
 --replace_column 6 '0000-00-00 00:00:00'
 show triggers like "t1";
@@ -753,4 +758,6 @@ drop table t1;
 --exec $MYSQL test < var/tmp/mysqldump.sql
 # Check that tables have been reloaded
 show tables;
+--replace_column 6 #
+show triggers;
 DROP TABLE t1, t2;
diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test
index 14b8c1d11273023498fc2929444386064f5b661d..08e51aadc24c2f4e04fed5e6a96bda05d44c2472 100644
--- a/mysql-test/t/mysqltest.test
+++ b/mysql-test/t/mysqltest.test
@@ -287,6 +287,7 @@ select 3 from t1 ;
 #
 #select 3 from t1 ;
 
+# End of 4.1 tests
 
 #
 # Bug #10251: Identifiers containing quotes not handled correctly
@@ -296,8 +297,6 @@ select 1 as `a'b`, 2 as `a"b`;
 # Test escaping of quotes
 select 'aaa\\','aa''a',"aa""a";
 
-
-
 #
 # Check of include/show_msg.inc and include/show_msg80.inc
 #
@@ -325,3 +324,14 @@ let $message= . Here comes a very very long message that
               .      - consists of several lines;
 --source include/show_msg80.inc
 
+#
+# Test --enable_parsning / disable_parsning
+#
+--disable_query_log
+--disable_parsing
+# The following will not enable query logging
+--enable_query_log
+select "this will not be executed";
+--enable_parsing
+select "this will be executed";
+--enable_query_log
diff --git a/mysql-test/t/ndb_alter_table.test b/mysql-test/t/ndb_alter_table.test
index 2e5e2293b5c655427d8a6ef71a10bbe23043ab6d..bfc278d709b6a98a7da0440b680170a1d6ceeec6 100644
--- a/mysql-test/t/ndb_alter_table.test
+++ b/mysql-test/t/ndb_alter_table.test
@@ -179,3 +179,5 @@ drop table t1;
 #truncate table t2;
 #select count(*) from t2;
 #drop table t2;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ndb_autodiscover.test b/mysql-test/t/ndb_autodiscover.test
index c2068329d413807f580bf58cd1239fe6609e009c..6bbb1c2f2f2774b983e65a9e1771ed6ed5b55f28 100644
--- a/mysql-test/t/ndb_autodiscover.test
+++ b/mysql-test/t/ndb_autodiscover.test
@@ -544,3 +544,5 @@ create table t10 (
 insert into t10 values (1, 'kalle');
 
 --exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test `$NDB_TOOLS_DIR/ndb_show_tables --no-defaults | grep BLOB` >> $NDB_TOOLS_OUTPUT 2>&1 || true
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ndb_autodiscover2.test b/mysql-test/t/ndb_autodiscover2.test
index 76baa31a2a98837a9a44d12ee1694824b36ca8da..f12d3d31fdd19979bb1571c2d5aff1ac055519b2 100644
--- a/mysql-test/t/ndb_autodiscover2.test
+++ b/mysql-test/t/ndb_autodiscover2.test
@@ -18,3 +18,4 @@ drop table t9;
 select * from t10;
 drop table t10;
 
+# End of 4.1 tests
diff --git a/mysql-test/t/ndb_basic.test b/mysql-test/t/ndb_basic.test
index c0d5b14c2ea84cfd0f6ccd730725426aa15061ce..1c78a4b8744c083b0b0731385d784494478eaba2 100644
--- a/mysql-test/t/ndb_basic.test
+++ b/mysql-test/t/ndb_basic.test
@@ -606,6 +606,7 @@ select * from t1 order by counter;
 
 drop table t1;
 
+# End of 4.1 tests
 
 #
 # Test long table name
diff --git a/mysql-test/t/ndb_blob.test b/mysql-test/t/ndb_blob.test
index b265809b75fac29a80ccce6ac58d1151444cf7bf..a12ebee2f0d4a684cbb3d9c118a92af3faeb22bc 100644
--- a/mysql-test/t/ndb_blob.test
+++ b/mysql-test/t/ndb_blob.test
@@ -404,3 +404,5 @@ Proper fix: Set inline bytes to multiple of mbmaxlen and
 validate it (after the 8 byte length).');
 select * from t1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ndb_cache.test b/mysql-test/t/ndb_cache.test
index b61422a58fb40f948dbcb63ed1aef2cf0a9c3725..9c299b61c2443c7a5dea3d689c3c4da3507437b0 100644
--- a/mysql-test/t/ndb_cache.test
+++ b/mysql-test/t/ndb_cache.test
@@ -119,4 +119,4 @@ show status like "Qcache_queries_in_cache";
 
 SET GLOBAL query_cache_size=0;
 
-
+# End of 4.1 tests
diff --git a/mysql-test/t/ndb_charset.test b/mysql-test/t/ndb_charset.test
index becbe9a4d06d020df379c76c2b1b5e8781284307..fb43e1831f318a70649ad846d03ffa6549d26001 100644
--- a/mysql-test/t/ndb_charset.test
+++ b/mysql-test/t/ndb_charset.test
@@ -246,3 +246,5 @@ replace into t1 values ('jonas % ');
 replace into t1 values ('jonas % ');
 select * from t1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ndb_config.test b/mysql-test/t/ndb_config.test
new file mode 100644
index 0000000000000000000000000000000000000000..66287bf6d29134658635569e26bd972632a268a2
--- /dev/null
+++ b/mysql-test/t/ndb_config.test
@@ -0,0 +1,9 @@
+-- source include/have_ndb.inc
+-- source include/not_embedded.inc
+
+--exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=type,nodeid,host 2> /dev/null
+--exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid,host,DataMemory,IndexMemory --type=ndbd 2> /dev/null
+--exec $NDB_TOOLS_DIR/ndb_config --no-defaults -r \\n -f " " --query=nodeid,host,DataMemory,IndexMemory --type=ndbd 2> /dev/null
+--exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --type=ndbd --host=localhost 2> /dev/null
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ndb_database.test b/mysql-test/t/ndb_database.test
index 1264c3fa73bc05ce6f2bd634ec315568acdfd11d..2e924ba2dcc33fcaa5ef2deed67b040b01bafdf3 100644
--- a/mysql-test/t/ndb_database.test
+++ b/mysql-test/t/ndb_database.test
@@ -48,3 +48,5 @@ show tables;
 drop table if exists t1;
 drop database if exists mysqltest;
 --enable_warnings
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ndb_grant.later b/mysql-test/t/ndb_grant.later
index b4885d2c5fc47a01d40dd507d83e4dc7c751f442..5431d94e1f862bafb61325bd2e6691bef2f1dee1 100644
--- a/mysql-test/t/ndb_grant.later
+++ b/mysql-test/t/ndb_grant.later
@@ -381,3 +381,5 @@ alter table time_zone_transition_type engine=myisam;
 alter table user engine=myisam;
 use test;
 flush privileges;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ndb_index.test b/mysql-test/t/ndb_index.test
index 93085dea587920053750ba8f7563398220d4f647..272f30e3e6f0cf7bbb2c3ae6e9db6705d8fbc9af 100644
--- a/mysql-test/t/ndb_index.test
+++ b/mysql-test/t/ndb_index.test
@@ -126,5 +126,6 @@ select port, accessnode, pop, accesstype  from t1 where pop='pop98' and accessno
 select port, accessnode, pop, accesstype  from t1 where pop='pop98' and accessnode='node78' and port='port67' and customer_id='kllopmn';
 select port, accessnode, pop, accesstype  from t1 where pop='pop98' and accessnode='node78' and port='port67' and customer_id='foo';
 
-
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ndb_index_ordered.test b/mysql-test/t/ndb_index_ordered.test
index 9c9d5d5a84faba2f2faf2f34601f53fb6dd99b05..9b70919ab2acf78b3e35d7ac86a4659d10a039c0 100644
--- a/mysql-test/t/ndb_index_ordered.test
+++ b/mysql-test/t/ndb_index_ordered.test
@@ -348,3 +348,5 @@ connection con1;
 select a from t1 where b = 2;
 show tables;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ndb_index_unique.test b/mysql-test/t/ndb_index_unique.test
index d6de013c1e24ee85ad6e434778bb19bf5803c6d9..2185276c2c6ee3af57f58949838718faf7d61b91 100644
--- a/mysql-test/t/ndb_index_unique.test
+++ b/mysql-test/t/ndb_index_unique.test
@@ -308,3 +308,5 @@ INSERT INTO t1 (month, year, code) VALUES (5,2004,'12');
 select * from t1 where code = '12' and month = 4 and year = 2004 ;
 
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ndb_insert.test b/mysql-test/t/ndb_insert.test
index 68f3817e13452a4fd4b32aff78b2ef6a81a8950a..92bc51bcf4f8fb4e47c1ba52d796e1f39797ebc1 100644
--- a/mysql-test/t/ndb_insert.test
+++ b/mysql-test/t/ndb_insert.test
@@ -616,3 +616,5 @@ INSERT IGNORE INTO t1 VALUES (1);
 INSERT IGNORE INTO t1 VALUES (1);
 SELECT * FROM t1;
 DROP TABLE t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ndb_limit.test b/mysql-test/t/ndb_limit.test
index 0df3b2f7566fff1a68daa3c5b1e3a854a1c90f8b..01613606d668eeb0dcda9a24bb4a3c538afa0d62 100644
--- a/mysql-test/t/ndb_limit.test
+++ b/mysql-test/t/ndb_limit.test
@@ -81,3 +81,5 @@ SELECT DATE_FORMAT(day, '%Y%m%d') as date, DATE_FORMAT(day, '%d-%m-%Y')
 as date_formatted FROM t2 GROUP BY day ORDER BY day DESC LIMIT 2;
 
 drop table t2;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ndb_lock.test b/mysql-test/t/ndb_lock.test
index b93abbd564b057ff0a21c9fd93421de6256d5938..6945f91ee39674d2c3cc17a583df8d9d251361d0 100644
--- a/mysql-test/t/ndb_lock.test
+++ b/mysql-test/t/ndb_lock.test
@@ -69,3 +69,4 @@ insert into t1 values (1,1,1);
 
 drop table t1;
 
+# End of 4.1 tests
diff --git a/mysql-test/t/ndb_minmax.test b/mysql-test/t/ndb_minmax.test
index 97ea84f98ef8147d1767a187be7923587bcfb558..a3ac677cd2a80d1862acd0b8ce7b6ac8e795b782 100644
--- a/mysql-test/t/ndb_minmax.test
+++ b/mysql-test/t/ndb_minmax.test
@@ -62,6 +62,4 @@ select MAX(c) from t2;
 select * from t2 order by a;
 drop table t2;
 
-
-
-
+# End of 4.1 tests
diff --git a/mysql-test/t/ndb_multi.test b/mysql-test/t/ndb_multi.test
index 85950c72cf97f5d682fe6bd5da992f274788e2a5..760150c6f6ae910d961f666bcc521135b64f2ccd 100644
--- a/mysql-test/t/ndb_multi.test
+++ b/mysql-test/t/ndb_multi.test
@@ -68,4 +68,4 @@ drop table t1, t2, t3, t4;
 connection server2;
 drop table t1, t3, t4;
 
-
+# End of 4.1 tests
diff --git a/mysql-test/t/ndb_replace.test b/mysql-test/t/ndb_replace.test
index 1c06a9a663390e66dd55f70003113c0ade829341..b97a0322a6a99cf5c0de45f203a5d9add4a92684 100644
--- a/mysql-test/t/ndb_replace.test
+++ b/mysql-test/t/ndb_replace.test
@@ -26,3 +26,5 @@ insert into t1 (gesuchnr,benutzer_id) values (1,1);
 replace into t1 (gesuchnr,benutzer_id) values (1,1);
 select * from t1 order by gesuchnr;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ndb_restore.test b/mysql-test/t/ndb_restore.test
index 0173fabd46f05f8105d7b756c1dbd43e32b2007a..049b07d5a8b8b6ccf8b542a3a19ba956b59413ac 100644
--- a/mysql-test/t/ndb_restore.test
+++ b/mysql-test/t/ndb_restore.test
@@ -215,3 +215,5 @@ drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
 #
 
 --exec $NDB_TOOLS_DIR/ndb_select_all --no-defaults -d sys -D , SYSTAB_0 | grep 520093696
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ndb_subquery.test b/mysql-test/t/ndb_subquery.test
index 095fdbcfa13533e059bf1c05afa4c76cca58f31e..93c45c521a08d2d49a534371e0b6cce9b9a6b167 100644
--- a/mysql-test/t/ndb_subquery.test
+++ b/mysql-test/t/ndb_subquery.test
@@ -38,8 +38,11 @@ drop table t2;
 # bug#5367
 ##########
 
-###
+# End of 4.1 tests
+
+#
 # bug#11205
+#
 create table t1 (p int not null primary key, u int not null) engine=ndb;
 insert into t1 values (1,1),(2,2),(3,3);
 
diff --git a/mysql-test/t/ndb_transaction.test b/mysql-test/t/ndb_transaction.test
index ae02059786deb592c7a3dadf5ee23f2e81fc4fd9..d3ebadb1a7809f7979d176f6d0b5e7f568dedc7d 100644
--- a/mysql-test/t/ndb_transaction.test
+++ b/mysql-test/t/ndb_transaction.test
@@ -295,4 +295,4 @@ select count(*) from t2;
 drop table test.t1, t2;
 drop database mysqltest;
 
-
+# End of 4.1 tests
diff --git a/mysql-test/t/ndb_truncate.test b/mysql-test/t/ndb_truncate.test
index 7c0f79bcc5924aab3bc7875af613a82c2025ef5e..73af70d0d0fe59fd233e38057617ee7c245e8d5b 100644
--- a/mysql-test/t/ndb_truncate.test
+++ b/mysql-test/t/ndb_truncate.test
@@ -32,3 +32,5 @@ truncate table t2;
 select count(*) from t2;
 
 drop table t2;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ndb_types.test b/mysql-test/t/ndb_types.test
index d4bf41338075a2902870cc1ead1d30c6a6030e42..3446a409b2a2e08eafead223836154fa99f7f34d 100644
--- a/mysql-test/t/ndb_types.test
+++ b/mysql-test/t/ndb_types.test
@@ -81,3 +81,5 @@ from t1;
 select time_stamp>@now from t1;
 
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ndb_update.test b/mysql-test/t/ndb_update.test
index 5453e41f93762d57ba2d0c0e4f32ba0ebb7f754a..45e3add4639a4753514832c93697b2a3bdf23acf 100644
--- a/mysql-test/t/ndb_update.test
+++ b/mysql-test/t/ndb_update.test
@@ -32,3 +32,5 @@ select * from t1 order by pk1;
 --disable_warnings
 DROP TABLE IF EXISTS t1;
 --enable_warnings
+
+# End of 4.1 tests
diff --git a/mysql-test/t/negation_elimination.test b/mysql-test/t/negation_elimination.test
index c50a9678edb8ff0a7e1a4c4d9a745202ff2b74c1..0e0d8891e1f9b55c95335e8c31b23c4d216ad025 100644
--- a/mysql-test/t/negation_elimination.test
+++ b/mysql-test/t/negation_elimination.test
@@ -70,3 +70,5 @@ select a, not(not(a)) from t1;
 explain extended select a, not(not(a)), not(a <= 2 and not(a)), not(a not like "1"), not (a not in (1,2)), not(a != 2) from t1 where not(not(a)) having not(not(a));
 
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/not_embedded_server.test b/mysql-test/t/not_embedded_server.test
new file mode 100644
index 0000000000000000000000000000000000000000..83ec03d6706cb765cd93e95faf185ff0df8159a3
--- /dev/null
+++ b/mysql-test/t/not_embedded_server.test
@@ -0,0 +1,18 @@
+#
+# Here we collect tests that doesn't work with the embedded server
+#
+
+-- source include/not_embedded.inc
+
+#
+# Show full process list with prepare
+# To not show other connections, this must be the first test and we must
+# have a server restart before this one
+#
+
+prepare stmt1 from ' show full processlist ';
+--replace_column 1 number 6 time 3 localhost
+execute stmt1;
+deallocate prepare stmt1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/null.test b/mysql-test/t/null.test
index 4cd20979319e4dfa9955957a84192ef6999b0cd3..183308880ed0e4b17315347e90f1d66d2a3b3d87 100644
--- a/mysql-test/t/null.test
+++ b/mysql-test/t/null.test
@@ -189,3 +189,5 @@ select
 
 # Restore charset to the default value.
 set names latin1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/null_key.test b/mysql-test/t/null_key.test
index d7f6a634d1e29f5565573b894e374bfd4ee7e9e0..4ab99fc5d6de584c93fc52e1a268a3c1a9b1a826 100644
--- a/mysql-test/t/null_key.test
+++ b/mysql-test/t/null_key.test
@@ -152,12 +152,18 @@ INSERT INTO t1 (order_id, product_id, product_type) VALUES
 INSERT INTO t2 (order_id, product_id, product_type) VALUES
 ('9d9aad7764b5b2c53004348ef8d34500',2315652, 3);
 
-select t1.* from t1
-left join t2 using(order_id, product_id, product_type)
-where t2.order_id=NULL;
-select t1.* from t1
-left join t2 using(order_id, product_id, product_type)
+select t1.* from t1 left join t2
+       on (t1.order_id = t2.order_id and
+           t1.product_id = t2.product_id and
+           t1.product_type = t2.product_type)
+where t2.order_id = NULL;
+
+select t1.* from t1 left join t2
+       on (t1.order_id = t2.order_id and
+           t1.product_id = t2.product_id and
+           t1.product_type = t2.product_type)
 where t2.order_id is NULL;
+
 drop table t1,t2;
 
 #
@@ -193,3 +199,50 @@ select * from t1 where id2 is null or id2 > 0;
 delete from t1 where id <=> NULL;
 select * from t1;
 drop table t1;
+
+#
+# Test for bug #12144: optimizations for key access with null keys 
+#                      used for outer joins
+#
+
+CREATE TABLE t1 (a int);
+CREATE TABLE t2 (a int, b int, INDEX idx(a));
+CREATE TABLE t3 (b int, INDEX idx(b));
+CREATE TABLE t4 (b int, INDEX idx(b));
+INSERT INTO t1 VALUES (1), (2), (3), (4);
+INSERT INTO t2 VALUES (1, 1), (3, 1);
+INSERT INTO t3 VALUES 
+  (NULL), (NULL), (NULL), (NULL), (NULL),
+  (NULL), (NULL), (NULL), (NULL), (NULL);
+INSERT INTO t4 SELECT * FROM t3;
+INSERT INTO t3 SELECT * FROM t4;
+INSERT INTO t4 SELECT * FROM t3;
+INSERT INTO t3 SELECT * FROM t4;
+INSERT INTO t4 SELECT * FROM t3;
+INSERT INTO t3 SELECT * FROM t4;
+INSERT INTO t4 SELECT * FROM t3;
+INSERT INTO t3 SELECT * FROM t4;
+INSERT INTO t4 SELECT * FROM t3;
+INSERT INTO t3 SELECT * FROM t4;
+INSERT INTO t4 SELECT * FROM t3;
+INSERT INTO t3 SELECT * FROM t4;
+INSERT INTO t4 SELECT * FROM t3;
+INSERT INTO t3 SELECT * FROM t4;
+INSERT INTO t4 SELECT * FROM t3;
+INSERT INTO t3 SELECT * FROM t4;
+INSERT INTO t3 VALUES (2), (3);
+
+ANALYZE table t1, t2, t3;
+
+SELECT COUNT(*) FROM t3;
+
+EXPLAIN SELECT SQL_CALC_FOUND_ROWS * FROM t1 LEFT JOIN t2 ON t1.a=t2.a
+                                             LEFT JOIN t3 ON t2.b=t3.b;
+FLUSH STATUS ;
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 LEFT JOIN t2 ON t1.a=t2.a
+                                     LEFT JOIN t3 ON t2.b=t3.b;
+SELECT FOUND_ROWS();
+SHOW STATUS LIKE "handler_read%";
+
+DROP TABLE t1,t2,t3,t4;
+# End of 4.1 tests
diff --git a/mysql-test/t/odbc.test b/mysql-test/t/odbc.test
index 9aac59483595b169153d5d170f2413baff2d465b..d4b6fc35e74edef40ee8df09a7b85e210236b6be 100644
--- a/mysql-test/t/odbc.test
+++ b/mysql-test/t/odbc.test
@@ -20,3 +20,5 @@ select * from t1 where a is null and b=2;
 select * from t1 where a is null;
 explain select * from t1 where b is null;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/olap.test b/mysql-test/t/olap.test
index f301797858846d9ed9693f7c7d8688e888ca77f7..2e09bc5b3a31a3dd260087bc3308f0e0359f0e87 100644
--- a/mysql-test/t/olap.test
+++ b/mysql-test/t/olap.test
@@ -276,3 +276,5 @@ INSERT INTO t1 VALUES (1, 2);
 SELECT a, b, a AS c, COUNT(*) AS count FROM t1 GROUP BY a, b, c WITH ROLLUP;
 
 DROP TABLE t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/openssl_1.test b/mysql-test/t/openssl_1.test
index 2262395d58643cb591299638f73e81b56b275c0e..96c926154300dd84276637df1bcddee034014bb1 100644
--- a/mysql-test/t/openssl_1.test
+++ b/mysql-test/t/openssl_1.test
@@ -43,3 +43,5 @@ delete from mysql.user where user='ssl_user%';
 delete from mysql.db where user='ssl_user%';
 flush privileges;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/order_by.test b/mysql-test/t/order_by.test
index 36eee6e43b77f820aa7ec46227ea0f8ebd93b8a7..615b317eb36a6568ca85af6d06772420d704c33b 100644
--- a/mysql-test/t/order_by.test
+++ b/mysql-test/t/order_by.test
@@ -153,12 +153,12 @@ INSERT INTO t3 VALUES (2,'453 Boardwalk');
 
 SELECT    a,b,if(b = 1,i,if(b = 2,v,''))
 FROM      t1
-LEFT JOIN t2 USING(c)
+LEFT JOIN t2 ON t1.c = t2.c
 LEFT JOIN t3 ON t3.c = t1.c;
 
 SELECT    a,b,if(b = 1,i,if(b = 2,v,''))
 FROM      t1
-LEFT JOIN t2 USING(c)
+LEFT JOIN t2 ON t1.c = t2.c
 LEFT JOIN t3 ON t3.c = t1.c
 ORDER BY a;
 
@@ -339,8 +339,8 @@ CREATE TABLE t2 (
 
 INSERT INTO t1 (titre,auteur,dest) VALUES ('test','joce','bug');
 INSERT INTO t2 (numeropost,pseudo) VALUES (1,'joce'),(1,'bug');
-SELECT titre,t1.numeropost,auteur,icone,nbrep,0,date,vue,ouvert,lastauteur,dest FROM t2 LEFT JOIN t1 USING(numeropost) WHERE t2.pseudo='joce' ORDER BY date DESC LIMIT 0,30;
-SELECT titre,t1.numeropost,auteur,icone,nbrep,'0',date,vue,ouvert,lastauteur,dest FROM t2 LEFT JOIN t1 USING(numeropost) WHERE t2.pseudo='joce' ORDER BY date DESC LIMIT 0,30;
+SELECT titre,numeropost,auteur,icone,nbrep,0,date,vue,ouvert,lastauteur,dest FROM t2 LEFT JOIN t1 USING(numeropost) WHERE t2.pseudo='joce' ORDER BY date DESC LIMIT 0,30;
+SELECT titre,numeropost,auteur,icone,nbrep,'0',date,vue,ouvert,lastauteur,dest FROM t2 LEFT JOIN t1 USING(numeropost) WHERE t2.pseudo='joce' ORDER BY date DESC LIMIT 0,30;
 drop table t1,t2;
 
 #
@@ -549,3 +549,5 @@ INSERT INTO t1 VALUES (2), (1), (1), (2), (1);
 SELECT a FROM t1 ORDER BY a;
 (SELECT a FROM t1) ORDER BY a;
 DROP TABLE t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/order_fill_sortbuf.test b/mysql-test/t/order_fill_sortbuf.test
index 37620ebe3317d94cc0193a257650105c024bceee..f13cf8cf350c520f077841103d85d260a1079c8c 100644
--- a/mysql-test/t/order_fill_sortbuf.test
+++ b/mysql-test/t/order_fill_sortbuf.test
@@ -22,3 +22,5 @@ enable_query_log;
 create table t2 select id2 from t1 order by id3;
 select count(*) from t2;
 drop table t1,t2;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/outfile.test b/mysql-test/t/outfile.test
index 4b12f9e4e504cddc51f66a18b2afaecd848d503a..a74bebe1460bb3df6b89ea936e1564461b1b0baa 100644
--- a/mysql-test/t/outfile.test
+++ b/mysql-test/t/outfile.test
@@ -63,3 +63,5 @@ EXPLAIN
   FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\r\n'
   FROM t1;
 DROP TABLE t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/overflow.test b/mysql-test/t/overflow.test
index 17e443d51f89ca44afa15b5e8c6488d8be425a0b..c930707413bcb2b640709a3031afcab1a22b4bc4 100644
--- a/mysql-test/t/overflow.test
+++ b/mysql-test/t/overflow.test
@@ -2,3 +2,5 @@ connect (con1,localhost,boo,,);
 connection con1;
 -- error 1064,1102,1280
 drop database AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/packet.test b/mysql-test/t/packet.test
index c7f10d75d7441344312bc703532cfbd507ef522f..4de284b7824a74e11bebd6ef68bc7f33933985b6 100644
--- a/mysql-test/t/packet.test
+++ b/mysql-test/t/packet.test
@@ -1,5 +1,8 @@
 # Embedded server doesn't support external clients
 --source include/not_embedded.inc
+# Windows fails because it disconnects on too-large packets instead of just
+# swallowing them and returning an error
+--source include/not_windows.inc
 
 #
 # Check protocol handling
@@ -31,3 +34,5 @@ set global net_buffer_length=default;
 set net_buffer_length=default;
 SELECT length("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") as len;
 select length(repeat('a',2000));
+
+# End of 4.1 tests
diff --git a/mysql-test/t/preload.test b/mysql-test/t/preload.test
index 7a049d06a8646439a0152fa60ffc1ddd25b030f3..1b7f3c5b9eb8d94770f1918a5d2e8d297b24c8af 100644
--- a/mysql-test/t/preload.test
+++ b/mysql-test/t/preload.test
@@ -98,3 +98,5 @@ load index into cache t3 key (b), t2 key (c) ;
 show status like "key_read%";
 
 drop table t1, t2;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test
index de92c67518e9707d2652033fd72ce5b80e9d0fec..b4c04e4432a9189e4ed93e594117b7f45ef3e1a7 100644
--- a/mysql-test/t/ps.test
+++ b/mysql-test/t/ps.test
@@ -828,3 +828,5 @@ execute stmt;
 set @@tx_isolation=default;
 execute stmt;
 deallocate prepare stmt;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ps_10nestset.test b/mysql-test/t/ps_10nestset.test
index 53e84f7a47dc7f3467f4f67c0ccd5da5860fa0be..46a88653da31ba0bd6780bbe2052b924c9fa879c 100644
--- a/mysql-test/t/ps_10nestset.test
+++ b/mysql-test/t/ps_10nestset.test
@@ -69,3 +69,5 @@ execute st_round using @arg_round, @arg_round;
 select * from t1;
 
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ps_11bugs.test b/mysql-test/t/ps_11bugs.test
index 5945b14064537c63982166a0608c602183dbd84a..e214afeaaf318a5b5bccd9f95d3a411790d56f41 100644
--- a/mysql-test/t/ps_11bugs.test
+++ b/mysql-test/t/ps_11bugs.test
@@ -129,3 +129,4 @@ drop table t1, t2;
 
 # end of bug#1676
 
+# End of 4.1 tests
diff --git a/mysql-test/t/ps_1general.test b/mysql-test/t/ps_1general.test
index ab133e4c347ba2cbcff98e75319673f86ff527aa..6abfd8f28a78cfb0879fa10073af787250a8000d 100644
--- a/mysql-test/t/ps_1general.test
+++ b/mysql-test/t/ps_1general.test
@@ -930,3 +930,5 @@ drop table t5, t9;
 #  Thank you for reading these rules of thumb.
 #
 #     Matthias
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ps_2myisam.test b/mysql-test/t/ps_2myisam.test
index 534703efc14ce35ac4d23f7c26de64759b12db38..0a335bd02a365fe54b68d9ea3b38ae3f2aa3b469 100644
--- a/mysql-test/t/ps_2myisam.test
+++ b/mysql-test/t/ps_2myisam.test
@@ -40,3 +40,5 @@ drop table t2 ;
 -- source include/ps_conv.inc
 
 drop table t1, t9;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ps_3innodb.test b/mysql-test/t/ps_3innodb.test
index f83b61914a2a15fdcb3180a2758639efe7467367..e25a8b1f4693c2af9c33f601520266e9843fe759 100644
--- a/mysql-test/t/ps_3innodb.test
+++ b/mysql-test/t/ps_3innodb.test
@@ -22,3 +22,5 @@ let $type= 'InnoDB' ;
 -- source include/ps_conv.inc
 
 drop table t1, t9;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ps_4heap.test b/mysql-test/t/ps_4heap.test
index 3ce3bea8265348dbb2cc8f41f018dd2e410a7975..f16d4599a74464ed61766c4d20ed1de8589e43ec 100644
--- a/mysql-test/t/ps_4heap.test
+++ b/mysql-test/t/ps_4heap.test
@@ -47,3 +47,5 @@ eval create table t9
 -- source include/ps_conv.inc
 
 drop table t1, t9;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ps_5merge.test b/mysql-test/t/ps_5merge.test
index 7e94ede41d17a98833b4032f3ca3ccdc60ddf29e..e6ce9bf42d31776ab872eefbec489c224caaf074 100644
--- a/mysql-test/t/ps_5merge.test
+++ b/mysql-test/t/ps_5merge.test
@@ -82,3 +82,5 @@ INSERT_METHOD=LAST;
 
 drop table t1, t1_1, t1_2, 
            t9_1, t9_2, t9;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ps_6bdb.test b/mysql-test/t/ps_6bdb.test
index 5db3349279efd706014b72688c70023e2c71c21c..49dd7aa924bd1019b3078b3282f5404a15f6bb1a 100644
--- a/mysql-test/t/ps_6bdb.test
+++ b/mysql-test/t/ps_6bdb.test
@@ -21,3 +21,5 @@ let $type= 'BDB' ;
 -- source include/ps_conv.inc
 
 drop table t1, t9;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ps_7ndb.test b/mysql-test/t/ps_7ndb.test
index b558f2f3c216c1c67030afe0053aca8d699ea985..e3f65ec2c4e84d0c98f6e2096b63ee58f6db27f9 100644
--- a/mysql-test/t/ps_7ndb.test
+++ b/mysql-test/t/ps_7ndb.test
@@ -21,3 +21,5 @@ let $type= 'NDB' ;
 -- source include/ps_conv.inc
 
 drop table t1, t9;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/ps_grant.test b/mysql-test/t/ps_grant.test
index 0b33a2dadde3d4bfb2a563c98a95251bc52ebc2f..81c842de45947e3cd2145fb993169bcc45e1e73f 100644
--- a/mysql-test/t/ps_grant.test
+++ b/mysql-test/t/ps_grant.test
@@ -1,7 +1,6 @@
 # Can't test grants with embedded server
 -- source include/not_embedded.inc
 
-
 let $type= 'MYISAM' ;
 
 ################ GRANT/REVOKE/DROP affecting a parallel session ################
@@ -80,6 +79,7 @@ execute s_t1 ;
 ######## Question 2: The table t9 does not exist. ########
 --error 1146
 execute s_t9 ;
+deallocate prepare s_t9;
 
 
 #### revoke the access rights to t1
@@ -112,8 +112,11 @@ show grants for second_user@localhost ;
 
 drop database mysqltest;
 
+# End of 4.1 tests
 
-## grant/revoke + drop user
+#
+# grant/revoke + drop user
+#
 --error 1295
 prepare stmt3 from ' grant all on test.t1 to drop_user@localhost
 identified by ''looser'' ';
@@ -126,11 +129,3 @@ revoke all privileges on test.t1 from drop_user@localhost ;
 --error 1295
 prepare stmt3 from ' drop user drop_user@localhost ';
 drop user drop_user@localhost;
-
-# This test must be the last one, otherwise it may produce extra
-# rows in the processlist under high load.
-# Tested here simply so it is not tested with embedded server
-prepare stmt4 from ' show full processlist ';
---replace_column 1 number 6 time 3 localhost
-execute stmt4;
-deallocate prepare stmt4;
diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test
index 3a0ac08b1ba3797ead06262c12bae9892b81af84..822c27fe40dbc7bf35f5cb8bbcdcce593ce79f08 100644
--- a/mysql-test/t/query_cache.test
+++ b/mysql-test/t/query_cache.test
@@ -79,68 +79,6 @@ delete from t3 where a=10;
 show status like "Qcache_queries_in_cache";
 drop table t1, t2, t3;
 #
-# FLUSH QUERY CACHE
-#
-create table t1 (a int not null);
-insert into t1 values (1),(2),(3);
-create table t2 (a int not null);
-insert into t2 values (1),(2),(3);
-select * from t1;
-select * from t2;
-insert into t1 values (4);
-show status like "Qcache_free_blocks";
-flush query cache;
-show status like "Qcache_free_blocks";
-drop table t1, t2;
-# With join results...
-create table t1 (a text not null);
-create table t11 (a text not null);
-create table t2 (a text not null);
-create table t21 (a text not null);
-create table t3 (a text not null);
-insert into t1 values("1111111111111111111111111111111111111111111111111111");
-insert into t2 select * from t1;
-insert into t1 select * from t2;
-insert into t2 select * from t1;
-insert into t1 select * from t2;
-insert into t2 select * from t1;
-insert into t1 select * from t2;
-insert into t2 select * from t1;
-insert into t1 select * from t2;
-insert into t2 select * from t1;
-insert into t1 select * from t2;
-insert into t2 select * from t1;
-insert into t1 select * from t2;
-insert into t2 select * from t1;
-insert into t1 select * from t2;
-insert into t2 select * from t1;
-# t11 and t21 must be over 4Kb (QUERY_CACHE_MIN_RESULT_DATA_SIZE)
-insert into t11 select * from t1;
-insert into t21 select * from t1;
-insert into t1 select * from t2;
-insert into t2 select * from t1;
-insert into t1 select * from t2;
-#results of t3 must  be > 0.5Mb
-insert into t3 select * from t1;
-insert into t3 select * from t2;
-insert into t3 select * from t1;
-disable_result_log;
-select * from t11;
-select * from t21;
-enable_result_log;
-show status like "Qcache_total_blocks";
-show status like "Qcache_free_blocks";
-disable_result_log;
-insert into t11 values("");
-select * from t3;
-enable_result_log;
-show status like "Qcache_total_blocks";
-show status like "Qcache_free_blocks";
-flush query cache;
-show status like "Qcache_total_blocks";
-show status like "Qcache_free_blocks";
-drop table t1, t2, t3, t11, t21;
-#
 # SELECT SQL_CACHE ...
 #
 set query_cache_type=demand;
@@ -616,6 +554,7 @@ set character_set_results=cp1251;
 SELECT a,'Â','â'='Â' FROM t1; 
 show status like "Qcache_hits";
 show status like "Qcache_queries_in_cache";
+SET NAMES default;
 
 DROP TABLE t1;
 
@@ -711,9 +650,10 @@ repair table t1;
 show status like 'qcache_queries_in_cache';
 drop table t1;
 
+#
 # Bug #9549: Make sure cached queries that span more than one cache block
 # are handled properly in the embedded server.
-
+#
 # We just want a small query cache, so we can fragment it easily
 set GLOBAL query_cache_size=64*1024;
 # This actually gives us a usable cache size of about 48K
@@ -755,6 +695,8 @@ select a from t1;
 flush query cache;
 
 drop table t1, t2;
+set GLOBAL query_cache_size=1355776
+
 
 #
 # Query with warning prohibited to query cache (BUG#9414)
@@ -767,9 +709,9 @@ CREATE TABLE t1 (
 
 INSERT INTO t1 VALUES ('20050326');
 INSERT INTO t1 VALUES ('20050325');
-SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 0:0:0';
-SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050328 0:0:0';
-SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 0:0:0';
+SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 invalid';
+SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050328 invalid';
+SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 invalid';
 show status like "Qcache_queries_in_cache";
 show status like "Qcache_inserts";
 show status like "Qcache_hits";
@@ -832,4 +774,45 @@ drop procedure p1//
 drop table t1//
 delimiter ;//
 
+#
+# query in QC from normal execution and SP (BUG#6897)
+#
+flush query cache;
+reset query cache;
+flush status;
+delimiter //;
+create table t1 (s1 int)//
+create procedure f1 () begin
+select sql_cache * from t1;
+select sql_cache * from t1;
+end;//
+delimiter ;//
+call f1();
+show status like "Qcache_queries_in_cache";
+show status like "Qcache_inserts";
+show status like "Qcache_hits";
+call f1();
+show status like "Qcache_queries_in_cache";
+show status like "Qcache_inserts";
+show status like "Qcache_hits";
+call f1();
+select sql_cache * from t1;
+show status like "Qcache_queries_in_cache";
+show status like "Qcache_inserts";
+show status like "Qcache_hits";
+insert into t1 values (1);
+select sql_cache * from t1;
+show status like "Qcache_queries_in_cache";
+show status like "Qcache_inserts";
+show status like "Qcache_hits";
+call f1();
+call f1();
+select sql_cache * from t1;
+show status like "Qcache_queries_in_cache";
+show status like "Qcache_inserts";
+show status like "Qcache_hits";
+drop procedure f1;
+drop table t1;
 set GLOBAL query_cache_size=0;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/query_cache_merge.test b/mysql-test/t/query_cache_merge.test
index fef3f18df600c7793fa914bafb9f152ff617832b..36b8662f088678de569b8c01977f0cc6a55cdd90 100644
--- a/mysql-test/t/query_cache_merge.test
+++ b/mysql-test/t/query_cache_merge.test
@@ -36,3 +36,5 @@ show status like "Qcache_queries_in_cache";
 drop table t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96,t97,t98,t99,t100,t101,t102,t103,t104,t105,t106,t107,t108,t109,t110,t111,t112,t113,t114,t115,t116,t117,t118,t119,t120,t121,t122,t123,t124,t125,t126,t127,t128,t129,t130,t131,t132,t133,t134,t135,t136,t137,t138,t139,t140,t141,t142,t143,t144,t145,t146,t147,t148,t149,t150,t151,t152,t153,t154,t155,t156,t157,t158,t159,t160,t161,t162,t163,t164,t165,t166,t167,t168,t169,t170,t171,t172,t173,t174,t175,t176,t177,t178,t179,t180,t181,t182,t183,t184,t185,t186,t187,t188,t189,t190,t191,t192,t193,t194,t195,t196,t197,t198,t199,t200,t201,t202,t203,t204,t205,t206,t207,t208,t209,t210,t211,t212,t213,t214,t215,t216,t217,t218,t219,t220,t221,t222,t223,t224,t225,t226,t227,t228,t229,t230,t231,t232,t233,t234,t235,t236,t237,t238,t239,t240,t241,t242,t243,t244,t245,t246,t247,t248,t249,t250,t251,t252,t253,t254,t255,t256,t257,t00;
 
 SET @@global.query_cache_size=0;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/query_cache_notembedded.test b/mysql-test/t/query_cache_notembedded.test
new file mode 100644
index 0000000000000000000000000000000000000000..fd4785ffe9539aad9c8a0c2dcb13c70280b8aa14
--- /dev/null
+++ b/mysql-test/t/query_cache_notembedded.test
@@ -0,0 +1,100 @@
+-- source include/have_query_cache.inc
+-- source include/not_embedded.inc
+
+#
+# Tests with query cache
+#
+set GLOBAL query_cache_size=1355776;
+
+# Reset query cache variables.
+
+flush query cache; # This crashed in some versions
+flush query cache; # This crashed in some versions
+reset query cache;
+flush status;
+--disable_warnings
+drop table if exists t1, t2, t3, t11, t21;
+--enable_warnings
+#
+# FLUSH QUERY CACHE
+#
+create table t1 (a int not null);
+insert into t1 values (1),(2),(3);
+create table t2 (a int not null);
+insert into t2 values (1),(2),(3);
+select * from t1;
+select * from t2;
+insert into t1 values (4);
+show status like "Qcache_free_blocks";
+flush query cache;
+show status like "Qcache_free_blocks";
+drop table t1, t2;
+# With join results...
+create table t1 (a text not null);
+create table t11 (a text not null);
+create table t2 (a text not null);
+create table t21 (a text not null);
+create table t3 (a text not null);
+insert into t1 values("1111111111111111111111111111111111111111111111111111");
+insert into t2 select * from t1;
+insert into t1 select * from t2;
+insert into t2 select * from t1;
+insert into t1 select * from t2;
+insert into t2 select * from t1;
+insert into t1 select * from t2;
+insert into t2 select * from t1;
+insert into t1 select * from t2;
+insert into t2 select * from t1;
+insert into t1 select * from t2;
+insert into t2 select * from t1;
+insert into t1 select * from t2;
+insert into t2 select * from t1;
+insert into t1 select * from t2;
+insert into t2 select * from t1;
+# t11 and t21 must be over 4Kb (QUERY_CACHE_MIN_RESULT_DATA_SIZE)
+insert into t11 select * from t1;
+insert into t21 select * from t1;
+insert into t1 select * from t2;
+insert into t2 select * from t1;
+insert into t1 select * from t2;
+#results of t3 must  be > 0.5Mb
+insert into t3 select * from t1;
+insert into t3 select * from t2;
+insert into t3 select * from t1;
+disable_result_log;
+select * from t11;
+select * from t21;
+enable_result_log;
+show status like "Qcache_total_blocks";
+show status like "Qcache_free_blocks";
+disable_result_log;
+insert into t11 values("");
+select * from t3;
+enable_result_log;
+show status like "Qcache_total_blocks";
+show status like "Qcache_free_blocks";
+flush query cache;
+show status like "Qcache_total_blocks";
+show status like "Qcache_free_blocks";
+drop table t1, t2, t3, t11, t21;
+
+#
+# do not use QC if tables locked (BUG#12385)
+#
+connect (root,localhost,root,,test,$MASTER_MYPORT,master.sock);
+connection root;
+CREATE TABLE t1 ( a INT NOT NULL PRIMARY KEY AUTO_INCREMENT ) ENGINE =
+MyISAM;
+LOCK TABLE t1 READ LOCAL;
+connect (root2,localhost,root,,test,$MASTER_MYPORT,master.sock);
+connection root2;
+INSERT INTO t1 VALUES (), (), ();
+connection root;
+SELECT * FROM t1;
+connection root2;
+SELECT * FROM t1;
+connection root;
+SELECT * FROM t1;
+drop table t1;
+
+set GLOBAL query_cache_size=0;
diff --git a/mysql-test/t/raid.test b/mysql-test/t/raid.test
index 14a55db0c3465da5c90debfd6fc7413becb8b9ab..3ca5adaaaea848f5f8d456bac1f9477a9f8ccd3c 100644
--- a/mysql-test/t/raid.test
+++ b/mysql-test/t/raid.test
@@ -220,3 +220,5 @@ ALTER TABLE t1 RENAME t2;
 ALTER TABLE t2 CHANGE COLUMN c c VARCHAR(251) NOT NULL;
 select count(*) from t2;
 DROP TABLE t2;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test
index 065cef659b895fd90f9b18d4a329587334363b31..12dda022cb93c983c6c1b0b10dca118afbeba6b0 100644
--- a/mysql-test/t/range.test
+++ b/mysql-test/t/range.test
@@ -490,6 +490,8 @@ SELECT count(*) FROM t1 WHERE CLIENT='000' AND (ARG1 != ' 1' OR ARG1 != ' 2');
 SELECT count(*) FROM t1 WHERE CLIENT='000' AND (ARG1 != ' 2' OR ARG1 != ' 1');
 drop table t1;
 
+# End of 4.1 tests
+
 #
 # Test for optimization request #10561: to use keys for
 # NOT IN (c1,...,cn) and NOT BETWEEN c1 AND c2
diff --git a/mysql-test/t/rename.test b/mysql-test/t/rename.test
index 6fa208f37ecb33b0a2f3a52f7bc0b8e65f731f22..5caecef176e860031d1b7515762a2f9af4463c5a 100644
--- a/mysql-test/t/rename.test
+++ b/mysql-test/t/rename.test
@@ -65,3 +65,5 @@ sleep 1;
 show tables;
 
 drop table t2, t4;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/repair.test b/mysql-test/t/repair.test
index ef7043febbc3a4c737a2c36c856b25da66fe611e..5e39e0b6a5008605b230bc032d8d0c96209d33a1 100644
--- a/mysql-test/t/repair.test
+++ b/mysql-test/t/repair.test
@@ -33,3 +33,5 @@ system echo 1 > $MYSQL_TEST_DIR/var/master-data/test/t1.MYI ;
 repair table t1;
 repair table t1 use_frm;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/replace.test b/mysql-test/t/replace.test
index 2b3775f4f67a755db856138cc2dde8e864a363d5..10703eaafb82096c4a1427195c5e2aa5d3e03fb9 100644
--- a/mysql-test/t/replace.test
+++ b/mysql-test/t/replace.test
@@ -33,3 +33,5 @@ replace into t1 values (126,"first updated");
 replace into t1 values (63,default);
 select * from t1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rollback.test b/mysql-test/t/rollback.test
index 3cb1ea3024b4aeb0ad6c4d05f53eb7cf2a8cb124..3b8ad9019070d19d4871dd9272e3e6e4b80c0c68 100644
--- a/mysql-test/t/rollback.test
+++ b/mysql-test/t/rollback.test
@@ -21,3 +21,5 @@ select * from t1;
 select @@warning_count;
 show warnings;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/row.test b/mysql-test/t/row.test
index afcaaef681199d15472757263a1dc2adde28641e..4becef1c2b726645d3d8efed88ff4e4966466e11 100644
--- a/mysql-test/t/row.test
+++ b/mysql-test/t/row.test
@@ -84,3 +84,5 @@ select a, MAX(b), (1, MAX(b)) = (1, 4) from t1 group by a;
 drop table t1;
 SELECT ROW(2,10) <=> ROW(3,4);
 SELECT ROW(NULL,10) <=> ROW(3,NULL);
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl000001.test b/mysql-test/t/rpl000001.test
index e9a875297068fbb182316ba1769adb7bd8990d12..13dba142d541db1dfadbb19987405b5c7405b201 100644
--- a/mysql-test/t/rpl000001.test
+++ b/mysql-test/t/rpl000001.test
@@ -126,3 +126,5 @@ drop table t1;
 save_master_pos;
 connection slave;
 sync_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl000002.test b/mysql-test/t/rpl000002.test
index 4fbb6a595a4407949d2d4772113cdd82b1776b29..bafd8a30159a82548d699a441cda40b15923f7ec 100644
--- a/mysql-test/t/rpl000002.test
+++ b/mysql-test/t/rpl000002.test
@@ -37,3 +37,5 @@ show create table t5;
 connection master;
 drop table t2,t3,t5;
 sync_slave_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl000004.test b/mysql-test/t/rpl000004.test
index 8fc2977faabbecf60b5b7569cbae58c8ff8b5ab1..f2a02bd4dd65859f4dd9c722aba359a851f5f9b7 100644
--- a/mysql-test/t/rpl000004.test
+++ b/mysql-test/t/rpl000004.test
@@ -21,3 +21,5 @@ connection slave;
 sync_with_master;
 create table t1(n int);
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl000005.test b/mysql-test/t/rpl000005.test
index b94695c72e1ef07985a6765c14469d15e044b72e..e81ad73940268eb0ea6f398299caa15267c1cda6 100644
--- a/mysql-test/t/rpl000005.test
+++ b/mysql-test/t/rpl000005.test
@@ -20,3 +20,5 @@ drop table t1;
 save_master_pos;
 connection slave;
 sync_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl000006.test b/mysql-test/t/rpl000006.test
index 898ef309f503c9d05ea0bb60b8d794ce2529e8a5..334ed575835fd5ff82ad74af7603dede87ccadff 100644
--- a/mysql-test/t/rpl000006.test
+++ b/mysql-test/t/rpl000006.test
@@ -43,3 +43,5 @@ drop table t1;
 save_master_pos;
 connection slave;
 sync_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl000008.test b/mysql-test/t/rpl000008.test
index ea782b99d286b65ea59a54fa177bd725fe7c14ba..fe030f90411022885a4ad37621be39e6932ff2d2 100644
--- a/mysql-test/t/rpl000008.test
+++ b/mysql-test/t/rpl000008.test
@@ -34,3 +34,5 @@ save_master_pos;
 connection slave;
 sync_with_master;
 drop table mysqltest_foo,mysqltest_bar,t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl000009.test b/mysql-test/t/rpl000009.test
index 59451bc888d6a7ae51a531d601da915ad4ecf006..a51a64979faa689b76d01a39b55bf30a18cb0572 100644
--- a/mysql-test/t/rpl000009.test
+++ b/mysql-test/t/rpl000009.test
@@ -170,3 +170,5 @@ sync_with_master;
 # These has to be droped on slave as they are not replicated
 drop database mysqltest2;
 drop database mysqltest3;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl000010.test b/mysql-test/t/rpl000010.test
index 0725214694a2bfc2d199e403252c78e2531b5d51..261b914877485434cc14f740ae49ddcd8d61c9a0 100644
--- a/mysql-test/t/rpl000010.test
+++ b/mysql-test/t/rpl000010.test
@@ -16,3 +16,4 @@ save_master_pos;
 connection slave;
 sync_with_master;
 
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl000011.test b/mysql-test/t/rpl000011.test
index 3b00afe10e44e64cae71f590e144cd7644d20ddc..32f6227f7c5113b87aef2137e0b892d0edb26dbf 100644
--- a/mysql-test/t/rpl000011.test
+++ b/mysql-test/t/rpl000011.test
@@ -13,3 +13,5 @@ select * from t1;
 connection master;
 drop table t1;
 sync_slave_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl000012.test b/mysql-test/t/rpl000012.test
index 7f440eaaa1324c20bf52678b74bf2ef7c3151e39..2c1c65e4202104df5d385ced18b355dba0e39197 100644
--- a/mysql-test/t/rpl000012.test
+++ b/mysql-test/t/rpl000012.test
@@ -41,3 +41,5 @@ drop table if exists t1,t2;
 save_master_pos;
 connection slave;
 sync_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl000013.test b/mysql-test/t/rpl000013.test
index 94d5feb39252e1fd294e31223abe75bb13c739f2..eca4803c6bcb0abef0f2e7369594907195d2717b 100644
--- a/mysql-test/t/rpl000013.test
+++ b/mysql-test/t/rpl000013.test
@@ -39,3 +39,5 @@ drop table if exists t1,t2;
 save_master_pos;
 connection slave;
 sync_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl000015.test b/mysql-test/t/rpl000015.test
index da73c5f4db272652b64cdb70ad12f691719a7fe0..a53049386afcc26af4683e06a184d7092fbf75d8 100644
--- a/mysql-test/t/rpl000015.test
+++ b/mysql-test/t/rpl000015.test
@@ -37,3 +37,5 @@ select * from t1;
 connection master;
 drop table t1;
 sync_slave_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl000017.test b/mysql-test/t/rpl000017.test
index 3b39a6b49a6fd83e7fbbdcb70d2662eeb340c124..3b4574e954704a540dc21a7b4931301c53bd483f 100644
--- a/mysql-test/t/rpl000017.test
+++ b/mysql-test/t/rpl000017.test
@@ -17,3 +17,5 @@ select * from t1;
 connection master;
 drop table t1;
 sync_slave_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl000018.test b/mysql-test/t/rpl000018.test
index fd2be2399a5b38a063ae3c0763267be812ed708d..bc6d887cc99795d65a0f5cdf23193699fb3c6b0d 100644
--- a/mysql-test/t/rpl000018.test
+++ b/mysql-test/t/rpl000018.test
@@ -25,3 +25,5 @@ select * from t1;
 connection master;
 drop table t1;
 sync_slave_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_EE_error.test b/mysql-test/t/rpl_EE_error.test
index 90d8c36685fd89f8ea065a78fba17da25378d0a6..683ccf1bc40e1f0c6a1178c0532ecbf23c9a20f5 100644
--- a/mysql-test/t/rpl_EE_error.test
+++ b/mysql-test/t/rpl_EE_error.test
@@ -28,3 +28,5 @@ drop table t1;
 save_master_pos;
 connection slave;
 wait_for_slave_to_stop;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_alter.test b/mysql-test/t/rpl_alter.test
index a913f01cd8166714613885b1836c301b8b63e4b1..576376a0264a5e4f263f38a9e20791aa002f24fe 100644
--- a/mysql-test/t/rpl_alter.test
+++ b/mysql-test/t/rpl_alter.test
@@ -20,3 +20,5 @@ drop database mysqltest;
 save_master_pos;
 connection slave;
 sync_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_chain_temp_table.test b/mysql-test/t/rpl_chain_temp_table.test
index 007b018e9d8ffaec2483a3ebd74f4adbd0dae94f..96e228a17a107c24b13b3239534aadd645f316f0 100644
--- a/mysql-test/t/rpl_chain_temp_table.test
+++ b/mysql-test/t/rpl_chain_temp_table.test
@@ -97,3 +97,5 @@ sync_with_master;
 # memory they use is freed (it should) by mysqld before it terminates).
 # If they wouldn't be cleaned up, you would see some "still reachable" blocks in
 # Valgrind.
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_change_master.test b/mysql-test/t/rpl_change_master.test
index 23866447c9801461bec16a3813d9e1fe7abc7307..45a6d2c0c289dda7abad0893abac64b52ef4b50b 100644
--- a/mysql-test/t/rpl_change_master.test
+++ b/mysql-test/t/rpl_change_master.test
@@ -33,3 +33,5 @@ drop table t1;
 save_master_pos;
 connection slave;
 sync_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_charset.test b/mysql-test/t/rpl_charset.test
index ee54bc72a652855e7798fd2ff6eb6b9e355360d0..e5ddf08446129a56e5d37c04d6ad1367fe9d2378 100644
--- a/mysql-test/t/rpl_charset.test
+++ b/mysql-test/t/rpl_charset.test
@@ -169,3 +169,5 @@ set @p=_latin1 'test';
 update t1 set pk='test' where pk=@p;
 drop table t1;
 sync_slave_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_commit_after_flush.test b/mysql-test/t/rpl_commit_after_flush.test
index 62c89b3aae6fc1b50e08bdee0ad1c46d4362fcc4..6129e5485a677e57287d571099c31da16c061f79 100644
--- a/mysql-test/t/rpl_commit_after_flush.test
+++ b/mysql-test/t/rpl_commit_after_flush.test
@@ -15,3 +15,5 @@ drop table t1;
 save_master_pos;
 connection slave;
 sync_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_create_database.test b/mysql-test/t/rpl_create_database.test
index c63b0bc85efc49f8705b55b2c3bc2c74729e7edf..cfccc4567b5f2c71d4c3b6c6c31a2fa6659e5721 100644
--- a/mysql-test/t/rpl_create_database.test
+++ b/mysql-test/t/rpl_create_database.test
@@ -69,3 +69,5 @@ DROP DATABASE IF EXISTS mysqltest_prometheus;
 DROP DATABASE IF EXISTS mysqltest_sisyfos;
 DROP DATABASE IF EXISTS mysqltest_bob;
 sync_slave_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_ddl.test b/mysql-test/t/rpl_ddl.test
index d043d40d96e060bffa4340dc9f46a2ff2bc63363..9521ba3d4c1a664390ea9465b0317005bc303633 100644
--- a/mysql-test/t/rpl_ddl.test
+++ b/mysql-test/t/rpl_ddl.test
@@ -348,3 +348,5 @@ DROP DATABASE IF EXISTS mysqltest1;
 DROP DATABASE IF EXISTS mysqltest2;
 DROP DATABASE IF EXISTS mysqltest3;
 --enable_warnings
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_deadlock.test b/mysql-test/t/rpl_deadlock.test
index eb4c5c33714fdfc1422a35dcabc1e75807fec7a4..d31ef3a5beff32be1dfda00f989ce6254f331c34 100644
--- a/mysql-test/t/rpl_deadlock.test
+++ b/mysql-test/t/rpl_deadlock.test
@@ -109,3 +109,5 @@ show slave status;
 connection master;
 drop table t1,t2,t3,t4;
 sync_slave_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_delete_all.test b/mysql-test/t/rpl_delete_all.test
index ad2ce29c6108647b8fc926504661560055bc3d72..db33ee3bb864632572006b3c22004cba6dbe26de 100644
--- a/mysql-test/t/rpl_delete_all.test
+++ b/mysql-test/t/rpl_delete_all.test
@@ -39,3 +39,5 @@ select * from t1;
 connection master;
 drop table t1;
 sync_slave_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_do_grant.test b/mysql-test/t/rpl_do_grant.test
index 27a22874497d33d0b5de4caf758c12042c0bc52f..54287a676570db4d7af73d5e55088ead6d56ad66 100644
--- a/mysql-test/t/rpl_do_grant.test
+++ b/mysql-test/t/rpl_do_grant.test
@@ -44,3 +44,5 @@ sync_with_master;
 # no need to delete manually, as the DELETEs must have done some real job on
 # master (updated binlog)
 flush privileges;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_drop.test b/mysql-test/t/rpl_drop.test
index ab5b608cab606953b9ecf9093fd84728f3db4551..2544599208ead81658574cd0bba8956a93a23811 100644
--- a/mysql-test/t/rpl_drop.test
+++ b/mysql-test/t/rpl_drop.test
@@ -10,3 +10,5 @@ drop table t1, t2;
 save_master_pos;
 connection slave;
 sync_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_drop_temp.test b/mysql-test/t/rpl_drop_temp.test
index cf663367b784a5c601a820e954eaea3e76624294..18fc17ed064c9816febd9cd5d531f2a17d262854 100644
--- a/mysql-test/t/rpl_drop_temp.test
+++ b/mysql-test/t/rpl_drop_temp.test
@@ -14,3 +14,4 @@ show status like 'Slave_open_temp_tables';
 connection default;
 drop database mysqltest;
 
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_empty_master_crash.test b/mysql-test/t/rpl_empty_master_crash.test
index 98a630c69ca802267336c319562d552ad115b30c..5f26bedc9feba6d8590883ad1902ebbb8278485a 100644
--- a/mysql-test/t/rpl_empty_master_crash.test
+++ b/mysql-test/t/rpl_empty_master_crash.test
@@ -11,3 +11,5 @@ load table t1 from master;
 connection slave;
 --error 1188
 load table t1 from master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_error_ignored_table.test b/mysql-test/t/rpl_error_ignored_table.test
index 5388b6af8d49eb507c00dd9573b68d8290cd9ce8..7d948e96c39e01f64c7a0120ebd59ce7046e75e9 100644
--- a/mysql-test/t/rpl_error_ignored_table.test
+++ b/mysql-test/t/rpl_error_ignored_table.test
@@ -55,3 +55,5 @@ connection slave;
 # SQL slave thread should not have stopped (because table of the killed
 # query is in the ignore list).
 sync_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_failed_optimize.test b/mysql-test/t/rpl_failed_optimize.test
index d245d1bacbb6c223b4b9c0e4d4c1896aaeb42647..57afaa89e836a99199f86ba992f37c042c9f7f76 100644
--- a/mysql-test/t/rpl_failed_optimize.test
+++ b/mysql-test/t/rpl_failed_optimize.test
@@ -16,3 +16,5 @@ OPTIMIZE TABLE t1;
 
 OPTIMIZE TABLE non_existing;  
 sync_slave_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_failsafe.test b/mysql-test/t/rpl_failsafe.test
index ae61b0611533b85ce59e7a95221002fb7af8d3a7..4336d897fc059ddaeeff40dc43f8128aef2b6635 100644
--- a/mysql-test/t/rpl_failsafe.test
+++ b/mysql-test/t/rpl_failsafe.test
@@ -20,3 +20,5 @@ start slave;
 sync_with_master;
 show variables like 'rpl_recovery_rank';
 show status like 'Rpl_status';
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_flush_log_loop.test b/mysql-test/t/rpl_flush_log_loop.test
index ccaae8ad76514a7f98e3bfe40ff806207bd14625..ff599af89a39ba4bc47e2dd1eed73468f4a30cc9 100644
--- a/mysql-test/t/rpl_flush_log_loop.test
+++ b/mysql-test/t/rpl_flush_log_loop.test
@@ -20,3 +20,5 @@ sleep 5;
 --replace_result $SLAVE_MYPORT SLAVE_PORT
 --replace_column 1 # 8 # 9 # 23 # 33 #
 show slave status;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_flush_tables.test b/mysql-test/t/rpl_flush_tables.test
index eb16ddcd8de0995fc15338aa9498c8e84254fcb6..48fda8188901b32bcaf46882800701ac66235c1d 100644
--- a/mysql-test/t/rpl_flush_tables.test
+++ b/mysql-test/t/rpl_flush_tables.test
@@ -3,7 +3,10 @@
 # RENAME TABLE work with MERGE tables on the slave.
 # Test of FLUSH NO_WRITE_TO_BINLOG by the way.
 #
-source include/master-slave.inc;
+--source include/master-slave.inc
+# Skipped on Windows because it can't handle a table underlying an open
+# merge table getting renamed.
+--source include/not_windows.inc
 
 create table t1 (a int);
 insert into t1 values (10);
@@ -35,3 +38,5 @@ sync_with_master;
 select * from t3;
 # Note that all this confusion may cause warnings 'table xx is open on rename'
 # in the .err files; these are not fatal and are not reported by mysql-test-run.
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_free_items.test b/mysql-test/t/rpl_free_items.test
index 3228ffd9cded9351706b2cc53e54440bc3cdadd8..043e84160b852358fcb88b699bb1d15fd836c437 100644
--- a/mysql-test/t/rpl_free_items.test
+++ b/mysql-test/t/rpl_free_items.test
@@ -18,3 +18,5 @@ connection master;
 drop table t1;
 drop table t2;
 sync_slave_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_get_lock.test b/mysql-test/t/rpl_get_lock.test
index 847e7145be6deeb35c30324ba397395983076779..945bd98c993708d9160022ef46f0d2b87a01bd1e 100644
--- a/mysql-test/t/rpl_get_lock.test
+++ b/mysql-test/t/rpl_get_lock.test
@@ -39,3 +39,5 @@ drop table t1;
 save_master_pos;
 connection slave;
 sync_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_heap.test b/mysql-test/t/rpl_heap.test
index 3452f3990bf07d692c6e53d6bb9cced776e47049..3ee335fe58dc2375416596e90589d35bc908f987 100644
--- a/mysql-test/t/rpl_heap.test
+++ b/mysql-test/t/rpl_heap.test
@@ -47,3 +47,5 @@ drop table t1;
 save_master_pos;
 connection slave;
 sync_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_ignore_grant.test b/mysql-test/t/rpl_ignore_grant.test
index 9b012d08df36c7e79ba6b584ecc88d5fa45c6ae7..2e6e2ce9a310263d920cdfd5bbde768e0f94724f 100644
--- a/mysql-test/t/rpl_ignore_grant.test
+++ b/mysql-test/t/rpl_ignore_grant.test
@@ -55,3 +55,5 @@ sync_with_master;
 delete from mysql.user where user=_binary'rpl_ignore_grant';
 delete from mysql.db where user=_binary'rpl_ignore_grant';
 flush privileges;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_init_slave.test b/mysql-test/t/rpl_init_slave.test
index 3ea04117ced889cf8435eee799e7d3fadd3e7bd0..cefb04a7b75a0e1b684674c0419d4a293a9dd4df 100644
--- a/mysql-test/t/rpl_init_slave.test
+++ b/mysql-test/t/rpl_init_slave.test
@@ -24,3 +24,5 @@ save_master_pos;
 connection slave;
 sync_with_master;
 stop slave;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_innodb.test b/mysql-test/t/rpl_innodb.test
index b171dced26ecffaacc6905b2677b7062aab727ff..551657fd7e318e46d1294e04a9e5d323627dce57 100644
--- a/mysql-test/t/rpl_innodb.test
+++ b/mysql-test/t/rpl_innodb.test
@@ -44,3 +44,5 @@ connection master;
 DROP TABLE t4;
 --enable_query_log
 sync_slave_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_insert_id.test b/mysql-test/t/rpl_insert_id.test
index a4506e3296359023b798bb4392d227d44d079a49..704de1a423b00c1a28303ff4f188c7ca01c2f867 100644
--- a/mysql-test/t/rpl_insert_id.test
+++ b/mysql-test/t/rpl_insert_id.test
@@ -74,6 +74,4 @@ SET FOREIGN_KEY_CHECKS=0;
 INSERT INTO t1 VALUES (1),(1);
 sync_slave_with_master;
 
-
-
-
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_insert_ignore.test b/mysql-test/t/rpl_insert_ignore.test
index 58eaa28781748322059aaf1702795e69241c049a..a6cc69b1df8b577408e8c653f1196ca60946e6ca 100644
--- a/mysql-test/t/rpl_insert_ignore.test
+++ b/mysql-test/t/rpl_insert_ignore.test
@@ -69,3 +69,5 @@ SELECT * FROM t1 ORDER BY a;
 connection master;
 drop table t1, t2;
 sync_slave_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_loaddata.test b/mysql-test/t/rpl_loaddata.test
index 3d54897adda311595887e782fc406e7813bbdf49..1b5980eb92e82fcd7f9d22762bac4809db5e1502 100644
--- a/mysql-test/t/rpl_loaddata.test
+++ b/mysql-test/t/rpl_loaddata.test
@@ -149,3 +149,5 @@ wait_for_slave_to_stop;
 drop table t2;
 connection master;
 drop table t2;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_loaddata_rule_m.test b/mysql-test/t/rpl_loaddata_rule_m.test
index 97c984c4369dcf62c048fe6f8d6f63f6796f3e41..68024c340a847f2f1e0528a8b9ceb2963c2fbdee 100644
--- a/mysql-test/t/rpl_loaddata_rule_m.test
+++ b/mysql-test/t/rpl_loaddata_rule_m.test
@@ -25,3 +25,5 @@ load data infile '../../std_data/rpl_loaddata.dat' into table test.t1;
 --replace_column 2 # 5 #
 show binlog events from 98;
 drop database mysqltest;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_loaddata_rule_s.test b/mysql-test/t/rpl_loaddata_rule_s.test
index 9802c00d35f14070889ff8b48b6bfabc13a39f17..98fad3cc06f8b7226041ced5fe6dbd2da279e006 100644
--- a/mysql-test/t/rpl_loaddata_rule_s.test
+++ b/mysql-test/t/rpl_loaddata_rule_s.test
@@ -18,3 +18,5 @@ connection slave;
 sync_with_master;
 select count(*) from t1; # check that LOAD was replicated
 show binlog events from 98; # should be nothing
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_loaddatalocal.test b/mysql-test/t/rpl_loaddatalocal.test
index f9325b39af6f2df4e4afae318024a103e21edc48..0b54de8462eda57f5382967d436446cc6e144d5b 100644
--- a/mysql-test/t/rpl_loaddatalocal.test
+++ b/mysql-test/t/rpl_loaddatalocal.test
@@ -35,6 +35,8 @@ save_master_pos;
 connection slave;
 sync_with_master;
 
+# End of 4.1 tests
+
 #
 # Now let us test how well we replicate LOAD DATA LOCAL in situation when
 # we met duplicates in tables to which we are adding rows.
diff --git a/mysql-test/t/rpl_log.test b/mysql-test/t/rpl_log.test
index 8cb99d5432e2ec8fbdae3db4c51a5395e2059c34..899f812535acbf40870e6ab5fb223443e89edeb6 100644
--- a/mysql-test/t/rpl_log.test
+++ b/mysql-test/t/rpl_log.test
@@ -108,3 +108,5 @@ show slave status;
 
 --error 1220
 show binlog events in 'slave-bin.000005' from 4;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_log_pos.test b/mysql-test/t/rpl_log_pos.test
index 2a03497846bcc289ee119e7138a67f8d2b644fe0..979b146bb22003fc68beabb66fc3eb386b922243 100644
--- a/mysql-test/t/rpl_log_pos.test
+++ b/mysql-test/t/rpl_log_pos.test
@@ -45,3 +45,5 @@ select * from t1;
 connection master;
 drop table t1;
 sync_slave_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_many_optimize.test b/mysql-test/t/rpl_many_optimize.test
index 525e23abe151bf8548db3238335f948b1de7cc6f..91fab0b27a8fc372adbadfd06c53718aa925fcec 100644
--- a/mysql-test/t/rpl_many_optimize.test
+++ b/mysql-test/t/rpl_many_optimize.test
@@ -18,3 +18,5 @@ enable_query_log;
 drop table t1;
 # Bug was that slave segfaulted after ~ a hundred of OPTIMIZE (or ANALYZE)
 sync_slave_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_master_pos_wait.test b/mysql-test/t/rpl_master_pos_wait.test
index 4d4d51b04ab4f219a6f3c052b15d3992cec4fbf9..893c8746efc723e77a78ee15bbd16b5d5cf45de1 100644
--- a/mysql-test/t/rpl_master_pos_wait.test
+++ b/mysql-test/t/rpl_master_pos_wait.test
@@ -14,3 +14,5 @@ connection slave1;
 stop slave sql_thread;
 connection slave;
 reap;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_max_relay_size.test b/mysql-test/t/rpl_max_relay_size.test
index 963a76fb959862a6d6a58bfb93d2748954ee42a5..8b54cf5ab7f3034c47241f97e636fabcb6f983ff 100644
--- a/mysql-test/t/rpl_max_relay_size.test
+++ b/mysql-test/t/rpl_max_relay_size.test
@@ -91,3 +91,5 @@ connection master;
 # test that the absence of relay logs does not make a master crash
 flush logs;
 show master status;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_misc_functions.test b/mysql-test/t/rpl_misc_functions.test
index 12eadbb25ed32e0f9408ca39c988f3e53a5709d7..f20d0aa83e429eb44b80fbe1aeddb2ab4894f0f8 100644
--- a/mysql-test/t/rpl_misc_functions.test
+++ b/mysql-test/t/rpl_misc_functions.test
@@ -28,3 +28,5 @@ load data local infile './var/master-data/test/rpl_misc_functions.outfile' into
 # compare them with the replica; the SELECT below should return no row
 select * from t1, t2 where (t1.id=t2.id) and not(t1.i=t2.i and t1.r1=t2.r1 and t1.r2=t2.r2 and t1.p=t2.p);
 stop slave;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_multi_delete.test b/mysql-test/t/rpl_multi_delete.test
index 299cb720b62625d2d0fc882768057f79e0c7b74f..2fd7b820b1ae55f4caedbcdb442eb737c641ae6b 100644
--- a/mysql-test/t/rpl_multi_delete.test
+++ b/mysql-test/t/rpl_multi_delete.test
@@ -21,3 +21,5 @@ drop table t1,t2;
 save_master_pos;
 connection slave;
 sync_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_multi_delete2.test b/mysql-test/t/rpl_multi_delete2.test
index c512883384317407fbb03b73ecba96adf7bf2814..62d95a3a90f0bb14af789f84c191a83109c9b678 100644
--- a/mysql-test/t/rpl_multi_delete2.test
+++ b/mysql-test/t/rpl_multi_delete2.test
@@ -21,3 +21,5 @@ select * from t2;
 
 connection master;
 drop table t1,t2;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_multi_query.test b/mysql-test/t/rpl_multi_query.test
index 2ddd61ce7ba20d159d755abc0be3ffe9924f3d0e..fa94928e13a485895aaac1055de19f37124a62c8 100644
--- a/mysql-test/t/rpl_multi_query.test
+++ b/mysql-test/t/rpl_multi_query.test
@@ -27,3 +27,5 @@ connection master;
 show binlog events from 98;
 drop database mysqltest;
 sync_slave_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_multi_update.test b/mysql-test/t/rpl_multi_update.test
index 88994aa66bd0787c7766b1ab3d5c0cda77b3cb6d..dd75edb30559fa4c29945eb824cb92c927f9a0d7 100644
--- a/mysql-test/t/rpl_multi_update.test
+++ b/mysql-test/t/rpl_multi_update.test
@@ -22,3 +22,5 @@ UPDATE t1, t2 SET t1.b = t2.b WHERE t1.a = t2.a;
 save_master_pos;
 connection slave;
 sync_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_multi_update2.test b/mysql-test/t/rpl_multi_update2.test
index bba7700a88e6e4ba90aff9b1893ae67898dea1bf..f92c5504f430088461d1601cd7f760084c98e45d 100644
--- a/mysql-test/t/rpl_multi_update2.test
+++ b/mysql-test/t/rpl_multi_update2.test
@@ -31,3 +31,5 @@ connection slave;
 sync_with_master;
 SELECT * FROM t1 ORDER BY a;
 SELECT * FROM t2 ORDER BY a;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_multi_update3.test b/mysql-test/t/rpl_multi_update3.test
index 80b0603eb60331f066fbac0f64f21ae40eec306c..64e46882c1649c59797b0d234652329855b19392 100644
--- a/mysql-test/t/rpl_multi_update3.test
+++ b/mysql-test/t/rpl_multi_update3.test
@@ -157,3 +157,5 @@ SELECT * FROM t1;
 
 connection master;
 DROP TABLE t1, t2, t3;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_mystery22.test b/mysql-test/t/rpl_mystery22.test
index d49f1a210f4bf0403f0089251820991232ed7223..f190968a03c7e428916ccf72b3a8d4d92f5363da 100644
--- a/mysql-test/t/rpl_mystery22.test
+++ b/mysql-test/t/rpl_mystery22.test
@@ -37,3 +37,4 @@ connection master;
 drop table t1;
 sync_slave_with_master;
 
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_openssl.test b/mysql-test/t/rpl_openssl.test
index 779ec4e84bf3b5d3316c0aedf1b773180767d43c..3c151721d8e5b05933f27c6cec49841f677cd6a9 100644
--- a/mysql-test/t/rpl_openssl.test
+++ b/mysql-test/t/rpl_openssl.test
@@ -7,7 +7,7 @@ source include/master-slave.inc;
 # creating replication user for whom ssl auth is required
 # preparing playground
 connection master;
-grant replication slave on *.* to replssl@'%' require ssl;
+grant replication slave on *.* to replssl@localhost require ssl;
 create table t1 (t int);
 save_master_pos;
 
@@ -60,3 +60,5 @@ sync_with_master;
 --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
 --replace_column 1 # 8 # 9 # 23 # 33 #
 show slave status;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_optimize.test b/mysql-test/t/rpl_optimize.test
index 9f02b715885cc9e1cd444da22f62a322994ac980..6858f52ababc5f37df3d238cb74da3413180f70f 100644
--- a/mysql-test/t/rpl_optimize.test
+++ b/mysql-test/t/rpl_optimize.test
@@ -41,3 +41,5 @@ sync_with_master;
 
 # If the machine is so fast that slave syncs before OPTIMIZE
 # starts, this test wil demonstrate nothing but will pass.
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_ps.test b/mysql-test/t/rpl_ps.test
index 79f48381a4fba2c516281080a732b3da567d9a70..adf39b1e4ab571456662499a056e73bff2580997 100644
--- a/mysql-test/t/rpl_ps.test
+++ b/mysql-test/t/rpl_ps.test
@@ -41,3 +41,4 @@ connection slave;
 sync_with_master;
 stop slave;
 
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_redirect.test b/mysql-test/t/rpl_redirect.test
index d505351cc6935d472f3dcd509544fb846a43923f..beb18348b404045a337f851f127314595c8b5b26 100644
--- a/mysql-test/t/rpl_redirect.test
+++ b/mysql-test/t/rpl_redirect.test
@@ -41,3 +41,5 @@ select * from t1;
 drop table t1;
 connection master;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_relayrotate.test b/mysql-test/t/rpl_relayrotate.test
index 2fde590356a959765b1322d7cb970f06601801da..b66cf7a6e0d638384a4325e2e558ef7958b6ab00 100644
--- a/mysql-test/t/rpl_relayrotate.test
+++ b/mysql-test/t/rpl_relayrotate.test
@@ -75,3 +75,5 @@ drop table t1;
 save_master_pos;
 connection slave;
 sync_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_relayspace.test b/mysql-test/t/rpl_relayspace.test
index bb82781b511a58cbfdcdda41252ef2951d49cdc4..70315c14f341b05f7c6dd4a3834fd5b348549483 100644
--- a/mysql-test/t/rpl_relayspace.test
+++ b/mysql-test/t/rpl_relayspace.test
@@ -30,3 +30,5 @@ start slave;
 # also the slave will probably not cooperate to shutdown
 # (as 2 threads are locked)
 select master_pos_wait('master-bin.001',200,6)=-1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_replicate_do.test b/mysql-test/t/rpl_replicate_do.test
index 108dd54ce0a13e4c2674874b3b64d13426ba1e59..ff5af71ea5b25951c2f3b2d7ff7a61d2648e0dcf 100644
--- a/mysql-test/t/rpl_replicate_do.test
+++ b/mysql-test/t/rpl_replicate_do.test
@@ -36,3 +36,4 @@ sync_with_master;
 --replace_column 1 # 8 # 9 # 23 # 33 #
 show slave status;
 
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_reset_slave.test b/mysql-test/t/rpl_reset_slave.test
index 1b27e059f92b17e6eeea4eaeba13b263979810a4..aeac1b501108d7f10bd58de5c45b2fb1a6b6ea6b 100644
--- a/mysql-test/t/rpl_reset_slave.test
+++ b/mysql-test/t/rpl_reset_slave.test
@@ -46,3 +46,5 @@ reset slave;
 start slave;
 sync_with_master;
 show status like 'slave_open_temp_tables';
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_rewrite_db.test b/mysql-test/t/rpl_rewrite_db.test
index b77d57294fa42dc51f60ac93cf7ccf8f7f5183d0..1e8e5a992d8e572bf18e9c4ec88486d7e3017e00 100644
--- a/mysql-test/t/rpl_rewrite_db.test
+++ b/mysql-test/t/rpl_rewrite_db.test
@@ -78,3 +78,4 @@ drop database rewrite;
 connection master;
 drop table t1;
 
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_rotate_logs.test b/mysql-test/t/rpl_rotate_logs.test
index 2355e92e58bae81c464ed4a2b5aeba68becaabb4..26cb5ac8631f5e5acf86c9ae2b6ffcc6134725ab 100644
--- a/mysql-test/t/rpl_rotate_logs.test
+++ b/mysql-test/t/rpl_rotate_logs.test
@@ -153,3 +153,4 @@ connection master;
 drop table if exists t1,t2,t3,t4;
 sync_slave_with_master;
 
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_server_id1.test b/mysql-test/t/rpl_server_id1.test
index 4d5043252942c346fb6d0eca46f4b2e9e90bd0d5..3583f05284cdd62983f84f93b9ff36edd1dcfd83 100644
--- a/mysql-test/t/rpl_server_id1.test
+++ b/mysql-test/t/rpl_server_id1.test
@@ -22,3 +22,5 @@ insert into t1 values (1);
 sleep 2; # enough time for the event to be replicated (it should not)
 show status like "slave_running";
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_server_id2.test b/mysql-test/t/rpl_server_id2.test
index 7bbac358adac7de024bb4ecc07b221ddb84eda27..0f2eb560d1818d377b5b34c0089fac728d27447c 100644
--- a/mysql-test/t/rpl_server_id2.test
+++ b/mysql-test/t/rpl_server_id2.test
@@ -22,3 +22,5 @@ select * from t1; # check that indeed 2 were inserted
 # (not critical).
 stop slave;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_set_charset.test b/mysql-test/t/rpl_set_charset.test
index 269074b1c423770551e677d177af2eb599a94a74..c70eb2681f5403060c5d1f9b46ad4cedcdbfa668 100644
--- a/mysql-test/t/rpl_set_charset.test
+++ b/mysql-test/t/rpl_set_charset.test
@@ -31,3 +31,5 @@ drop database mysqltest1;
 save_master_pos;
 connection slave;
 sync_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_skip_error.test b/mysql-test/t/rpl_skip_error.test
index 86c89c703140825936788b59f36d95c87f614c20..e0e569a65b788595a769ade31c18b995923552a8 100644
--- a/mysql-test/t/rpl_skip_error.test
+++ b/mysql-test/t/rpl_skip_error.test
@@ -12,3 +12,5 @@ save_master_pos;
 connection slave;
 sync_with_master;
 select * from t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_slave_status.test b/mysql-test/t/rpl_slave_status.test
new file mode 100644
index 0000000000000000000000000000000000000000..7e16097edd0ee46f6731183d603da77d4b58b9a2
--- /dev/null
+++ b/mysql-test/t/rpl_slave_status.test
@@ -0,0 +1,30 @@
+# Test case for BUG #10780
+source include/master-slave.inc
+connection master;
+grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl';
+connection slave;
+stop slave;
+change master to master_user='rpl',master_password='rpl';
+start slave;
+connection master;
+--disable_warnings
+drop table if exists t1;
+--enable_warning
+create table t1 (n int);
+insert into t1 values (1);
+save_master_pos;
+connection slave;
+sync_with_master;
+select * from t1;
+connection master;
+delete from mysql.user where user='rpl';
+flush privileges;
+connection slave;
+stop slave;
+start slave;
+--replace_result $MASTER_MYPORT MASTER_MYPORT
+--replace_column 7 # 8 # 9 # 22 # 23 #
+--vertical_results
+show slave status;
+
+# end of 4.1 tests
diff --git a/mysql-test/t/rpl_sporadic_master.test b/mysql-test/t/rpl_sporadic_master.test
index b24901c62a9c56e29bf735eff419171571f1f8f0..26b633a1c4f93845ccd140fdb6bda2ff5fcf8988 100644
--- a/mysql-test/t/rpl_sporadic_master.test
+++ b/mysql-test/t/rpl_sporadic_master.test
@@ -22,3 +22,5 @@ select * from t1;
 connection master;
 drop table t1,t2;
 sync_slave_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_start_stop_slave.test b/mysql-test/t/rpl_start_stop_slave.test
index 903ff204194b43ee1670bc6194434392b2b7f687..19988cf902a8c3f5d279b7b17fa9db2b2367d5d2 100644
--- a/mysql-test/t/rpl_start_stop_slave.test
+++ b/mysql-test/t/rpl_start_stop_slave.test
@@ -32,3 +32,5 @@ save_master_pos;
 
 connection slave;
 sync_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_temporary.test b/mysql-test/t/rpl_temporary.test
index e65469de7e01971d2fed79da2c3c8d116271b7e7..fcb2391a9d892121e8c631dad1662fd8d8d7fac9 100644
--- a/mysql-test/t/rpl_temporary.test
+++ b/mysql-test/t/rpl_temporary.test
@@ -130,3 +130,5 @@ create temporary table t3 (f int);
 sync_with_master;
 
 # The server will now close done
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_timezone.test b/mysql-test/t/rpl_timezone.test
index a7547f7afc6b63303b92432855095892cac41913..2e9883141d8deaf11293c7992c1257d3c5cff72a 100644
--- a/mysql-test/t/rpl_timezone.test
+++ b/mysql-test/t/rpl_timezone.test
@@ -122,3 +122,5 @@ select * from t2;
 connection master;
 drop table t1, t2;
 sync_slave_with_master;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_trigger.test b/mysql-test/t/rpl_trigger.test
new file mode 100644
index 0000000000000000000000000000000000000000..715222f0314880f833c1cd653cf20e11094d1c5d
--- /dev/null
+++ b/mysql-test/t/rpl_trigger.test
@@ -0,0 +1,118 @@
+#
+# Test of triggers with replication
+#
+
+source include/master-slave.inc;
+
+#
+# #12482: Triggers has side effects with auto_increment values
+#
+
+create table t1 (a int auto_increment, primary key (a), b int, rand_value double not null);
+create table t2 (a int auto_increment, primary key (a), b int);
+create table t3 (a int auto_increment, primary key (a), name varchar(64) not null, old_a int, old_b int, rand_value double not null);
+
+delimiter |;
+create trigger t1 before insert on t1 for each row
+begin
+ insert into t3 values (NULL, "t1", new.a, new.b, rand());
+end|
+
+create trigger t2 after insert on t2 for each row
+begin
+ insert into t3 values (NULL, "t2", new.a, new.b, rand());
+end|
+delimiter ;|
+
+insert into t3 values(100,"log",0,0,0);
+
+# Ensure we always have same random numbers
+SET @@RAND_SEED1=658490765, @@RAND_SEED2=635893186;
+
+# Emulate that we have rows 2-9 deleted on the slave
+insert into t1 values(1,1,rand()),(NULL,2,rand());
+insert into t2 (b) values(last_insert_id());
+insert into t2 values(3,0),(NULL,0);
+insert into t2 values(NULL,0),(500,0);
+
+select a,b, truncate(rand_value,4) from t1;
+select * from t2;
+select a,name, old_a, old_b, truncate(rand_value,4) from t3;
+save_master_pos;
+connection slave;
+sync_with_master;
+--disable_query_log
+select "--- On slave --" as "";
+--enable_query_log
+select a,b, truncate(rand_value,4) from t1;
+select * from t2;
+select a,name, old_a, old_b, truncate(rand_value,4) from t3;
+connection master;
+drop table t1,t2,t3;
+
+#
+# #12480: NOW() is not constant in a trigger
+# #12481: Using NOW() in a stored function breaks statement based replication
+#
+
+# Start by getting a lock on 'bug12480' to be able to use get_lock() as sleep()
+connect (con2,localhost,root,,);
+connection con2;
+select get_lock("bug12480",2);
+connection default;
+
+create table t1 (a datetime,b  datetime, c datetime);
+--ignore_warnings
+drop function if exists bug12480;
+--enable_warnings
+
+delimiter |;
+
+create function bug12480() returns datetime
+begin
+  set @a=get_lock("bug12480",2);
+  return now();
+end|
+
+create trigger t1_first before insert on t1
+for each row begin
+  set @a=get_lock("bug12480",2);
+  set new.b= now();
+  set new.c= bug12480();
+end
+|
+
+delimiter ;|
+insert into t1 set a = now();
+select a=b && a=c from t1;
+let $time=`select a from t1`;
+
+save_master_pos;
+connection slave;
+sync_with_master;
+--disable_query_log
+select "--- On slave --" as "";
+--enable_query_log
+select a=b && a=c from t1;
+--disable_query_log
+eval select a='$time' as 'test' from t1;
+--enable_query_log
+
+connection master;
+disconnect con2;
+
+truncate table t1;
+drop trigger t1_first;
+
+insert into t1 values ("2003-03-03","2003-03-03","2003-03-03"),(bug12480(),bug12480(),bug12480()),(now(),now(),now());
+select a=b && a=c from t1;
+
+drop function bug12480;
+drop table t1;
+
+#
+# End of test
+#
+save_master_pos;
+connection slave;
+sync_with_master;
diff --git a/mysql-test/t/rpl_until.test b/mysql-test/t/rpl_until.test
index c1aee2cb1dbc615c5a5c275a736654721e4f5ca2..5bc7a040b1b474d1bc0e62953d5ba5f58742f8b9 100644
--- a/mysql-test/t/rpl_until.test
+++ b/mysql-test/t/rpl_until.test
@@ -83,3 +83,5 @@ start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561;
 # Warning should be given for second command
 start slave sql_thread;
 start slave until master_log_file='master-bin.000001', master_log_pos=776;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_user_variables.test b/mysql-test/t/rpl_user_variables.test
index 711d83219a669777932b9d1550d69c27ee3c7c00..e89853977032b4b5b7d4afc2565d2e220dca624f 100644
--- a/mysql-test/t/rpl_user_variables.test
+++ b/mysql-test/t/rpl_user_variables.test
@@ -54,3 +54,5 @@ save_master_pos;
 connection slave;
 sync_with_master;
 stop slave;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/rpl_variables.test b/mysql-test/t/rpl_variables.test
index ea40181ecd37c39eaef3a59c994913e215d9af1f..57ae2b9c3c4602757f46af830297d04cdc017c2d 100644
--- a/mysql-test/t/rpl_variables.test
+++ b/mysql-test/t/rpl_variables.test
@@ -3,6 +3,8 @@ source include/master-slave.inc;
 set global slave_net_timeout=100;
 set global sql_slave_skip_counter=100;
 
+# End of 4.1 tests
+
 # BUG #7800: Add various-slave related variables to SHOW VARIABLES
 show variables like 'slave_compressed_protocol';
 --replace_column 2 SLAVE_LOAD_TMPDIR
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index ef26712af069de3544e41fde84ee0665d67ce90e..390c4372f16e6695e2180bb0df42935bab3cc940 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -1538,22 +1538,22 @@ select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 25
 #
 insert into t2 (fld1, companynr) values (999999,99);
 
-select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null;
-select count(*) from t2 left join t4 using (companynr) where t4.companynr is not null;
-explain select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null;
-explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr is null;
+select companynr,companyname from t2 left join t4 using (companynr) where companynr is null;
+select count(*) from t2 left join t4 using (companynr) where companynr is not null;
+explain select companynr,companyname from t2 left join t4 using (companynr) where companynr is null;
+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr is null;
 delete from t2 where fld1=999999;
 
 #
 # Test left join optimization
 
-explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0;
-explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0;
-explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 and t4.companynr > 0;
+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0;
+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0;
+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 and companynr > 0;
 # Following can't be optimized
-explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr is null;
-explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0 or t4.companynr > 0;
-explain select t2.companynr,companyname from t4 left join t2 using (companynr) where ifnull(t2.companynr,1)>0;
+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr is null;
+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0 or companynr > 0;
+explain select companynr,companyname from t4 left join t2 using (companynr) where ifnull(companynr,1)>0;
 
 #
 # Joins with forms.
@@ -2080,6 +2080,96 @@ select * from t3 left join t1 on t3.id = t1.uid, t2 where t2.ident in (0, t1.gid
 
 drop table t1,t2,t3;
 
+# Test for BUG#11700
+CREATE TABLE t1 (
+  acct_id int(11) NOT NULL default '0',
+  profile_id smallint(6) default NULL,
+  UNIQUE KEY t1$acct_id (acct_id),
+  KEY t1$profile_id (profile_id)
+);
+INSERT INTO t1 VALUES (132,17),(133,18);
+
+CREATE TABLE t2 (
+  profile_id smallint(6) default NULL,
+  queue_id int(11) default NULL,
+  seq int(11) default NULL,
+  KEY t2$queue_id (queue_id)
+);
+INSERT INTO t2 VALUES (17,31,4),(17,30,3),(17,36,2),(17,37,1);
+
+CREATE TABLE t3 (
+  id int(11) NOT NULL default '0',
+  qtype int(11) default NULL,
+  seq int(11) default NULL,
+  warn_lvl int(11) default NULL,
+  crit_lvl int(11) default NULL,
+  rr1 tinyint(4) NOT NULL default '0',
+  rr2 int(11) default NULL,
+  default_queue tinyint(4) NOT NULL default '0',
+  KEY t3$qtype (qtype),
+  KEY t3$id (id)
+);
+
+INSERT INTO t3 VALUES (30,1,29,NULL,NULL,0,NULL,0),(31,1,28,NULL,NULL,0,NULL,0),
+  (36,1,34,NULL,NULL,0,NULL,0),(37,1,35,NULL,NULL,0,121,0);
+
+SELECT COUNT(*) FROM t1 a STRAIGHT_JOIN t2 pq STRAIGHT_JOIN t3 q 
+WHERE 
+  (pq.profile_id = a.profile_id) AND (a.acct_id = 132) AND 
+  (pq.queue_id = q.id) AND (q.rr1 <> 1);
+
+drop table t1,t2,t3;
+
+#
+# Bug #11482 Wrongly applied optimization was erroneously rejecting valid
+#            rows 
+create table t1 (f1 int);
+insert into t1 values (1),(NULL);
+create table t2 (f2 int, f3 int, f4 int);
+create index idx1 on t2 (f4);
+insert into t2 values (1,2,3),(2,4,6);
+select A.f2 from t1 left join t2 A on A.f2 = f1 where A.f3=(select min(f3)
+from  t2 C where A.f4 = C.f4) or A.f3 IS NULL; 
+drop table t1,t2;
+
+#
+# Bug #11521 Negative integer keys incorrectly substituted for 0 during
+#            range analysis.
+
+create table t2 (a tinyint unsigned);
+create index t2i on t2(a);
+insert into t2 values (0), (254), (255);
+explain select * from t2 where a > -1;
+select * from t2 where a > -1;
+drop table t2;
+
+#
+# Bug #11745: SELECT ... FROM DUAL with WHERE condition
+#
+
+CREATE TABLE t1 (a int, b int, c int);
+INSERT INTO t1
+  SELECT 50, 3, 3 FROM DUAL
+    WHERE NOT EXISTS
+      (SELECT * FROM t1 WHERE a = 50 AND b = 3);
+SELECT * FROM t1;
+INSERT INTO t1
+  SELECT 50, 3, 3 FROM DUAL
+    WHERE NOT EXISTS
+      (SELECT * FROM t1 WHERE a = 50 AND b = 3);
+select found_rows();
+SELECT * FROM t1;
+select count(*) from t1;
+select found_rows();
+select count(*) from t1 limit 2,3;
+select found_rows();
+select SQL_CALC_FOUND_ROWS count(*) from t1 limit 2,3;
+select found_rows();
+
+DROP TABLE t1;
+
+# End of 4.1 tests
+
 #
 # Test case for bug 7098: substitution of a constant for a string field 
 #
@@ -2154,15 +2244,6 @@ SELECT K2C4, K4N4, F2I4 FROM t1
         (F2I4 = 2 AND K2C4 = 'WART' OR (F2I4 = 2 OR K4N4 = '0200'));
 SELECT K2C4, K4N4, F2I4 FROM t1
   WHERE  K2C4 = 'WART' AND (K2C4 = 'WART' OR K4N4 = '0200');
-
-select found_rows();
-select count(*) from t1;
-select found_rows();
-select count(*) from t1 limit 2,3;
-select found_rows();
-select SQL_CALC_FOUND_ROWS count(*) from t1 limit 2,3;
-select found_rows();
-
 DROP TABLE t1;
 
 #
@@ -2180,36 +2261,6 @@ EXPLAIN SELECT * FROM t1 LEFT JOIN t2 FORCE INDEX (a) ON t1.a=t2.a;
 
 DROP TABLE t1, t2;
 
-
-#
-# Test case for bug 7098: substitution of a constant for a string field 
-#
-
-CREATE TABLE t1 ( city char(30) );
-INSERT INTO t1 VALUES ('London');
-INSERT INTO t1 VALUES ('Paris');
-
-SELECT * FROM t1 WHERE city='London';
-SELECT * FROM t1 WHERE city='london';
-EXPLAIN SELECT * FROM t1 WHERE city='London' AND city='london';
-SELECT * FROM t1 WHERE city='London' AND city='london';
-EXPLAIN SELECT * FROM t1 WHERE city LIKE '%london%' AND city='London';
-SELECT * FROM t1 WHERE city LIKE '%london%' AND city='London';
-
-DROP TABLE t1;
-
-#
-# Bug#7425 inconsistent sort order on unsigned columns result of substraction
-#
-
-create table t1 (a int(11) unsigned, b int(11) unsigned);
-insert into t1 values (1,0), (1,1), (1,2);
-select a-b  from t1 order by 1;
-select a-b , (a-b < 0)  from t1 order by 1;
-select a-b as d, (a-b >= 0), b from t1 group by b having d >= 0;
-select cast((a - b) as unsigned) from t1 order by 1;
-drop table t1;
-
 #
 # Bug#8670
 #
@@ -2297,82 +2348,14 @@ DROP TABLE t1,t2;
 #
 
 select x'10' + 0, X'10' + 0, b'10' + 0, B'10' + 0;
-# Test for BUG#11700
-CREATE TABLE t1 (
-  acct_id int(11) NOT NULL default '0',
-  profile_id smallint(6) default NULL,
-  UNIQUE KEY t1$acct_id (acct_id),
-  KEY t1$profile_id (profile_id)
-);
-INSERT INTO t1 VALUES (132,17),(133,18);
-
-CREATE TABLE t2 (
-  profile_id smallint(6) default NULL,
-  queue_id int(11) default NULL,
-  seq int(11) default NULL,
-  KEY t2$queue_id (queue_id)
-);
-INSERT INTO t2 VALUES (17,31,4),(17,30,3),(17,36,2),(17,37,1);
-
-CREATE TABLE t3 (
-  id int(11) NOT NULL default '0',
-  qtype int(11) default NULL,
-  seq int(11) default NULL,
-  warn_lvl int(11) default NULL,
-  crit_lvl int(11) default NULL,
-  rr1 tinyint(4) NOT NULL default '0',
-  rr2 int(11) default NULL,
-  default_queue tinyint(4) NOT NULL default '0',
-  KEY t3$qtype (qtype),
-  KEY t3$id (id)
-);
-
-INSERT INTO t3 VALUES (30,1,29,NULL,NULL,0,NULL,0),(31,1,28,NULL,NULL,0,NULL,0),
-  (36,1,34,NULL,NULL,0,NULL,0),(37,1,35,NULL,NULL,0,121,0);
-
-SELECT COUNT(*) FROM t1 a STRAIGHT_JOIN t2 pq STRAIGHT_JOIN t3 q 
-WHERE 
-  (pq.profile_id = a.profile_id) AND (a.acct_id = 132) AND 
-  (pq.queue_id = q.id) AND (q.rr1 <> 1);
-
-drop table t1,t2,t3;
 
 #
-# Bug #11482 Wrongly applied optimization was erroneously rejecting valid
-#            rows 
-create table t1 (f1 int);
-insert into t1 values (1),(NULL);
-create table t2 (f2 int, f3 int, f4 int);
-create index idx1 on t2 (f4);
-insert into t2 values (1,2,3),(2,4,6);
-select A.f2 from t1 left join t2 A on A.f2 = f1 where A.f3=(select min(f3)
-from  t2 C where A.f4 = C.f4) or A.f3 IS NULL; 
-drop table t1,t2;
+# BUG #12595
 #
-# Bug #11521 Negative integer keys incorrectly substituted for 0 during
-#            range analysis.
-
-create table t2 (a tinyint unsigned);
-create index t2i on t2(a);
-insert into t2 values (0), (254), (255);
-explain select * from t2 where a > -1;
-select * from t2 where a > -1;
-drop table t2;
-
-#
-# Bug #11745: SELECT ... FROM DUAL with WHERE condition
-#
-
-CREATE TABLE t1 (a int, b int, c int);
-INSERT INTO t1
-  SELECT 50, 3, 3 FROM DUAL
-    WHERE NOT EXISTS
-      (SELECT * FROM t1 WHERE a = 50 AND b = 3);
-SELECT * FROM t1;
-INSERT INTO t1
-  SELECT 50, 3, 3 FROM DUAL
-    WHERE NOT EXISTS
-      (SELECT * FROM t1 WHERE a = 50 AND b = 3);
-SELECT * FROM t1;
-
-DROP TABLE t1;
+CREATE TABLE BUG_12595(a varchar(100));
+INSERT INTO BUG_12595 VALUES ('hakan%'), ('hakank'), ("ha%an");
+SELECT * FROM BUG_12595 WHERE a LIKE 'hakan*%' ESCAPE '*';
+-- error 1210
+SELECT * FROM BUG_12595 WHERE a LIKE 'hakan**%' ESCAPE '**';
+SELECT * FROM BUG_12595 WHERE a LIKE 'ha%%an' ESCAPE '%';
+DROP TABLE BUG_12595;
diff --git a/mysql-test/t/select_found.test b/mysql-test/t/select_found.test
index 91879015b51aaf23cf161fc9186068799a2df4ac..e4bc54a5538088db6f3b16d190c53c776b1a11f9 100644
--- a/mysql-test/t/select_found.test
+++ b/mysql-test/t/select_found.test
@@ -191,3 +191,5 @@ INSERT INTO t1 VALUES (1,2), (1,3), (1,4), (1,5);
 SELECT SQL_CALC_FOUND_ROWS DISTINCT 'a' FROM t1 GROUP BY b LIMIT 2;
 SELECT FOUND_ROWS();
 DROP TABLE t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/select_safe.test b/mysql-test/t/select_safe.test
index 5b2dfb00bb706da1d9f3057e3f150d588e713417..481779e76d70ea0dfc62d33a7c1429574c1c34a4 100644
--- a/mysql-test/t/select_safe.test
+++ b/mysql-test/t/select_safe.test
@@ -56,7 +56,6 @@ SELECT * from t1;
 #
 # Test MAX_SEEKS_FOR_KEY
 #
-SELECT @@MAX_SEEKS_FOR_KEY;
 analyze table t1;
 insert into t1 values (null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a");
 explain select STRAIGHT_JOIN * from t1,t1 as t2 where t1.b=t2.b;
@@ -79,7 +78,7 @@ select * from (select * from t1) x;
 
 set local  max_join_size=1;
 --error 1104
-select * from (select * from t1 a, t1 b) x;
+select * from (select a.a as aa, b.a as ba from t1 a, t1 b) x;
 
 set local  max_join_size=1;
 --error 1104
@@ -87,3 +86,5 @@ select * from (select 1 union select 2 union select 3) x;
 drop table t1;
 
 SET SQL_SAFE_UPDATES=0,SQL_SELECT_LIMIT=DEFAULT, SQL_MAX_JOIN_SIZE=DEFAULT;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test
index d591f90dd65b82a33018158ea75d4d175620cb98..41b8a9e401ce48e78ca109e11a92d9c1dbe871ef 100644
--- a/mysql-test/t/show_check.test
+++ b/mysql-test/t/show_check.test
@@ -385,3 +385,23 @@ create table t1 (
 );
 SHOW CREATE TABLE t1;
 DROP TABLE t1;
+
+# End of 4.1 tests
+#
+# BUG 12183 -  SHOW OPEN TABLES behavior doesn't match grammar
+# First we close all open tables with FLUSH tables and then we open some.
+CREATE TABLE txt1(a int);
+CREATE TABLE tyt2(a int);
+CREATE TABLE urkunde(a int);
+FLUSH TABLES;
+SELECT 1 FROM mysql.db, mysql.proc, mysql.user, mysql.time_zone, mysql.time_zone_name, txt1, tyt2, urkunde LIMIT 0;
+SHOW OPEN TABLES;
+SHOW OPEN TABLES FROM mysql;
+SHOW OPEN TABLES FROM mysql LIKE 'u%';
+SHOW OPEN TABLES LIKE 't%';
+SHOW OPEN TABLES LIKE '%o%';
+FLUSH TABLES;
+SHOW OPEN TABLES;
+DROP TABLE txt1;
+DROP TABLE tyt2;
+DROP TABLE urkunde;
diff --git a/mysql-test/t/skip_name_resolve.test b/mysql-test/t/skip_name_resolve.test
index b669579acbf5e4b9e19a4cb1a91afbb724be747f..02339ca14c5ef2d5766212e1bb398a66d941eced 100644
--- a/mysql-test/t/skip_name_resolve.test
+++ b/mysql-test/t/skip_name_resolve.test
@@ -6,3 +6,5 @@ GRANT ALL ON test.* TO mysqltest_1@'127.0.0.1/255.255.255.255';
 SHOW GRANTS FOR mysqltest_1@'127.0.0.1/255.255.255.255';
 REVOKE ALL ON test.* FROM mysqltest_1@'127.0.0.1/255.255.255.255';
 DROP USER mysqltest_1@'127.0.0.1/255.255.255.255';
+
+# End of 4.1 tests
diff --git a/mysql-test/t/sp-big.test b/mysql-test/t/sp-big.test
new file mode 100644
index 0000000000000000000000000000000000000000..769d77dbef9e07476e00e4bb7e9b6014af2c829a
--- /dev/null
+++ b/mysql-test/t/sp-big.test
@@ -0,0 +1,33 @@
+#
+# Bug #11602: SP with very large body not handled well
+#
+
+--disable_warnings
+drop procedure if exists test.longprocedure;
+drop table if exists t1;
+--enable_warnings
+
+create table t1 (a int);
+insert into t1 values (1),(2),(3);
+
+let $body=`select repeat('select count(*) into out1 from t1;\n', 3072)`;
+
+delimiter //;
+--disable_query_log
+eval select length('$body') as length//
+eval create procedure test.longprocedure (out out1 int) deterministic
+begin
+  $body
+end//
+--enable_query_log
+
+delimiter ;//
+
+# this is larger than the length above, because it includes the 'begin' and
+# 'end' bits and some whitespace
+select length(routine_definition) from information_schema.routines where routine_schema = 'test' and routine_name = 'longprocedure';
+
+call test.longprocedure(@value); select @value;
+
+drop procedure test.longprocedure;
+drop table t1;
diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test
index 7f5674493118f5fe99e5cf5add11502980559106..85b81f72f4032f0fa59e1596417e586ee02080ed 100644
--- a/mysql-test/t/sp-error.test
+++ b/mysql-test/t/sp-error.test
@@ -334,7 +334,7 @@ begin
 end|
 
 # USE is not allowed
---error 1336
+--error ER_SP_BADSTATEMENT 
 create procedure u()
   use sptmp|
 
@@ -811,19 +811,19 @@ end|
 #
 
 # Some things are caught when parsing
---error ER_SP_NO_RETSET_IN_FUNC
+--error ER_SP_NO_RETSET
 create function bug8408() returns int
 begin
   select * from t1;
   return 0;
 end|
---error ER_SP_NO_RETSET_IN_FUNC
+--error ER_SP_NO_RETSET
 create function bug8408() returns int
 begin
   show warnings;
   return 0;
 end|
---error ER_SP_NO_RETSET_IN_FUNC
+--error ER_SP_NO_RETSET
 create function bug8408(a int) returns int
 begin
   declare b int;
@@ -885,7 +885,7 @@ create procedure bug10537()
 --disable_warnings
 drop function if exists bug8409|
 --enable_warnings
---error ER_SP_BADSTATEMENT
+--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
 create function bug8409()
   returns int
 begin
diff --git a/mysql-test/t/sp-prelocking.test b/mysql-test/t/sp-prelocking.test
new file mode 100644
index 0000000000000000000000000000000000000000..e5f35b19fa7638b18f84019375d0023279d165a0
--- /dev/null
+++ b/mysql-test/t/sp-prelocking.test
@@ -0,0 +1,242 @@
+#
+# Tests of prelocking-free execution of stored procedures.
+# Currently two properties of prelocking-free SP execution are checked:
+#  - It is possible to execute DDL statements in prelocking-free stored
+#    procedure
+#  - The same procedure can be called in prelocking-free mode and 
+#    in prelocked mode (from within a function).
+
+--disable_warnings
+drop database if exists mysqltest;
+drop table if exists t1, t2, t3, t4;
+drop procedure if exists sp1;
+drop procedure if exists sp2;
+drop procedure if exists sp3;
+drop procedure if exists sp4;
+drop function if exists f1;
+drop function if exists f2;
+drop function if exists f3;
+--enable_warnings
+
+# BUG#8072 
+
+create database mysqltest;
+delimiter //;
+use mysqltest//
+create procedure sp1 () 
+begin
+  drop table if exists t1;
+  select 1 as "my-col";
+end;
+//
+delimiter ;//
+
+select database();
+call sp1();
+select database();
+
+use test;
+select database();
+call mysqltest.sp1();
+select database();
+
+drop procedure mysqltest.sp1;
+drop database mysqltest;
+
+# BUG#8766
+
+delimiter //;
+create procedure sp1() 
+begin 
+  create table t1 (a int); 
+  insert into t1 values (10); 
+end//
+
+create procedure sp2()
+begin
+  create table t2(a int);
+  insert into t2 values(1);
+  call sp1();
+end//
+
+create function f1() returns int
+begin 
+  return (select max(a) from t1);
+end//
+
+create procedure sp3()
+begin 
+  call sp1();
+  select 'func', f1();
+end//
+
+delimiter ;//
+
+call sp1();
+select 't1',a from t1;
+
+drop table t1;
+call sp2();
+select 't1',a from t1;
+select 't2',a from t2;
+drop table t1, t2;
+
+call sp3();
+select 't1',a from t1;
+
+drop table t1;
+
+drop procedure sp1;
+drop procedure sp2;
+drop procedure sp3;
+drop function f1;
+
+delimiter //;
+create procedure sp1()
+begin
+  create temporary table t2(a int);
+  insert into t2 select * from t1;
+end//
+
+create procedure sp2()
+begin
+  create temporary table t1 (a int);
+  insert into t1 values(1);
+  call sp1();
+  select 't1', a from t1;
+  select 't2', a from t2;
+  drop table t1;
+  drop table t2;
+end//
+
+delimiter ;//
+call sp2();
+
+drop procedure sp1;
+drop procedure sp2;
+
+# Miscelaneous tests
+create table t1 (a int);
+insert into t1 values(1),(2);
+create table t2 as select * from t1;
+create table t3 as select * from t1;
+create table t4 as select * from t1;
+delimiter //;
+create procedure sp1(a int)
+begin
+  select a;
+end //
+
+create function f1() returns int
+begin
+  return (select max(a) from t1);
+end //
+
+delimiter ;//
+
+CALL sp1(f1());
+
+#############
+delimiter //;
+create procedure sp2(a int)
+begin
+  select * from t3;
+  select a;
+end //
+
+create procedure sp3()
+begin 
+  select * from t1;
+  call sp2(5);
+end //
+
+create procedure sp4()
+begin 
+  select * from t2;
+  call sp3();
+end //
+
+delimiter ;//
+call sp4();
+
+drop procedure sp1;
+drop procedure sp2;
+drop procedure sp3;
+drop procedure sp4;
+drop function f1;
+
+# Test that prelocking state restoration works with cursors
+--disable_warnings
+drop view if exists v1;
+--enable_warnings
+delimiter //;
+
+create function f1(ab int) returns int
+begin
+  declare i int;
+  set i= (select max(a) from t1 where a < ab) ;
+  return i;
+end //
+
+create function f2(ab int) returns int
+begin
+  declare i int;
+  set i= (select max(a) from t2 where a < ab) ;
+  return i;
+end //
+
+create view v1 as 
+  select t3.a as x, t4.a as y, f2(3) as z
+  from t3, t4 where t3.a = t4.a //
+
+create procedure sp1()
+begin
+  declare a int;
+  set a= (select f1(4) + count(*) A from t1, v1);
+end //
+
+
+create function f3() returns int
+begin
+  call sp1();
+  return 1;
+end //
+
+call sp1() //
+
+select f3() //
+select f3() //
+
+call sp1() //
+
+---------------
+drop procedure sp1//
+drop function f3//
+
+create procedure sp1() 
+begin 
+  declare x int;
+  declare c cursor for select f1(3) + count(*) from v1;
+  open c;
+  fetch c into x;
+end;//
+
+create function f3() returns int
+begin
+  call sp1();
+  return 1;
+end //
+
+call sp1() //
+call sp1() //
+
+select f3() //
+call sp1() //
+
+delimiter ;//
+drop table t1,t2,t3;
+drop function f1;
+drop function f2;
+drop function f3;
+drop procedure sp1;
+
diff --git a/mysql-test/t/sp-security.test b/mysql-test/t/sp-security.test
index 15fcba5ebe969ecabfd2e04e7167ebbdb51a9ea6..c7c7ef20a5b1f83d6b69082e4c2a39f6e7558b49 100644
--- a/mysql-test/t/sp-security.test
+++ b/mysql-test/t/sp-security.test
@@ -371,3 +371,39 @@ drop procedure bug7291_0;
 disconnect user1;
 REVOKE ALL PRIVILEGES, GRANT OPTION FROM user1@localhost;
 drop user user1@localhost;
+
+#
+# Bug #12318: Wrong error message when accessing an inaccessible stored
+# procedure in another database when the current database is
+# information_schema.
+# 
+
+--disable_warnings
+drop database if exists mysqltest_1;
+--enable_warnings
+
+create database mysqltest_1;
+delimiter //;
+create procedure mysqltest_1.p1()
+begin
+   select 1 from dual;
+end//
+delimiter ;//
+
+grant usage on *.* to mysqltest_1@localhost;
+
+connect (n1,localhost,mysqltest_1,,information_schema,$MASTER_MYPORT,$MASTER_MYSOCK);
+connection n1;
+--error 1370
+call mysqltest_1.p1();
+disconnect n1;
+
+connection default;
+
+drop procedure mysqltest_1.p1;
+drop database mysqltest_1;
+
+revoke usage on *.* from mysqltest_1@localhost;
+drop user mysqltest_1@localhost;
+
+# End of 5.0 bugs.
diff --git a/mysql-test/t/sp-threads.test b/mysql-test/t/sp-threads.test
index 4c192f3e96f95a5ec2b2ec69ae39d32189481643..70c1efb1f0bf273410e68bdff3157a7fade9939e 100644
--- a/mysql-test/t/sp-threads.test
+++ b/mysql-test/t/sp-threads.test
@@ -5,6 +5,7 @@
 
 connect (con1root,localhost,root,,);
 connect (con2root,localhost,root,,);
+connect (con3root,localhost,root,,);
 
 connection con1root;
 use test;
@@ -75,7 +76,7 @@ send call bug9486();
 connection con2root;
 --sleep 2
 # There should be call statement in locked state.
---replace_column 1 # 6 #
+--replace_column 1 # 3 localhost 6 #
 show processlist;
 unlock tables;
 connection con1root;
@@ -130,6 +131,48 @@ drop function bug11554;
 drop table t1;
 drop view v1;
 
+
+# BUG#12228 
+--disable_warnings
+drop procedure if exists p1;
+drop procedure if exists p2;
+--enable_warnings
+
+connection con1root;
+delimiter |;
+create table t1 (s1 int)|
+create procedure p1() select * from t1|
+create procedure p2()
+begin
+  insert into t1 values (1);
+  call p1();
+  select * from t1;
+end|
+delimiter ;|
+
+connection con2root;
+use test;
+lock table t1 write;
+
+connection con1root;
+send call p2();
+
+connection con3root;
+use test;
+drop procedure p1;
+create procedure p1() select * from t1;
+
+connection con2root;
+unlock tables;
+
+connection con1root;
+# Crash will be here if we hit BUG#12228 
+reap;
+
+drop procedure p1;
+drop procedure p2;
+drop table t1;
+
 #
 # BUG#NNNN: New bug synopsis
 #
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test
index d9e6163cbc79208367c22f751351f0f265a87a8d..cde5d3922ab25ed99b3ae50edc8d77d7fc27e37a 100644
--- a/mysql-test/t/sp.test
+++ b/mysql-test/t/sp.test
@@ -22,15 +22,12 @@ use test;
 # t3 and up are created and dropped when needed.
 #
 --disable_warnings
-drop table if exists t1;
+drop table if exists t1,t2,t3,t4;
 --enable_warnings
 create table t1 (
 	id   char(16) not null default '',
         data int not null
 );
---disable_warnings
-drop table if exists t2;
---enable_warnings
 create table t2 (
 	s   char(16),
         i   int,
@@ -150,9 +147,6 @@ drop procedure setcontext|
 
 
 # Set things to null
---disable_warnings
-drop table if exists t3|
---enable_warnings
 create table t3 ( d date, i int, f double, s varchar(32) )|
 
 --disable_warnings
@@ -686,9 +680,6 @@ begin
 end|
 
 delete from t1|
---disable_warnings
-drop table if exists t3|
---enable_warnings
 create table t3 ( s char(16), d int)|
 call into_test4()|
 select * from t3|
@@ -744,14 +735,9 @@ begin
   insert into test.t3 values (concat(x, "2"), y+2);
 end|
 
---disable_warnings
-drop table if exists t3|
---enable_warnings
 call create_select("cs", 90)|
 select * from t1, t3|
---disable_warnings
-drop table if exists t3|
---enable_warnings
+drop table t3|
 delete from t1|
 drop procedure create_select|
 
@@ -925,9 +911,6 @@ drop procedure hndlr3|
 # Variables might be uninitialized when using handlers
 # (Otherwise the compiler can detect if a variable is not set, but
 #  not in this case.)
---disable_warnings
-drop table if exists t3|
---enable_warnings
 create table t3 ( id   char(16), data int )|
 
 --disable_warnings
@@ -980,9 +963,6 @@ call cur1()|
 select * from t1|
 drop procedure cur1|
 
---disable_warnings
-drop table if exists t3|
---enable_warnings
 create table t3 ( s char(16), i int )|
 
 --disable_warnings
@@ -1232,12 +1212,14 @@ begin
 end|
 select f5(1)|
 # This should generate an error about insuficient number of tables locked
-# Nuw this crash server, comented until bug#11394 fix
-#--error 1100
-#select f5(2)|
+# Now this crash server
+--disable_parsing until bug#11394 fix
+--error 1100
+select f5(2)|
 # But now it simply miserably fails because we are trying to use the same
 # lex on the next iteration :/ It should generate some error too...
-# select f5(3)|
+select f5(3)|
+--enable_parsing
 
 # OTOH this should work 
 create function f6() returns int
@@ -1285,9 +1267,11 @@ create function f1() returns int
   return (select sum(data) from t1) + (select sum(data) from v1)|
 # This queries will crash server because we can't use LEX in
 # reenterable fashion yet. Patch disabling recursion will heal this.
-#select f1()|
-#select * from v1|
-#select * from v2|
+--disable_parsing
+select f1()|
+select * from v1|
+select * from v2|
+--enable_parsing
 # Back to the normal cases
 drop function f1|
 create function f1() returns int
@@ -1499,54 +1483,55 @@ show procedure status like '%p%'|
 #
 # This part of test is disabled until we implement support for
 # recursive stored procedures.
-#--disable_warnings
-#drop table if exists fib|
-#--enable_warnings
-#create table fib ( f bigint unsigned not null )|
-#
-## We deliberately do it the awkward way, fetching the last two
-## values from the table, in order to exercise various statements
-## and table accesses at each turn.
-#--disable_warnings
-#drop procedure if exists fib|
-#--enable_warnings
-#create procedure fib(n int unsigned)
-#begin
-#  if n > 1 then
-#    begin
-#      declare x, y bigint unsigned;
-#      declare c cursor for select f from fib order by f desc limit 2;
-#
-#      open c;
-#      fetch c into y;
-#      fetch c into x;
-#      close c;
-#      insert into fib values (x+y);
-#      call fib(n-1);
-#    end;
-#  end if;
-#end|
-#
-## Minimum test: recursion of 3 levels
-#
-#insert into fib values (0), (1)|
-#
-#call fib(3)|
-#
-#select * from fib order by f asc|
-#
-#delete from fib|
-#
-## Original test: 20 levels (may run into memory limits!)
-#
-#insert into fib values (0), (1)|
-#
-#call fib(20)|
-#
-#select * from fib order by f asc|
-#drop table fib|
-#drop procedure fib|
+--disable_parsing
+--disable_warnings
+drop table if exists fib|
+--enable_warnings
+create table fib ( f bigint unsigned not null )|
 
+# We deliberately do it the awkward way, fetching the last two
+# values from the table, in order to exercise various statements
+# and table accesses at each turn.
+--disable_warnings
+drop procedure if exists fib|
+--enable_warnings
+create procedure fib(n int unsigned)
+begin
+  if n > 1 then
+    begin
+      declare x, y bigint unsigned;
+      declare c cursor for select f from fib order by f desc limit 2;
+
+      open c;
+      fetch c into y;
+      fetch c into x;
+      close c;
+      insert into fib values (x+y);
+      call fib(n-1);
+    end;
+  end if;
+end|
+
+# Minimum test: recursion of 3 levels
+
+insert into fib values (0), (1)|
+
+call fib(3)|
+
+select * from fib order by f asc|
+
+delete from fib|
+
+# Original test: 20 levels (may run into memory limits!)
+
+insert into fib values (0), (1)|
+
+call fib(20)|
+
+select * from fib order by f asc|
+drop table fib|
+drop procedure fib|
+--enable_parsing
 
 #
 # Comment & suid
@@ -1614,9 +1599,6 @@ insert into t1 values ("foo", 3), ("bar", 2), ("zip", 5), ("zap", 1)|
 select t1max()|
 drop function t1max|
 
---disable_warnings
-drop table if exists t3|
---enable_warnings
 create table t3 (
   v char(16) not null primary key,
   c int unsigned not null
@@ -1750,9 +1732,6 @@ drop procedure bug1656|
 #
 # BUG#1862
 #
---disable_warnings
-drop table if exists t3|
---enable_warnings
 create table t3(a int)|
 
 --disable_warnings
@@ -1830,49 +1809,51 @@ drop procedure bug2260|
 # FIXME: Other solution would be to use preopened proc table
 #        instead of opening it anew.
 # 
-#--disable_warnings
-#drop procedure if exists bug2267_1|
-#--enable_warnings
-#create procedure bug2267_1()
-#begin
-#  show procedure status;
-#end|
-#
-#--disable_warnings
-#drop procedure if exists bug2267_2|
-#--enable_warnings
-#create procedure bug2267_2()
-#begin
-#  show function status;
-#end|
-#
-#--disable_warnings
-#drop procedure if exists bug2267_3|
-#--enable_warnings
-#create procedure bug2267_3()
-#begin
-#  show create procedure bug2267_1;
-#end|
-#
-#--disable_warnings
-#drop procedure if exists bug2267_4|
-#--enable_warnings
-#create procedure bug2267_4()
-#begin
-#  show create function fac;
-#end|
-#
-#--replace_column 5 '0000-00-00 00:00:00' 6 '0000-00-00 00:00:00'
-#call bug2267_1()|
-#--replace_column 5 '0000-00-00 00:00:00' 6 '0000-00-00 00:00:00'
-#call bug2267_2()|
-#call bug2267_3()|
-#call bug2267_4()|
-#
-#drop procedure bug2267_1|
-#drop procedure bug2267_2|
-#drop procedure bug2267_3|
-#drop procedure bug2267_4|
+--disable_parsing
+--disable_warnings
+drop procedure if exists bug2267_1|
+--enable_warnings
+create procedure bug2267_1()
+begin
+  show procedure status;
+end|
+
+--disable_warnings
+drop procedure if exists bug2267_2|
+--enable_warnings
+create procedure bug2267_2()
+begin
+  show function status;
+end|
+
+--disable_warnings
+drop procedure if exists bug2267_3|
+--enable_warnings
+create procedure bug2267_3()
+begin
+  show create procedure bug2267_1;
+end|
+
+--disable_warnings
+drop procedure if exists bug2267_4|
+--enable_warnings
+create procedure bug2267_4()
+begin
+  show create function fac;
+end|
+
+--replace_column 5 '0000-00-00 00:00:00' 6 '0000-00-00 00:00:00'
+call bug2267_1()|
+--replace_column 5 '0000-00-00 00:00:00' 6 '0000-00-00 00:00:00'
+call bug2267_2()|
+call bug2267_3()|
+call bug2267_4()|
+
+drop procedure bug2267_1|
+drop procedure bug2267_2|
+drop procedure bug2267_3|
+drop procedure bug2267_4|
+--enable_parsing
 
 #
 # BUG#2227
@@ -1901,23 +1882,25 @@ drop procedure bug2227|
 # QQ For this reason we can't run this test any more (i.e., if we modify
 # QQ it, it's no longer a test case for the bug), but we keep it here
 # QQ anyway, for tracability.
-#--disable_warnings
-#drop procedure if exists bug2614|
-#--enable_warnings
-#create procedure bug2614()
-#begin
-#  drop temporary table if exists t3;
-#  create temporary table t3 (id int default '0' not null);
-#  insert into t3 select 12;
-#  insert into t3 select * from t3;
-#end|
-#
-#--disable_warnings
-#call bug2614()|
-#--enable_warnings
-#call bug2614()|
-#drop temporary table t3|
-#drop procedure bug2614|
+--disable_parsing
+--disable_warnings
+drop procedure if exists bug2614|
+--enable_warnings
+create procedure bug2614()
+begin
+  drop temporary table if exists t3;
+  create temporary table t3 (id int default '0' not null);
+  insert into t3 select 12;
+  insert into t3 select * from t3;
+end|
+
+--disable_warnings
+call bug2614()|
+--enable_warnings
+call bug2614()|
+drop temporary table t3|
+drop procedure bug2614|
+--enable_parsing
 
 #
 # BUG#2674
@@ -2009,9 +1992,6 @@ drop procedure bug2776_2|
 #
 # BUG#2780
 #
---disable_warnings
-drop table if exists t3|
---enable_warnings
 create table t3 (s1 smallint)|
 
 insert into t3 values (123456789012)|
@@ -2085,9 +2065,6 @@ drop table t3, t4|
 #
 # BUG#2656
 #
---disable_warnings
-drop table if exists t3, t4|
---enable_warnings
 
 create table t3 ( 
   OrderID  int not null,
@@ -2175,8 +2152,6 @@ drop procedure bug3426|
 # BUG#3448
 #
 --disable_warnings
-drop table if exists t3, t4|
-
 create table t3 (
   a int primary key, 
   ach char(1)
@@ -2208,9 +2183,6 @@ drop table t3, t4|
 #
 # BUG#3734
 #
---disable_warnings
-drop table if exists t3|
---enable_warnings
 create table t3 (
   id int unsigned auto_increment not null primary key,
   title VARCHAR(200),
@@ -2386,9 +2358,6 @@ drop procedure bug3843|
 #
 # BUG#3368
 #
---disable_warnings
-drop table if exists t3|
---enable_warnings
 create table t3 ( s1 char(10) )|
 insert into t3 values ('a'), ('b')|
 
@@ -2408,9 +2377,6 @@ drop table t3|
 #
 # BUG#4579
 #
---disable_warnings
-drop table if exists t3|
---enable_warnings
 create table t3 (f1 int, f2 int)|
 insert into t3 values (1,1)|
 
@@ -2445,7 +2411,6 @@ drop table t3|
 # BUG#2773: Function's data type ignored in stored procedures
 #
 --disable_warnings
-drop table if exists t3|
 drop procedure if exists bug2773|
 --enable_warnings
 
@@ -2474,10 +2439,6 @@ drop function bug3788|
 #
 # BUG#4726
 #
---disable_warnings
-drop table if exists t3|
---enable_warnings
- 
 create table t3 (f1 int, f2 int, f3 int)|
 insert into t3 values (1,1,1)|
 
@@ -2507,28 +2468,26 @@ drop table t3|
 #
 # BUG#4318
 #
-#QQ Don't know if HANDLER commands can work with SPs, or at all...
-#--disable_warnings
-#drop table if exists t3|
-#--enable_warnings
-# 
-#create table t3 (s1 int)|
-#insert into t3 values (3), (4)|
-#
-#--disable_warnings
-#drop procedure if exists bug4318|
-#--enable_warnings
-#create procedure bug4318()
-#  handler t3 read next|
-#
-#handler t3 open|
-## Expect no results, as tables are closed, but there shouldn't be any errors
-#call bug4318()|
-#call bug4318()|
-#handler t3 close|
-#
-#drop procedure bug4318|
-#drop table t3|
+
+--disable_parsing Don't know if HANDLER commands can work with SPs, or at all..
+create table t3 (s1 int)|
+insert into t3 values (3), (4)|
+
+--disable_warnings
+drop procedure if exists bug4318|
+--enable_warnings
+create procedure bug4318()
+  handler t3 read next|
+
+handler t3 open|
+# Expect no results, as tables are closed, but there shouldn't be any errors
+call bug4318()|
+call bug4318()|
+handler t3 close|
+
+drop procedure bug4318|
+drop table t3|
+--enable_parsing
 
 #
 # BUG#4902: Stored procedure with SHOW WARNINGS leads to packet error
@@ -2563,11 +2522,13 @@ begin
   show variables like 'foo';
   show warnings;
 end|
-#show binlog events;
-#show storage engines;
-#show master status;
-#show slave hosts;
-#show slave status;
+--disable_parsing
+show binlog events;
+show storage engines;
+show master status;
+show slave hosts;
+show slave status;
+--enable_parsing
 
 call bug4902()|
 call bug4902()|
@@ -2582,19 +2543,15 @@ create procedure bug4902_2()
 begin
   show processlist;
 end|
---replace_column 1 # 6 #
+--replace_column 1 # 6 # 3 localhost
 call bug4902_2()|
---replace_column 1 # 6 #
+--replace_column 1 # 6 # 3 localhost
 call bug4902_2()|
 drop procedure bug4902_2|
 
 #
 # BUG#4904
 #
---disable_warnings
-drop table if exists t3|
---enable_warnings
-
 --disable_warnings
 drop procedure if exists bug4904|
 --enable_warnings
@@ -2848,7 +2805,6 @@ drop procedure bug3583|
 # BUG#4905: Stored procedure doesn't clear for "Rows affected"
 #
 --disable_warnings
-drop table if exists t3|
 drop procedure if exists bug4905|
 --enable_warnings
 
@@ -2879,26 +2835,27 @@ drop table t3|
 #
 # BUG#6022: Stored procedure shutdown problem with self-calling function.
 #
-# This part of test is disabled until we implement support for
-# recursive stored functions.
-#--disable_warnings
-#drop function if exists bug6022|
-#--enable_warnings
-#
-#--disable_warnings
-#drop function if exists bug6022|
-#--enable_warnings
-#create function bug6022(x int) returns int
-#begin
-#  if x < 0 then
-#    return 0;
-#  else
-#    return bug6022(x-1);
-#  end if;
-#end|
-#
-#select bug6022(5)|
-#drop function bug6022|
+
+--disable_parsing until we implement support for recursive stored functions.
+--disable_warnings
+drop function if exists bug6022|
+--enable_warnings
+
+--disable_warnings
+drop function if exists bug6022|
+--enable_warnings
+create function bug6022(x int) returns int
+begin
+  if x < 0 then
+    return 0;
+  else
+    return bug6022(x-1);
+  end if;
+end|
+
+select bug6022(5)|
+drop function bug6022|
+--enable_parsing
 
 #
 # BUG#6029: Stored procedure specific handlers should have priority
@@ -2948,9 +2905,6 @@ drop procedure bug8540|
 #
 # BUG#6642: Stored procedure crash if expression with set function
 #
---disable_warnings
-drop table if exists t3|
---enable_warnings
 create table t3 (s1 int)|
 
 --disable_warnings
@@ -3038,9 +2992,6 @@ drop table t3|
 # BUG#8116: calling simple stored procedure twice in a row results
 #           in server crash
 #
---disable_warnings
-drop table if exists t3|
---enable_warnings
 create table t3 (  userid bigint(20) not null default 0 )|
 
 --disable_warnings
@@ -3283,7 +3234,6 @@ delete from t1|
 drop procedure if exists bug6900|
 drop procedure if exists bug9074|
 drop procedure if exists bug6900_9074|
-drop table if exists t3|
 --enable_warnings
 
 create table t3 (w char unique, x char)|
@@ -3378,7 +3328,7 @@ drop procedure avg|
 drop procedure if exists bug6129|
 --enable_warnings
 set @old_mode= @@sql_mode;
-set @@sql_mode= "";
+set @@sql_mode= "ERROR_FOR_DIVISION_BY_ZERO";
 create procedure bug6129()
   select @@sql_mode|
 call bug6129()|
@@ -3812,6 +3762,7 @@ drop procedure if exists bug7088_1|
 drop procedure if exists bug7088_2|
 --enable_warnings
 
+--disable_parsing temporarily disabled until Bar fixes BUG#11986
 create procedure bug6063()
   lâbel: begin end|
 call bug6063()|
@@ -3832,6 +3783,7 @@ show create procedure bug7088_2|
 drop procedure bug6063|
 drop procedure bug7088_1|
 drop procedure bug7088_2|
+--enable_parsing
 
 #
 # BUG#9565: "Wrong locking in stored procedure if a sub-sequent procedure
@@ -3876,6 +3828,107 @@ set @@sort_buffer_size = @x|
 drop procedure bug9538|
 
 
+#
+# BUG#8692: Cursor fetch of empty string
+#
+--disable_warnings
+drop procedure if exists bug8692|
+--enable_warnings
+create table t3 (c1 varchar(5), c2 char(5), c3 enum('one','two'), c4 text, c5 blob, c6 char(5), c7 varchar(5))|
+insert into t3 values ('', '', '', '', '', '', NULL)|
+
+create procedure bug8692()
+begin 
+    declare v1 VARCHAR(10); 
+    declare v2 VARCHAR(10); 
+    declare v3 VARCHAR(10); 
+    declare v4 VARCHAR(10); 
+    declare v5 VARCHAR(10); 
+    declare v6 VARCHAR(10); 
+    declare v7 VARCHAR(10); 
+    declare c8692 cursor for select c1,c2,c3,c4,c5,c6,c7 from t3; 
+    open c8692; 
+    fetch c8692 into v1,v2,v3,v4,v5,v6,v7;
+    select v1, v2, v3, v4, v5, v6, v7;
+end|
+
+call bug8692()|
+drop procedure bug8692|
+drop table t3|
+
+#
+# Bug#10055 "Using stored function with information_schema causes empty
+#            result set"
+#
+--disable_warnings
+drop function if exists bug10055|
+--enable_warnings
+create function bug10055(v char(255)) returns char(255) return lower(v)|
+# This select should not crash server and should return all fields in t1
+select t.column_name, bug10055(t.column_name)
+from information_schema.columns as t
+where t.table_schema = 'test' and t.table_name = 't1'|
+drop function bug10055|
+
+#
+# Bug #12297 "SP crashes the server if data inserted inside a lon loop"
+# The test for memleak bug, so actually there is no way to test it
+# from the suite. The test below could be used to check SP memory
+# consumption by passing large input parameter.
+#
+
+#
+#  Note: the test is currenly disabled because of the
+#  Bug #12637: SP crashes the server if it has update query with user var
+#  & binlog is enabled.
+#
+
+--disable_warnings
+#drop procedure if exists bug12297|
+--enable_warnings
+
+#create procedure bug12297(lim int)
+#begin
+#  set @x = 0;
+#  repeat
+#   insert into t1(id,data)
+#   values('aa', @x);
+#   set @x = @x + 1;
+#  until @x >= lim
+#  end repeat;
+#end|
+
+#call bug12297(10)|
+#drop procedure bug12297|
+
+#
+# Bug #11247 "Stored procedures: Function calls in long loops leak memory"
+# One more memleak bug test. One could use this test to check that the memory
+# isn't leaking by increasing the input value for p_bug11247.
+#
+
+--disable_warnings
+drop function if exists f_bug11247|
+drop procedure if exists p_bug11247|
+--enable_warnings
+
+create function f_bug11247(param int)
+  returns int
+return param + 1|
+
+create procedure p_bug11247(lim int)
+begin
+  declare v int default 0;
+
+  while v < lim do
+    set v= f_bug11247(v);
+  end while;
+end|
+
+call p_bug11247(10)|
+drop function f_bug11247|
+drop procedure p_bug11247|
+
 #
 # BUG#NNNN: New bug synopsis
 #
@@ -3884,7 +3937,6 @@ drop procedure bug9538|
 #--enable_warnings
 #create procedure bugNNNN...
 
-
 # Add bugs above this line. Use existing tables t1 and t2 when
 # practical, or create table t3, t4 etc temporarily (and drop them).
 delimiter ;|
diff --git a/mysql-test/t/sql_mode.test b/mysql-test/t/sql_mode.test
index f8ab521e66596cff26ec7679c541f0cbfc1255aa..10db520cd128095a77646025d0b11e31ca5f01d7 100644
--- a/mysql-test/t/sql_mode.test
+++ b/mysql-test/t/sql_mode.test
@@ -86,6 +86,8 @@ drop table t1 ;
 --error 1231
 set @@SQL_MODE=NULL;
 
+# End of 4.1 tests
+
 #
 # test for 
 #  WL 1941 "NO_C_ESCAPES sql_mode"
diff --git a/mysql-test/t/status.test b/mysql-test/t/status.test
index 31d9c8154d5312abaa3e4adc35821516cfbc2755..7fea51c9327eb4fefbcbd8e2989d96f73edcb289 100644
--- a/mysql-test/t/status.test
+++ b/mysql-test/t/status.test
@@ -35,3 +35,5 @@ connection con1;
 reap;
 show status like 'Table_lock%';
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/strict.test b/mysql-test/t/strict.test
index 71b57424e75630b694efd4996ced472a5bb44c2a..ca57ca646f29f87d776845e06783cd292a495482 100644
--- a/mysql-test/t/strict.test
+++ b/mysql-test/t/strict.test
@@ -1118,3 +1118,28 @@ insert into t1 values ('2000-10-01');
 update t1 set d = 1100;
 select * from t1;
 drop table t1;
+
+#
+# Bug #11964: alter table with timestamp field
+#
+
+set @@sql_mode='traditional';
+create table t1(a int, b timestamp);
+alter table t1 add primary key(a);
+show create table t1;
+drop table t1;
+create table t1(a int, b timestamp default 20050102030405);
+alter table t1 add primary key(a);
+show create table t1;
+drop table t1;
+
+#
+# BIT fields
+#
+
+set @@sql_mode='traditional';
+create table t1(a bit(2));
+--error 1406
+insert into t1 values(b'101');
+select * from t1;
+drop table t1;
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test
index ecb3432753db1a59e0ce08319917960d3190a1c7..22c5471dee232bc84102bf85bb655fa0e48eb122 100644
--- a/mysql-test/t/subselect.test
+++ b/mysql-test/t/subselect.test
@@ -696,7 +696,7 @@ CREATE TABLE `t1` (
 INSERT INTO t1 VALUES (1);
 UPDATE t1 SET i=i+(SELECT MAX(i) FROM (SELECT 1) t) WHERE i=(SELECT MAX(i));
 UPDATE t1 SET i=i+1 WHERE i=(SELECT MAX(i));
--- error 1109
+-- error 1054
 UPDATE t1 SET t.i=i+(SELECT MAX(i) FROM (SELECT 1) t);
 select * from t1;
 drop table t1;
@@ -1005,7 +1005,7 @@ create table t2 (s1 int);
 select * from t1 where (select count(*) from t2 where t1.s2) = 1;
 -- error 1054
 select * from t1 where (select count(*) from t2 group by t1.s2) = 1;
--- error 1109
+-- error 1054
 select count(*) from t2 group by t1.s2;
 drop table t1, t2;
 
@@ -1132,8 +1132,8 @@ CREATE TABLE t1 (id INT);
 CREATE TABLE t2 (id INT);
 INSERT INTO t1 VALUES (1), (2);
 INSERT INTO t2 VALUES (1);
-SELECT t1.id, ( SELECT COUNT(t.id) FROM t2 AS t WHERE t.id = t1.id ) AS c FROM t1 LEFT JOIN t2 USING (id);
-SELECT t1.id, ( SELECT COUNT(t.id) FROM t2 AS t WHERE t.id = t1.id ) AS c FROM t1 LEFT JOIN t2 USING (id) ORDER BY t1.id;
+SELECT id, ( SELECT COUNT(t.id) FROM t2 AS t WHERE t.id = t1.id ) AS c FROM t1 LEFT JOIN t2 USING (id);
+SELECT id, ( SELECT COUNT(t.id) FROM t2 AS t WHERE t.id = t1.id ) AS c FROM t1 LEFT JOIN t2 USING (id) ORDER BY id;
 DROP TABLE t1,t2;
 
 #
@@ -1726,8 +1726,101 @@ select (select a from t1) = (1,2);
 select (1,2,3) = (select * from t1);
 -- error 1241
 select (select * from t1) = (1,2,3);
+drop table t1
+
+#
+# Item_int_with_ref check (BUG#10020)
+#
+CREATE TABLE `t1` (
+  `itemid` bigint(20) unsigned NOT NULL auto_increment,
+  `sessionid` bigint(20) unsigned default NULL,
+  `time` int(10) unsigned NOT NULL default '0',
+  `type` set('A','D','E','F','G','I','L','N','U') collate latin1_general_ci NOT
+NULL default '',
+  `data` text collate latin1_general_ci NOT NULL,
+  PRIMARY KEY  (`itemid`)
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+INSERT INTO `t1` VALUES (1, 1, 1, 'D', '');
+CREATE TABLE `t2` (
+  `sessionid` bigint(20) unsigned NOT NULL auto_increment,
+  `pid` int(10) unsigned NOT NULL default '0',
+  `date` int(10) unsigned NOT NULL default '0',
+  `ip` varchar(15) collate latin1_general_ci NOT NULL default '',
+  PRIMARY KEY  (`sessionid`)
+) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
+INSERT INTO `t2` VALUES (1, 1, 1, '10.10.10.1');
+SELECT s.ip, count( e.itemid ) FROM `t1` e JOIN t2 s ON s.sessionid = e.sessionid WHERE e.sessionid = ( SELECT sessionid FROM t2 ORDER BY sessionid DESC LIMIT 1 ) GROUP BY s.ip HAVING count( e.itemid ) >0 LIMIT 0 , 30;
+drop tables t1,t2;
+
+# BUG#11821 : Select from subselect using aggregate function on an enum
+# segfaults:
+create table t1 (fld enum('0','1'));
+insert into t1 values ('1');
+select * from (select max(fld) from t1) as foo;
 drop table t1;
 
+#
+# Bug #11867: queries with ROW(,elems>) IN (SELECT DISTINCT <cols> FROM ...)
+#
+
+CREATE TABLE t1 (one int, two int, flag char(1));
+CREATE TABLE t2 (one int, two int, flag char(1));
+INSERT INTO t1 VALUES(1,2,'Y'),(2,3,'Y'),(3,4,'Y'),(5,6,'N'),(7,8,'N');
+INSERT INTO t2 VALUES(1,2,'Y'),(2,3,'Y'),(3,4,'Y'),(5,6,'N'),(7,8,'N');
+
+SELECT * FROM t1
+  WHERE ROW(one,two) IN (SELECT DISTINCT one,two FROM t2 WHERE flag = 'N');
+SELECT * FROM t1
+  WHERE ROW(one,two) IN (SELECT DISTINCT one,two FROM t1 WHERE flag = 'N');
+
+insert into t2 values (null,null,'N');
+insert into t2 values (null,3,'0');
+insert into t2 values (null,5,'0');
+insert into t2 values (10,null,'0');
+insert into t1 values (10,3,'0');
+insert into t1 values (10,5,'0');
+insert into t1 values (10,10,'0');
+SELECT one,two,ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = 'N') as 'test' from t1;
+SELECT one,two from t1 where ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = 'N');
+SELECT one,two,ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = 'N' group by one,two) as 'test' from t1;
+SELECT one,two,ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = '0') as 'test' from t1;
+SELECT one,two,ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = '0' group by one,two) as 'test' from t1;
+explain extended SELECT one,two,ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = '0') as 'test' from t1;
+explain extended SELECT one,two from t1 where ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = 'N');
+explain extended SELECT one,two,ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = '0' group by one,two) as 'test' from t1;
+DROP TABLE t1,t2;
+
+#
+# Bug #12392: where cond with IN predicate for rows and NULL values in table 
+#
+
+CREATE TABLE t1 (a char(5), b char(5));
+INSERT INTO t1 VALUES (NULL,'aaa'), ('aaa','aaa');
+
+SELECT * FROM t1 WHERE (a,b) IN (('aaa','aaa'), ('aaa','bbb'));
+
+DROP TABLE t1;
+
+#
+# Bug #11479: subquery over left join with an empty inner table 
+#
+
+CREATE TABLE t1 (a int);
+CREATE TABLE t2 (a int, b int);
+CREATE TABLE t3 (b int NOT NULL);
+INSERT INTO t1 VALUES (1), (2), (3), (4);
+INSERT INTO t2 VALUES (1,10), (3,30);
+
+SELECT * FROM t2 LEFT JOIN t3 ON t2.b=t3.b
+  WHERE t3.b IS NOT NULL OR t2.a > 10;
+SELECT * FROM t1
+  WHERE t1.a NOT IN (SELECT a FROM t2 LEFT JOIN t3 ON t2.b=t3.b
+                       WHERE t3.b IS NOT NULL OR t2.a > 10);
+
+DROP TABLE t1,t2,t3;
+
+# End of 4.1 tests
+
 #
 #decimal-related tests
 #
@@ -1867,3 +1960,4 @@ insert into t1 values ('1');
 select * from (select max(fld) from t1) as foo;
 drop table t1;
 
+
diff --git a/mysql-test/t/subselect2.test b/mysql-test/t/subselect2.test
index 2d42320334afff690abc47f595c9965f50712084..839e94206d05a10055837629e1903ca569fcd966 100644
--- a/mysql-test/t/subselect2.test
+++ b/mysql-test/t/subselect2.test
@@ -146,4 +146,5 @@ SELECT t2.*, t4.DOCTYPENAME, t1.CONTENTSIZE,t1.MIMETYPE FROM t2 INNER JOIN t4 ON
 
 EXPLAIN SELECT t2.*, t4.DOCTYPENAME, t1.CONTENTSIZE,t1.MIMETYPE FROM t2 INNER JOIN t4 ON t2.DOCTYPEID = t4.DOCTYPEID LEFT OUTER JOIN t1 ON t2.DOCID = t1.DOCID WHERE t2.FOLDERID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID='2f6161e879db43c1a5b82c21ddc49089' AND t3.FOLDERNAME = 'Level1') AND t3.FOLDERNAME = 'Level2') AND t3.FOLDERNAME = 'Level3') AND t3.FOLDERNAME = 'CopiedFolder') AND t3.FOLDERNAME = 'Movie Reviews') AND t2.DOCNAME = 'Last Discussion';
 
-drop table t1, t2, t3, t4;
\ No newline at end of file
+drop table t1, t2, t3, t4;
+# End of 4.1 tests
diff --git a/mysql-test/t/subselect_gis.test b/mysql-test/t/subselect_gis.test
index 338051029c4d76a20237045884774e82fda654b7..1ab139b7822981e035a4a68a2f9adbf4f0ac8e91 100644
--- a/mysql-test/t/subselect_gis.test
+++ b/mysql-test/t/subselect_gis.test
@@ -13,3 +13,5 @@ select City from t1 where (select
 intersects(GeomFromText(AsText(Location)),GeomFromText('Polygon((2 50, 2.5
 50, 2.5 47, 2 47, 2 50))'))=0);
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/subselect_innodb.test b/mysql-test/t/subselect_innodb.test
index 5d796988178f1a27f30ec68534406c2d52d1a5ac..3b1d2f393c29a9b61390400669ebbf46d7a34ffe 100644
--- a/mysql-test/t/subselect_innodb.test
+++ b/mysql-test/t/subselect_innodb.test
@@ -159,3 +159,5 @@ EXECUTE my_stmt;
 EXECUTE my_stmt;
 deallocate prepare my_stmt;
 drop table t1,t2;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test
index f477fc378c61a0c341bbc7db5e766eb8618c3852..b7a7e83d569b94d70c9dec0c1fef059859a93aa1 100644
--- a/mysql-test/t/symlink.test
+++ b/mysql-test/t/symlink.test
@@ -136,3 +136,5 @@ eval create table t1 (i int) index directory = "$MYSQL_TEST_DIR/var/master-data/
 enable_query_log;
 show create table t1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/synchronization.test b/mysql-test/t/synchronization.test
index 09324b32b9775bbce977c7d04729f1d7bc18c623..c7696195ee0275d65af09e759036498418716165 100644
--- a/mysql-test/t/synchronization.test
+++ b/mysql-test/t/synchronization.test
@@ -36,3 +36,5 @@ while ($1)
   dec $1;
 }
 DROP TABLE t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/system_mysql_db.test b/mysql-test/t/system_mysql_db.test
index acd19f47728fec5b20d909697735d46fe0a7bda1..27c17da2731f140610c49ba71a79e73c54cca143 100644
--- a/mysql-test/t/system_mysql_db.test
+++ b/mysql-test/t/system_mysql_db.test
@@ -16,3 +16,5 @@ use test;
 -- enable_query_log
 # keep results same with system_mysql_db_fix
 show tables;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/system_mysql_db_fix.test b/mysql-test/t/system_mysql_db_fix.test
index f47b4cba6e62624c6d8cfb3bfd225522025b6f8a..3b19df5f756b7c88a9abab1e0a87f7764361a8ba 100644
--- a/mysql-test/t/system_mysql_db_fix.test
+++ b/mysql-test/t/system_mysql_db_fix.test
@@ -91,3 +91,5 @@ DROP TABLE db, host, user, func, tables_priv, columns_priv, procs_priv, help_cat
 
 # check that we droped all system tables
 show tables;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/system_mysql_db_refs.test b/mysql-test/t/system_mysql_db_refs.test
index 9e2c5a20b54c512db9f0d468f78b39e2d4dfcf60..c5146e1b04379f4fdfa61502d4fa28580e04877a 100644
--- a/mysql-test/t/system_mysql_db_refs.test
+++ b/mysql-test/t/system_mysql_db_refs.test
@@ -99,3 +99,5 @@ drop table test_func;
 drop table test_host;
 drop table test_user;
 drop table test_db;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/tablelock.test b/mysql-test/t/tablelock.test
index fbc5d685096bb199d08db28955dbbe8eca9b8544..95533903b4562eb843a649cb152f9ec484681dda 100644
--- a/mysql-test/t/tablelock.test
+++ b/mysql-test/t/tablelock.test
@@ -47,3 +47,5 @@ CREATE TABLE t2 (a int);
 lock tables t1 write,t1 as b write, t2 write, t2 as c read;
 drop table t2,t1;
 unlock tables;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/temp_table.test b/mysql-test/t/temp_table.test
index da7ce9b4722f4fc4bbd41043a2243a47195e8dee..9a7678ed7126fa671611c0603f2f94b776e21f00 100644
--- a/mysql-test/t/temp_table.test
+++ b/mysql-test/t/temp_table.test
@@ -112,3 +112,5 @@ insert into t1 values (3,1),(3,2);
 insert into t2 values (NULL, 'foo'), (NULL, 'bar');
 select d, c from t1 left join t2 on b = c where a = 3 order by d;
 drop table t1, t2;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/timezone.test b/mysql-test/t/timezone.test
index ffc2e3a3ebfdad18a969a994540b1a93204e3e66..34bbb365c70664761d112dccc6b8dd9f8f399ad3 100644
--- a/mysql-test/t/timezone.test
+++ b/mysql-test/t/timezone.test
@@ -58,3 +58,5 @@ select unix_timestamp('1970-01-01 01:00:00'),
        unix_timestamp('1970-01-01 01:00:01'),
        unix_timestamp('2038-01-01 00:59:59'),
        unix_timestamp('2038-01-01 01:00:00');
+
+# End of 4.1 tests
diff --git a/mysql-test/t/timezone2.test b/mysql-test/t/timezone2.test
index 40fcd15387743a166ef1b86985df28b4f48df3ec..069c19341e4e84d3d7b917a70c1a579f9cb58483 100644
--- a/mysql-test/t/timezone2.test
+++ b/mysql-test/t/timezone2.test
@@ -220,3 +220,5 @@ select convert_tz('2005-01-14 17:00:00', 'UTC', custTimeZone) from (select 'UTC'
 create table t1 select convert_tz(NULL, NULL, NULL);
 select * from t1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/timezone3.test b/mysql-test/t/timezone3.test
index 8910783cd8561bc68cfd598e8277f7d527d4ed6f..0aedbafcec4a7be3735eaf085afc89ab4c694f2d 100644
--- a/mysql-test/t/timezone3.test
+++ b/mysql-test/t/timezone3.test
@@ -57,3 +57,5 @@ create table t1 (ts timestamp);
 insert into t1 values (19730101235900), (20040101235900);
 select * from t1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/timezone_grant.test b/mysql-test/t/timezone_grant.test
index 5dbf457e1f1e448b0e96968b11ac54293474b787..f94d86eb266e8b646c8bd60a5595fa1ddc196827 100644
--- a/mysql-test/t/timezone_grant.test
+++ b/mysql-test/t/timezone_grant.test
@@ -81,3 +81,4 @@ delete from mysql.tables_priv where user like 'mysqltest\_%';
 flush privileges;
 drop table t1, t2;
 
+# End of 4.1 tests
diff --git a/mysql-test/t/trigger.test b/mysql-test/t/trigger.test
index f6b3c714d282a98915667b48bc870102fcc2e413..cbc9da2bf5154288bb0f68f6445c774c525dc75e 100644
--- a/mysql-test/t/trigger.test
+++ b/mysql-test/t/trigger.test
@@ -7,6 +7,7 @@ drop table if exists t1, t2, t3;
 drop view if exists v1;
 drop database if exists mysqltest;
 drop function if exists f1;
+drop procedure if exists p1;
 --enable_warnings
 
 create table t1 (i int);
@@ -610,3 +611,121 @@ update t1 set col2 = 4;
 # This should not crash server too.
 drop trigger t1_bu;
 drop table t1;
+
+#
+# storing and restoring parsing modes for triggers (BUG#5891)
+#
+set sql_mode='ansi';
+create table t1 ("t1 column" int);
+create trigger t1_bi before insert on t1 for each row set new."t1 column" = 5;
+set sql_mode="";
+insert into t1 values (0);
+# create trigger with different sql_mode
+create trigger t1_af after insert on t1 for each row set @a=10;
+insert into t1 values (0);
+select * from t1;
+select @a;
+--replace_column 6 #
+show triggers;
+drop table t1;
+# check that rigger preserve sql_mode during execution
+set sql_mode="traditional";
+create table t1 (a date);
+-- error 1292
+insert into t1 values ('2004-01-00');
+set sql_mode="";
+create trigger t1_bi before insert on t1 for each row set new.a = '2004-01-00';
+set sql_mode="traditional";
+insert into t1 values ('2004-01-01');
+select * from t1;
+set sql_mode=default;
+show create table t1;
+--replace_column 6 #
+show triggers;
+drop table t1;
+
+# Test for bug #12280 "Triggers: crash if flush tables"
+# FLUSH TABLES and FLUSH PRIVILEGES should be disallowed inside
+# of functions and triggers.
+create table t1 (id int);
+--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
+create trigger t1_ai after insert on t1 for each row flush tables;
+--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
+create trigger t1_ai after insert on t1 for each row flush privileges;
+create procedure p1() flush tables;
+create trigger t1_ai after insert on t1 for each row call p1();
+--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
+insert into t1 values (0);
+drop procedure p1;
+create procedure p1() flush privileges;
+--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
+insert into t1 values (0);
+drop procedure p1;
+drop table t1;
+
+# Test for bug #11973 "SELECT .. INTO var_name; in trigger cause
+#                      crash on update"
+
+create table t1 (id int, data int, username varchar(16));
+insert into t1 (id, data) values (1, 0);
+delimiter |;
+create trigger t1_whoupdated before update on t1 for each row
+begin
+  declare user varchar(32);
+  declare i int;
+  select user() into user;
+  set NEW.username = user;
+  select count(*) from ((select 1) union (select 2)) as d1 into i;
+end|
+delimiter ;|
+update t1 set data = 1;
+
+connect (addconroot, localhost, root,,);
+connection addconroot;
+update t1 set data = 2;
+
+connection default;
+disconnect addconroot;
+drop table t1;
+
+#
+# #11587 Trigger causes lost connection error
+#
+
+create table t1 (c1 int, c2 datetime);
+delimiter |;
+--error ER_SP_NO_RETSET
+create trigger tr1 before insert on t1 for each row 
+begin 
+  set new.c2= '2004-04-01';
+  select 'hello';
+end|
+delimiter ;|
+
+insert into t1 (c1) values (1),(2),(3);
+select * from t1;
+
+--disable_warnings
+drop procedure if exists bug11587;
+--enable_warnings
+
+delimiter |;
+create procedure bug11587(x char(16))
+begin
+  select "hello";
+  select "hello again";
+end|
+
+create trigger tr1 before insert on t1 for each row 
+begin 
+  call bug11587();
+  set new.c2= '2004-04-02';
+end|
+delimiter ;|
+
+--error 1312
+insert into t1 (c1) values (4),(5),(6);
+select * from t1;
+
+drop procedure bug11587;
+drop table t1;
diff --git a/mysql-test/t/truncate.test b/mysql-test/t/truncate.test
index b7ec506ecf1d344c1b0450b08b48ae040aa9af0d..f806bd8ec170911b8de285d551bc352f05f72f2e 100644
--- a/mysql-test/t/truncate.test
+++ b/mysql-test/t/truncate.test
@@ -50,3 +50,5 @@ delete from t1;
 insert into t1 (a) values (NULL),(NULL);
 SELECT * from t1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/type_bit.test b/mysql-test/t/type_bit.test
index fd5eb49858c1bc911ed624e57f9e3dbbaa7a500b..6906cfc280833680dbac5131255ffad203aa5148 100644
--- a/mysql-test/t/type_bit.test
+++ b/mysql-test/t/type_bit.test
@@ -16,10 +16,10 @@ select 0 + b'1111111111111111';
 select 0 + b'1000000000000001';
 
 --disable_warnings
-drop table if exists t1;
+drop table if exists t1,t2;
 --enable_warnings
 
---error 1074
+--error 1439
 create table t1 (a bit(65));
 
 create table t1 (a bit(0));
diff --git a/mysql-test/t/type_bit_innodb.test b/mysql-test/t/type_bit_innodb.test
index 693fc16971792bfcafe8da97ee28845dcc4a5cc0..ec433f40a88b8698d5d89d65bf615f077ea2f8df 100644
--- a/mysql-test/t/type_bit_innodb.test
+++ b/mysql-test/t/type_bit_innodb.test
@@ -20,7 +20,7 @@ select 0 + b'1000000000000001';
 drop table if exists t1;
 --enable_warnings
 
---error 1074
+--error 1439
 create table t1 (a bit(65)) engine=innodb;
 
 create table t1 (a bit(0)) engine=innodb;
diff --git a/mysql-test/t/type_blob.test b/mysql-test/t/type_blob.test
index 80aabf6c5e0e0b99f7edf1ca4e2985d89e0b63da..1ec5c60029662b77f685f8a74ed3460a90444e41 100644
--- a/mysql-test/t/type_blob.test
+++ b/mysql-test/t/type_blob.test
@@ -394,6 +394,8 @@ INSERT t1 (i, c) VALUES (1,''),(2,''),(3,'asdfh'),(4,'');
 select max(i) from t1 where c = '';
 drop table t1;
 
+# End of 4.1 tests
+
 #
 # Bug#11657: Creation of secondary index fails
 #
diff --git a/mysql-test/t/type_date.test b/mysql-test/t/type_date.test
index 304ed19b971ccfb238de447ee8d686455b4f3c74..78bdd9b8a80c857729583c1fe882856b3b10190a 100644
--- a/mysql-test/t/type_date.test
+++ b/mysql-test/t/type_date.test
@@ -114,3 +114,5 @@ CREATE TABLE t1 (y YEAR);
 INSERT INTO t1 VALUES ('abc');
 SELECT * FROM t1;
 DROP TABLE t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/type_datetime.test b/mysql-test/t/type_datetime.test
index a7eb78cb2924b155f769328a80b9fac0d24e4154..4b6741b4242358adec55fdf5126d47a88fbd97c7 100644
--- a/mysql-test/t/type_datetime.test
+++ b/mysql-test/t/type_datetime.test
@@ -14,6 +14,17 @@ optimize table t1;
 check table t1;
 delete from t1;
 insert into t1 values("000101"),("691231"),("700101"),("991231"),("00000101"),("00010101"),("99991231"),("00101000000"),("691231000000"),("700101000000"),("991231235959"),("10000101000000"),("99991231235959"),("20030100000000"),("20030000000000");
+
+# Strange dates
+insert into t1 values ("2003-003-03");
+
+# Bug #7308: ISO-8601 date format not handled correctly
+insert into t1 values ("20030102T131415"),("2001-01-01T01:01:01"), ("2001-1-1T1:01:01");
+select * from t1;
+
+# Test some wrong dates
+truncate table t1;
+insert into t1 values("2003-0303 12:13:14");
 select * from t1;
 drop table t1;
 
@@ -101,3 +112,5 @@ insert into t1 values ("12-00-00"), ("00-00-00 01:00:00");
 insert into t1 values ("00-00-00"), ("00-00-00 00:00:00");
 select * from t1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/type_decimal.test b/mysql-test/t/type_decimal.test
index 2901592fd9e92f7ba9642d837a55957f5c950d42..44032fde46fda0b4b72f789a083c39258cd0c85e 100644
--- a/mysql-test/t/type_decimal.test
+++ b/mysql-test/t/type_decimal.test
@@ -268,7 +268,11 @@ insert into t1 values ('1'),('+1'),('-1'),('0000000001'),('+0000000001'),('-0000
 select * from t1;
 drop table t1;
 
+# End of 4.1 tests
+
+#
 # Test for BUG#8397: decimal type in subselects (Item_cache_decimal)
+#
 CREATE TABLE t1
 (EMPNUM   CHAR(3) NOT NULL,
 HOURS    DECIMAL(5));
diff --git a/mysql-test/t/type_enum.test b/mysql-test/t/type_enum.test
index 6b2183df06969b21dced9f182a988c39bf590abc..0d479f312cd834415452a08aa54f878a50e86d67 100644
--- a/mysql-test/t/type_enum.test
+++ b/mysql-test/t/type_enum.test
@@ -126,3 +126,5 @@ create table t1 (a set('x','y') default 'x');
 --error 1067
 alter table t1 alter a set default 'z';
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/type_float.test b/mysql-test/t/type_float.test
index a27fd4c58b46fe47d6247b42f7cdbd8bee943b22..c0f1854d5b2edc2f230e8a5f80915664b3b5b26f 100644
--- a/mysql-test/t/type_float.test
+++ b/mysql-test/t/type_float.test
@@ -145,3 +145,5 @@ select * from t1 where reckey=1.08E2;
 select * from t1 where reckey=109;
 select * from t1 where reckey=1.09E2;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/type_nchar.test b/mysql-test/t/type_nchar.test
index e85609e3f0cfd8fae025ea748518dae5b550ad82..f22588304509dbb52af07097c189a602da62255f 100644
--- a/mysql-test/t/type_nchar.test
+++ b/mysql-test/t/type_nchar.test
@@ -33,3 +33,4 @@ create table t1 (c nchar varying(10));
 show create table t1;
 drop table t1;
 
+# End of 4.1 tests
diff --git a/mysql-test/t/type_newdecimal.test b/mysql-test/t/type_newdecimal.test
index f295311fe4ec2df6fe11854ce26db9d72fa1418b..81e06c70c7d7c7bfc0247325b45b8838a2053977 100644
--- a/mysql-test/t/type_newdecimal.test
+++ b/mysql-test/t/type_newdecimal.test
@@ -986,6 +986,10 @@ create table t1 (sl decimal(0,30));
 create table t1 (sl decimal(5, 5));
 show create table t1;
 drop table t1;
+# Test limits
+create table t1 (sl decimal(65, 30));
+show create table t1;
+drop table t1;
 
 #
 # Bug 11557 (DEFAULT values rounded improperly
@@ -1003,3 +1007,11 @@ insert into t1 (f1) values (1);
 select * from t1;
 drop table t1;
 
+#
+# Bug 12173 (show create table fails)
+#
+create table t1 (
+        f0 decimal (30,30) zerofill not null DEFAULT 0,
+        f1 decimal (0,0) zerofill not null default 0);
+show create table t1;
+drop table t1;
diff --git a/mysql-test/t/type_ranges.test b/mysql-test/t/type_ranges.test
index a2deb367e1496207987ed0a32acb5a6adc639191..85862821aab858f85b08fd62919c5141b2b3b9f2 100644
--- a/mysql-test/t/type_ranges.test
+++ b/mysql-test/t/type_ranges.test
@@ -157,11 +157,13 @@ create table t1 ( id integer unsigned not null primary key );
 create table t2 ( id integer unsigned not null primary key );
 insert into t1 values (1), (2);
 insert into t2 values (1);
-select  t1.id as id_A,  t2.id as id_B from t1 left join t2 using ( id ); 
+select  t1.id as id_A,  t2.id as id_B from t1 left join t2 on (t1.id = t2.id); 
 create table t3 (id_A integer unsigned not null, id_B integer unsigned null  );
-insert into t3 select t1.id as id_A,  t2.id as id_B from t1 left join t2 using ( id );
+insert into t3 select t1.id as id_A,  t2.id as id_B from t1 left join t2 on (t1.id = t2.id);
 select * from t3;
 drop table t3;
-create table t3 select t1.id as id_A,  t2.id as id_B from t1 left join t2 using ( id );
+create table t3 select t1.id as id_A,  t2.id as id_B from t1 left join t2 on (t1.id = t2.id);
 select * from t3;
 drop table t1,t2,t3;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/type_set.test b/mysql-test/t/type_set.test
index b6410a9ea3d47562b7fe86b3dc7e65399b0f6010..56df3328246a439bc9fc3f91c8cec6a664777b43 100644
--- a/mysql-test/t/type_set.test
+++ b/mysql-test/t/type_set.test
@@ -37,3 +37,5 @@ INSERT INTO t1 VALUES ('ae,oe,ue,ss');
 SELECT c FROM t1 ORDER BY c;
 SELECT c FROM t1 ORDER BY concat(c);
 DROP TABLE t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/type_time.test b/mysql-test/t/type_time.test
index 2f342f8bf6760162251930baa70df797dda03916..7ae3f65f7cc44bb242246aba11743df8f72c785e 100644
--- a/mysql-test/t/type_time.test
+++ b/mysql-test/t/type_time.test
@@ -20,3 +20,5 @@ insert into t1 values ('09:00:00'),('13:00:00'),('19:38:34'), ('13:00:00'),('09:
 select t, time_to_sec(t),sec_to_time(time_to_sec(t)) from t1;
 select sec_to_time(time_to_sec(t)) from t1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/type_timestamp.test b/mysql-test/t/type_timestamp.test
index 01d18afc5af9d1ca99306f944fa14f19189c7b4c..f96beedbebcc6531a3a1bde520d336ffa0baf06d 100644
--- a/mysql-test/t/type_timestamp.test
+++ b/mysql-test/t/type_timestamp.test
@@ -321,3 +321,4 @@ insert into t1 (a, c) values (4, '2004-04-04 00:00:00'),
 select * from t1;
 drop table t1;
 
+# End of 4.1 tests
diff --git a/mysql-test/t/type_uint.test b/mysql-test/t/type_uint.test
index b1f59242e8e16d14989121141150a78cad0db886..a9212183cb61c34c57fe7e712dbcf8c239da0162 100644
--- a/mysql-test/t/type_uint.test
+++ b/mysql-test/t/type_uint.test
@@ -13,3 +13,5 @@ insert into t1 values (-1);
 insert into t1 values ('5000000000');
 select * from t1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/type_year.test b/mysql-test/t/type_year.test
index c67b8447494a885ca8d29d9252c488eaae9ae4cf..9744da24c02d47eeb8b329756cbfb676bd30842e 100644
--- a/mysql-test/t/type_year.test
+++ b/mysql-test/t/type_year.test
@@ -20,3 +20,5 @@ create table t1 (y year);
 insert into t1 values (now());
 select if(y = now(), 1, 0) from t1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test
index 4da19622dcb6eae71bf19453f25692fdc3f35c75..d4b0c1746af860438663c1e9316dbaa05e476cb4 100644
--- a/mysql-test/t/union.test
+++ b/mysql-test/t/union.test
@@ -276,7 +276,7 @@ create temporary table t1 select a from t1 union select a from t2;
 drop temporary table t1;
 --error 1093
 create table t1 select a from t1 union select a from t2;
---error 1109
+--error 1054
 select a from t1 union select a from t2 order by t2.a;
 drop table t1,t2;
 
@@ -793,3 +793,5 @@ insert into t1 (col1) values (2),(3),(4),(5),(6);
 select 99 union all select id from t1 order by 1;
 select id from t1 union all select 99 order by 1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/update.test b/mysql-test/t/update.test
index 66b3a2886b62a38685f62a1aabbc9ad2c08b23ab..dd6c36d84148878932d0da5a10b3e3bf323c6527 100644
--- a/mysql-test/t/update.test
+++ b/mysql-test/t/update.test
@@ -214,3 +214,5 @@ insert into t2 values(1,1),(2,2);
 UPDATE t1 SET t1.f2=(SELECT MAX(t2.f4) FROM t2 WHERE t2.f3=t1.f1);
 select * from t1;
 drop table t1,t2;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/user_var-binlog.test b/mysql-test/t/user_var-binlog.test
index 916a7dfa47b5a1e6394885c1d7efe46e7a8b4063..004154339b28462bc376ddb1a0b9075ed1685cbd 100644
--- a/mysql-test/t/user_var-binlog.test
+++ b/mysql-test/t/user_var-binlog.test
@@ -17,3 +17,5 @@ show binlog events from 98;
 --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
 --exec $MYSQL_BINLOG --short-form $MYSQL_TEST_DIR/var/log/master-bin.000001 
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/user_var.test b/mysql-test/t/user_var.test
index f8c441c7564a0a61b6dbfbadb983ea9f56afd10b..e3b5b4ef33e60039dccdf2b22eb0636b5c1645e8 100644
--- a/mysql-test/t/user_var.test
+++ b/mysql-test/t/user_var.test
@@ -121,6 +121,29 @@ set session @honk=99;
 --error 1382
 set one_shot @honk=99;
 
+#
+# Bug #10724  @@local not preserved in column name of select
+#
+# The value doesn't actually matter, we just care about the column name
+--replace_column 1 #
+select @@local.max_allowed_packet;
+--replace_column 1 #
+select @@session.max_allowed_packet;
+--replace_column 1 #
+select @@global.max_allowed_packet;
+--replace_column 1 #
+select @@max_allowed_packet;
+--replace_column 1 #
+select @@Max_Allowed_Packet;
+--replace_column 1 #
+select @@version;
+--replace_column 1 #
+select @@global.version;
+--replace_column 1 #
+select @@session.VERSION;
+
+# End of 4.1 tests
+
 #
 # Bug #6598: problem with cast(NULL as signed integer);
 #
diff --git a/mysql-test/t/varbinary.test b/mysql-test/t/varbinary.test
index 9425bd7bd99b40ff6df1d34d1b4711c92db5260c..5fbd116d7b87e88c4424d5371ef44d987e4c23ad 100644
--- a/mysql-test/t/varbinary.test
+++ b/mysql-test/t/varbinary.test
@@ -35,3 +35,5 @@ select 0xfg;
 create table t1 select 1 as x, 2 as xx;
 select x,xx from t1;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test
index c3ffdc79c164ba8bef40eff36cbd11bb7af50a4b..9d68b7c8172df20361163a6de45272d41dcb300b 100644
--- a/mysql-test/t/variables.test
+++ b/mysql-test/t/variables.test
@@ -390,6 +390,8 @@ SET GLOBAL table_cache=-1;
 SHOW VARIABLES LIKE 'table_cache';
 SET GLOBAL table_cache=DEFAULT;
 
+# End of 4.1 tests
+
 #
 # Bug#6282 Packet error with SELECT INTO
 # 
@@ -406,3 +408,13 @@ drop table t1;
 set @@warning_count=1;
 --error 1238
 set @@global.error_count=1;
+
+#
+# Bug #10351: Setting ulong variable to > MAX_ULONG fails on 32-bit platform
+#
+set @@max_heap_table_size= 4294967296;
+select @@max_heap_table_size > 0;
+set global max_heap_table_size= 4294967296;
+select @@max_heap_table_size > 0;
+set @@max_heap_table_size= 4294967296;
+select @@max_heap_table_size > 0;
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test
index 16a9482059622fe50c28015cfdfc2fa011512d9f..ceff7af401cf63446f000d0ddcfcb8de60aaefb9 100644
--- a/mysql-test/t/view.test
+++ b/mysql-test/t/view.test
@@ -147,10 +147,11 @@ insert into t1 values (1), (2), (3);
 create view v1 (a) as select a+1 from t1;
 create view v2 (a) as select a-1 from t1;
 
-# WL #2486 should enable these tests
-#select * from t1 natural left join v1;
-#select * from v2 natural left join t1;
-#select * from v2 natural left join v1;
+--disable_parsing WL #2486 should enable these tests
+select * from t1 natural left join v1;
+select * from v2 natural left join t1;
+select * from v2 natural left join v1;
+--enable_parsing
 
 drop view v1, v2;
 drop table t1;
@@ -490,15 +491,15 @@ create view v1 (a,a) as select 'a','a';
 #
 # SP variables inside view test
 #
-# QQ This can't be tested with the new table locking for functions,
-# QQ since views created in an SP can't be used within the same SP
-# QQ (just as for tables). Instead it fails with error 1146.
-#delimiter //;
-#create procedure p1 () begin declare v int; create view v1 as select v; end;//
-#delimiter ;//
-#-- error 1351
-#call p1();
-#drop procedure p1;
+--disable_warnings
+drop procedure if exists p1;
+--enable_warnings
+delimiter //;
+create procedure p1 () begin declare v int; create view v1 as select v; end;//
+delimiter ;//
+-- error 1351
+call p1();
+drop procedure p1;
 
 #
 # updatablity should be transitive
@@ -1710,6 +1711,10 @@ CHECK TABLE v1, v2, v3, v4, v5, v6;
 drop view v1, v2, v3, v4, v5, v6;
 drop table t2;
 
+--disable_warnings
+drop function if exists f1;
+drop function if exists f2;
+--enable_warnings
 CREATE TABLE t1 (col1 time);
 CREATE TABLE t2 (col1 time);
 CREATE TABLE t3 (col1 time);
@@ -1854,6 +1859,15 @@ DROP PROCEDURE p1;
 DROP VIEW v1;
 DROP TABLE t1;
 
+#
+# Bug #11335 View redefines column types
+#
+create table t1 (f1 tinyint(1), f2 char(1), f3 varchar(1), f4 geometry, f5 datetime);
+create view v1 as select * from t1;
+desc v1;
+drop view v1;
+drop table t1;
+
 #
 # Bug #11760 Typo in Item_func_add_time::print() results in NULLs returned
 #             subtime() in view
@@ -1862,4 +1876,69 @@ insert into t1 values('2005.01.01 12:0:0');
 create view v1 as select f1, subtime(f1, '1:1:1') as sb from t1;
 select * from v1;
 drop view v1;
-drop table t1; 
+drop table t1;
+
+#
+# Test for bug #11412: query over a multitable view with GROUP_CONCAT
+#
+CREATE TABLE t1 (
+  aid int PRIMARY KEY,
+  fn varchar(20) NOT NULL,
+  ln varchar(20) NOT NULL
+);
+CREATE TABLE t2 (
+  aid int NOT NULL,
+  pid int NOT NULL
+);
+INSERT INTO t1 VALUES(1,'a','b'), (2,'c','d');
+INSERT INTO t2 values (1,1), (2,1), (2,2);
+
+CREATE VIEW v1 AS SELECT t1.*,t2.pid FROM t1,t2 WHERE t1.aid = t2.aid;
+
+SELECT pid,GROUP_CONCAT(CONCAT(fn,' ',ln) ORDER BY 1) FROM t1,t2 
+  WHERE t1.aid = t2.aid GROUP BY pid;
+SELECT pid,GROUP_CONCAT(CONCAT(fn,' ',ln) ORDER BY 1) FROM v1 GROUP BY pid;
+
+DROP VIEW v1;
+DROP TABLE t1,t2;
+
+#
+# Test for bug #12382: SELECT * FROM view after INSERT command
+#
+
+CREATE TABLE t1 (id int PRIMARY KEY, f varchar(255));
+CREATE VIEW v1 AS SELECT id, f FROM t1 WHERE id <= 2;
+INSERT INTO t1 VALUES (2, 'foo2');
+INSERT INTO t1 VALUES (1, 'foo1');
+
+SELECT * FROM v1;
+SELECT * FROM v1;
+
+DROP VIEW v1;
+DROP TABLE t1;
+
+#
+# Test for bug #12470: crash for a simple select from a view defined
+#                      as a join over 5 tables
+
+CREATE TABLE t1 (pk int PRIMARY KEY, b int);
+CREATE TABLE t2 (pk int PRIMARY KEY, fk int, INDEX idx(fk));
+CREATE TABLE t3 (pk int PRIMARY KEY, fk int, INDEX idx(fk));
+CREATE TABLE t4 (pk int PRIMARY KEY, fk int, INDEX idx(fk));
+CREATE TABLE t5 (pk int PRIMARY KEY, fk int, INDEX idx(fk));
+CREATE VIEW v1 AS
+  SELECT t1.pk as a FROM t1,t2,t3,t4,t5
+    WHERE t1.b IS NULL AND
+          t1.pk=t2.fk AND t2.pk=t3.fk AND t3.pk=t4.fk AND t4.pk=t5.fk;
+
+SELECT a FROM v1;
+
+DROP VIEW v1;
+DROP TABLE t1,t2,t3,t4,t5;
+
+#
+# Bug #12298 Typo in  function name results in erroneous view being created.
+#
+create view v1 as select timestampdiff(day,'1997-01-01 00:00:00','1997-01-02 00:00:00') as f1;
+select * from v1;
+drop view v1;
diff --git a/mysql-test/t/warnings.test b/mysql-test/t/warnings.test
index 314432af83ec3914667666362416193528b40acc..f6ae7cdaf309e5aa767433c280d029e01b681fea 100644
--- a/mysql-test/t/warnings.test
+++ b/mysql-test/t/warnings.test
@@ -151,3 +151,5 @@ select * from t1 limit 0;
 select * from t1 limit 1, 0;
 select * from t1 limit 0, 0;
 drop table t1;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/xa.test b/mysql-test/t/xa.test
index 321e5008035eb7b4cd880eb2237c569f46077e76..1347fd05415c114cbe7da4df16554e0474579b65 100644
--- a/mysql-test/t/xa.test
+++ b/mysql-test/t/xa.test
@@ -31,6 +31,9 @@ xa end 'testa','testb';
 connect (con1,localhost,,,);
 connection con1;
 
+--error 1440
+xa start 'testa','testb';
+
 #        gtrid [ , bqual [ , formatID ] ]
 xa start 0x7465737462, 0x2030405060, 0xb;
 insert t1 values (40);
@@ -47,6 +50,7 @@ xa prepare 'testa','testb';
 
 xa recover;
 
+--error 1397
 xa commit 'testb',0x2030405060,11;
 xa rollback 'testa','testb';
 
diff --git a/mysys/charset.c b/mysys/charset.c
index 4920e7806a2394a249b77a1d9bbea37d4e2ece52..c02144fafc0bf263dd728ee511ab47fd9cc6b48d 100644
--- a/mysys/charset.c
+++ b/mysys/charset.c
@@ -383,26 +383,28 @@ static my_bool init_available_charsets(myf myflags)
       while we may changing the cs_info_table
     */
     pthread_mutex_lock(&THR_LOCK_charset);
-
-    bzero(&all_charsets,sizeof(all_charsets));
-    init_compiled_charsets(myflags);
-    
-    /* Copy compiled charsets */
-    for (cs=all_charsets;
-	 cs < all_charsets+array_elements(all_charsets)-1 ;
-	 cs++)
+    if (!charset_initialized)
     {
-      if (*cs)
+      bzero(&all_charsets,sizeof(all_charsets));
+      init_compiled_charsets(myflags);
+      
+      /* Copy compiled charsets */
+      for (cs=all_charsets;
+           cs < all_charsets+array_elements(all_charsets)-1 ;
+           cs++)
       {
-        if (cs[0]->ctype)
-          if (init_state_maps(*cs))
-            *cs= NULL;
+        if (*cs)
+        {
+          if (cs[0]->ctype)
+            if (init_state_maps(*cs))
+              *cs= NULL;
+        }
       }
+      
+      strmov(get_charsets_dir(fname), MY_CHARSET_INDEX);
+      error= my_read_charset_file(fname,myflags);
+      charset_initialized=1;
     }
-    
-    strmov(get_charsets_dir(fname), MY_CHARSET_INDEX);
-    error= my_read_charset_file(fname,myflags);
-    charset_initialized=1;
     pthread_mutex_unlock(&THR_LOCK_charset);
   }
   return error;
@@ -586,6 +588,7 @@ CHARSET_INFO *get_charset_by_csname(const char *cs_name,
     ~0          The escaped string did not fit in the to buffer
     >=0         The length of the escaped string
 */
+
 ulong escape_string_for_mysql(CHARSET_INFO *charset_info,
                               char *to, ulong to_length,
                               const char *from, ulong length)
@@ -676,6 +679,32 @@ ulong escape_string_for_mysql(CHARSET_INFO *charset_info,
 }
 
 
+#ifdef BACKSLASH_MBTAIL
+static CHARSET_INFO *fs_cset_cache= NULL;
+
+CHARSET_INFO *fs_character_set()
+{
+  if (!fs_cset_cache)
+  {
+    char buf[10]= "cp";
+    GetLocaleInfo(LOCALE_SYSTEM_DEFAULT, LOCALE_IDEFAULTANSICODEPAGE,
+                  buf+2, sizeof(buf)-3);
+    /*
+      We cannot call get_charset_by_name here
+      because fs_character_set() is executed before
+      LOCK_THD_charset mutex initialization, which
+      is used inside get_charset_by_name.
+      As we're now interested in cp932 only,
+      let's just detect it using strcmp().
+    */
+    fs_cset_cache= !strcmp(buf, "cp932") ?
+                   &my_charset_cp932_japanese_ci : &my_charset_bin;
+  }
+  return fs_cset_cache;
+}
+#endif
+
+
 /*
   Escape apostrophes by doubling them up
 
@@ -700,6 +729,7 @@ ulong escape_string_for_mysql(CHARSET_INFO *charset_info,
     ~0          The escaped string did not fit in the to buffer
     >=0         The length of the escaped string
 */
+
 ulong escape_quotes_for_mysql(CHARSET_INFO *charset_info,
                               char *to, ulong to_length,
                               const char *from, ulong length)
@@ -712,7 +742,6 @@ ulong escape_quotes_for_mysql(CHARSET_INFO *charset_info,
 #endif
   for (end= from + length; from < end; from++)
   {
-    char escape= 0;
 #ifdef USE_MB
     int tmp_length;
     if (use_mb_flag && (tmp_length= my_ismbchar(charset_info, from, end)))
diff --git a/mysys/default.c b/mysys/default.c
index 6b78d0312915bb377d0f4d834a66439c4dfd22e1..bde7cbf2563637f6cd6f9888d40d8a3f1a5ce4b8 100644
--- a/mysys/default.c
+++ b/mysys/default.c
@@ -917,6 +917,7 @@ typedef UINT (WINAPI *GET_SYSTEM_WINDOWS_DIRECTORY)(LPSTR, UINT);
 
 static uint my_get_system_windows_directory(char *buffer, uint size)
 {
+  uint count;
   GET_SYSTEM_WINDOWS_DIRECTORY
     func_ptr= (GET_SYSTEM_WINDOWS_DIRECTORY)
               GetProcAddress(GetModuleHandle("kernel32.dll"),
@@ -924,22 +925,19 @@ static uint my_get_system_windows_directory(char *buffer, uint size)
 
   if (func_ptr)
     return func_ptr(buffer, size);
-  else
-  {
-    /*
-      Windows NT 4.0 Terminal Server Edition:  
-      To retrieve the shared Windows directory, call GetSystemDirectory and
-      trim the "System32" element from the end of the returned path.
-     */
-    UINT count= GetSystemDirectory(buffer, size);
 
-    if (count > 8 && stricmp(buffer+(count-8), "\\System32") == 0)
-    {
-      count-= 8;
-      buffer[count] = '\0';
-    }
-    return count;
+  /*
+    Windows NT 4.0 Terminal Server Edition:  
+    To retrieve the shared Windows directory, call GetSystemDirectory and
+    trim the "System32" element from the end of the returned path.
+  */
+  count= GetSystemDirectory(buffer, size);
+  if (count > 8 && stricmp(buffer+(count-8), "\\System32") == 0)
+  {
+    count-= 8;
+    buffer[count] = '\0';
   }
+  return count;
 }
 #endif
 
@@ -952,7 +950,7 @@ static uint my_get_system_windows_directory(char *buffer, uint size)
     2. GetWindowsDirectory()
     3. GetSystemWindowsDirectory()
     4. getenv(DEFAULT_HOME_ENV)
-    5. Direcotry above where the executable is located
+    5. Directory above where the executable is located
     6. ""
 
   On Novell NetWare, this is:
@@ -1011,26 +1009,28 @@ static void init_default_directories()
       Look for the second-to-last \ in the filename, but hang on
       to a pointer after the last \ in case we're in the root of
       a drive.
-     */
+    */
     for ( ; end > config_dir; end--)
     {
       if (*end == FN_LIBCHAR)
       {
         if (last)
+        {
+          if (end != config_dir)
+          {
+            /* Keep the last '\' as this works both with D:\ and a directory */
+            end[1]= 0;
+          }
+          else
+          {
+            /* No parent directory (strange). Use current dir + '\' */
+            last[1]= 0;
+          }
           break;
+        }
         last= end;
       }
     }
-
-    if (last)
-    {                                                            
-      if (end != config_dir && end[-1] == FN_DEVCHAR) /* Ended up with D:\ */
-        end[1]= 0; /* Keep one \ */
-      else if (end != config_dir)
-        end[0]= 0; 
-      else
-        last[1]= 0;
-    }
     *ptr++= (char *)&config_dir;
   }
 #endif
diff --git a/mysys/list.c b/mysys/list.c
index c3cd6c94b9f09fbd597c8e9960c19e8b0c80895e..0e55c9399f5ec4907d764216fa3e694a4ffa749c 100644
--- a/mysys/list.c
+++ b/mysys/list.c
@@ -109,7 +109,7 @@ int list_walk(LIST *list, list_walk_action action, gptr argument)
   {
     if ((error = (*action)(list->data,argument)))
       return error;
-    list=rest(list);
+    list=list_rest(list);
   }
   return 0;
 }
diff --git a/mysys/mf_dirname.c b/mysys/mf_dirname.c
index 3de82c05b871034fa7c8dc626da239e37f26893a..45bf4d56c3116882e98df5917054ee8ccbfc0c19 100644
--- a/mysys/mf_dirname.c
+++ b/mysys/mf_dirname.c
@@ -22,6 +22,9 @@
 uint dirname_length(const char *name)
 {
   register my_string pos,gpos;
+#ifdef BASKSLASH_MBTAIL
+  CHARSET_INFO *fs= fs_character_set();
+#endif
 #ifdef FN_DEVCHAR
   if ((pos=(char*)strrchr(name,FN_DEVCHAR)) == 0)
 #endif
@@ -29,12 +32,22 @@ uint dirname_length(const char *name)
 
   gpos= pos++;
   for ( ; *pos ; pos++)				/* Find last FN_LIBCHAR */
+  {
+#ifdef BASKSLASH_MBTAIL
+    uint l;
+    if (use_mb(fs) && (l= my_ismbchar(fs, pos, pos + 3)))
+    {
+      pos+= l - 1;
+      continue;
+    }
+#endif
     if (*pos == FN_LIBCHAR || *pos == '/'
 #ifdef FN_C_AFTER_DIR
 	|| *pos == FN_C_AFTER_DIR || *pos == FN_C_AFTER_DIR_2
 #endif
 	)
       gpos=pos;
+  }
   return ((uint) (uint) (gpos+1-(char*) name));
 }
 
@@ -85,6 +98,9 @@ uint dirname_part(my_string to, const char *name)
 char *convert_dirname(char *to, const char *from, const char *from_end)
 {
   char *to_org=to;
+#ifdef BACKSLASH_MBTAIL
+  CHARSET_INFO *fs= fs_character_set();
+#endif
 
   /* We use -2 here, becasue we need place for the last FN_LIBCHAR */
   if (!from_end || (from_end - from) > FN_REFLEN-2)
@@ -103,7 +119,22 @@ char *convert_dirname(char *to, const char *from, const char *from_end)
 	*to++= FN_C_AFTER_DIR;
 #endif
       else
-	*to++= *from;
+      {
+#ifdef BACKSLASH_MBTAIL
+        uint l;
+        if (use_mb(fs) && (l= my_ismbchar(fs, from, from + 3)))
+        {
+          memmove(to, from, l);
+          to+= l;
+          from+= l - 1;
+          to_org= to; /* Don't look inside mbchar */
+        }
+        else
+#endif
+        {
+          *to++= *from;
+        }
+      }
     }
     *to=0;
   }
diff --git a/mysys/mf_pack.c b/mysys/mf_pack.c
index 86172f648f4888d3205aa4bd6942595d9d6267f6..049aa59a578428a91f628594ddd18a25262048a8 100644
--- a/mysys/mf_pack.c
+++ b/mysys/mf_pack.c
@@ -124,6 +124,9 @@ uint cleanup_dirname(register my_string to, const char *from)
   reg4 my_string start;
   char parent[5],				/* for "FN_PARENTDIR" */
        buff[FN_REFLEN+1],*end_parentdir;
+#ifdef BACKSLASH_MBTAIL
+  CHARSET_INFO *fs= fs_character_set();
+#endif
   DBUG_ENTER("cleanup_dirname");
   DBUG_PRINT("enter",("from: '%s'",from));
 
@@ -141,6 +144,15 @@ uint cleanup_dirname(register my_string to, const char *from)
   length=(uint) (strmov(parent+1,FN_PARENTDIR)-parent);
   for (pos=start ; (*pos= *from_ptr++) != 0 ; pos++)
   {
+#ifdef BACKSLASH_MBTAIL
+    uint l;
+    if (use_mb(fs) && (l= my_ismbchar(fs, from_ptr - 1, from_ptr + 2)))
+    {
+      for (l-- ; l ; *++pos= *from_ptr++, l--);
+      start= pos + 1; /* Don't look inside multi-byte char */
+      continue;
+    }
+#endif
     if (*pos == '/')
       *pos = FN_LIBCHAR;
     if (*pos == FN_LIBCHAR)
diff --git a/mysys/my_init.c b/mysys/my_init.c
index bee485c3bedab3441b26f64e6343d2a8022fbd84..abb1ad27f7b209915b7087650853e1b9757461b1 100644
--- a/mysys/my_init.c
+++ b/mysys/my_init.c
@@ -96,7 +96,7 @@ my_bool my_init(void)
 #endif
   {
     DBUG_ENTER("my_init");
-    DBUG_PROCESS(my_progname ? my_progname : (char*) "unknown");
+    DBUG_PROCESS((char*) (my_progname ? my_progname : "unknown"));
     if (!home_dir)
     {					/* Don't initialize twice */
       my_win_init();
@@ -395,7 +395,7 @@ static void netware_init()
     }
 
     /* Parse program name and change to base format */
-    name= my_progname;
+    name= (char*) my_progname;
     for (; *name; name++)
     {
       if (*name == '\\')
diff --git a/mysys/my_static.c b/mysys/my_static.c
index 8207463ea50c21435f9975fa1d61ea359d1a595f..8448afdc158f5ff0ee40562fd9b063a5f0403fe1 100644
--- a/mysys/my_static.c
+++ b/mysys/my_static.c
@@ -28,7 +28,8 @@
 my_bool timed_mutexes= 0;
 
 	/* from my_init */
-my_string	home_dir=0,my_progname=0;
+my_string	home_dir=0;
+const char      *my_progname=0;
 char		NEAR curr_dir[FN_REFLEN]= {0},
 		NEAR home_dir_buff[FN_REFLEN]= {0};
 ulong		my_stream_opened=0,my_file_opened=0, my_tmp_file_created=0;
diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c
index f3179fee9941efc976f05a075d5be318de66da8c..41266d61b0a96e07ed3528808bf52324d82b73eb 100644
--- a/mysys/thr_lock.c
+++ b/mysys/thr_lock.c
@@ -388,7 +388,6 @@ wait_for_lock(struct st_lock_list *wait, THR_LOCK_DATA *data,
 {
   struct st_my_thread_var *thread_var= my_thread_var;
   pthread_cond_t *cond= &thread_var->suspend;
-  struct timeval now;
   struct timespec wait_timeout;
   enum enum_thr_lock_result result= THR_LOCK_ABORTED;
   my_bool can_deadlock= test(data->owner->info->n_cursors);
@@ -406,11 +405,7 @@ wait_for_lock(struct st_lock_list *wait, THR_LOCK_DATA *data,
   data->cond= cond;
 
   if (can_deadlock)
-  {
-    gettimeofday(&now, 0);
-    wait_timeout.tv_sec= now.tv_sec + table_lock_wait_timeout;
-    wait_timeout.tv_nsec= now.tv_usec * 1000;
-  }
+    set_timespec(wait_timeout, table_lock_wait_timeout);
   while (!thread_var->abort || in_wait_list)
   {
     int rc= can_deadlock ? pthread_cond_timedwait(cond, &data->lock->mutex,
@@ -514,7 +509,7 @@ thr_lock(THR_LOCK_DATA *data, THR_LOCK_OWNER *owner,
 	(*lock->read.last)=data;		/* Add to running FIFO */
 	data->prev=lock->read.last;
 	lock->read.last= &data->next;
-	if ((int) lock_type == (int) TL_READ_NO_INSERT)
+	if (lock_type == TL_READ_NO_INSERT)
 	  lock->read_no_write_count++;
 	check_locks(lock,"read lock with old write lock",0);
 	if (lock->get_status)
@@ -540,14 +535,14 @@ thr_lock(THR_LOCK_DATA *data, THR_LOCK_OWNER *owner,
       lock->read.last= &data->next;
       if (lock->get_status)
 	(*lock->get_status)(data->status_param, 0);
-      if ((int) lock_type == (int) TL_READ_NO_INSERT)
+      if (lock_type == TL_READ_NO_INSERT)
 	lock->read_no_write_count++;
       check_locks(lock,"read lock with no write locks",0);
       statistic_increment(locks_immediate,&THR_LOCK_lock);
       goto end;
     }
     /*
-      We're here if there is an active write lock  or no write
+      We're here if there is an active write lock or no write
       lock but a high priority write waiting in the write_wait queue.
       In the latter case we should yield the lock to the writer.
     */
@@ -1048,10 +1043,10 @@ void thr_abort_locks(THR_LOCK *lock)
   This is used to abort all locks for a specific thread
 */
 
-bool thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread)
+my_bool thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread)
 {
   THR_LOCK_DATA *data;
-  bool found= FALSE;
+  my_bool found= FALSE;
   DBUG_ENTER("thr_abort_locks_for_thread");
 
   pthread_mutex_lock(&lock->mutex);
@@ -1211,7 +1206,8 @@ void thr_print_locks(void)
 
   pthread_mutex_lock(&THR_LOCK_lock);
   puts("Current locks:");
-  for (list=thr_lock_thread_list ; list && count++ < MAX_THREADS ; list=rest(list))
+  for (list= thr_lock_thread_list; list && count++ < MAX_THREADS;
+       list= list_rest(list))
   {
     THR_LOCK *lock=(THR_LOCK*) list->data;
     VOID(pthread_mutex_lock(&lock->mutex));
diff --git a/ndb/include/mgmapi/mgmapi.h b/ndb/include/mgmapi/mgmapi.h
index 018e554de7ced6b65370c268cb5a05c0711d80c6..924d65c284752544a46c62d9d0dde19476a8c502 100644
--- a/ndb/include/mgmapi/mgmapi.h
+++ b/ndb/include/mgmapi/mgmapi.h
@@ -139,6 +139,7 @@
  *  @{
  */
 
+#include <stdio.h>
 #include <ndb_types.h>
 #include "ndb_logevent.h"
 #include "mgmapi_config_parameters.h"
@@ -441,6 +442,12 @@ extern "C" {
   int ndb_mgm_get_latest_error_line(const NdbMgmHandle handle);
 #endif
 
+  /**
+   * Set error stream
+   */
+  void ndb_mgm_set_error_stream(NdbMgmHandle, FILE *);
+
+
   /** @} *********************************************************************/
   /**
    * @name Functions: Create/Destroy Management Server Handles
diff --git a/ndb/include/mgmapi/mgmapi_config_parameters.h b/ndb/include/mgmapi/mgmapi_config_parameters.h
index 33134899d1e4273513a783b9147dfe0187daafd4..8f95e159b381877267ca2b059e8dbce39e23b548 100644
--- a/ndb/include/mgmapi/mgmapi_config_parameters.h
+++ b/ndb/include/mgmapi/mgmapi_config_parameters.h
@@ -50,8 +50,11 @@
 
 #define CFG_DB_FILESYSTEM_PATH        125
 #define CFG_DB_NO_REDOLOG_FILES       126
-#define CFG_DB_DISC_BANDWIDTH         127
-#define CFG_DB_SR_DISC_BANDWITH       128
+
+#define CFG_DB_LCP_DISC_PAGES_TUP     127
+#define CFG_DB_LCP_DISC_PAGES_TUP_SR  128
+#define CFG_DB_LCP_DISC_PAGES_ACC     137
+#define CFG_DB_LCP_DISC_PAGES_ACC_SR  138
 
 #define CFG_DB_TRANSACTION_CHECK_INTERVAL   129
 #define CFG_DB_TRANSACTION_INACTIVE_TIMEOUT 130
diff --git a/ndb/src/common/logger/LogHandler.cpp b/ndb/src/common/logger/LogHandler.cpp
index a9d4512112fee763ca6c136538775a590d939c12..521bd346fd38f5669228fd7f2a381ef098d64fb6 100644
--- a/ndb/src/common/logger/LogHandler.cpp
+++ b/ndb/src/common/logger/LogHandler.cpp
@@ -58,7 +58,7 @@ LogHandler::append(const char* pCategory, Logger::LoggerLevel level,
   }
   else // repeated message
   {
-    if (now < m_last_log_time+m_max_repeat_frequency)
+    if (now < (time_t) (m_last_log_time+m_max_repeat_frequency))
     {
       m_count_repeated_messages++;
       m_now= now;
diff --git a/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp b/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
index 1a64b8f9e1e3e7e9cbec86ff4178212f72181cb2..aefd2612151d5b3f9516bf0db702a0571295f3b4 100644
--- a/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
+++ b/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
@@ -731,10 +731,12 @@ void Dbacc::execREAD_CONFIG_REQ(Signal* signal)
   ndbrestart1Lab(signal);
 
   clblPagesPerTick = 50;
-  //ndb_mgm_get_int_parameter(p, CFG_DB_, &clblPagesPerTick);
+  ndb_mgm_get_int_parameter(p, CFG_DB_LCP_DISC_PAGES_ACC_SR, 
+			    &clblPagesPerTick);
 
   clblPagesPerTickAfterSr = 50;
-  //ndb_mgm_get_int_parameter(p, CFG_DB_, &clblPagesPerTickAfterSr);
+  ndb_mgm_get_int_parameter(p, CFG_DB_LCP_DISC_PAGES_ACC, 
+			    &clblPagesPerTickAfterSr);
 
   tdata0 = 0;
   initialiseRecordsLab(signal, ref, senderData);
@@ -4849,16 +4851,16 @@ Uint32 Dbacc::executeNextOperation(Signal* signal)
   else if(operationRecPtr.p->operation == ZWRITE)
   {
     jam();
-    operationRecPtr.p->operation = ZINSERT;
+    operationRecPtr.p->operation = ZUPDATE;
     if (operationRecPtr.p->prevParallelQue != RNIL) {
       OperationrecPtr prevOpPtr;
       jam();
       prevOpPtr.i = operationRecPtr.p->prevParallelQue;
       ptrCheckGuard(prevOpPtr, coprecsize, operationrec);
-      if (prevOpPtr.p->operation != ZDELETE) 
+      if (prevOpPtr.p->operation == ZDELETE) 
       {
         jam();
-        operationRecPtr.p->operation = ZUPDATE;
+        operationRecPtr.p->operation = ZINSERT;
       }
     }
   }
diff --git a/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp b/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp
index 03f02dd0b92722ac2fd429a298000869a79e0e1a..f02a804aa83c27fa2a086caf66080b36335090d1 100644
--- a/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp
+++ b/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp
@@ -672,10 +672,12 @@ void Dbtup::execREAD_CONFIG_REQ(Signal* signal)
   initialiseRecordsLab(signal, 0, ref, senderData);
 
   clblPagesPerTick = 50;
-  //ndb_mgm_get_int_parameter(p, CFG_DB_, &clblPagesPerTick);
+  ndb_mgm_get_int_parameter(p, CFG_DB_LCP_DISC_PAGES_TUP_SR, 
+			    &clblPagesPerTick);
 
   clblPagesPerTickAfterSr = 50;
-  //ndb_mgm_get_int_parameter(p, CFG_DB_, &clblPagesPerTickAfterSr);
+  ndb_mgm_get_int_parameter(p, CFG_DB_LCP_DISC_PAGES_TUP, 
+			    &clblPagesPerTickAfterSr);
 
 }//Dbtup::execSIZEALT_REP()
 
diff --git a/ndb/src/mgmapi/mgmapi.cpp b/ndb/src/mgmapi/mgmapi.cpp
index 9f393d10528958bbaef97ebdd8d661ca35102f9c..6551ca24ee24727438d80ceaad994a3f0e47f4f0 100644
--- a/ndb/src/mgmapi/mgmapi.cpp
+++ b/ndb/src/mgmapi/mgmapi.cpp
@@ -101,6 +101,7 @@ struct ndb_mgm_handle {
 #ifdef MGMAPI_LOG
   FILE* logfile;
 #endif
+  FILE *errstream;
 };
 
 #define SET_ERROR(h, e, s) setError(h, e, __LINE__, s)
@@ -154,6 +155,7 @@ ndb_mgm_create_handle()
   h->read_timeout    = 50000;
   h->write_timeout   = 100;
   h->cfg_i           = -1;
+  h->errstream       = stdout;
 
   strncpy(h->last_error_desc, "No error", NDB_MGM_MAX_ERR_DESC_SIZE);
 
@@ -219,6 +221,13 @@ ndb_mgm_destroy_handle(NdbMgmHandle * handle)
   DBUG_VOID_RETURN;
 }
 
+extern "C" 
+void
+ndb_mgm_set_error_stream(NdbMgmHandle handle, FILE * file)
+{
+  handle->errstream = file;
+}
+
 /*****************************************************************************
  * Error handling
  *****************************************************************************/
@@ -424,8 +433,8 @@ ndb_mgm_connect(NdbMgmHandle handle, int no_retries,
 #endif
     if (verbose > 0) {
       char buf[1024];
-      ndbout_c("Unable to connect with connect string: %s",
-	       cfg.makeConnectString(buf,sizeof(buf)));
+      fprintf(handle->errstream, "Unable to connect with connect string: %s\n",
+	      cfg.makeConnectString(buf,sizeof(buf)));
       verbose= -1;
     }
     if (no_retries == 0) {
@@ -434,32 +443,35 @@ ndb_mgm_connect(NdbMgmHandle handle, int no_retries,
 	       "Unable to connect with connect string: %s",
 	       cfg.makeConnectString(buf,sizeof(buf)));
       if (verbose == -2)
-	ndbout << ", failed." << endl;
+	fprintf(handle->errstream, ", failed.\n");
       DBUG_RETURN(-1);
     }
     if (verbose == -1) {
-      ndbout << "Retrying every " << retry_delay_in_seconds << " seconds";
+      fprintf(handle->errstream, "Retrying every %d seconds", 
+	      retry_delay_in_seconds);
       if (no_retries > 0)
-	ndbout << ". Attempts left:";
+	fprintf(handle->errstream, ". Attempts left:");
       else
-	ndbout << ", until connected.";;	
-      ndbout << flush;
+	fprintf(handle->errstream, ", until connected.");
+      fflush(handle->errstream);
       verbose= -2;
     }
     if (no_retries > 0) {
       if (verbose == -2) {
-	ndbout << " " << no_retries;
-	ndbout << flush;
+	fprintf(handle->errstream, " %d", no_retries);
+	fflush(handle->errstream);
       }
       no_retries--;
     }
     NdbSleep_SecSleep(retry_delay_in_seconds);
   }
   if (verbose == -2)
-    ndbout << endl;
-
+  {
+    fprintf(handle->errstream, "\n");
+    fflush(handle->errstream);
+  }
   handle->cfg_i = i;
-
+  
   handle->socket    = sockfd;
   handle->connected = 1;
 
@@ -511,7 +523,9 @@ ndb_mgm_match_node_type(const char * type)
   for(int i = 0; i<no_of_type_values; i++)
     if(strcmp(type, type_values[i].str) == 0)
       return type_values[i].value;
-
+    else if(strcmp(type, type_values[i].alias) == 0)
+      return type_values[i].value;
+  
   return NDB_MGM_NODE_TYPE_UNKNOWN;
 }
 
@@ -1720,28 +1734,28 @@ ndb_mgm_get_configuration(NdbMgmHandle handle, unsigned int version) {
   do {
     const char * buf;
     if(!prop->get("result", &buf) || strcmp(buf, "Ok") != 0){
-      ndbout_c("ERROR Message: %s\n", buf);
+      fprintf(handle->errstream, "ERROR Message: %s\n\n", buf);
       break;
     }
 
     buf = "<Unspecified>";
     if(!prop->get("Content-Type", &buf) || 
        strcmp(buf, "ndbconfig/octet-stream") != 0){
-      ndbout_c("Unhandled response type: %s", buf);
+      fprintf(handle->errstream, "Unhandled response type: %s\n", buf);
       break;
     }
 
     buf = "<Unspecified>";
     if(!prop->get("Content-Transfer-Encoding", &buf) 
        || strcmp(buf, "base64") != 0){
-      ndbout_c("Unhandled encoding: %s", buf);
+      fprintf(handle->errstream, "Unhandled encoding: %s\n", buf);
       break;
     }
 
     buf = "<Content-Length Unspecified>";
     Uint32 len = 0;
     if(!prop->get("Content-Length", &len)){
-      ndbout_c("Invalid response: %s\n", buf);
+      fprintf(handle->errstream, "Invalid response: %s\n\n", buf);
       break;
     }
 
@@ -1766,14 +1780,14 @@ ndb_mgm_get_configuration(NdbMgmHandle handle, unsigned int version) {
     const int res = base64_decode(buf64, len-1, tmp);
     delete[] buf64; 
     if(res != 0){
-      ndbout_c("Failed to decode buffer");
+      fprintf(handle->errstream, "Failed to decode buffer\n");
       break;
     }
 
     ConfigValuesFactory cvf;
     const int res2 = cvf.unpack(tmp);
     if(!res2){
-      ndbout_c("Failed to unpack buffer");
+      fprintf(handle->errstream, "Failed to unpack buffer\n");
       break;
     }
 
@@ -1883,7 +1897,7 @@ ndb_mgm_alloc_nodeid(NdbMgmHandle handle, unsigned int version, int nodetype)
     }
     Uint32 _nodeid;
     if(!prop->get("nodeid", &_nodeid) != 0){
-      ndbout_c("ERROR Message: <nodeid Unspecified>\n");
+      fprintf(handle->errstream, "ERROR Message: <nodeid Unspecified>\n");
       break;
     }
     nodeid= _nodeid;
@@ -1959,7 +1973,7 @@ ndb_mgm_set_int_parameter(NdbMgmHandle handle,
   do {
     const char * buf;
     if(!prop->get("result", &buf) || strcmp(buf, "Ok") != 0){
-      ndbout_c("ERROR Message: %s\n", buf);
+      fprintf(handle->errstream, "ERROR Message: %s\n", buf);
       break;
     }
     res= 0;
@@ -2002,7 +2016,7 @@ ndb_mgm_set_int64_parameter(NdbMgmHandle handle,
   do {
     const char * buf;
     if(!prop->get("result", &buf) || strcmp(buf, "Ok") != 0){
-      ndbout_c("ERROR Message: %s\n", buf);
+      fprintf(handle->errstream, "ERROR Message: %s\n", buf);
       break;
     }
     res= 0;
@@ -2045,7 +2059,7 @@ ndb_mgm_set_string_parameter(NdbMgmHandle handle,
   do {
     const char * buf;
     if(!prop->get("result", &buf) || strcmp(buf, "Ok") != 0){
-      ndbout_c("ERROR Message: %s\n", buf);
+      fprintf(handle->errstream, "ERROR Message: %s\n", buf);
       break;
     }
     res= 0;
@@ -2082,7 +2096,7 @@ ndb_mgm_purge_stale_sessions(NdbMgmHandle handle, char **purged){
   do {
     const char * buf;
     if(!prop->get("result", &buf) || strcmp(buf, "Ok") != 0){
-      ndbout_c("ERROR Message: %s\n", buf);
+      fprintf(handle->errstream, "ERROR Message: %s\n", buf);
       break;
     }
     if (purged) {
@@ -2164,7 +2178,7 @@ ndb_mgm_set_connection_int_parameter(NdbMgmHandle handle,
   do {
     const char * buf;
     if(!prop->get("result", &buf) || strcmp(buf, "Ok") != 0){
-      ndbout_c("ERROR Message: %s\n", buf);
+      fprintf(handle->errstream, "ERROR Message: %s\n", buf);
       break;
     }
     res= 0;
@@ -2206,14 +2220,14 @@ ndb_mgm_get_connection_int_parameter(NdbMgmHandle handle,
   do {
     const char * buf;
     if(!prop->get("result", &buf) || strcmp(buf, "Ok") != 0){
-      ndbout_c("ERROR Message: %s\n", buf);
+      fprintf(handle->errstream, "ERROR Message: %s\n", buf);
       break;
     }
     res= 0;
   } while(0);
 
   if(!prop->get("value",(Uint32*)value)){
-    ndbout_c("Unable to get value");
+    fprintf(handle->errstream, "Unable to get value\n");
     res = -4;
   }
 
@@ -2265,7 +2279,7 @@ ndb_mgm_get_mgmd_nodeid(NdbMgmHandle handle)
   CHECK_REPLY(prop, 0);
 
   if(!prop->get("nodeid",&nodeid)){
-    ndbout_c("Unable to get value");
+    fprintf(handle->errstream, "Unable to get value\n");
     return 0;
   }
 
diff --git a/ndb/src/mgmsrv/ConfigInfo.cpp b/ndb/src/mgmsrv/ConfigInfo.cpp
index 34a2d8c1302c79e6ad9c82d663684cb5fa778c7f..3df878065a75fe91a8c3d9fa881aa6cbd3fae205 100644
--- a/ndb/src/mgmsrv/ConfigInfo.cpp
+++ b/ndb/src/mgmsrv/ConfigInfo.cpp
@@ -915,7 +915,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
     STR_VALUE(MAX_INT_RNIL) },
 
   {
-    KEY_INTERNAL,
+    CFG_DB_LCP_DISC_PAGES_TUP_SR,
     "NoOfDiskPagesToDiskDuringRestartTUP",
     DB_TOKEN,
     "?",
@@ -927,7 +927,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
     STR_VALUE(MAX_INT_RNIL) },
 
   {
-    KEY_INTERNAL,
+    CFG_DB_LCP_DISC_PAGES_TUP,
     "NoOfDiskPagesToDiskAfterRestartTUP",
     DB_TOKEN,
     "?",
@@ -939,7 +939,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
     STR_VALUE(MAX_INT_RNIL) },
 
   {
-    KEY_INTERNAL,
+    CFG_DB_LCP_DISC_PAGES_ACC_SR,
     "NoOfDiskPagesToDiskDuringRestartACC",
     DB_TOKEN,
     "?",
@@ -951,7 +951,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
     STR_VALUE(MAX_INT_RNIL) },
 
   {
-    KEY_INTERNAL,
+    CFG_DB_LCP_DISC_PAGES_ACC,
     "NoOfDiskPagesToDiskAfterRestartACC",
     DB_TOKEN,
     "?",
diff --git a/ndb/src/mgmsrv/ConfigInfo.hpp b/ndb/src/mgmsrv/ConfigInfo.hpp
index 871ee62040efd7663bf8f64fb68a3188b9f0591e..788619db7feabcdf0263f92ec5824f81295e9371 100644
--- a/ndb/src/mgmsrv/ConfigInfo.hpp
+++ b/ndb/src/mgmsrv/ConfigInfo.hpp
@@ -127,14 +127,14 @@ private:
   Properties               m_info;
   Properties               m_systemDefaults;
 
-  static const ParamInfo   m_ParamInfo[];
-  static const int         m_NoOfParams;
-  
   static const AliasPair   m_sectionNameAliases[];
   static const char*       m_sectionNames[];
   static const int         m_noOfSectionNames;
 
 public:
+  static const ParamInfo   m_ParamInfo[];
+  static const int         m_NoOfParams;
+  
   static const SectionRule m_SectionRules[];
   static const ConfigRule  m_ConfigRules[];
   static const int         m_NoOfRules;
diff --git a/ndb/test/include/HugoOperations.hpp b/ndb/test/include/HugoOperations.hpp
index dbb2ff8d43007d3c634647a2005e04d0f58129b8..82fd5529fa28001602c962617e8bad3896b2b36f 100644
--- a/ndb/test/include/HugoOperations.hpp
+++ b/ndb/test/include/HugoOperations.hpp
@@ -45,6 +45,10 @@ public:
 		    int recordNo,
 		    int numRecords = 1,
 		    int updatesValue = 0);
+
+  int pkWritePartialRecord(Ndb*,
+			   int recordNo,
+			   int numRecords = 1);
   
   int pkReadRecord(Ndb*,
 		   int recordNo,
diff --git a/ndb/test/include/UtilTransactions.hpp b/ndb/test/include/UtilTransactions.hpp
index afdbc5c34451968b1306d1fe15398211c56106fd..333f5d983287342aa8ff353afcc21399cf4b23b6 100644
--- a/ndb/test/include/UtilTransactions.hpp
+++ b/ndb/test/include/UtilTransactions.hpp
@@ -28,6 +28,8 @@ public:
   UtilTransactions(Ndb* ndb, 
 		   const char * tableName, const char * indexName = 0);
   
+  int closeTransaction(Ndb*);
+  
   int clearTable(Ndb*, 
 		 int records = 0,
 		 int parallelism = 0);
diff --git a/ndb/test/ndbapi/testNdbApi.cpp b/ndb/test/ndbapi/testNdbApi.cpp
index 67932780d8f3cc4ea60099c317f938f3652cb816..f456d8528987379bf270d57871e2291f74ad1e2e 100644
--- a/ndb/test/ndbapi/testNdbApi.cpp
+++ b/ndb/test/ndbapi/testNdbApi.cpp
@@ -1037,7 +1037,7 @@ int runCheckGetNdbErrorOperation(NDBT_Context* ctx, NDBT_Step* step){
   return result;
 }
 
-#define C2(x) { int _x= (x); if(_x == 0) return NDBT_FAILED; }
+#define C2(x) { int _x= (x); if(_x == 0){ ndbout << "line: " << __LINE__ << endl;  return NDBT_FAILED;} }
 
 int runBug_11133(NDBT_Context* ctx, NDBT_Step* step){
   int result = NDBT_OK;
@@ -1046,7 +1046,6 @@ int runBug_11133(NDBT_Context* ctx, NDBT_Step* step){
   HugoOperations hugoOps(*pTab);
 
   Ndb* pNdb = GETNDB(step);
-
   C2(hugoOps.startTransaction(pNdb) == 0);
   C2(hugoOps.pkInsertRecord(pNdb, 0, 1) == 0);
   C2(hugoOps.execute_NoCommit(pNdb) == 0);
@@ -1098,7 +1097,7 @@ int runBug_11133(NDBT_Context* ctx, NDBT_Step* step){
   C2(hugoOps.pkInsertRecord(pNdb, 0, 1) == 0);
   C2(hugoOps.execute_NoCommit(pNdb) == 0);
   C2(hugoOps2.startTransaction(&ndb2) == 0);
-  C2(hugoOps2.pkWriteRecord(&ndb2, 0, 1) == 0);
+  C2(hugoOps2.pkWritePartialRecord(&ndb2, 0) == 0);
   C2(hugoOps2.execute_async(&ndb2, NdbTransaction::NoCommit) == 0);
   C2(hugoOps.execute_Commit(pNdb) == 0);
   C2(hugoOps2.wait_async(&ndb2) == 0);
@@ -1113,6 +1112,29 @@ int runBug_11133(NDBT_Context* ctx, NDBT_Step* step){
   C2(hugoOps2.execute_async(&ndb2, NdbTransaction::NoCommit) == 0);
   C2(hugoOps.execute_Commit(pNdb) == 0);
   C2(hugoOps2.wait_async(&ndb2) == 0);
+  C2(hugoOps2.execute_Commit(pNdb) == 0);
+  C2(hugoOps.closeTransaction(pNdb) == 0);
+  C2(hugoOps2.closeTransaction(&ndb2) == 0);  
+
+  C2(hugoOps.startTransaction(pNdb) == 0);
+  C2(hugoOps.pkUpdateRecord(pNdb, 0, 1) == 0);
+  C2(hugoOps.execute_NoCommit(pNdb) == 0);
+  C2(hugoOps2.startTransaction(&ndb2) == 0);
+  C2(hugoOps2.pkWritePartialRecord(&ndb2, 0) == 0);
+  C2(hugoOps2.execute_async(&ndb2, NdbTransaction::NoCommit) == 0);
+  C2(hugoOps.execute_Commit(pNdb) == 0);
+  C2(hugoOps2.wait_async(&ndb2) == 0);
+  C2(hugoOps.closeTransaction(pNdb) == 0);
+  C2(hugoOps2.closeTransaction(&ndb2) == 0);  
+
+  C2(hugoOps.startTransaction(pNdb) == 0);
+  C2(hugoOps.pkDeleteRecord(pNdb, 0, 1) == 0);
+  C2(hugoOps.execute_NoCommit(pNdb) == 0);
+  C2(hugoOps2.startTransaction(&ndb2) == 0);
+  C2(hugoOps2.pkWritePartialRecord(&ndb2, 0) == 0);
+  C2(hugoOps2.execute_async(&ndb2, NdbTransaction::NoCommit) == 0);
+  C2(hugoOps.execute_Commit(pNdb) == 0);
+  C2(hugoOps2.wait_async(&ndb2) != 0);
   C2(hugoOps.closeTransaction(pNdb) == 0);
   C2(hugoOps2.closeTransaction(&ndb2) == 0);  
 
diff --git a/ndb/test/src/HugoOperations.cpp b/ndb/test/src/HugoOperations.cpp
index 91902c56d76c6557cb84009e3e5419f24268ec26..f2e54971766fe7bf68cc2a0d6b3a3fbd1edb5fd1 100644
--- a/ndb/test/src/HugoOperations.cpp
+++ b/ndb/test/src/HugoOperations.cpp
@@ -53,11 +53,7 @@ HugoOperations::setTransactionId(Uint64 id){
 
 int HugoOperations::closeTransaction(Ndb* pNdb){
 
-  if (pTrans != NULL){
-    pNdb->closeTransaction(pTrans);
-    pTrans = NULL;
-  }
-  pTrans = NULL;
+  UtilTransactions::closeTransaction(pNdb);
 
   m_result_sets.clear();
   m_executed_result_sets.clear();
@@ -267,6 +263,37 @@ int HugoOperations::pkWriteRecord(Ndb* pNdb,
   return NDBT_OK;
 }
 
+int HugoOperations::pkWritePartialRecord(Ndb* pNdb,
+					 int recordNo,
+					 int numRecords){
+  
+  int a, check;
+  for(int r=0; r < numRecords; r++){
+    NdbOperation* pOp = pTrans->getNdbOperation(tab.getName());	
+    if (pOp == NULL) {
+      ERR(pTrans->getNdbError());
+      return NDBT_FAILED;
+    }
+    
+    check = pOp->writeTuple();
+    if( check == -1 ) {
+      ERR(pTrans->getNdbError());
+      return NDBT_FAILED;
+    }
+    
+    // Define primary keys
+    for(a = 0; a<tab.getNoOfColumns(); a++){
+      if (tab.getColumn(a)->getPrimaryKey() == true){
+	if(equalForAttr(pOp, a, r+recordNo) != 0){
+	  ERR(pTrans->getNdbError());
+	  return NDBT_FAILED;
+	}
+      }
+    }
+  }
+  return NDBT_OK;
+}
+
 int HugoOperations::pkDeleteRecord(Ndb* pNdb,
 				   int recordNo,
 				   int numRecords){
@@ -419,7 +446,14 @@ HugoOperations::callback(int res, NdbTransaction* pCon)
 {
   assert(pCon == pTrans);
   m_async_reply= 1;
-  m_async_return= res;
+  if(res)
+  {
+    m_async_return = pCon->getNdbError().code;
+  }
+  else
+  {
+    m_async_return = 0;
+  }
 }
 
 int 
@@ -444,6 +478,8 @@ HugoOperations::wait_async(Ndb* pNdb, int timeout)
 
   if(m_async_reply)
   {
+    if(m_async_return)
+      ndbout << "ERROR: " << pNdb->getNdbError(m_async_return) << endl;
     return m_async_return;
   }
   ndbout_c("wait returned nothing...");
diff --git a/ndb/test/src/UtilTransactions.cpp b/ndb/test/src/UtilTransactions.cpp
index 65c1a7ded31d88f9a27773d234d1b38c65746aed..31c323045ed9103959b21826c12d6a915cf37d75 100644
--- a/ndb/test/src/UtilTransactions.cpp
+++ b/ndb/test/src/UtilTransactions.cpp
@@ -109,7 +109,7 @@ UtilTransactions::clearTable3(Ndb* pNdb,
       err = pTrans->getNdbError();
       if(err.status == NdbError::TemporaryError){
 	ERR(err);
-	pNdb->closeTransaction(pTrans);
+	closeTransaction(pNdb);
 	NdbSleep_MilliSleep(50);
 	par = 1;
 	goto restart;
@@ -126,7 +126,7 @@ UtilTransactions::clearTable3(Ndb* pNdb,
       err = pTrans->getNdbError();    
       if(err.status == NdbError::TemporaryError){
 	ERR(err);
-	pNdb->closeTransaction(pTrans);
+	closeTransaction(pNdb);
 	NdbSleep_MilliSleep(50);
 	continue;
       }
@@ -150,7 +150,7 @@ UtilTransactions::clearTable3(Ndb* pNdb,
       if(check == -1){
 	if(err.status == NdbError::TemporaryError){
 	  ERR(err);
-	  pNdb->closeTransaction(pTrans);
+	  closeTransaction(pNdb);
 	  NdbSleep_MilliSleep(50);
 	  par = 1;
 	  goto restart;
@@ -162,20 +162,20 @@ UtilTransactions::clearTable3(Ndb* pNdb,
       err = pTrans->getNdbError();    
       if(err.status == NdbError::TemporaryError){
 	ERR(err);
-	pNdb->closeTransaction(pTrans);
+	closeTransaction(pNdb);
 	NdbSleep_MilliSleep(50);
 	par = 1;
 	goto restart;
       }
       goto failed;
     }
-    pNdb->closeTransaction(pTrans);
+    closeTransaction(pNdb);
     return NDBT_OK;
   }
   return NDBT_FAILED;
   
  failed:
-  if(pTrans != 0) pNdb->closeTransaction(pTrans);
+  closeTransaction(pNdb);
   ERR(err);
   return (err.code != 0 ? err.code : NDBT_FAILED);
 }
@@ -219,20 +219,20 @@ UtilTransactions::copyTableData(Ndb* pNdb,
     pOp = pTrans->getNdbScanOperation(tab.getName());	
     if (pOp == NULL) {
       ERR(pTrans->getNdbError());
-      pNdb->closeTransaction(pTrans);
+      closeTransaction(pNdb);
       return NDBT_FAILED;
     }
 
     if( pOp->readTuples(NdbScanOperation::LM_Read, parallelism) ) {
       ERR(pTrans->getNdbError());
-      pNdb->closeTransaction(pTrans);
+      closeTransaction(pNdb);
       return NDBT_FAILED;
     }
 
     check = pOp->interpret_exit_ok();
     if( check == -1 ) {
       ERR(pTrans->getNdbError());
-      pNdb->closeTransaction(pTrans);
+      closeTransaction(pNdb);
       return NDBT_FAILED;
     }  
 
@@ -241,7 +241,7 @@ UtilTransactions::copyTableData(Ndb* pNdb,
       if ((row.attributeStore(a) =  
 	   pOp->getValue(tab.getColumn(a)->getName())) == 0) {
 	ERR(pTrans->getNdbError());
-	pNdb->closeTransaction(pTrans);
+	closeTransaction(pNdb);
 	return NDBT_FAILED;
       }
     }
@@ -249,7 +249,7 @@ UtilTransactions::copyTableData(Ndb* pNdb,
     check = pTrans->execute(NoCommit);
     if( check == -1 ) {
       ERR(pTrans->getNdbError());
-      pNdb->closeTransaction(pTrans);
+      closeTransaction(pNdb);
       return NDBT_FAILED;
     }
   
@@ -258,7 +258,7 @@ UtilTransactions::copyTableData(Ndb* pNdb,
       do {
 	insertedRows++;
 	if (addRowToInsert(pNdb, pTrans, row, destName) != 0){
-	  pNdb->closeTransaction(pTrans);
+	  closeTransaction(pNdb);
 	  return NDBT_FAILED;
 	}
       } while((eof = pOp->nextResult(false)) == 0);
@@ -268,7 +268,7 @@ UtilTransactions::copyTableData(Ndb* pNdb,
       if( check == -1 ) {
 	const NdbError err = pTrans->getNdbError();    
 	ERR(err);
-	pNdb->closeTransaction(pTrans);
+	closeTransaction(pNdb);
 	return NDBT_FAILED;
       }
     }  
@@ -277,7 +277,7 @@ UtilTransactions::copyTableData(Ndb* pNdb,
       
       if (err.status == NdbError::TemporaryError){
 	ERR(err);
-	pNdb->closeTransaction(pTrans);
+	closeTransaction(pNdb);
 	NdbSleep_MilliSleep(50);
 	// If error = 488 there should be no limit on number of retry attempts
 	if (err.code != 488) 
@@ -285,11 +285,11 @@ UtilTransactions::copyTableData(Ndb* pNdb,
 	continue;
       }
       ERR(err);
-      pNdb->closeTransaction(pTrans);
+      closeTransaction(pNdb);
       return NDBT_FAILED;
     }
     
-    pNdb->closeTransaction(pTrans);
+    closeTransaction(pNdb);
     
     g_info << insertedRows << " rows copied" << endl;
     
@@ -375,7 +375,7 @@ UtilTransactions::scanReadRecords(Ndb* pNdb,
     pOp = getScanOperation(pTrans);
     if (pOp == NULL) {
       const NdbError err = pNdb->getNdbError();
-      pNdb->closeTransaction(pTrans);
+      closeTransaction(pNdb);
 
       if (err.status == NdbError::TemporaryError){
 	ERR(err);
@@ -389,14 +389,14 @@ UtilTransactions::scanReadRecords(Ndb* pNdb,
 
     if( pOp->readTuples(lm, 0, parallelism) ) {
       ERR(pTrans->getNdbError());
-      pNdb->closeTransaction(pTrans);
+      closeTransaction(pNdb);
       return NDBT_FAILED;
     }
 
     check = pOp->interpret_exit_ok();
     if( check == -1 ) {
       ERR(pTrans->getNdbError());
-      pNdb->closeTransaction(pTrans);
+      closeTransaction(pNdb);
       return NDBT_FAILED;
     }
     
@@ -408,7 +408,7 @@ UtilTransactions::scanReadRecords(Ndb* pNdb,
 	if ((row.attributeStore(attrib_list[a]) =  
 	     pOp->getValue(tab.getColumn(attrib_list[a])->getName())) == 0) {
 	  ERR(pTrans->getNdbError());
-	  pNdb->closeTransaction(pTrans);
+	  closeTransaction(pNdb);
 	  return NDBT_FAILED;
 	}
       }
@@ -421,13 +421,13 @@ UtilTransactions::scanReadRecords(Ndb* pNdb,
 
       if (err.status == NdbError::TemporaryError){
 	ERR(err);
-	pNdb->closeTransaction(pTrans);
+	closeTransaction(pNdb);
 	NdbSleep_MilliSleep(50);
 	retryAttempt++;
 	continue;
       }
       ERR(err);
-      pNdb->closeTransaction(pTrans);
+      closeTransaction(pNdb);
       return NDBT_FAILED;
     }
     
@@ -447,17 +447,17 @@ UtilTransactions::scanReadRecords(Ndb* pNdb,
       
       if (err.status == NdbError::TemporaryError){
 	ERR(err);
-	pNdb->closeTransaction(pTrans);
+	closeTransaction(pNdb);
 	NdbSleep_MilliSleep(50);
 	retryAttempt++;
 	continue;
       }
       ERR(err);
-      pNdb->closeTransaction(pTrans);
+      closeTransaction(pNdb);
       return NDBT_FAILED;
     }
     
-    pNdb->closeTransaction(pTrans);
+    closeTransaction(pNdb);
     g_info << rows << " rows have been read" << endl;
     if (records != 0 && rows != records){
       g_info << "Check expected number of records failed" << endl 
@@ -496,13 +496,13 @@ UtilTransactions::selectCount(Ndb* pNdb,
     pOp = getScanOperation(pTrans);
     if (pOp == NULL) {
       ERR(pTrans->getNdbError());
-      pNdb->closeTransaction(pTrans);
+      closeTransaction(pNdb);
       return NDBT_FAILED;
     }
 
     if( pOp->readTuples(lm) ) {
       ERR(pTrans->getNdbError());
-      pNdb->closeTransaction(pTrans);
+      closeTransaction(pNdb);
       return NDBT_FAILED;
     }
 
@@ -515,7 +515,7 @@ UtilTransactions::selectCount(Ndb* pNdb,
       check = pOp->interpret_exit_ok();
       if( check == -1 ) {
 	ERR(pTrans->getNdbError());
-	pNdb->closeTransaction(pTrans);
+	closeTransaction(pNdb);
 	return NDBT_FAILED;
       }
     }
@@ -524,7 +524,7 @@ UtilTransactions::selectCount(Ndb* pNdb,
     check = pTrans->execute(NoCommit);
     if( check == -1 ) {
       ERR(pTrans->getNdbError());
-      pNdb->closeTransaction(pTrans);
+      closeTransaction(pNdb);
       return NDBT_FAILED;
     }
 
@@ -539,17 +539,17 @@ UtilTransactions::selectCount(Ndb* pNdb,
       const NdbError err = pTrans->getNdbError();
       
       if (err.status == NdbError::TemporaryError){
-	pNdb->closeTransaction(pTrans);
+	closeTransaction(pNdb);
 	NdbSleep_MilliSleep(50);
 	retryAttempt++;
 	continue;
       }
       ERR(err);
-      pNdb->closeTransaction(pTrans);
+      closeTransaction(pNdb);
       return NDBT_FAILED;
     }
     
-    pNdb->closeTransaction(pTrans);
+    closeTransaction(pNdb);
     
     if (count_rows != NULL){
       *count_rows = rows;
@@ -653,7 +653,7 @@ restart:
     pOp = pTrans->getNdbScanOperation(tab.getName());	
     if (pOp == NULL) {
       const NdbError err = pNdb->getNdbError();
-      pNdb->closeTransaction(pTrans);
+      closeTransaction(pNdb);
       ERR(err);
       
       if (err.status == NdbError::TemporaryError){
@@ -673,14 +673,14 @@ restart:
     
     if( rs != 0 ) {
       ERR(pTrans->getNdbError());
-      pNdb->closeTransaction(pTrans);
+      closeTransaction(pNdb);
       return NDBT_FAILED;
     }
 
     check = pOp->interpret_exit_ok();
     if( check == -1 ) {
       ERR(pTrans->getNdbError());
-      pNdb->closeTransaction(pTrans);
+      closeTransaction(pNdb);
       return NDBT_FAILED;
     }
 
@@ -689,7 +689,7 @@ restart:
       if ((row.attributeStore(a) =  
 	   pOp->getValue(tab.getColumn(a)->getName())) == 0) {
 	ERR(pTrans->getNdbError());
-	pNdb->closeTransaction(pTrans);
+	closeTransaction(pNdb);
 	return NDBT_FAILED;
       }
     }
@@ -700,13 +700,13 @@ restart:
       
       if (err.status == NdbError::TemporaryError){
 	ERR(err);
-	pNdb->closeTransaction(pTrans);
+	closeTransaction(pNdb);
 	NdbSleep_MilliSleep(50);
 	retryAttempt++;
 	continue;
       }
       ERR(err);
-      pNdb->closeTransaction(pTrans);
+      closeTransaction(pNdb);
       return NDBT_FAILED;
     }
     
@@ -733,13 +733,13 @@ restart:
 	  
 	  if (err.status == NdbError::TemporaryError){
 	    ERR(err);
-	    pNdb->closeTransaction(pTrans);
+	    closeTransaction(pNdb);
 	    NdbSleep_MilliSleep(50);
 	    retryAttempt++;
 	    goto restart;
 	  }
 	}
-	pNdb->closeTransaction(pTrans);
+	closeTransaction(pNdb);
 	return NDBT_FAILED;
       }
     }
@@ -748,17 +748,17 @@ restart:
       
       if (err.status == NdbError::TemporaryError){
 	ERR(err);
-	pNdb->closeTransaction(pTrans);
+	closeTransaction(pNdb);
 	NdbSleep_MilliSleep(50);
 	retryAttempt++;
 	continue;
       }
       ERR(err);
-      pNdb->closeTransaction(pTrans);
+      closeTransaction(pNdb);
       return NDBT_FAILED;
     }
     
-    pNdb->closeTransaction(pTrans);
+    closeTransaction(pNdb);
     
     return NDBT_OK;
   }
@@ -1057,20 +1057,20 @@ UtilTransactions::verifyOrderedIndex(Ndb* pNdb,
     pOp = pTrans->getNdbScanOperation(tab.getName());	
     if (pOp == NULL) {
       ERR(pTrans->getNdbError());
-      pNdb->closeTransaction(pTrans);
+      closeTransaction(pNdb);
       return NDBT_FAILED;
     }
 
     if( pOp->readTuples(NdbScanOperation::LM_Read, 0, parallelism) ) {
       ERR(pTrans->getNdbError());
-      pNdb->closeTransaction(pTrans);
+      closeTransaction(pNdb);
       return NDBT_FAILED;
     }
 
     check = pOp->interpret_exit_ok();
     if( check == -1 ) {
       ERR(pTrans->getNdbError());
-      pNdb->closeTransaction(pTrans);
+      closeTransaction(pNdb);
       return NDBT_FAILED;
     }
 
@@ -1085,13 +1085,13 @@ UtilTransactions::verifyOrderedIndex(Ndb* pNdb,
       
       if (err.status == NdbError::TemporaryError){
 	ERR(err);
-	pNdb->closeTransaction(pTrans);
+	closeTransaction(pNdb);
 	NdbSleep_MilliSleep(50);
 	retryAttempt++;
 	continue;
       }
       ERR(err);
-      pNdb->closeTransaction(pTrans);
+      closeTransaction(pNdb);
       return NDBT_FAILED;
     }
         
@@ -1146,7 +1146,7 @@ UtilTransactions::verifyOrderedIndex(Ndb* pNdb,
 	g_err << "Error when comapring records" << endl;
 	g_err << " scanRow: \n" << scanRow.c_str().c_str() << endl;
 	g_err << " pkRow: \n" << pkRow.c_str().c_str() << endl;
-	pNdb->closeTransaction(pTrans);
+	closeTransaction(pNdb);
 	return NDBT_FAILED;
       }
 
@@ -1156,7 +1156,7 @@ UtilTransactions::verifyOrderedIndex(Ndb* pNdb,
 	if((res= iop->nextResult()) != 0){
 	  g_err << "Failed to find row using index: " << res << endl;
 	  ERR(pTrans->getNdbError());
-	  pNdb->closeTransaction(pTrans);
+	  closeTransaction(pNdb);
 	  return NDBT_FAILED;
 	}
 	
@@ -1164,14 +1164,14 @@ UtilTransactions::verifyOrderedIndex(Ndb* pNdb,
 	  g_err << "Error when comapring records" << endl;
 	  g_err << " scanRow: \n" << scanRow.c_str().c_str() << endl;
 	  g_err << " indexRow: \n" << indexRow.c_str().c_str() << endl;
-	  pNdb->closeTransaction(pTrans);
+	  closeTransaction(pNdb);
 	  return NDBT_FAILED;
 	}
 	
 	if(iop->nextResult() == 0){
 	  g_err << "Found extra row!!" << endl;
 	  g_err << " indexRow: \n" << indexRow.c_str().c_str() << endl;
-	  pNdb->closeTransaction(pTrans);
+	  closeTransaction(pNdb);
 	  return NDBT_FAILED;
 	}
       }
@@ -1184,18 +1184,18 @@ UtilTransactions::verifyOrderedIndex(Ndb* pNdb,
       if (err.status == NdbError::TemporaryError){
 	ERR(err);
 	iop = 0;
-	pNdb->closeTransaction(pTrans);
+	closeTransaction(pNdb);
 	NdbSleep_MilliSleep(50);
 	retryAttempt++;
 	rows--;
 	continue;
       }
       ERR(err);
-      pNdb->closeTransaction(pTrans);
+      closeTransaction(pNdb);
       return NDBT_FAILED;
     }
       
-    pNdb->closeTransaction(pTrans);
+    closeTransaction(pNdb);
     
     return NDBT_OK;
   }
@@ -1303,6 +1303,16 @@ UtilTransactions::getOperation(NdbConnection* pTrans,
 
 #include <HugoOperations.hpp>
 
+int
+UtilTransactions::closeTransaction(Ndb* pNdb)
+{
+  if (pTrans != NULL){
+    pNdb->closeTransaction(pTrans);
+    pTrans = NULL;
+  }
+  return 0;
+}
+
 int 
 UtilTransactions::compare(Ndb* pNdb, const char* tab_name2, int flags){
 
@@ -1313,7 +1323,6 @@ UtilTransactions::compare(Ndb* pNdb, const char* tab_name2, int flags){
 
   HugoCalculator calc(tab);
   NDBT_ResultRow row(tab);
-  NdbTransaction* pTrans= 0;
   const NdbDictionary::Table* tmp= pNdb->getDictionary()->getTable(tab_name2);
   if(tmp == 0)
   {
diff --git a/ndb/tools/Makefile.am b/ndb/tools/Makefile.am
index 1008b166dfca447851de1d7e4c5def087d8e4220..17b71f7e33c65b440abc7445868941dc767002b3 100644
--- a/ndb/tools/Makefile.am
+++ b/ndb/tools/Makefile.am
@@ -9,7 +9,7 @@ ndbtools_PROGRAMS = \
   ndb_show_tables \
   ndb_select_all \
   ndb_select_count \
-  ndb_restore
+  ndb_restore ndb_config
 
 tools_common_sources = ../test/src/NDBT_ReturnCodes.cpp \
                        ../test/src/NDBT_Table.cpp \
@@ -33,6 +33,17 @@ ndb_restore_SOURCES = restore/restore_main.cpp \
                       restore/Restore.cpp \
                       ../test/src/NDBT_ResultRow.cpp $(tools_common_sources)
 
+ndb_config_SOURCES = ndb_config.cpp \
+	../src/mgmsrv/Config.cpp \
+	../src/mgmsrv/ConfigInfo.cpp \
+	../src/mgmsrv/InitConfigFileParser.cpp
+
+ndb_config_CXXFLAGS = -I$(top_srcdir)/ndb/src/mgmapi \
+                      -I$(top_srcdir)/ndb/src/mgmsrv \
+                      -I$(top_srcdir)/ndb/include/mgmcommon \
+                      -DMYSQLCLUSTERDIR="\"\""
+
+
 include $(top_srcdir)/ndb/config/common.mk.am
 include $(top_srcdir)/ndb/config/type_ndbapitools.mk.am
 
@@ -46,6 +57,7 @@ ndb_show_tables_LDFLAGS = @ndb_bin_am_ldflags@
 ndb_select_all_LDFLAGS = @ndb_bin_am_ldflags@
 ndb_select_count_LDFLAGS = @ndb_bin_am_ldflags@
 ndb_restore_LDFLAGS = @ndb_bin_am_ldflags@
+ndb_config_LDFLAGS = @ndb_bin_am_ldflags@
 
 # Don't update the files from bitkeeper
 %::SCCS/s.%
diff --git a/ndb/tools/ndb_config.cpp b/ndb/tools/ndb_config.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..d188aec1337e9a7cee58f317f6f5eebf8f152a62
--- /dev/null
+++ b/ndb/tools/ndb_config.cpp
@@ -0,0 +1,407 @@
+/* Copyright (C) 2003 MySQL 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 */
+
+/**
+ * ndb_config --nodes --query=nodeid --type=ndbd --host=local1
+ */
+
+#include <ndb_global.h>
+#include <my_sys.h>
+#include <my_getopt.h>
+#include <mysql_version.h>
+
+#include <NdbOut.hpp>
+#include <mgmapi.h>
+#include <mgmapi_configuration.hpp>
+#include <ConfigInfo.hpp>
+
+static int g_verbose = 0;
+static int try_reconnect = 3;
+
+static int g_nodes = 1;
+static const char * g_connectstring = 0;
+static const char * g_query = 0;
+
+static int g_nodeid = 0;
+static const char * g_type = 0;
+static const char * g_host = 0;
+static const char * g_field_delimiter=",";
+static const char * g_row_delimiter=" ";
+
+int g_print_full_config, opt_ndb_shm;
+
+typedef ndb_mgm_configuration_iterator Iter;
+
+static void ndb_std_print_version()
+{
+  printf("MySQL distrib %s, for %s (%s)\n",
+	 MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE);
+}
+
+static struct my_option my_long_options[] =
+{
+  { "usage", '?', "Display this help and exit.", 
+    0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 }, 
+  { "help", '?', "Display this help and exit.", 
+    0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 }, 
+  { "version", 'V', "Output version information and exit.", 0, 0, 0, 
+    GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 }, 
+  { "ndb-connectstring", 256,
+    "Set connect string for connecting to ndb_mgmd. " 
+    "Syntax: \"[nodeid=<id>;][host=]<hostname>[:<port>]\". " 
+    "Overides specifying entries in NDB_CONNECTSTRING and Ndb.cfg", 
+    (gptr*) &g_connectstring, (gptr*) &g_connectstring, 
+    0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
+  { "nodes", 256, "Print nodes",
+    (gptr*) &g_nodes, (gptr*) &g_nodes,
+    0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
+  { "query", 'q', "Query option(s)",
+    (gptr*) &g_query, (gptr*) &g_query,
+    0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+  { "host", 257, "Host",
+    (gptr*) &g_host, (gptr*) &g_host,
+    0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+  { "type", 258, "Type of node/connection",
+    (gptr*) &g_type, (gptr*) &g_type,
+    0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+  { "id", 258, "Nodeid",
+    (gptr*) &g_nodeid, (gptr*) &g_nodeid,
+    0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+  { "nodeid", 258, "Nodeid",
+    (gptr*) &g_nodeid, (gptr*) &g_nodeid,
+    0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+  { "fields", 'f', "Field separator",
+    (gptr*) &g_field_delimiter, (gptr*) &g_field_delimiter,
+    0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+  { "rows", 'r', "Row separator",
+    (gptr*) &g_row_delimiter, (gptr*) &g_row_delimiter,
+    0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+  { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
+};
+
+static void usage()
+{
+  char desc[] = 
+    "This program will retreive config options for a ndb cluster\n";
+  ndb_std_print_version();
+  my_print_help(my_long_options);
+  my_print_variables(my_long_options);
+}
+static my_bool
+ndb_std_get_one_option(int optid,
+		       const struct my_option *opt __attribute__((unused)),
+		       char *argument)
+{
+  switch (optid) {
+  case 'V':
+    ndb_std_print_version();
+    exit(0);
+  case '?':
+    usage();
+    exit(0);
+  }
+  return 0;
+}
+
+/**
+ * Match/Apply framework
+ */
+struct Match
+{
+  int m_key;
+  BaseString m_value;
+  virtual int eval(NdbMgmHandle, const Iter&);
+};
+
+struct Apply
+{
+  Apply() {}
+  Apply(int val) { m_key = val;}
+  int m_key;
+  virtual int apply(NdbMgmHandle, const Iter&);
+};
+
+struct NodeTypeApply : public Apply
+{
+  virtual int apply(NdbMgmHandle, const Iter&);
+};
+
+static int parse_query(Vector<Apply*>&, int &argc, char**& argv);
+static int parse_where(Vector<Match*>&, int &argc, char**& argv);
+static int eval(NdbMgmHandle, const Iter&, const Vector<Match*>&);
+static int apply(NdbMgmHandle, const Iter&, const Vector<Apply*>&);
+int
+main(int argc, char** argv){
+  NDB_INIT(argv[0]);
+  const char *load_default_groups[]= { "mysql_cluster",0 };
+  load_defaults("my",load_default_groups,&argc,&argv);
+  int ho_error;
+  if ((ho_error=handle_options(&argc, &argv, my_long_options,
+			       ndb_std_get_one_option)))
+    return -1;
+
+  NdbMgmHandle mgm = ndb_mgm_create_handle();
+  if(mgm == NULL) {
+    fprintf(stderr, "Cannot create handle to management server.\n");
+    exit(-1);
+  }
+
+  ndb_mgm_set_error_stream(mgm, stderr);
+  
+  if (ndb_mgm_set_connectstring(mgm, g_connectstring))
+  {
+    fprintf(stderr, "* %5d: %s\n", 
+	    ndb_mgm_get_latest_error(mgm),
+	    ndb_mgm_get_latest_error_msg(mgm));
+    fprintf(stderr, 
+	    "*        %s", ndb_mgm_get_latest_error_desc(mgm));
+    exit(-1);
+  }
+
+  if(ndb_mgm_connect(mgm, try_reconnect-1, 5, 1))
+  {
+    fprintf(stderr, "Connect failed");
+    fprintf(stderr, " code: %d, msg: %s\n",
+	    ndb_mgm_get_latest_error(mgm),
+	    ndb_mgm_get_latest_error_msg(mgm));
+    exit(-1);
+  }
+  else if(g_verbose)
+  {
+    fprintf(stderr, "Connected to %s:%d\n", 
+	    ndb_mgm_get_connected_host(mgm),
+	    ndb_mgm_get_connected_port(mgm));
+  }
+	  
+  ndb_mgm_configuration * conf = ndb_mgm_get_configuration(mgm, 0);
+  if(conf == 0)
+  {
+    fprintf(stderr, "Could not get configuration");
+    fprintf(stderr, "code: %d, msg: %s\n",
+	    ndb_mgm_get_latest_error(mgm),
+	    ndb_mgm_get_latest_error_msg(mgm));
+    exit(-1);
+  }
+  else if(g_verbose)
+  {
+    fprintf(stderr, "Fetched configuration\n");
+  }
+
+  Vector<Apply*> select_list;
+  Vector<Match*> where_clause;
+
+  if(strcmp(g_row_delimiter, "\\n") == 0)
+    g_row_delimiter = "\n";
+  if(strcmp(g_field_delimiter, "\\n") == 0)
+    g_field_delimiter = "\n";
+
+  if(parse_query(select_list, argc, argv))
+  {
+    exit(0);
+  }
+
+  if(parse_where(where_clause, argc, argv))
+  {
+    exit(0);
+  }
+
+  Iter iter(* conf, CFG_SECTION_NODE);
+  bool prev= false;
+  iter.first();
+  for(iter.first(); iter.valid(); iter.next())
+  {
+    if(eval(mgm, iter, where_clause))
+    {
+      if(prev)
+	printf("%s", g_row_delimiter);
+      prev= true;
+      apply(mgm, iter, select_list);
+    }
+  }
+  printf("\n");
+  return 0;
+}
+
+static
+int
+parse_query(Vector<Apply*>& select, int &argc, char**& argv)
+{
+  if(g_query)
+  {
+    BaseString q(g_query);
+    Vector<BaseString> list;
+    q.split(list, ",");
+    for(unsigned i = 0; i<list.size(); i++)
+    {
+      const char * str= list[i].c_str();
+      if(strcasecmp(str, "id") == 0 || strcasecmp(str, "nodeid") == 0)
+	select.push_back(new Apply(CFG_NODE_ID));
+      else if(strncasecmp(str, "host", 4) == 0)
+	select.push_back(new Apply(CFG_NODE_HOST));
+      else if(strcasecmp(str, "type") == 0)
+	select.push_back(new NodeTypeApply());
+      else if(g_nodes)
+      {
+	bool found = false;
+	for(int p = 0; p<ConfigInfo::m_NoOfParams; p++)
+	{
+	  if(0)ndbout_c("%s %s",
+			ConfigInfo::m_ParamInfo[p]._section,
+			ConfigInfo::m_ParamInfo[p]._fname);
+	  if(strcmp(ConfigInfo::m_ParamInfo[p]._section, "DB") == 0 ||
+	     strcmp(ConfigInfo::m_ParamInfo[p]._section, "API") == 0 ||
+	     strcmp(ConfigInfo::m_ParamInfo[p]._section, "MGM") == 0)
+	  {
+	    if(strcasecmp(ConfigInfo::m_ParamInfo[p]._fname, str) == 0)
+	    {
+	      select.push_back(new Apply(ConfigInfo::m_ParamInfo[p]._paramId));
+	      found = true;
+	      break;
+	    }
+	  }
+	}
+	if(!found)
+	{
+	  fprintf(stderr, "Unknown query option: %s\n", str);
+	  return 1;
+	}
+      }
+      else
+      {
+	fprintf(stderr, "Unknown query option: %s\n", str);
+	return 1;
+      }
+    }
+  }
+  return 0;
+}
+
+static 
+int 
+parse_where(Vector<Match*>& where, int &argc, char**& argv)
+{
+  Match m;
+  if(g_host)
+  {
+    m.m_key = CFG_NODE_HOST;
+    m.m_value.assfmt("%s", g_host);
+    where.push_back(new Match(m));
+  }
+  
+  if(g_type)
+  {
+    m.m_key = CFG_TYPE_OF_SECTION;
+    m.m_value.assfmt("%d", ndb_mgm_match_node_type(g_type));
+    where.push_back(new Match(m));
+  }
+
+  if(g_nodeid)
+  {
+    m.m_key = CFG_NODE_ID;
+    m.m_value.assfmt("%d", g_nodeid);
+    where.push_back(new Match(m));
+  }
+  return 0;
+}
+
+template class Vector<Apply*>;
+template class Vector<Match*>;
+
+static 
+int
+eval(NdbMgmHandle mgm, const Iter& iter, const Vector<Match*>& where)
+{
+  for(unsigned i = 0; i<where.size(); i++)
+  {
+    if(where[i]->eval(mgm, iter) == 0)
+      return 0;
+  }
+  
+  return 1;
+}
+
+static 
+int 
+apply(NdbMgmHandle mgm, const Iter& iter, const Vector<Apply*>& list)
+{
+  for(unsigned i = 0; i<list.size(); i++)
+  {
+    list[i]->apply(mgm, iter);
+    if(i + 1 != list.size())
+      printf("%s", g_field_delimiter);
+  }
+  return 0;
+}
+
+int
+Match::eval(NdbMgmHandle h, const Iter& iter)
+{
+  Uint32 val32;
+  Uint64 val64;
+  const char* valc;
+  if (iter.get(m_key, &val32) == 0)
+  {
+    if(atoi(m_value.c_str()) != val32)
+      return 0;
+  } 
+  else if(iter.get(m_key, &val64) == 0)
+  {
+    if(strtoll(m_value.c_str(), (char **)NULL, 10) != val64)
+      return 0;
+  }
+  else if(iter.get(m_key, &valc) == 0)
+  {
+    if(strcmp(m_value.c_str(), valc) != 0)
+      return 0;
+  }
+  else
+  {
+    return 0;
+  }
+  return 1;
+}
+
+int
+Apply::apply(NdbMgmHandle h, const Iter& iter)
+{
+  Uint32 val32;
+  Uint64 val64;
+  const char* valc;
+  if (iter.get(m_key, &val32) == 0)
+  {
+    printf("%u", val32);
+  } 
+  else if(iter.get(m_key, &val64) == 0)
+  {
+    printf("%llu", val64);
+  }
+  else if(iter.get(m_key, &valc) == 0)
+  {
+    printf("%s", valc);
+  }
+  return 0;
+}
+
+int
+NodeTypeApply::apply(NdbMgmHandle h, const Iter& iter)
+{
+  Uint32 val32;
+  if (iter.get(CFG_TYPE_OF_SECTION, &val32) == 0)
+  {
+    printf("%s", ndb_mgm_get_node_type_alias_string((ndb_mgm_node_type)val32, 0));
+  } 
+  return 0;
+}
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 225e8bdccbb41bcb259d961cddf86e3f09f45092..474ebedda62cacaf51c6ad787e7cdcb8b3eeb0c0 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -35,10 +35,13 @@ bin_SCRIPTS =		@server_scripts@ \
 			mysqld_multi \
 			mysql_create_system_tables
 
+noinst_SCRIPTS =	make_binary_distribution \
+			make_sharedlib_distribution \
+			make_win_src_distribution
+
 EXTRA_SCRIPTS =		make_binary_distribution.sh \
 			make_sharedlib_distribution.sh \
 			make_win_src_distribution.sh \
-			make_win_binary_distribution.sh \
 			msql2mysql.sh \
 			mysql_config.sh \
 			mysql_fix_privilege_tables.sh \
@@ -147,5 +150,3 @@ SUFFIXES = .sh
 
 # Don't update the files from bitkeeper
 %::SCCS/s.%
-
-all: make_win_src_distribution make_binary_distribution make_sharedlib_distribution
diff --git a/scripts/make_win_binary_distribution.sh b/scripts/make_win_binary_distribution.sh
deleted file mode 100644
index c611454450cb19ddffa9084e7f97333b1f6d14e9..0000000000000000000000000000000000000000
--- a/scripts/make_win_binary_distribution.sh
+++ /dev/null
@@ -1,185 +0,0 @@
-#!/bin/sh
-
-#
-# Script to create a Windows binary package
-#
-# This is intended to be used under Cygwin, and will generate
-# an archive named in the form mysql<suffix>-<version>-noinstall.zip
-
-version=@VERSION@
-
-DEBUG=0
-SUFFIX=""
-DIRNAME=""
-EXTRA=""
-
-#
-# This script must run from MySQL top directory
-#
-
-if [ ! -f scripts/make_win_binary_distribution ]; then
-  echo "ERROR : You must run this script from the MySQL top-level directory"
-  exit 1
-fi
-
-#
-# Debug print of the status
-#
-
-print_debug()
-{
-  for statement
-  do
-    if [ "$DEBUG" = "1" ] ; then
-      echo $statement
-    fi
-  done
-}
-
-#
-# Usage of the script
-#
-
-show_usage()
-{
-  echo "MySQL utility script to create a Windows binary package"
-  echo ""
-  echo "This is intended to be used under Cygwin, and will generate"
-  echo "an archive named in the form mysql<suffix>-<version>-noinstall.zip"
-  echo "Takes the following arguments:"
-  echo ""
-  echo "  --dirname  Directory to use for copying files"
-  echo "  --extra    Directory to get extra files from"
-  echo "  --suffix   Name to append to 'mysql' for this binary"
-  echo "  --help     Show this help message"
-  exit 0
-}
-
-#
-# Parse the input arguments
-#
-
-parse_arguments() {
-  for arg do
-    case "$arg" in
-      --debug)    DEBUG=1;;
-      --extra=*) EXTRA=`echo "$arg" | sed -e "s;--extra=;;"` ;;
-      --suffix=*) SUFFIX=`echo "$arg" | sed -e "s;--suffix=;;"` ;;
-      --dirname=*) DIRNAME=`echo "$arg" | sed -e "s;--dirname=;;"` ;;
-      --help)     show_usage ;;
-      *)
-  echo "Unknown argument '$arg'"
-  exit 1
-      ;;
-    esac
-  done
-}
-
-parse_arguments "$@"
-
-if [ -z "$DIRNAME" ]; then
-  $DIRNAME="dist"
-fi
-
-print_debug "Making directories"
-mkdir $DIRNAME
-$DIRNAME="$DIRNAME/mysql-$version"
-mkdir $DIRNAME
-
-for dir in bin lib lib/opt lib/debug Embedded Embedded/DLL Embedded/DLL/debug Embedded/DLL/release Embedded/static Embedded/static/release examples examples/libmysqltest
-do
-  mkdir $DIRNAME/$dir
-done
-
-if [ $EXTRA ]; then
-  print_debug "Copying extra files"
-  cp -fr $EXTRA/* $DIRNAME
-fi
-
-# Dirs to be copied as-is
-for dir in data Docs include scripts share
-do
-  print_debug "Copying $dir to $DIRNAME/"
-  cp -fr $dir $DIRNAME
-done
-
-print_debug "Copying tests to $DIRNAME/examples/"
-cp -fr tests $DIRNAME/examples
-
-print_debug "Copying sql-bench to $DIRNAME/bench"
-mkdir $DIRNAME/bench
-cp -fr sql-bench/* $DIRNAME/bench
-
-print_debug "Copying mysql-test to $DIRNAME/mysql-test"
-mkdir $DIRNAME/mysql-test
-cp -fr mysql-test/* $DIRNAME/mysql-test
-
-print_debug "Copying support-files to $DIRNAME"
-cp support-files/* $DIRNAME
-
-# Files for bin
-for i in client_release/* client_debug/mysqld.exe lib_release/libmySQL.dll
-do
-  print_debug "Copying $i to $DIRNAME/bin"
-  cp $i $DIRNAME/bin
-done
-
-# Files for include
-for i in libmysql/libmysql.def libmysqld/libmysqld.def
-do
-  print_debug "Copying $i to $DIRNAME/include"
-  cp $i $DIRNAME/include
-done
-
-# Windows users are used to having dbug.h ?
-cp include/my_dbug.h $DIRNAME/include/dbug.h
-
-# Libraries found in lib_release and lib_debug
-for i in libmySQL.dll libmysql.lib zlib.lib mysqlclient.lib mysys.lib regex.lib strings.lib
-do
-  print_debug "Copying lib_release/$i to $DIRNAME/lib/opt"
-  cp lib_release/$i $DIRNAME/lib/opt
-  print_debug "Copying lib_debug/$i to $DIRNAME/lib/debug"
-  cp lib_debug/$i $DIRNAME/lib/debug
-done
-
-print_debug "Copying lib_release/mysys-max.lib to $DIRNAME/lib/opt"
-cp lib_release/mysys-max.lib $DIRNAME/lib/opt
-
-# Embedded server
-for i in libmysqld.dll libmysqld.lib libmysqld.exp
-do
-  print_debug "Copying lib_release/$i to $DIRNAME/Embedded/DLL/release"
-  cp lib_release/$i $DIRNAME/Embedded/DLL/release
-  print_debug "Copying lib_debug/$i to $DIRNAME/Embedded/DLL/debug"
-  cp lib_debug/$i $DIRNAME/Embedded/DLL/debug
-done
-
-# Static embedded
-print_debug "Copying lib_release/mysqlserver.lib to $DIRNAME/Embedded/static/release"
-cp lib_release/mysqlserver.lib $DIRNAME/Embedded/static/release
-
-# libmysqltest
-for i in mytest.c mytest.dsp mytest.dsw mytest.exe
-do
-  print_debug "Copying libmysqltest/release/$i to $DIRNAME/examples/libmysqltest"
-  cp libmysqltest/release/$i $DIRNAME/examples/libmysqltest
-done
-
-print_debug "Copying README.txt"
-cp README.txt $DIRNAME
-
-if [ -f MySQLEULA.txt ]; then
-  print_debug "Commercial version: copying MySQLEULA.txt"
-  cp MySQLEULA.txt $DIRNAME
-  rm $DIRNAME/Docs/COPYING
-else
-  print_debug "GPL version: copying COPYING"
-  cp Docs/COPYING $DIRNAME
-fi
-
-print_debug "Invoking zip to package the binary"
-zip -r mysql$SUFFIX-$version-win-noinstall.zip $DIRNAME
-
-print_debug "Deleting intermediate directory"
-rm -rf $DIRNAME
diff --git a/scripts/make_win_src_distribution.sh b/scripts/make_win_src_distribution.sh
index c79433f97c1cf5cb1883448cf6feea45411f46f9..0d2a8cdd5d793578b7442ae56cbf996e7f7940bb 100644
--- a/scripts/make_win_src_distribution.sh
+++ b/scripts/make_win_src_distribution.sh
@@ -202,7 +202,7 @@ copy_dir_files()
     for i in *.c *.cpp *.h *.ih *.i *.ic *.asm *.def *.hpp *.dsp *.dsw \
              README INSTALL* LICENSE AUTHORS NEWS ChangeLog \
              *.inc *.test *.result *.pem Moscow_leap des_key_file \
-             *.dat *.000001 *.require *.opt
+             *.vcproj *.sln *.dat *.000001 *.require *.opt
     do
       if [ -f $i ]
       then
@@ -343,7 +343,9 @@ mv $BASE/sql/sql_yacc.cpp-new $BASE/sql/sql_yacc.cpp
 # Search the tree for plain text files and adapt the line end marker
 #
 find $BASE \( -name "*.dsp" -o -name "*.dsw" -o -name "*.cnf" -o -name "*.ini" \
-           -o -name COPYING -o -name ChangeLog -o -name EXCEPTIONS-CLIENT -o -name "INSTALL*" -o -name LICENSE -o -name "README*" \) -type f -print \
+           -o -name COPYING -o -name ChangeLog -o -name EXCEPTIONS-CLIENT \
+           -o -name "INSTALL*" -o -name LICENSE -o -name "README*" \
+           -o -name "*.vcproj" -o -name "*.sln" \) -type f -print \
 | while read v
   do
     unix_to_dos $v
diff --git a/scripts/mysql_create_system_tables.sh b/scripts/mysql_create_system_tables.sh
index a3036b5c10ba5369bd4d31da14dee8f057910e4b..383f8b80dc8032e52d1405170f578eacb5f1d95c 100644
--- a/scripts/mysql_create_system_tables.sh
+++ b/scripts/mysql_create_system_tables.sh
@@ -683,7 +683,7 @@ then
   c_p="$c_p   security_type     enum('INVOKER','DEFINER') DEFAULT 'DEFINER' NOT NULL,"
   c_p="$c_p   param_list        blob DEFAULT '' NOT NULL,"
   c_p="$c_p   returns           char(64) DEFAULT '' NOT NULL,"
-  c_p="$c_p   body              blob DEFAULT '' NOT NULL,"
+  c_p="$c_p   body              longblob DEFAULT '' NOT NULL,"
   c_p="$c_p   definer           char(77) collate utf8_bin DEFAULT '' NOT NULL,"
   c_p="$c_p   created           timestamp,"
   c_p="$c_p   modified          timestamp,"
diff --git a/scripts/mysql_fix_privilege_tables.sql b/scripts/mysql_fix_privilege_tables.sql
index b93e0a47b1bec6c7078838ca542a5a827abf69e0..f67bab4451421f627eac7c9a9369fe80a44dc86f 100644
--- a/scripts/mysql_fix_privilege_tables.sql
+++ b/scripts/mysql_fix_privilege_tables.sql
@@ -426,7 +426,7 @@ CREATE TABLE IF NOT EXISTS proc (
   security_type     enum('INVOKER','DEFINER') DEFAULT 'DEFINER' NOT NULL,
   param_list        blob DEFAULT '' NOT NULL,
   returns           char(64) DEFAULT '' NOT NULL,
-  body              blob DEFAULT '' NOT NULL,
+  body              longblob DEFAULT '' NOT NULL,
   definer           char(77) collate utf8_bin DEFAULT '' NOT NULL,
   created           timestamp,
   modified          timestamp,
@@ -477,6 +477,7 @@ ALTER TABLE proc MODIFY name char(64) DEFAULT '' NOT NULL,
                              'READS_SQL_DATA',
                              'MODIFIES_SQL_DATA'
                             ) DEFAULT 'CONTAINS_SQL' NOT NULL,
+                 MODIFY body longblob DEFAULT '' NOT NULL,
                  MODIFY sql_mode
                         set('REAL_AS_FLOAT',
                             'PIPES_AS_CONCAT',
diff --git a/server-tools/instance-manager/IMService.cpp b/server-tools/instance-manager/IMService.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..e040a5da8c2432bf0ae8c6d4ec3dbe11479ac672
--- /dev/null
+++ b/server-tools/instance-manager/IMService.cpp
@@ -0,0 +1,71 @@
+#include <windows.h>
+#include "log.h"
+#include "options.h"
+#include "IMService.h"
+
+IMService::IMService(void)
+{
+  serviceName= "MySqlManager";
+  displayName= "MySQL Manager";
+}
+
+IMService::~IMService(void)
+{
+}
+
+void IMService::Stop()
+{
+  ReportStatus(SERVICE_STOP_PENDING);
+  // stop the IM work
+}
+
+void IMService::Run()
+{
+  // report to the SCM that we're about to start
+  ReportStatus((DWORD)SERVICE_START_PENDING);
+
+  // init goes here
+  ReportStatus((DWORD)SERVICE_RUNNING);
+
+  // wait for main loop to terminate
+}
+
+void IMService::Log(const char *msg)
+{
+  log_info(msg);
+}
+
+int HandleServiceOptions(Options options)
+{
+  int ret_val= 0;
+
+  IMService winService;
+
+  if (options.install_as_service)
+  {
+    if (winService.IsInstalled())
+      log_info("Service is already installed");
+    else if (winService.Install())
+      log_info("Service installed successfully");
+    else
+    {
+      log_info("Service failed to install");
+      ret_val= 1;
+    }
+  }
+  else if (options.remove_service)
+  {
+    if (! winService.IsInstalled())
+      log_info("Service is not installed");
+    else if (winService.Remove())
+      log_info("Service removed successfully");
+    else
+    {
+      log_info("Service failed to remove");
+      ret_val= 1;
+    }
+  }
+  else
+    ret_val= !winService.Init();
+  return ret_val;
+}
diff --git a/server-tools/instance-manager/IMService.h b/server-tools/instance-manager/IMService.h
new file mode 100644
index 0000000000000000000000000000000000000000..60c202fc5611c8497a27a02504373c70ed38f9c6
--- /dev/null
+++ b/server-tools/instance-manager/IMService.h
@@ -0,0 +1,14 @@
+#pragma once
+#include "windowsservice.h"
+
+class IMService : public WindowsService
+{
+public:
+  IMService(void);
+  ~IMService(void);
+
+protected:
+  void Log(const char *msg);
+  void Stop();
+  void Run();
+};
diff --git a/server-tools/instance-manager/Makefile.am b/server-tools/instance-manager/Makefile.am
index 68c9d5b7d18d398d8c7359278fed4a0b54d28fbc..4de0aac3d2375baebceacae1b2814700d8f6a5ac 100644
--- a/server-tools/instance-manager/Makefile.am
+++ b/server-tools/instance-manager/Makefile.am
@@ -77,7 +77,8 @@ mysqlmanager_SOURCES=	command.cc command.h mysqlmanager.cc \
 			buffer.h buffer.cc parse.cc parse.h \
 			guardian.cc guardian.h \
 			parse_output.cc parse_output.h \
-                        mysql_manager_error.h
+                        mysql_manager_error.h \
+                        portability.h
 
 mysqlmanager_LDADD=	liboptions.a \
 			libnet.a \
diff --git a/server-tools/instance-manager/WindowsService.cpp b/server-tools/instance-manager/WindowsService.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..fb7e00e0d9b2d6e4418d0db0cf311631457aac5a
--- /dev/null
+++ b/server-tools/instance-manager/WindowsService.cpp
@@ -0,0 +1,202 @@
+#include <windows.h>
+#include <assert.h>
+#include ".\windowsservice.h"
+
+static WindowsService *gService;
+
+WindowsService::WindowsService(void) :
+  statusCheckpoint(0),
+  serviceName(NULL),
+  inited(false),
+  dwAcceptedControls(SERVICE_ACCEPT_STOP)
+{
+  gService= this;
+  status.dwServiceType= SERVICE_WIN32_OWN_PROCESS;
+  status.dwServiceSpecificExitCode= 0;
+}
+
+WindowsService::~WindowsService(void)
+{
+}
+
+BOOL WindowsService::Install()
+{
+  bool ret_val= false;
+  SC_HANDLE newService;
+  SC_HANDLE scm;
+
+  if (IsInstalled()) return true;
+
+  // determine the name of the currently executing file
+  char szFilePath[_MAX_PATH];
+  GetModuleFileName(NULL, szFilePath, sizeof(szFilePath));
+
+  // open a connection to the SCM
+  if (!(scm= OpenSCManager(0, 0,SC_MANAGER_CREATE_SERVICE)))
+    return false;
+
+  newService= CreateService(scm, serviceName, displayName,
+                            SERVICE_ALL_ACCESS, SERVICE_WIN32_OWN_PROCESS,
+                            SERVICE_AUTO_START, SERVICE_ERROR_NORMAL,
+                            szFilePath, NULL, NULL, NULL, username,
+                            password);
+
+  if (newService)
+  {
+    CloseServiceHandle(newService);
+    ret_val= true;
+  }
+
+  CloseServiceHandle(scm);
+  return ret_val;
+}
+
+BOOL WindowsService::Init()
+{
+  assert(serviceName != NULL);
+
+  if (inited) return true;
+
+  SERVICE_TABLE_ENTRY stb[] =
+  {
+    { (LPSTR)serviceName, (LPSERVICE_MAIN_FUNCTION) ServiceMain},
+    { NULL, NULL }
+  };
+  inited= true;
+  return StartServiceCtrlDispatcher(stb); //register with the Service Manager
+}
+
+BOOL WindowsService::Remove()
+{
+  bool  ret_val= false;
+
+  if (! IsInstalled())
+    return true;
+
+  // open a connection to the SCM
+  SC_HANDLE scm= OpenSCManager(0, 0,SC_MANAGER_CREATE_SERVICE);
+  if (! scm)
+    return false;
+
+  SC_HANDLE service= OpenService(scm, serviceName, DELETE);
+  if (service)
+  {
+    if (DeleteService(service))
+      ret_val= true;
+    DWORD dw= ::GetLastError();
+    CloseServiceHandle(service);
+  }
+
+  CloseServiceHandle(scm);
+  return ret_val;
+}
+
+BOOL WindowsService::IsInstalled()
+{
+  BOOL ret_val= FALSE;
+
+  SC_HANDLE scm= ::OpenSCManager(NULL, NULL, SC_MANAGER_CONNECT);
+  SC_HANDLE serv_handle= ::OpenService(scm, serviceName, SERVICE_QUERY_STATUS);
+
+  ret_val= serv_handle != NULL;
+
+  ::CloseServiceHandle(serv_handle);
+  ::CloseServiceHandle(scm);
+
+  return ret_val;
+}
+
+void WindowsService::SetAcceptedControls(DWORD acceptedControls)
+{
+  dwAcceptedControls= acceptedControls;
+}
+
+
+BOOL WindowsService::ReportStatus(DWORD currentState, DWORD waitHint,
+                                  DWORD dwError)
+{
+  if(debugging) return TRUE;
+
+  if(currentState == SERVICE_START_PENDING)
+    status.dwControlsAccepted= 0;
+  else
+    status.dwControlsAccepted= dwAcceptedControls;
+
+  status.dwCurrentState= currentState;
+  status.dwWin32ExitCode= dwError != 0 ?
+    ERROR_SERVICE_SPECIFIC_ERROR : NO_ERROR;
+  status.dwWaitHint= waitHint;
+  status.dwServiceSpecificExitCode= dwError;
+
+  if(currentState == SERVICE_RUNNING || currentState == SERVICE_STOPPED)
+  {
+    status.dwCheckPoint= 0;
+    statusCheckpoint= 0;
+  }
+  else
+    status.dwCheckPoint= ++statusCheckpoint;
+
+  // Report the status of the service to the service control manager.
+  BOOL result= SetServiceStatus(statusHandle, &status);
+  if (!result)
+    Log("ReportStatus failed");
+
+  return result;
+}
+
+void WindowsService::RegisterAndRun(DWORD argc, LPTSTR *argv)
+{
+  statusHandle= ::RegisterServiceCtrlHandler(serviceName, ControlHandler);
+  if (statusHandle && ReportStatus(SERVICE_START_PENDING))
+    Run();
+  ReportStatus(SERVICE_STOPPED);
+}
+
+void WindowsService::HandleControlCode(DWORD opcode)
+{
+  // Handle the requested control code.
+  switch(opcode) {
+  case SERVICE_CONTROL_STOP:
+    // Stop the service.
+    status.dwCurrentState= SERVICE_STOP_PENDING;
+    Stop();
+    break;
+
+  case SERVICE_CONTROL_PAUSE:
+    status.dwCurrentState= SERVICE_PAUSE_PENDING;
+    Pause();
+    break;
+
+  case SERVICE_CONTROL_CONTINUE:
+    status.dwCurrentState= SERVICE_CONTINUE_PENDING;
+    Continue();
+    break;
+
+  case SERVICE_CONTROL_SHUTDOWN:
+    Shutdown();
+    break;
+
+  case SERVICE_CONTROL_INTERROGATE:
+    ReportStatus(status.dwCurrentState);
+    break;
+
+  default:
+    // invalid control code
+    break;
+  }
+}
+
+void WINAPI WindowsService::ServiceMain(DWORD argc, LPTSTR *argv)
+{
+  assert(gService != NULL);
+
+  // register our service control handler:
+  gService->RegisterAndRun(argc, argv);
+}
+
+void WINAPI WindowsService::ControlHandler(DWORD opcode)
+{
+  assert(gService != NULL);
+
+  return gService->HandleControlCode(opcode);
+}
diff --git a/server-tools/instance-manager/WindowsService.h b/server-tools/instance-manager/WindowsService.h
new file mode 100644
index 0000000000000000000000000000000000000000..612eeda21e970e7ca52d91a4982d15976c2cfa37
--- /dev/null
+++ b/server-tools/instance-manager/WindowsService.h
@@ -0,0 +1,43 @@
+#pragma once
+
+class WindowsService
+{
+protected:
+  bool                  inited;
+  const char            *serviceName;
+  const char            *displayName;
+  const char            *username;
+  const char            *password;
+  SERVICE_STATUS_HANDLE statusHandle;
+  DWORD                 statusCheckpoint;
+  SERVICE_STATUS        status;
+  DWORD                 dwAcceptedControls;
+  bool                  debugging;
+
+public:
+  WindowsService(void);
+  ~WindowsService(void);
+
+  BOOL  Install();
+  BOOL  Remove();
+  BOOL  Init();
+  BOOL  IsInstalled();
+  void  SetAcceptedControls(DWORD acceptedControls);
+  void  Debug(bool debugFlag) { debugging= debugFlag; }
+
+public:
+  static void WINAPI    ServiceMain(DWORD argc, LPTSTR *argv);
+  static void WINAPI    ControlHandler(DWORD CtrlType);
+
+protected:
+  virtual void Run()= 0;
+  virtual void Stop()                 {}
+  virtual void Shutdown()             {}
+  virtual void Pause()                {}
+  virtual void Continue()             {}
+  virtual void Log(const char *msg)   {}
+
+  BOOL ReportStatus(DWORD currentStatus, DWORD waitHint= 3000, DWORD dwError=0);
+  void HandleControlCode(DWORD opcode);
+  void RegisterAndRun(DWORD argc, LPTSTR *argv);
+};
diff --git a/server-tools/instance-manager/commands.cc b/server-tools/instance-manager/commands.cc
index ad9d46be1eda44448311cc8252b92b2650d75d20..0f801c8cc7eb17f38e485e2f814308fce3d20180 100644
--- a/server-tools/instance-manager/commands.cc
+++ b/server-tools/instance-manager/commands.cc
@@ -470,7 +470,8 @@ int Show_instance_log::execute(struct st_net *net, ulong connection_id)
       size_t buff_size;
       int read_len;
       /* calculate buffer size */
-      struct stat file_stat;
+      MY_STAT file_stat;
+      Buffer read_buff;
 
       /* my_fstat doesn't use the flag parameter */
       if (my_fstat(fd, &file_stat, MYF(0)))
@@ -478,13 +479,16 @@ int Show_instance_log::execute(struct st_net *net, ulong connection_id)
 
       buff_size= (size - offset);
 
+      read_buff.reserve(0, buff_size);
+
       /* read in one chunk */
       read_len= my_seek(fd, file_stat.st_size - size, MY_SEEK_SET, MYF(0));
 
-      char *bf= (char*) malloc(sizeof(char)*buff_size);
-      if ((read_len= my_read(fd, bf, buff_size, MYF(0))) < 0)
+      if ((read_len= my_read(fd, (byte*) read_buff.buffer,
+                             buff_size, MYF(0))) < 0)
         return ER_READ_FILE;
-      store_to_protocol_packet(&send_buff, (char*) bf, &position, read_len);
+      store_to_protocol_packet(&send_buff, read_buff.buffer,
+                               &position, read_len);
       close(fd);
     }
     else
@@ -605,7 +609,7 @@ int Show_instance_log_files::execute(struct st_net *net, ulong connection_id)
           store_to_protocol_packet(&send_buff, "", &position);
           store_to_protocol_packet(&send_buff, (char*) "0", &position);
         }
-        else if (S_ISREG(file_stat.st_mode))
+        else if (MY_S_ISREG(file_stat.st_mode))
         {
           store_to_protocol_packet(&send_buff,
                                    (char*) log_files->value,
@@ -693,7 +697,6 @@ int Set_option::correct_file(int skip)
 
   error= modify_defaults_file(Options::config_file, option,
                               option_value, instance_name, skip);
-
   switch (error)
   {
   case 0:
diff --git a/server-tools/instance-manager/guardian.cc b/server-tools/instance-manager/guardian.cc
index 404e9f34ab54693053e96f69a00beae89dc5c7ff..b8580711524299d201166c77993615ff608386db 100644
--- a/server-tools/instance-manager/guardian.cc
+++ b/server-tools/instance-manager/guardian.cc
@@ -25,6 +25,7 @@
 #include "instance.h"
 #include "mysql_manager_error.h"
 #include "log.h"
+#include "portability.h"
 
 #include <string.h>
 #include <sys/types.h>
@@ -32,7 +33,6 @@
 
 
 
-
 C_MODE_START
 
 pthread_handler_decl(guardian, arg)
@@ -424,13 +424,13 @@ int Guardian_thread::stop_instances(bool stop_instances_arg)
 }
 
 
-int Guardian_thread::lock()
+void Guardian_thread::lock()
 {
-  return pthread_mutex_lock(&LOCK_guardian);
+  pthread_mutex_lock(&LOCK_guardian); 
 }
 
 
-int Guardian_thread::unlock()
+void Guardian_thread::unlock()
 {
-  return pthread_mutex_unlock(&LOCK_guardian);
+  pthread_mutex_unlock(&LOCK_guardian);
 }
diff --git a/server-tools/instance-manager/guardian.h b/server-tools/instance-manager/guardian.h
index 502dc86b2ae2d781f5d949e93ed5ef5827b58cf4..e8992722f3c9552ae04094840cb4e25035f49da9 100644
--- a/server-tools/instance-manager/guardian.h
+++ b/server-tools/instance-manager/guardian.h
@@ -100,8 +100,8 @@ public:
   int stop_guard(Instance *instance);
   /* Returns true if guardian thread is stopped */
   int is_stopped();
-  int lock();
-  int unlock();
+  void lock();
+  void unlock();
 
 public:
   pthread_cond_t COND_guardian;
diff --git a/server-tools/instance-manager/instance.cc b/server-tools/instance-manager/instance.cc
index 2b25c74439e2fa6eb9117c00a4b21194e666e54e..dee3c2d4e380304f168087cc3e43a9e4e7e56470 100644
--- a/server-tools/instance-manager/instance.cc
+++ b/server-tools/instance-manager/instance.cc
@@ -18,14 +18,19 @@
 #pragma implementation
 #endif
 
+#ifdef __WIN__
+#include <process.h>
+#endif
 #include "instance.h"
 
 #include "mysql_manager_error.h"
 #include "log.h"
 #include "instance_map.h"
 #include "priv.h"
-
+#include "portability.h"
+#ifndef __WIN__
 #include <sys/wait.h>
+#endif
 #include <my_sys.h>
 #include <signal.h>
 #include <m_string.h>
@@ -50,6 +55,16 @@ pthread_handler_decl(proxy, arg)
 C_MODE_END
 
 
+void Instance::remove_pid()
+{
+  int pid;
+  if ((pid= options.get_pid()) != 0)          /* check the pidfile */
+    if (options.unlink_pidfile())             /* remove stalled pidfile */
+      log_error("cannot remove pidfile for instance %i, this might be \
+                since IM lacks permmissions or hasn't found the pidifle",
+                options.instance_name);
+}
+
 /*
   The method starts an instance.
 
@@ -65,8 +80,6 @@ C_MODE_END
 
 int Instance::start()
 {
-  pid_t pid;
-
   /* clear crash flag */
   pthread_mutex_lock(&LOCK_instance);
   crashed= 0;
@@ -75,11 +88,7 @@ int Instance::start()
 
   if (!is_running())
   {
-    if ((pid= options.get_pid()) != 0)          /* check the pidfile */
-      if (options.unlink_pidfile())             /* remove stalled pidfile */
-        log_error("cannot remove pidfile for instance %i, this might be \
-                  since IM lacks permmissions or hasn't found the pidifle",
-                  options.instance_name);
+    remove_pid();
 
     /*
       No need to monitor this thread in the Thread_registry, as all
@@ -107,19 +116,19 @@ int Instance::start()
   return ER_INSTANCE_ALREADY_STARTED;
 }
 
-
-void Instance::fork_and_monitor()
+#ifndef __WIN__
+int Instance::launch_and_wait()
 {
-  pid_t pid;
-  log_info("starting instance %s", options.instance_name);
-  switch (pid= fork()) {
+  pid_t pid= fork();
+
+  switch (pid) {
   case 0:
     execv(options.mysqld_path, options.argv);
     /* exec never returns */
     exit(1);
   case -1:
     log_info("cannot fork() to start instance %s", options.instance_name);
-    return;
+    return -1;
   default:
     /*
       Here we wait for the child created. This process differs for systems
@@ -141,24 +150,88 @@ void Instance::fork_and_monitor()
       wait(NULL);                               /* LinuxThreads were detected */
     else
       waitpid(pid, NULL, 0);
-    /* set instance state to crashed */
-    pthread_mutex_lock(&LOCK_instance);
-    crashed= 1;
-    pthread_mutex_unlock(&LOCK_instance);
+  }
+  return 0;
+}
+#else
+int Instance::launch_and_wait()
+{
+  STARTUPINFO si;
+  PROCESS_INFORMATION pi;
 
-    /*
-      Wake connection threads waiting for an instance to stop. This
-      is needed if a user issued command to stop an instance via
-      mysql connection. This is not the case if Guardian stop the thread.
-    */
-    pthread_cond_signal(&COND_instance_stopped);
-    /* wake guardian */
-    pthread_cond_signal(&instance_map->guardian->COND_guardian);
-    /* thread exits */
-    return;
+  ZeroMemory(&si, sizeof(si));
+  si.cb= sizeof(si);
+  ZeroMemory(&pi, sizeof(pi));
+
+  int cmdlen= 0;
+  for (int i= 1; options.argv[i] != 0; i++)
+    cmdlen+= strlen(options.argv[i]) + 1;
+  cmdlen++;  // we have to add a single space for CreateProcess (read the docs)
+
+  char *cmdline= NULL;
+  if (cmdlen > 0)
+  {
+    cmdline= new char[cmdlen];
+    cmdline[0]= 0;
+    for (int i= 1; options.argv[i] != 0; i++)
+    {
+      strcat(cmdline, " ");
+      strcat(cmdline, options.argv[i]);
+    }
   }
-  /* we should never end up here */
-  DBUG_ASSERT(0);
+
+  // Start the child process.
+  BOOL result= CreateProcess(options.mysqld_path,    // file to execute
+                             cmdline,    // Command line.
+                             NULL,       // Process handle not inheritable.
+                             NULL,       // Thread handle not inheritable.
+                             FALSE,      // Set handle inheritance to FALSE.
+                             0,          // No creation flags.
+                             NULL,       // Use parent's environment block.
+                             NULL,       // Use parent's starting directory.
+                             &si,        // Pointer to STARTUPINFO structure.
+                             &pi );      // Pointer to PROCESS_INFORMATION structure.
+  delete cmdline;
+  if (! result)
+    return -1;
+
+  // Wait until child process exits.
+  WaitForSingleObject(pi.hProcess, INFINITE);
+
+  DWORD exitcode;
+  ::GetExitCodeProcess(pi.hProcess, &exitcode);
+
+  // Close process and thread handles.
+  CloseHandle(pi.hProcess);
+  CloseHandle(pi.hThread);
+
+  return exitcode;
+}
+#endif
+
+
+void Instance::fork_and_monitor()
+{
+  log_info("starting instance %s", options.instance_name);
+
+  if (launch_and_wait())
+    return;                                     /* error is logged */
+
+  /* set instance state to crashed */
+  pthread_mutex_lock(&LOCK_instance);
+  crashed= 1;
+  pthread_mutex_unlock(&LOCK_instance);
+
+  /*
+    Wake connection threads waiting for an instance to stop. This
+    is needed if a user issued command to stop an instance via
+    mysql connection. This is not the case if Guardian stop the thread.
+  */
+  pthread_cond_signal(&COND_instance_stopped);
+  /* wake guardian */
+  pthread_cond_signal(&instance_map->guardian->COND_guardian);
+  /* thread exits */
+  return;
 }
 
 
@@ -191,9 +264,9 @@ bool Instance::is_running()
   MYSQL mysql;
   uint port= 0;
   const char *socket= NULL;
-  const char *password= "check_connection";
-  const char *username= "MySQL_Instance_Manager";
-  const char *access_denied_message= "Access denied for user";
+  static const char *password= "check_connection";
+  static const char *username= "MySQL_Instance_Manager";
+  static const char *access_denied_message= "Access denied for user";
   bool return_val;
 
   if (options.mysqld_port)
@@ -222,15 +295,8 @@ bool Instance::is_running()
     return_val= TRUE;                           /* server is alive */
   }
   else
-  {
-    if (!strncmp(access_denied_message, mysql_error(&mysql),
-                 sizeof(access_denied_message)-1))
-    {
-      return_val= TRUE;
-    }
-    else
-      return_val= FALSE;
-  }
+    return_val= test(!strncmp(access_denied_message, mysql_error(&mysql),
+                              sizeof(access_denied_message) - 1));
 
   mysql_close(&mysql);
   pthread_mutex_unlock(&LOCK_instance);
@@ -253,7 +319,6 @@ bool Instance::is_running()
 
 int Instance::stop()
 {
-  pid_t pid;
   struct timespec timeout;
   uint waitchild= (uint)  DEFAULT_SHUTDOWN_DELAY;
 
@@ -290,6 +355,68 @@ err:
   return ER_STOP_INSTANCE;
 }
 
+#ifdef __WIN__
+
+BOOL SafeTerminateProcess(HANDLE hProcess, UINT uExitCode)
+{
+  DWORD dwTID, dwCode, dwErr= 0;
+  HANDLE hProcessDup= INVALID_HANDLE_VALUE;
+  HANDLE hRT= NULL;
+  HINSTANCE hKernel= GetModuleHandle("Kernel32");
+  BOOL bSuccess= FALSE;
+
+  BOOL bDup= DuplicateHandle(GetCurrentProcess(),
+                             hProcess, GetCurrentProcess(), &hProcessDup,
+                             PROCESS_ALL_ACCESS, FALSE, 0);
+
+  // Detect the special case where the process is
+  // already dead...
+  if (GetExitCodeProcess((bDup) ? hProcessDup : hProcess, &dwCode) &&
+      (dwCode == STILL_ACTIVE))
+  {
+    FARPROC pfnExitProc;
+
+    pfnExitProc= GetProcAddress(hKernel, "ExitProcess");
+
+    hRT= CreateRemoteThread((bDup) ? hProcessDup : hProcess, NULL, 0,
+                            (LPTHREAD_START_ROUTINE)pfnExitProc,
+                            (PVOID)uExitCode, 0, &dwTID);
+
+    if (hRT == NULL)
+      dwErr= GetLastError();
+  }
+  else
+    dwErr= ERROR_PROCESS_ABORTED;
+
+  if (hRT)
+  {
+    // Must wait process to terminate to
+    // guarantee that it has exited...
+    WaitForSingleObject((bDup) ? hProcessDup : hProcess, INFINITE);
+
+    CloseHandle(hRT);
+    bSuccess= TRUE;
+  }
+
+  if (bDup)
+    CloseHandle(hProcessDup);
+
+  if (!bSuccess)
+    SetLastError(dwErr);
+
+  return bSuccess;
+}
+
+int kill(pid_t pid, int signum)
+{
+  HANDLE processhandle= ::OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);
+  if (signum == SIGTERM)
+    ::SafeTerminateProcess(processhandle, 0);
+  else
+    ::TerminateProcess(processhandle, -1);
+  return 0;
+}
+#endif
 
 void Instance::kill_instance(int signum)
 {
diff --git a/server-tools/instance-manager/instance.h b/server-tools/instance-manager/instance.h
index 39a2b8ee846eade8104381d2e74378b9086d3742..0ff5ecc179e22a736720619e43222c24084aacb0 100644
--- a/server-tools/instance-manager/instance.h
+++ b/server-tools/instance-manager/instance.h
@@ -61,6 +61,9 @@ private:
   */
   pthread_cond_t COND_instance_stopped;
   Instance_map *instance_map;
+
+  void  remove_pid();
+  int   launch_and_wait();
 };
 
 #endif /* INCLUDES_MYSQL_INSTANCE_MANAGER_INSTANCE_H */
diff --git a/server-tools/instance-manager/instance_map.cc b/server-tools/instance-manager/instance_map.cc
index 7356d79e27a901a4a566d97eeaa78da06391218f..69eadd7e7652c97eff8213a680875ce6a58fa25b 100644
--- a/server-tools/instance-manager/instance_map.cc
+++ b/server-tools/instance-manager/instance_map.cc
@@ -137,15 +137,15 @@ Instance_map::~Instance_map()
 }
 
 
-int Instance_map::lock()
+void Instance_map::lock()
 {
-  return pthread_mutex_lock(&LOCK_instance_map);
+  pthread_mutex_lock(&LOCK_instance_map);
 }
 
 
-int Instance_map::unlock()
+void Instance_map::unlock()
 {
-  return pthread_mutex_unlock(&LOCK_instance_map);
+  pthread_mutex_unlock(&LOCK_instance_map);
 }
 
 
diff --git a/server-tools/instance-manager/instance_map.h b/server-tools/instance-manager/instance_map.h
index 666a16c7040c19a348c5a73af2eb372cfdaae5da..47037e0d43392e4ddf5496fb2fff9e385953c269 100644
--- a/server-tools/instance-manager/instance_map.h
+++ b/server-tools/instance-manager/instance_map.h
@@ -60,8 +60,8 @@ public:
   Instance *find(const char *name, uint name_len);
 
   int flush_instances();
-  int lock();
-  int unlock();
+  void lock();
+  void unlock();
   int init();
 
   Instance_map(const char *default_mysqld_path_arg);
diff --git a/server-tools/instance-manager/instance_options.h b/server-tools/instance-manager/instance_options.h
index 9dac8b39bdcafe72e8d28e6c681d48b7dac4e6eb..dc62d277a438ad186815185c310129181112106c 100644
--- a/server-tools/instance-manager/instance_options.h
+++ b/server-tools/instance-manager/instance_options.h
@@ -19,6 +19,7 @@
 #include <my_global.h>
 #include <my_sys.h>
 #include "parse.h"
+#include "portability.h"
 
 #ifdef __GNUC__
 #pragma interface
diff --git a/server-tools/instance-manager/listener.cc b/server-tools/instance-manager/listener.cc
index 4aed18c753dca7384bef5b5f510d9282aa793e00..790770be09e569efa5ababb00da7fcc23a515162 100644
--- a/server-tools/instance-manager/listener.cc
+++ b/server-tools/instance-manager/listener.cc
@@ -19,11 +19,13 @@
 #endif
 
 #include "listener.h"
-
+#include "priv.h"
 #include <m_string.h>
 #include <mysql.h>
 #include <violite.h>
+#ifndef __WIN__
 #include <sys/un.h>
+#endif
 #include <sys/stat.h>
 
 #include "thread_registry.h"
@@ -31,7 +33,7 @@
 #include "instance_map.h"
 #include "log.h"
 #include "mysql_connection.h"
-#include "priv.h"
+#include "portability.h"
 
 
 /*
@@ -45,10 +47,17 @@ public:
   ~Listener_thread();
   void run();
 private:
+  static const int LISTEN_BACK_LOG_SIZE= 5;     /* standard backlog size */
   ulong total_connection_count;
   Thread_info thread_info;
+
+  int     sockets[2];
+  int     num_sockets;
+  fd_set  read_fds;
 private:
   void handle_new_mysql_connection(Vio *vio);
+  int   create_tcp_socket();
+  int   create_unix_socket(struct sockaddr_un &unix_socket_address);
 };
 
 
@@ -57,6 +66,7 @@ Listener_thread::Listener_thread(const Listener_thread_args &args) :
                        args.instance_map)
   ,total_connection_count(0)
   ,thread_info(pthread_self())
+  ,num_sockets(0)
 {
 }
 
@@ -78,30 +88,139 @@ Listener_thread::~Listener_thread()
 
 void Listener_thread::run()
 {
-  enum { LISTEN_BACK_LOG_SIZE = 5 };            // standard backlog size
-  int flags;
-  int arg= 1;                             /* value to be set by setsockopt */
-  int unix_socket;
-  uint im_port;
+  int n= 0;
+
+#ifndef __WIN__
   /* we use this var to check whether we are running on LinuxThreads */
   pid_t thread_pid;
 
   thread_pid= getpid();
+
+  struct sockaddr_un unix_socket_address;
   /* set global variable */
   linuxthreads= (thread_pid != manager_pid);
+#endif
 
   thread_registry.register_thread(&thread_info);
 
   my_thread_init();
 
+  FD_ZERO(&read_fds);
+
   /* I. prepare 'listen' sockets */
+  if (create_tcp_socket())
+    goto err;
+
+#ifndef __WIN__
+  if (create_unix_socket(unix_socket_address))
+    goto err;
+#endif
+
+  /* II. Listen sockets and spawn childs */
+  for (int i= 0; i < num_sockets; i++)
+    n= max(n, sockets[i]);
+  n++;
+
+  while (!thread_registry.is_shutdown())
+  {
+    fd_set read_fds_arg= read_fds;
+
+    /*
+      When using valgrind 2.0 this syscall doesn't get kicked off by a
+      signal during shutdown. This results in failing assert
+      (Thread_registry::~Thread_registry). Valgrind 2.2 works fine.
+    */
+    int rc= select(n, &read_fds_arg, 0, 0, 0);
+
+
+    if (rc == -1 && errno != EINTR)
+    {
+      log_error("Listener_thread::run(): select() failed, %s",
+                strerror(errno));
+      continue;
+    }
+
+
+    for (int socket_index= 0; socket_index < num_sockets; socket_index++)
+    {
+      /* Assuming that rc > 0 as we asked to wait forever */
+      if (FD_ISSET(sockets[socket_index], &read_fds_arg))
+      {
+        int client_fd= accept(sockets[socket_index], 0, 0);
+        /* accept may return -1 (failure or spurious wakeup) */
+        if (client_fd >= 0)                    // connection established
+        {
+          Vio *vio= vio_new(client_fd, socket_index == 0 ?
+                            VIO_TYPE_SOCKET : VIO_TYPE_TCPIP,
+                            socket_index == 0 ? 1 : 0);
+          if (vio != 0)
+            handle_new_mysql_connection(vio);
+          else
+          {
+            shutdown(client_fd, SHUT_RDWR);
+            close(client_fd);
+          }
+        }
+      }
+    }
+  }
+
+  /* III. Release all resources and exit */
+
+  log_info("Listener_thread::run(): shutdown requested, exiting...");
+
+  for (int i= 0; i < num_sockets; i++)
+    close(sockets[i]);
+
+#ifndef __WIN__
+  unlink(unix_socket_address.sun_path);
+#endif
+
+  thread_registry.unregister_thread(&thread_info);
+  my_thread_end();
+  return;
+
+err:
+  // we have to close the ip sockets in case of error
+  for (int i= 0; i < num_sockets; i++)
+    close(sockets[i]);
+
+  thread_registry.unregister_thread(&thread_info);
+  thread_registry.request_shutdown();
+  my_thread_end();
+  return;
+}
+
+void set_non_blocking(int socket)
+{
+#ifndef __WIN__
+  int flags= fcntl(socket, F_GETFL, 0);
+  fcntl(socket, F_SETFL, flags | O_NONBLOCK);
+#else
+  u_long arg= 1;
+  ioctlsocket(socket, FIONBIO, &arg);
+#endif
+}
+
+void set_no_inherit(int socket)
+{
+#ifndef __WIN__
+  int flags= fcntl(socket, F_GETFD, 0);
+  fcntl(socket, F_SETFD, flags | FD_CLOEXEC);
+#endif
+}
+
+int Listener_thread::create_tcp_socket()
+{
+  /* value to be set by setsockopt */
+  int arg= 1;
 
   int ip_socket= socket(AF_INET, SOCK_STREAM, 0);
   if (ip_socket == INVALID_SOCKET)
   {
     log_error("Listener_thead::run(): socket(AF_INET) failed, %s",
               strerror(errno));
-    goto err;
+    return -1;
   }
 
   struct sockaddr_in ip_socket_address;
@@ -115,14 +234,14 @@ void Listener_thread::run()
   }
   else
     im_bind_addr= htonl(INADDR_ANY);
-  im_port= options.port_number;
+  uint im_port= options.port_number;
 
   ip_socket_address.sin_family= AF_INET;
-  ip_socket_address.sin_addr.s_addr = im_bind_addr;
+  ip_socket_address.sin_addr.s_addr= im_bind_addr;
 
 
   ip_socket_address.sin_port= (unsigned short)
-                              htons((unsigned short) im_port);
+    htons((unsigned short) im_port);
 
   setsockopt(ip_socket, SOL_SOCKET, SO_REUSEADDR, (char*) &arg, sizeof(arg));
   if (bind(ip_socket, (struct sockaddr *) &ip_socket_address,
@@ -130,154 +249,87 @@ void Listener_thread::run()
   {
     log_error("Listener_thread::run(): bind(ip socket) failed, '%s'",
               strerror(errno));
-   goto err;
+    close(ip_socket);
+    return -1;
   }
 
   if (listen(ip_socket, LISTEN_BACK_LOG_SIZE))
   {
     log_error("Listener_thread::run(): listen(ip socket) failed, %s",
               strerror(errno));
-    goto err;
+    close(ip_socket);
+    return -1;
   }
-      /* set the socket nonblocking */
-  flags= fcntl(ip_socket, F_GETFL, 0);
-  fcntl(ip_socket, F_SETFL, flags | O_NONBLOCK);
-    /* make sure that instances won't be listening our sockets */
-  flags= fcntl(ip_socket, F_GETFD, 0);
-  fcntl(ip_socket, F_SETFD, flags | FD_CLOEXEC);
 
+  /* set the socket nonblocking */
+  set_non_blocking(ip_socket);
+
+  /* make sure that instances won't be listening our sockets */
+  set_no_inherit(ip_socket);
+
+  FD_SET(ip_socket, &read_fds);
+  sockets[num_sockets++]= ip_socket;
   log_info("accepting connections on ip socket");
+  return 0;
+}
 
-  /*--------------------------------------------------------------*/
-  unix_socket= socket(AF_UNIX, SOCK_STREAM, 0);
+#ifndef __WIN__
+int Listener_thread::
+create_unix_socket(struct sockaddr_un &unix_socket_address)
+{
+  int unix_socket= socket(AF_UNIX, SOCK_STREAM, 0);
   if (unix_socket == INVALID_SOCKET)
   {
     log_error("Listener_thead::run(): socket(AF_UNIX) failed, %s",
               strerror(errno));
-    goto err;
+    return -1;
   }
 
-  struct sockaddr_un unix_socket_address;
   bzero(&unix_socket_address, sizeof(unix_socket_address));
 
   unix_socket_address.sun_family= AF_UNIX;
   strmake(unix_socket_address.sun_path, options.socket_file_name,
           sizeof(unix_socket_address.sun_path));
-  unlink(unix_socket_address.sun_path); /* in case we have stale socket file */
+  unlink(unix_socket_address.sun_path); // in case we have stale socket file
 
+  /*
+    POSIX specifies default permissions for a pathname created by bind
+    to be 0777. We need everybody to have access to the socket.
+  */
+  mode_t old_mask= umask(0);
+  if (bind(unix_socket, (struct sockaddr *) &unix_socket_address,
+           sizeof(unix_socket_address)))
   {
-    /*
-      POSIX specifies default permissions for a pathname created by bind
-      to be 0777. We need everybody to have access to the socket.
-    */
-    mode_t old_mask= umask(0);
-    if (bind(unix_socket, (struct sockaddr *) &unix_socket_address,
-             sizeof(unix_socket_address)))
-    {
-      log_error("Listener_thread::run(): bind(unix socket) failed, "
-                "socket file name is '%s', error '%s'",
-                unix_socket_address.sun_path, strerror(errno));
-      goto err;
-    }
-    umask(old_mask);
-
-    if (listen(unix_socket, LISTEN_BACK_LOG_SIZE))
-    {
-      log_error("Listener_thread::run(): listen(unix socket) failed, %s",
-                strerror(errno));
-      goto err;
-    }
-
-      /* set the socket nonblocking */
-    flags= fcntl(unix_socket, F_GETFL, 0);
-    fcntl(unix_socket, F_SETFL, flags | O_NONBLOCK);
-      /* make sure that instances won't be listening our sockets */
-    flags= fcntl(unix_socket, F_GETFD, 0);
-    fcntl(unix_socket, F_SETFD, flags | FD_CLOEXEC);
+    log_error("Listener_thread::run(): bind(unix socket) failed, "
+              "socket file name is '%s', error '%s'",
+              unix_socket_address.sun_path, strerror(errno));
+    close(unix_socket);
+    return -1;
   }
-  log_info("accepting connections on unix socket %s",
-           unix_socket_address.sun_path);
 
-  /* II. Listen sockets and spawn childs */
+  umask(old_mask);
 
+  if (listen(unix_socket, LISTEN_BACK_LOG_SIZE))
   {
-    int n= max(unix_socket, ip_socket) + 1;
-    fd_set read_fds;
-
-    FD_ZERO(&read_fds);
-    FD_SET(unix_socket, &read_fds);
-    FD_SET(ip_socket, &read_fds);
-
-    while (thread_registry.is_shutdown() == false)
-    {
-      fd_set read_fds_arg= read_fds;
-
-      /*
-        When using valgrind 2.0 this syscall doesn't get kicked off by a
-        signal during shutdown. This results in failing assert
-        (Thread_registry::~Thread_registry). Valgrind 2.2 works fine.
-      */
-      int rc= select(n, &read_fds_arg, 0, 0, 0);
-
-
-      if (rc == -1 && errno != EINTR)
-        log_error("Listener_thread::run(): select() failed, %s",
-                  strerror(errno));
-      else
-      {
-        /* Assuming that rc > 0 as we asked to wait forever */
-        if (FD_ISSET(unix_socket, &read_fds_arg))
-        {
-          int client_fd= accept(unix_socket, 0, 0);
-          /* accept may return -1 (failure or spurious wakeup) */
-          if (client_fd >= 0)                    // connection established
-          {
-            if (Vio *vio= vio_new(client_fd, VIO_TYPE_SOCKET, 1))
-              handle_new_mysql_connection(vio);
-            else
-            {
-              shutdown(client_fd, SHUT_RDWR);
-              close(client_fd);
-            }
-          }
-        }
-        else if (FD_ISSET(ip_socket, &read_fds_arg))
-        {
-          int client_fd= accept(ip_socket, 0, 0);
-          /* accept may return -1 (failure or spurious wakeup) */
-          if (client_fd >= 0)                    // connection established
-          {
-            if (Vio *vio= vio_new(client_fd, VIO_TYPE_TCPIP, 0))
-              handle_new_mysql_connection(vio);
-            else
-            {
-              shutdown(client_fd, SHUT_RDWR);
-              close(client_fd);
-            }
-          }
-        }
-      }
-    }
+    log_error("Listener_thread::run(): listen(unix socket) failed, %s",
+              strerror(errno));
+    close(unix_socket);
+    return -1;
   }
 
-  /* III. Release all resources and exit */
+  /* set the socket nonblocking */
+  set_non_blocking(unix_socket);
 
-  log_info("Listener_thread::run(): shutdown requested, exiting...");
+  /* make sure that instances won't be listening our sockets */
+  set_no_inherit(unix_socket);
 
-  close(unix_socket);
-  close(ip_socket);
-  unlink(unix_socket_address.sun_path);
-
-  thread_registry.unregister_thread(&thread_info);
-  my_thread_end();
-  return;
-
-err:
-  thread_registry.unregister_thread(&thread_info);
-  thread_registry.request_shutdown();
-  my_thread_end();
-  return;
+  log_info("accepting connections on unix socket %s",
+           unix_socket_address.sun_path);
+  sockets[num_sockets++]= unix_socket;
+  FD_SET(unix_socket, &read_fds);
+  return 0;
 }
+#endif
 
 
 /*
diff --git a/server-tools/instance-manager/listener.h b/server-tools/instance-manager/listener.h
index 7a8af49e2b34cdfca4c587dbb4d2977d6e16ecaa..67a090c3aa2b92b4608f94d4978d5666f06c0bfe 100644
--- a/server-tools/instance-manager/listener.h
+++ b/server-tools/instance-manager/listener.h
@@ -31,7 +31,7 @@ pthread_handler_decl(listener, arg);
 C_MODE_END
 
 class Thread_registry;
-class Options;
+struct Options;
 class User_map;
 class Instance_map;
 
diff --git a/server-tools/instance-manager/log.cc b/server-tools/instance-manager/log.cc
index 3c18d2816bf94ead721680f120ce5d42e87f92a4..3f54bc0649a9132dff10543fd4e4d6702d999de2 100644
--- a/server-tools/instance-manager/log.cc
+++ b/server-tools/instance-manager/log.cc
@@ -17,7 +17,7 @@
 #include <my_global.h>
 
 #include "log.h"
-
+#include "portability.h"
 #include <stdarg.h>
 #include <m_string.h>
 #include <my_sys.h>
diff --git a/server-tools/instance-manager/manager.cc b/server-tools/instance-manager/manager.cc
index 2bb887716b03767ea0643f6de31f8d634328ba2d..09d30e1312fbbd360caa0c1e8b60fbbcf927f1a0 100644
--- a/server-tools/instance-manager/manager.cc
+++ b/server-tools/instance-manager/manager.cc
@@ -30,7 +30,9 @@
 #include <m_string.h>
 #include <signal.h>
 #include <thr_alarm.h>
+#ifndef __WIN__
 #include <sys/wait.h>
+#endif
 
 
 static int create_pid_file(const char *pid_file_name)
@@ -50,6 +52,60 @@ static int create_pid_file(const char *pid_file_name)
   return 0;
 }
 
+#ifndef __WIN__
+void set_signals(sigset_t *mask)
+{
+  /* block signals */
+  sigemptyset(mask);
+  sigaddset(mask, SIGINT);
+  sigaddset(mask, SIGTERM);
+  sigaddset(mask, SIGPIPE);
+  sigaddset(mask, SIGHUP);
+  signal(SIGPIPE, SIG_IGN);
+
+  /*
+    We want this signal to be blocked in all theads but the signal
+    one. It is needed for the thr_alarm subsystem to work.
+  */
+  sigaddset(mask,THR_SERVER_ALARM);
+
+  /* all new threads will inherite this signal mask */
+  pthread_sigmask(SIG_BLOCK, mask, NULL);
+
+  /*
+     In our case the signal thread also implements functions of alarm thread.
+     Here we init alarm thread functionality. We suppose that we won't have
+     more then 10 alarms at the same time.
+  */
+  init_thr_alarm(10);
+}
+#else
+
+bool have_signal;
+
+void onsignal(int signo)
+{
+  have_signal= true;
+}
+
+void set_signals(sigset_t *set)
+{
+  signal(SIGINT, onsignal);
+  signal(SIGTERM, onsignal);
+  have_signal= false;
+}
+
+int my_sigwait(const sigset_t *set, int *sig)
+{
+  while (!have_signal)
+  {
+    Sleep(100);
+  }
+  return 0;
+}
+
+#endif
+
 
 /*
   manager - entry point to the main instance manager process: start
@@ -98,21 +154,8 @@ void manager(const Options &options)
   if (create_pid_file(options.pid_file_name))
     return;
 
-  /* block signals */
   sigset_t mask;
-  sigemptyset(&mask);
-  sigaddset(&mask, SIGINT);
-  sigaddset(&mask, SIGTERM);
-  sigaddset(&mask, SIGPIPE);
-  sigaddset(&mask, SIGHUP);
-  /*
-    We want this signal to be blocked in all theads but the signal
-    one. It is needed for the thr_alarm subsystem to work.
-  */
-  sigaddset(&mask,THR_SERVER_ALARM);
-
-  /* all new threads will inherite this signal mask */
-  pthread_sigmask(SIG_BLOCK, &mask, NULL);
+  set_signals(&mask);
 
   /* create the listener */
   {
@@ -166,12 +209,7 @@ void manager(const Options &options)
   bool shutdown_complete;
 
   shutdown_complete= FALSE;
-  /*
-     In our case the signal thread also implements functions of alarm thread.
-     Here we init alarm thread functionality. We suppose that we won't have
-     more then 10 alarms at the same time.
-  */
-  init_thr_alarm(10);
+
   /* init list of guarded instances */
   guardian_thread.lock();
 
@@ -185,8 +223,6 @@ void manager(const Options &options)
   */
   pthread_cond_signal(&guardian_thread.COND_guardian);
 
-  signal(SIGPIPE, SIG_IGN);
-
   while (!shutdown_complete)
   {
     int status= 0;
@@ -197,25 +233,23 @@ void manager(const Options &options)
       goto err;
     }
 
-    switch (signo) {
-      case THR_SERVER_ALARM:
-        process_alarm(signo);
-      break;
-      default:
+#ifndef __WIN__
+    if (THR_SERVER_ALARM == signo)
+      process_alarm(signo);
+    else
+#endif
+    {
+      if (!guardian_thread.is_stopped())
+      {
+        bool stop_instances= true;
+        guardian_thread.request_shutdown(stop_instances);
+        pthread_cond_signal(&guardian_thread.COND_guardian);
+      }
+      else
       {
-        if (!guardian_thread.is_stopped())
-        {
-          bool stop_instances= true;
-          guardian_thread.request_shutdown(stop_instances);
-          pthread_cond_signal(&guardian_thread.COND_guardian);
-        }
-        else
-        {
-          thread_registry.deliver_shutdown();
-          shutdown_complete= TRUE;
-        }
+        thread_registry.deliver_shutdown();
+        shutdown_complete= TRUE;
       }
-      break;
     }
   }
 
@@ -223,8 +257,10 @@ err:
   /* delete the pid file */
   my_delete(options.pid_file_name, MYF(0));
 
+#ifndef __WIN__
   /* free alarm structures */
   end_thr_alarm(1);
   /* don't pthread_exit to kill all threads who did not shut down in time */
+#endif
 }
 
diff --git a/server-tools/instance-manager/manager.h b/server-tools/instance-manager/manager.h
index d73f4b35f184c03749240fca53a0e9324c3d1f0b..12ed6b3b1ff275ad9ecfc7a43741a701cc755105 100644
--- a/server-tools/instance-manager/manager.h
+++ b/server-tools/instance-manager/manager.h
@@ -16,7 +16,7 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
-class Options;
+struct Options;
 
 void manager(const Options &options);
 
diff --git a/server-tools/instance-manager/mysqlmanager.cc b/server-tools/instance-manager/mysqlmanager.cc
index 8693b3c590fef8eb2f8647836d99d5de8b0ef06a..a1420a639cbc645d4f71a4d3feafe9224ecfe9d0 100644
--- a/server-tools/instance-manager/mysqlmanager.cc
+++ b/server-tools/instance-manager/mysqlmanager.cc
@@ -23,12 +23,16 @@
 #include <my_sys.h>
 #include <string.h>
 #include <signal.h>
+#ifndef __WIN__
 #include <pwd.h>
 #include <grp.h>
 #include <sys/wait.h>
+#endif
 #include <sys/types.h>
 #include <sys/stat.h>
-
+#ifdef __WIN__
+#include "windowsservice.h"
+#endif
 
 /*
   Few notes about Instance Manager architecture:
@@ -55,10 +59,14 @@
 */
 
 static void init_environment(char *progname);
+#ifndef __WIN__
 static void daemonize(const char *log_file_name);
 static void angel(const Options &options);
 static struct passwd *check_user(const char *user);
 static int set_user(const char *user, struct passwd *user_info);
+#else
+int HandleServiceOptions(Options options);
+#endif
 
 
 /*
@@ -71,6 +79,7 @@ static int set_user(const char *user, struct passwd *user_info);
 
 int main(int argc, char *argv[])
 {
+  int return_value= 1;
   init_environment(argv[0]);
   Options options;
   struct passwd *user_info;
@@ -78,13 +87,11 @@ int main(int argc, char *argv[])
   if (options.load(argc, argv))
     goto err;
 
+#ifndef __WIN__
   if ((user_info= check_user(options.user)))
   {
       if (set_user(options.user, user_info))
-      {
-        options.cleanup();
         goto err;
-      }
   }
 
   if (options.run_as_service)
@@ -94,22 +101,29 @@ int main(int argc, char *argv[])
     /* forks again, and returns only in child: parent becomes angel */
     angel(options);
   }
+#else
+#ifdef NDEBUG
+  return_value= HandleServiceOptions(options);
+  goto err;   /* this is not always an error but we reuse the label */
+#endif
+#endif
+
   manager(options);
-  options.cleanup();
-  my_end(0);
-  return 0;
+  return_value= 0;
+
 err:
+  options.cleanup();
   my_end(0);
-  return 1;
+  return return_value;
 }
 
 /******************* Auxilary functions implementation **********************/
 
+#if !defined(__WIN__) && !defined(OS2) && !defined(__NETWARE__)
 /* Change to run as another user if started with --user */
 
 static struct passwd *check_user(const char *user)
 {
-#if !defined(__WIN__) && !defined(OS2) && !defined(__NETWARE__)
   struct passwd *user_info;
   uid_t user_id= geteuid();
 
@@ -150,7 +164,6 @@ static struct passwd *check_user(const char *user)
 
 err:
   log_error("Fatal error: Can't change to run as user '%s' ;  Please check that the user exists!\n", user);
-#endif
   return NULL;
 }
 
@@ -172,7 +185,7 @@ static int set_user(const char *user, struct passwd *user_info)
   }
   return 0;
 }
-
+#endif
 
 
 /*
@@ -188,6 +201,7 @@ static void init_environment(char *progname)
 }
 
 
+#ifndef __WIN__
 /*
   Become a UNIX service
   SYNOPSYS
@@ -342,3 +356,4 @@ spawn:
   }
 }
 
+#endif
diff --git a/server-tools/instance-manager/mysqlmanager.vcproj b/server-tools/instance-manager/mysqlmanager.vcproj
new file mode 100644
index 0000000000000000000000000000000000000000..2ab9a4878c10e7dc17797ac1c1163f46f417112d
--- /dev/null
+++ b/server-tools/instance-manager/mysqlmanager.vcproj
@@ -0,0 +1,295 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="mysqlmanager"
+	ProjectGUID="{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="Debug"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\include"
+				PreprocessorDefinitions="MYSQL_INSTANCE_MANAGER;MYSQL_SERVER;_DEBUG;SAFEMALLOC;SAFE_MUTEX;_WINDOWS;CONSOLE"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="FALSE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="4"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib"
+				OutputFile="$(OutDir)/mysqlmanager.exe"
+				LinkIncremental="2"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile="$(OutDir)/mysqlmanager.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="Release"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="..\include"
+				PreprocessorDefinitions="MYSQL_INSTANCE_MANAGER;MYSQL_SERVER;_WINDOWS;CONSOLE"
+				ExceptionHandling="FALSE"
+				RuntimeLibrary="0"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wsock32.lib"
+				OutputFile="$(OutDir)/mysqlmanager.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\buffer.cc">
+			</File>
+			<File
+				RelativePath="..\sql\client.c">
+			</File>
+			<File
+				RelativePath=".\command.cc">
+			</File>
+			<File
+				RelativePath=".\commands.cc">
+			</File>
+			<File
+				RelativePath=".\factory.cc">
+			</File>
+			<File
+				RelativePath="..\libmysql\get_password.c">
+			</File>
+			<File
+				RelativePath=".\guardian.cc">
+			</File>
+			<File
+				RelativePath=".\IMService.cpp">
+			</File>
+			<File
+				RelativePath=".\instance.cc">
+			</File>
+			<File
+				RelativePath=".\instance_map.cc">
+			</File>
+			<File
+				RelativePath=".\instance_options.cc">
+			</File>
+			<File
+				RelativePath=".\listener.cc">
+			</File>
+			<File
+				RelativePath=".\log.cc">
+			</File>
+			<File
+				RelativePath=".\manager.cc">
+			</File>
+			<File
+				RelativePath=".\messages.cc">
+			</File>
+			<File
+				RelativePath="..\sql\mini_client_errors.c">
+			</File>
+			<File
+				RelativePath=".\mysql_connection.cc">
+			</File>
+			<File
+				RelativePath=".\mysqlmanager.cc">
+			</File>
+			<File
+				RelativePath="..\sql\net_serv.cpp">
+			</File>
+			<File
+				RelativePath=".\options.cc">
+			</File>
+			<File
+				RelativePath="..\sql\pack.c">
+			</File>
+			<File
+				RelativePath=".\parse.cc">
+			</File>
+			<File
+				RelativePath=".\parse_output.cc">
+			</File>
+			<File
+				RelativePath="..\sql\password.c">
+			</File>
+			<File
+				RelativePath=".\priv.cc">
+			</File>
+			<File
+				RelativePath=".\protocol.cc">
+			</File>
+			<File
+				RelativePath=".\service_funcs.cpp">
+			</File>
+			<File
+				RelativePath="..\sql\sql_state.c">
+			</File>
+			<File
+				RelativePath=".\thread_registry.cc">
+			</File>
+			<File
+				RelativePath=".\user_map.cc">
+			</File>
+			<File
+				RelativePath=".\WindowsService.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+			<File
+				RelativePath=".\buffer.h">
+			</File>
+			<File
+				RelativePath=".\command.h">
+			</File>
+			<File
+				RelativePath=".\commands.h">
+			</File>
+			<File
+				RelativePath=".\factory.h">
+			</File>
+			<File
+				RelativePath=".\guardian.h">
+			</File>
+			<File
+				RelativePath=".\IMService.h">
+			</File>
+			<File
+				RelativePath=".\instance.h">
+			</File>
+			<File
+				RelativePath=".\instance_map.h">
+			</File>
+			<File
+				RelativePath=".\instance_options.h">
+			</File>
+			<File
+				RelativePath=".\listener.h">
+			</File>
+			<File
+				RelativePath=".\log.h">
+			</File>
+			<File
+				RelativePath=".\manager.h">
+			</File>
+			<File
+				RelativePath=".\messages.h">
+			</File>
+			<File
+				RelativePath=".\mysql_connection.h">
+			</File>
+			<File
+				RelativePath=".\mysql_manager_error.h">
+			</File>
+			<File
+				RelativePath=".\options.h">
+			</File>
+			<File
+				RelativePath=".\parse.h">
+			</File>
+			<File
+				RelativePath=".\parse_output.h">
+			</File>
+			<File
+				RelativePath=".\portability.h">
+			</File>
+			<File
+				RelativePath=".\priv.h">
+			</File>
+			<File
+				RelativePath=".\protocol.h">
+			</File>
+			<File
+				RelativePath=".\thread_registry.h">
+			</File>
+			<File
+				RelativePath=".\user_map.h">
+			</File>
+			<File
+				RelativePath=".\WindowsService.h">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/server-tools/instance-manager/options.cc b/server-tools/instance-manager/options.cc
index 34a9a0792e9d466c1b8df972afd1143b4cc82806..6fd11471fc667ce9a136b5b1ac3630e8e9ce73de 100644
--- a/server-tools/instance-manager/options.cc
+++ b/server-tools/instance-manager/options.cc
@@ -21,7 +21,7 @@
 #include "options.h"
 
 #include "priv.h"
-
+#include "portability.h"
 #include <my_sys.h>
 #include <my_getopt.h>
 #include <m_string.h>
@@ -30,19 +30,30 @@
 #define QUOTE2(x) #x
 #define QUOTE(x) QUOTE2(x)
 
+#ifdef __WIN__
+char Options::install_as_service;
+char Options::remove_service;
+char windows_config_file[FN_REFLEN];
+char default_password_file_name[FN_REFLEN];
+char default_log_file_name[FN_REFLEN];
+const char *Options::config_file= windows_config_file;
+#else
 char Options::run_as_service;
-const char *Options::log_file_name= QUOTE(DEFAULT_LOG_FILE_NAME);
+const char *Options::user= 0;                   /* No default value */
+const char *default_password_file_name= QUOTE(DEFAULT_PASSWORD_FILE_NAME);
+const char *default_log_file_name= QUOTE(DEFAULT_LOG_FILE_NAME);
+const char *Options::config_file= QUOTE(DEFAULT_CONFIG_FILE);
+#endif
+const char *Options::log_file_name= default_log_file_name;
 const char *Options::pid_file_name= QUOTE(DEFAULT_PID_FILE_NAME);
 const char *Options::socket_file_name= QUOTE(DEFAULT_SOCKET_FILE_NAME);
-const char *Options::password_file_name= QUOTE(DEFAULT_PASSWORD_FILE_NAME);
+const char *Options::password_file_name= default_password_file_name;
 const char *Options::default_mysqld_path= QUOTE(DEFAULT_MYSQLD_PATH);
-const char *Options::config_file= QUOTE(DEFAULT_CONFIG_FILE);
 const char *Options::bind_address= 0;           /* No default value */
-const char *Options::user= 0;                   /* No default value */
 uint Options::monitoring_interval= DEFAULT_MONITORING_INTERVAL;
 uint Options::port_number= DEFAULT_PORT;
 /* just to declare */
-char **Options::saved_argv;
+char **Options::saved_argv= NULL;
 
 /*
   List of options, accepted by the instance manager.
@@ -55,8 +66,13 @@ enum options {
   OPT_SOCKET,
   OPT_PASSWORD_FILE,
   OPT_MYSQLD_PATH,
+#ifndef __WIN__
   OPT_RUN_AS_SERVICE,
   OPT_USER,
+#else
+  OPT_INSTALL_SERVICE,
+  OPT_REMOVE_SERVICE,
+#endif
   OPT_MONITORING_INTERVAL,
   OPT_PORT,
   OPT_BIND_ADDRESS
@@ -97,28 +113,36 @@ static struct my_option my_long_options[] =
     0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
 
   { "default-mysqld-path", OPT_MYSQLD_PATH, "Where to look for MySQL"
-                                            " Server binary.",
-    (gptr *) &Options::default_mysqld_path, (gptr *) &Options::default_mysqld_path,
+    " Server binary.",
+    (gptr *) &Options::default_mysqld_path,
+    (gptr *) &Options::default_mysqld_path,
     0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
 
-  { "monitoring-interval", OPT_MONITORING_INTERVAL, "Interval to monitor instances"
-                                            " in seconds.",
-                   (gptr *) &Options::monitoring_interval,
-                   (gptr *) &Options::monitoring_interval,
-                   0, GET_UINT, REQUIRED_ARG, DEFAULT_MONITORING_INTERVAL,
-                   0, 0, 0, 0, 0 },
-
+  { "monitoring-interval", OPT_MONITORING_INTERVAL, "Interval to monitor"
+    " instances in seconds.",
+    (gptr *) &Options::monitoring_interval,
+    (gptr *) &Options::monitoring_interval,
+    0, GET_UINT, REQUIRED_ARG, DEFAULT_MONITORING_INTERVAL,
+    0, 0, 0, 0, 0 },
+#ifdef __WIN__
+  { "install", OPT_INSTALL_SERVICE, "Install as system service.",
+    (gptr *) &Options::install_as_service, (gptr*) &Options::install_as_service,
+    0, GET_BOOL, NO_ARG, 0, 0, 1, 0, 0, 0 },
+  { "remove", OPT_REMOVE_SERVICE, "Remove system service.",
+    (gptr *)&Options::remove_service, (gptr*) &Options::remove_service,
+    0, GET_BOOL, NO_ARG, 0, 0, 1, 0, 0, 0},
+#else
   { "run-as-service", OPT_RUN_AS_SERVICE,
     "Daemonize and start angel process.", (gptr *) &Options::run_as_service,
     0, 0, GET_BOOL, NO_ARG, 0, 0, 1, 0, 0, 0 },
 
   { "user", OPT_USER, "Username to start mysqlmanager",
-                   (gptr *) &Options::user,
-                   (gptr *) &Options::user,
-                   0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
-
+    (gptr *) &Options::user,
+    (gptr *) &Options::user,
+    0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
+#endif
   { "version", 'V', "Output version information and exit.", 0, 0, 0,
-   GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 },
+    GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 },
 
   { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 }
 };
@@ -233,12 +257,17 @@ int Options::load(int argc, char **argv)
     {
       /* the log is not enabled yet */
       fprintf(stderr, "The --defaults-extra-file and --no-defaults options"
-                      " are not supported by\n"
-                      "Instance Manager. Program aborted.\n");
+              " are not supported by\n"
+              "Instance Manager. Program aborted.\n");
       goto err;
     }
   }
 
+#ifdef __WIN__
+  if (setup_windows_defaults())
+    goto err;
+#endif
+
   /* config-file options are prepended to command-line ones */
   load_defaults(config_file, default_groups, &argc,
                 &saved_argv);
@@ -256,5 +285,32 @@ err:
 void Options::cleanup()
 {
   /* free_defaults returns nothing */
-  free_defaults(Options::saved_argv);
+  if (Options::saved_argv != NULL)
+    free_defaults(Options::saved_argv);
 }
+
+#ifdef __WIN__
+
+int Options::setup_windows_defaults()
+{
+  if (!GetModuleFileName(NULL, default_password_file_name,
+                         sizeof(default_password_file_name)))
+    return 1;
+  char *filename= strstr(default_password_file_name, ".exe");
+  strcpy(filename, ".passwd");
+ 
+  if (!GetModuleFileName(NULL, default_log_file_name,
+                         sizeof(default_log_file_name)))
+    return 1;
+  filename= strstr(default_log_file_name, ".exe");
+  strcpy(filename, ".log");
+
+  if (!GetModuleFileName(NULL, windows_config_file,
+                         sizeof(windows_config_file)))
+    return 1;
+  char *slash= strrchr(windows_config_file, '\\');
+  strcpy(slash, "\\my.ini");
+  return 0;
+}
+
+#endif
diff --git a/server-tools/instance-manager/options.h b/server-tools/instance-manager/options.h
index 761d366dfb4d3e715b01bd9072ab0ab66160c885..5cc14e7ee7fd563122edfd6e4d3758f95e9091a0 100644
--- a/server-tools/instance-manager/options.h
+++ b/server-tools/instance-manager/options.h
@@ -28,13 +28,18 @@
 
 struct Options
 {
+#ifdef __WIN__
+  static char install_as_service;
+  static char remove_service;
+#else
   static char run_as_service;        /* handle_options doesn't support bool */
+  static const char *user;
+#endif
   static const char *log_file_name;
   static const char *pid_file_name;
   static const char *socket_file_name;
   static const char *password_file_name;
   static const char *default_mysqld_path;
-  static const char *user;
   /* the option which should be passed to process_default_option_files */
   static uint monitoring_interval;
   static uint port_number;
@@ -44,8 +49,11 @@ struct Options
   /* argv pointer returned by load_defaults() to be used by free_defaults() */
   static char **saved_argv;
 
-  static int load(int argc, char **argv);
+  int load(int argc, char **argv);
   void cleanup();
+#ifdef __WIN__
+  int setup_windows_defaults(const char *progname);
+#endif
 };
 
 #endif // INCLUDES_MYSQL_INSTANCE_MANAGER_OPTIONS_H
diff --git a/server-tools/instance-manager/parse_output.cc b/server-tools/instance-manager/parse_output.cc
index e83a75c67787e61bc617333a11615dd56a291b6a..98074c47d64ee9f8d1de48c899874b03053558ce 100644
--- a/server-tools/instance-manager/parse_output.cc
+++ b/server-tools/instance-manager/parse_output.cc
@@ -21,6 +21,7 @@
 #include <stdio.h>
 #include <my_sys.h>
 #include <m_string.h>
+#include "portability.h"
 
 
 /*
diff --git a/server-tools/instance-manager/portability.h b/server-tools/instance-manager/portability.h
new file mode 100644
index 0000000000000000000000000000000000000000..133d99eb111de0738cae07eb15df2658152d6928
--- /dev/null
+++ b/server-tools/instance-manager/portability.h
@@ -0,0 +1,25 @@
+#ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_PORTABILITY_H
+#define INCLUDES_MYSQL_INSTANCE_MANAGER_PORTABILITY_H
+
+#ifdef __WIN__
+
+#define vsnprintf _vsnprintf
+
+#define SIGKILL 9
+#define SHUT_RDWR 0x2
+
+//TODO:  fix this
+#define DEFAULT_MONITORING_INTERVAL 20
+#define DEFAULT_PORT 2273
+#define PROTOCOL_VERSION 10
+
+typedef int pid_t;
+
+#undef popen
+#define popen(A,B) _popen(A,B)
+
+#endif /* __WIN__ */
+
+#endif  /* INCLUDES_MYSQL_INSTANCE_MANAGER_PORTABILITY_H */
+
+
diff --git a/server-tools/instance-manager/priv.cc b/server-tools/instance-manager/priv.cc
index dd192370aafa48e450f0e541f1f99221e383e2e7..02a788ec469ea85b495c3c809c07d60fe3b0e454 100644
--- a/server-tools/instance-manager/priv.cc
+++ b/server-tools/instance-manager/priv.cc
@@ -14,7 +14,9 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
+#include <my_global.h>
 #include "priv.h"
+#include "portability.h"
 
 /* the pid of the manager process (of the signal thread on the LinuxThreads) */
 pid_t manager_pid;
diff --git a/server-tools/instance-manager/priv.h b/server-tools/instance-manager/priv.h
index decc3605dffcafae33afd87bf8135b126e9267d5..ce9d54293c7247b33efff400dcac44f2233e36ff 100644
--- a/server-tools/instance-manager/priv.h
+++ b/server-tools/instance-manager/priv.h
@@ -17,17 +17,23 @@
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
 #include <sys/types.h>
+#ifdef __WIN__
+#include "portability.h"
+#else
 #include <unistd.h>
+#endif
 
 
 /* the pid of the manager process (of the signal thread on the LinuxThreads) */
 extern pid_t manager_pid;
 
+#ifndef __WIN__
 /*
   This flag is set if mysqlmanager has detected that it is running on the
   system using LinuxThreads
 */
 extern bool linuxthreads;
+#endif
 
 extern const char mysqlmanager_version[];
 extern const int mysqlmanager_version_length;
diff --git a/server-tools/instance-manager/protocol.cc b/server-tools/instance-manager/protocol.cc
index 4b46d091c3f20912987f87364f10782fa248088f..cd1be805b6b04cab8c13a77e70706707acde9313 100644
--- a/server-tools/instance-manager/protocol.cc
+++ b/server-tools/instance-manager/protocol.cc
@@ -203,7 +203,7 @@ int send_fields(struct st_net *net, LIST *fields)
     position+= 12;
     if (my_net_write(net, send_buff.buffer, (uint) position+1))
       goto err;
-    tmp= rest(tmp);
+    tmp= list_rest(tmp);
   }
 
   if (my_net_write(net, eof_buff, 1))
diff --git a/server-tools/instance-manager/thread_registry.cc b/server-tools/instance-manager/thread_registry.cc
index 16821df4146801c3c1954415caf440c9b52d4ea3..0d47664a89af2b880c06013b42c9aa44f25bedb2 100644
--- a/server-tools/instance-manager/thread_registry.cc
+++ b/server-tools/instance-manager/thread_registry.cc
@@ -27,6 +27,7 @@
 #include <thr_alarm.h>
 
 
+#ifndef __WIN__
 /* Kick-off signal handler */
 
 enum { THREAD_KICK_OFF_SIGNAL= SIGUSR2 };
@@ -34,7 +35,7 @@ enum { THREAD_KICK_OFF_SIGNAL= SIGUSR2 };
 static void handle_signal(int __attribute__((unused)) sig_no)
 {
 }
-
+#endif
 
 /*
   TODO: think about moving signal information (now it's shutdown_in_progress)
@@ -76,12 +77,13 @@ Thread_registry::~Thread_registry()
 
 void Thread_registry::register_thread(Thread_info *info)
 {
+#ifndef __WIN__
   struct sigaction sa;
   sa.sa_handler= handle_signal;
   sa.sa_flags= 0;
   sigemptyset(&sa.sa_mask);
   sigaction(THREAD_KICK_OFF_SIGNAL, &sa, 0);
-
+#endif
   info->current_cond= 0;
 
   pthread_mutex_lock(&LOCK_thread_registry);
@@ -156,6 +158,7 @@ void Thread_registry::deliver_shutdown()
   pthread_mutex_lock(&LOCK_thread_registry);
   shutdown_in_progress= true;
 
+#ifndef __WIN__
   /* to stop reading from the network we need to flush alarm queue */
   end_thr_alarm(0);
   /*
@@ -163,6 +166,8 @@ void Thread_registry::deliver_shutdown()
     stopped alarm processing.
   */
   process_alarm(THR_SERVER_ALARM);
+#endif
+
   for (info= head.next; info != &head; info= info->next)
   {
     pthread_kill(info->thread_id, THREAD_KICK_OFF_SIGNAL);
diff --git a/server-tools/instance-manager/user_map.cc b/server-tools/instance-manager/user_map.cc
index 7cb2cd67d7f8026f38f26c9e5c4f7bc69e146cd1..4e47127bba10615d58dc7fe46c80d3ba24d1b13d 100644
--- a/server-tools/instance-manager/user_map.cc
+++ b/server-tools/instance-manager/user_map.cc
@@ -15,7 +15,7 @@
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
 #ifdef __GNUC__
-#pragma interface 
+#pragma interface
 #endif
 
 #include "user_map.h"
@@ -37,6 +37,7 @@ struct User
 int User::init(const char *line)
 {
   const char *name_begin, *name_end, *password;
+  int line_ending_len= 1;
 
   if (line[0] == '\'' || line[0] == '"')
   {
@@ -58,8 +59,14 @@ int User::init(const char *line)
   if (user_length > USERNAME_LENGTH)
     goto err;
 
-  /* assume that newline characater is present */
-  if (strlen(password) != SCRAMBLED_PASSWORD_CHAR_LENGTH + 1)
+  /*
+    assume that newline characater is present
+    we support reading password files that end in \n or \r\n on
+    either platform.
+  */
+  if (password[strlen(password)-2] == '\r')
+    line_ending_len= 2;
+  if (strlen(password) != SCRAMBLED_PASSWORD_CHAR_LENGTH + line_ending_len)
     goto err;
 
   memcpy(user, name_begin, user_length);
@@ -95,7 +102,7 @@ C_MODE_END
 
 int User_map::init()
 {
-  enum { START_HASH_SIZE = 16 };
+  enum { START_HASH_SIZE= 16 };
   if (hash_init(&hash, default_charset_info, START_HASH_SIZE, 0, 0,
       get_user_key, delete_user, 0))
     return 1;
diff --git a/sql-common/client.c b/sql-common/client.c
index 4ecc8d26fc72a95accdac6f4a4bb11e46d220c26..993978f132f005c95336d468a5a9910971b83815 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -713,8 +713,9 @@ void free_old_query(MYSQL *mysql)
   if (mysql->fields)
     free_root(&mysql->field_alloc,MYF(0));
   init_alloc_root(&mysql->field_alloc,8192,0); /* Assume rowlength < 8192 */
-  mysql->fields=0;
-  mysql->field_count=0;				/* For API */
+  mysql->fields= 0;
+  mysql->field_count= 0;			/* For API */
+  mysql->info= 0;
   DBUG_VOID_RETURN;
 }
 
@@ -2206,14 +2207,22 @@ my_bool mysql_reconnect(MYSQL *mysql)
   tmp_mysql.rpl_pivot = mysql->rpl_pivot;
   if (!mysql_real_connect(&tmp_mysql,mysql->host,mysql->user,mysql->passwd,
 			  mysql->db, mysql->port, mysql->unix_socket,
-			  mysql->client_flag | CLIENT_REMEMBER_OPTIONS) ||
-      mysql_set_character_set(&tmp_mysql, mysql->charset->csname))
+			  mysql->client_flag | CLIENT_REMEMBER_OPTIONS))
   {
     mysql->net.last_errno= tmp_mysql.net.last_errno;
     strmov(mysql->net.last_error, tmp_mysql.net.last_error);
     strmov(mysql->net.sqlstate, tmp_mysql.net.sqlstate);
     DBUG_RETURN(1);
   }
+  if (mysql_set_character_set(&tmp_mysql, mysql->charset->csname))
+  {
+    mysql_close(&tmp_mysql);
+    mysql->net.last_errno= tmp_mysql.net.last_errno;
+    strmov(mysql->net.last_error, tmp_mysql.net.last_error);
+    strmov(mysql->net.sqlstate, tmp_mysql.net.sqlstate);
+    DBUG_RETURN(1);
+  }
+
   tmp_mysql.reconnect= 1;
   tmp_mysql.free_me= mysql->free_me;
 
diff --git a/sql-common/my_time.c b/sql-common/my_time.c
index c00c0e7be8345b28898b6a5f9d0017196183beb7..72809ee9b4ba007cc91fd1d14feebd55eb3b780c 100644
--- a/sql-common/my_time.c
+++ b/sql-common/my_time.c
@@ -60,11 +60,11 @@ uint calc_days_in_year(uint year)
 
   SYNOPSIS
     check_date()
-      ltime         - Date to check.
-      not_zero_date - ltime is not the zero date
-      flags         - flags to check
-      was_cut       - set to whether the value was truncated
-
+      ltime          Date to check.
+      not_zero_date  ltime is not the zero date
+      flags          flags to check
+      was_cut        set to 2 if value was truncated.
+		     NOTE: This is not touched if value was not truncated
   NOTES
     Here we assume that year and month is ok !
     If month is 0 we allow any date. (This only happens if we allow zero
@@ -75,10 +75,9 @@ uint calc_days_in_year(uint year)
     1  error
 */
 
-bool check_date(const MYSQL_TIME *ltime, bool not_zero_date, ulong flags,
-                int *was_cut)
+static my_bool check_date(const MYSQL_TIME *ltime, my_bool not_zero_date,
+                          ulong flags, int *was_cut)
 {
-
   if (not_zero_date)
   {
     if ((((flags & TIME_NO_ZERO_IN_DATE) || !(flags & TIME_FUZZY_DATE)) &&
@@ -165,11 +164,11 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
   uint date[MAX_DATE_PARTS], date_len[MAX_DATE_PARTS];
   uint add_hours= 0, start_loop;
   ulong not_zero_date, allow_space;
-  bool is_internal_format;
+  my_bool is_internal_format;
   const char *pos, *last_field_pos;
   const char *end=str+length;
   const uchar *format_position;
-  bool found_delimitier= 0, found_space= 0;
+  my_bool found_delimitier= 0, found_space= 0;
   uint frac_pos, frac_len;
   DBUG_ENTER("str_to_datetime");
   DBUG_PRINT("ENTER",("str: %.*s",length,str));
@@ -198,7 +197,9 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
     If length= 8 or >= 14 then year is of format YYYY.
     (YYYY-MM-DD,  YYYYMMDD, YYYYYMMDDHHMMSS)
   */
-  for (pos=str; pos != end && my_isdigit(&my_charset_latin1,*pos) ; pos++)
+  for (pos=str;
+       pos != end && (my_isdigit(&my_charset_latin1,*pos) || *pos == 'T');
+       pos++)
     ;
 
   digits= (uint) (pos-str);
@@ -208,7 +209,7 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
   {
     /* Found date in internal format (only numbers like YYYYMMDD) */
     year_length= (digits == 4 || digits == 8 || digits >= 14) ? 4 : 2;
-    field_length=year_length-1;
+    field_length= year_length;
     is_internal_format= 1;
     format_position= internal_format_positions;
   }
@@ -238,6 +239,8 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
         start_loop= 5;                         /* Start with first date part */
       }
     }
+
+    field_length= format_position[0] == 0 ? 4 : 2;
   }
 
   /*
@@ -262,7 +265,7 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
     const char *start= str;
     ulong tmp_value= (uint) (uchar) (*str++ - '0');
     while (str != end && my_isdigit(&my_charset_latin1,str[0]) &&
-           (!is_internal_format || field_length--))
+           (!is_internal_format || --field_length))
     {
       tmp_value=tmp_value*10 + (ulong) (uchar) (*str - '0');
       str++;
@@ -276,8 +279,8 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
     date[i]=tmp_value;
     not_zero_date|= tmp_value;
 
-    /* Length-1 of next field */
-    field_length= format_position[i+1] == 0 ? 3 : 1;
+    /* Length of next field */
+    field_length= format_position[i+1] == 0 ? 4 : 2;
 
     if ((last_field_pos= str) == end)
     {
@@ -295,7 +298,7 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
       if (*str == '.')                          /* Followed by part seconds */
       {
         str++;
-        field_length= 5;                        /* 5 digits after first (=6) */
+        field_length= 6;                        /* 6 digits */
       }
       continue;
 
@@ -472,12 +475,12 @@ err:
      1  error
 */
 
-bool str_to_time(const char *str, uint length, MYSQL_TIME *l_time,
-                 int *was_cut)
+my_bool str_to_time(const char *str, uint length, MYSQL_TIME *l_time,
+                    int *was_cut)
 {
   long date[5],value;
   const char *end=str+length, *end_of_days;
-  bool found_days,found_hours;
+  my_bool found_days,found_hours;
   uint state;
 
   l_time->neg=0;
@@ -644,7 +647,7 @@ void init_time(void)
   time_t seconds;
   struct tm *l_time,tm_tmp;
   MYSQL_TIME my_time;
-  bool not_used;
+  my_bool not_used;
 
   seconds= (time_t) time((time_t*) 0);
   localtime_r(&seconds,&tm_tmp);
@@ -710,7 +713,8 @@ long calc_daynr(uint year,uint month,uint day)
     Time in UTC seconds since Unix Epoch representation.
 */
 my_time_t 
-my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone, bool *in_dst_time_gap)
+my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone,
+                  my_bool *in_dst_time_gap)
 {
   uint loop;
   time_t tmp;
@@ -961,11 +965,10 @@ longlong number_to_datetime(longlong nr, MYSQL_TIME *time_res,
     return nr;
 
   /* Don't want to have was_cut get set if NO_ZERO_DATE was violated. */
-  if (!nr && flags & TIME_NO_ZERO_DATE)
+  if (!nr && (flags & TIME_NO_ZERO_DATE))
     return LL(-1);
 
  err:
-
   *was_cut= 1;
   return LL(-1);
 }
diff --git a/sql/field.cc b/sql/field.cc
index 3fdd7ab45e6817866692b95cc5f61e2f0b50b7da..224b6c279f3689ea0b23e5ac01d8512c1c96c770 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -4468,7 +4468,7 @@ int Field_timestamp::store(const char *from,uint len,CHARSET_INFO *cs)
   my_time_t tmp= 0;
   int error;
   bool have_smth_to_conv;
-  bool in_dst_time_gap;
+  my_bool in_dst_time_gap;
   THD *thd= table->in_use;
 
   /* We don't want to store invalid or fuzzy datetime values in TIMESTAMP */
@@ -4539,14 +4539,14 @@ int Field_timestamp::store(longlong nr)
   TIME l_time;
   my_time_t timestamp= 0;
   int error;
-  bool in_dst_time_gap;
+  my_bool in_dst_time_gap;
   THD *thd= table->in_use;
 
   /* We don't want to store invalid or fuzzy datetime values in TIMESTAMP */
   longlong tmp= number_to_datetime(nr, &l_time, (thd->variables.sql_mode &
                                                  MODE_NO_ZERO_DATE) |
                                    MODE_NO_ZERO_IN_DATE, &error);
-  if (tmp < 0)
+  if (tmp == LL(-1))
   {
     error= 2;
   }
@@ -5215,7 +5215,7 @@ int Field_date::store(longlong nr)
                                            MODE_NO_ZERO_DATE |
                                            MODE_INVALID_DATES))), &error);
 
-  if (nr < 0)
+  if (nr == LL(-1))
   {
     nr= 0;
     error= 2;
@@ -5391,12 +5391,12 @@ int Field_newdate::store(longlong nr)
   TIME l_time;
   longlong tmp;
   int error;
-  if ((tmp= number_to_datetime(nr, &l_time,
-                               (TIME_FUZZY_DATE |
-                                (table->in_use->variables.sql_mode &
-                                 (MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE |
-                                  MODE_INVALID_DATES))),
-                               &error) < 0))
+  if (number_to_datetime(nr, &l_time,
+                         (TIME_FUZZY_DATE |
+                          (table->in_use->variables.sql_mode &
+                           (MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE |
+                            MODE_INVALID_DATES))),
+                         &error) == LL(-1))
   {
     tmp= 0L;
     error= 2;
@@ -5593,7 +5593,7 @@ int Field_datetime::store(longlong nr)
                                            MODE_NO_ZERO_DATE |
                                            MODE_INVALID_DATES))), &error);
 
-  if (nr < 0)
+  if (nr == LL(-1))
   {
     nr= 0;
     error= 2;
@@ -7846,7 +7846,10 @@ int Field_bit::store(const char *from, uint length, CHARSET_INFO *cs)
   {
     set_rec_bits(0xff, bit_ptr, bit_ofs, bit_len);
     memset(ptr, 0xff, field_length);
-    set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
+    if (table->in_use->really_abort_on_warning())
+      set_warning(MYSQL_ERROR::WARN_LEVEL_ERROR, ER_DATA_TOO_LONG, 1);
+    else
+      set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
     return 1;
   }
   /* delta is >= -1 here */
@@ -8063,7 +8066,10 @@ int Field_bit_as_char::store(const char *from, uint length, CHARSET_INFO *cs)
     memset(ptr, 0xff, field_length);
     if (bits)
       *ptr&= ((1 << bits) - 1); /* set first byte */
-    set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
+    if (table->in_use->really_abort_on_warning())
+      set_warning(MYSQL_ERROR::WARN_LEVEL_ERROR, ER_DATA_TOO_LONG, 1);
+    else
+      set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
     return 1;
   }
   bzero(ptr, delta);
@@ -8462,7 +8468,10 @@ create_field::create_field(Field *old_field,Field *orig_field)
   def=0;
   if (!(flags & (NO_DEFAULT_VALUE_FLAG | BLOB_FLAG)) &&
       !old_field->is_real_null() &&
-      old_field->ptr && orig_field)
+      old_field->ptr && orig_field &&
+      (sql_type != FIELD_TYPE_TIMESTAMP ||                /* set def only if */
+       old_field->table->timestamp_field != old_field ||  /* timestamp field */ 
+       unireg_check == Field::TIMESTAMP_UN_FIELD))        /* has default val */
   {
     char buff[MAX_FIELD_WIDTH],*pos;
     String tmp(buff,sizeof(buff), charset), *res;
diff --git a/sql/field.h b/sql/field.h
index 523cf444c30d0e208c5ee7cb997c264e0dd2e08a..2b67ed3f599772e4b29707956a446b0613417fef 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -1204,6 +1204,7 @@ public:
   int  store(longlong nr);
   int  store_decimal(const my_decimal *);
   void get_key_image(char *buff,uint length,imagetype type);
+  uint size_of() const { return sizeof(*this); }
 };
 #endif /*HAVE_SPATIAL*/
 
diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc
index 793029ab4c75146abeab2ac7bc05509ef1639b2c..b8a779c08cf319a30c21c207f538addd32882f7b 100644
--- a/sql/ha_berkeley.cc
+++ b/sql/ha_berkeley.cc
@@ -958,8 +958,6 @@ int ha_berkeley::write_row(byte * record)
   {
     DB_TXN *sub_trans = transaction;
     /* Don't use sub transactions in temporary tables */
-    ulong thd_options= (table->s->tmp_table == NO_TMP_TABLE ?
-                        table->in_use->options : 0);
     for (uint retry=0 ; retry < berkeley_trans_retry ; retry++)
     {
       key_map changed_keys(0);
@@ -1070,7 +1068,7 @@ int ha_berkeley::key_cmp(uint keynr, const byte * old_row,
 int ha_berkeley::update_primary_key(DB_TXN *trans, bool primary_key_changed,
 				    const byte * old_row, DBT *old_key,
 				    const byte * new_row, DBT *new_key,
-				    ulong thd_options, bool local_using_ignore)
+                                    bool local_using_ignore)
 {
   DBT row;
   int error;
@@ -1119,8 +1117,7 @@ int ha_berkeley::update_primary_key(DB_TXN *trans, bool primary_key_changed,
 int ha_berkeley::restore_keys(DB_TXN *trans, key_map *changed_keys,
 			      uint primary_key,
 			      const byte *old_row, DBT *old_key,
-			      const byte *new_row, DBT *new_key,
-			      ulong thd_options)
+			      const byte *new_row, DBT *new_key)
 {
   int error;
   DBT tmp_key;
@@ -1130,7 +1127,7 @@ int ha_berkeley::restore_keys(DB_TXN *trans, key_map *changed_keys,
   /* Restore the old primary key, and the old row, but don't ignore
      duplicate key failure */
   if ((error=update_primary_key(trans, TRUE, new_row, new_key,
-				old_row, old_key, thd_options, FALSE)))
+				old_row, old_key, FALSE)))
     goto err; /* purecov: inspected */
 
   /* Remove the new key, and put back the old key
@@ -1167,8 +1164,6 @@ int ha_berkeley::update_row(const byte * old_row, byte * new_row)
   DBT prim_key, key, old_prim_key;
   int error;
   DB_TXN *sub_trans;
-  ulong thd_options= (table->s->tmp_table == NO_TMP_TABLE ?
-                      table->in_use->options : 0);
   bool primary_key_changed;
   DBUG_ENTER("update_row");
   LINT_INIT(error);
@@ -1204,7 +1199,7 @@ int ha_berkeley::update_row(const byte * old_row, byte * new_row)
     if (!(error=update_primary_key(sub_trans, primary_key_changed,
 				   old_row, &old_prim_key,
 				   new_row, &prim_key,
-				   thd_options, using_ignore)))
+				   using_ignore)))
     {
       // Update all other keys
       for (uint keynr=0 ; keynr < table->s->keys ; keynr++)
@@ -1239,8 +1234,7 @@ int ha_berkeley::update_row(const byte * old_row, byte * new_row)
 	int new_error = 0;
         if (!changed_keys.is_clear_all())
 	  new_error=restore_keys(transaction, &changed_keys, primary_key,
-				 old_row, &old_prim_key, new_row, &prim_key,
-				 thd_options);
+				 old_row, &old_prim_key, new_row, &prim_key);
 	if (new_error)
 	{
           /* This shouldn't happen */
@@ -1342,8 +1336,6 @@ int ha_berkeley::delete_row(const byte * record)
   int error;
   DBT row, prim_key;
   key_map keys= table->s->keys_in_use;
-  ulong thd_options= (table->s->tmp_table == NO_TMP_TABLE ?
-                      table->in_use->options : 0);
   DBUG_ENTER("delete_row");
   statistic_increment(table->in_use->status_var.ha_delete_count,&LOCK_status);
 
@@ -2150,7 +2142,7 @@ ha_rows ha_berkeley::records_in_range(uint keynr, key_range *start_key,
     end_pos=end_range.less+end_range.equal;
   rows=(end_pos-start_pos)*records;
   DBUG_PRINT("exit",("rows: %g",rows));
-  DBUG_RETURN(rows <= 1.0 ? (ha_rows) 1 : (ha_rows) rows);
+  DBUG_RETURN((ha_rows)(rows <= 1.0 ? 1 : rows));
 }
 
 
diff --git a/sql/ha_berkeley.h b/sql/ha_berkeley.h
index aa92908ecdef50a67911982bdd897005d8ac4d48..282641e3f251a0a352b1d0163be9e1640dd0acf0 100644
--- a/sql/ha_berkeley.h
+++ b/sql/ha_berkeley.h
@@ -74,13 +74,12 @@ class ha_berkeley: public handler
 		  DBT *prim_key, key_map *keys);
   int restore_keys(DB_TXN *trans, key_map *changed_keys, uint primary_key,
 		   const byte *old_row, DBT *old_key,
-		   const byte *new_row, DBT *new_key,
-		   ulong thd_options);
+		   const byte *new_row, DBT *new_key);
   int key_cmp(uint keynr, const byte * old_row, const byte * new_row);
   int update_primary_key(DB_TXN *trans, bool primary_key_changed,
 			 const byte * old_row, DBT *old_key,
 			 const byte * new_row, DBT *prim_key,
-			 ulong thd_options, bool local_using_ignore);
+			 bool local_using_ignore);
   int read_row(int error, char *buf, uint keynr, DBT *row, DBT *key, bool);
   DBT *get_pos(DBT *to, byte *pos);
 
diff --git a/sql/ha_federated.cc b/sql/ha_federated.cc
index bc8aebdfff64820169612b13c885ca610d65dac5..639f09d10ca97d1356a0c3a4fc12f431fc572bea 100644
--- a/sql/ha_federated.cc
+++ b/sql/ha_federated.cc
@@ -765,7 +765,6 @@ uint ha_federated::convert_row_to_internal_format(byte *record, MYSQL_ROW row)
     (*field)->move_field(-old_ptr);
   }
 
-  DBUG_DUMP("record", record, table->s->reclength);
   DBUG_RETURN(0);
 }
 
diff --git a/sql/ha_heap.h b/sql/ha_heap.h
index f7368436456fdc788ce43f50023c3ba06c8166c4..7c4227e952c79a36db6c723fadf5446dd1410fcb 100644
--- a/sql/ha_heap.h
+++ b/sql/ha_heap.h
@@ -43,6 +43,8 @@ public:
     return ((table->key_info[inx].algorithm == HA_KEY_ALG_BTREE) ? "BTREE" :
 	    "HASH");
   }
+  /* Rows also use a fixed-size format */
+  enum row_type get_row_type() const { return ROW_TYPE_FIXED; }
   const char **bas_ext() const;
   ulong table_flags() const
   {
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index 690f1354d2b7d6972aefed1c64f8566a6d1be307..98a3922beec5097b752c9faa481780ec4166203a 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -48,6 +48,10 @@ have disables the InnoDB inlining in this file. */
 pthread_mutex_t innobase_share_mutex, /* to protect innobase_open_files */
                 prepare_commit_mutex; /* to force correct commit order in
 				      binlog */
+ulong commit_threads= 0;
+pthread_mutex_t commit_threads_m;
+pthread_cond_t commit_cond;
+pthread_mutex_t commit_cond_m;
 bool innodb_inited= 0;
 
 /*-----------------------------------------------------------------*/
@@ -216,10 +220,10 @@ static handlerton innobase_hton = {
   innobase_xa_recover,		/* recover */
   innobase_commit_by_xid,	/* commit_by_xid */
   innobase_rollback_by_xid,     /* rollback_by_xid */
-  NULL,
-  NULL,
-  NULL,
-  HTON_CLOSE_CURSORS_AT_COMMIT
+  innobase_create_cursor_view,
+  innobase_set_cursor_view,
+  innobase_close_cursor_view,
+  HTON_NO_FLAGS
 };
 
 /*********************************************************************
@@ -538,7 +542,7 @@ innobase_mysql_prepare_print_arbitrary_thd(void)
 }
 
 /*****************************************************************
-Relases the mutex reserved by innobase_mysql_prepare_print_arbitrary_thd().
+Releases the mutex reserved by innobase_mysql_prepare_print_arbitrary_thd().
 NOTE that /mysql/innobase/lock/lock0lock.c must contain the prototype for this
 function! */
 extern "C"
@@ -550,19 +554,20 @@ innobase_mysql_end_print_arbitrary_thd(void)
 }
 
 /*****************************************************************
-Prints info of a THD object (== user session thread) to the
-standard output. NOTE that /mysql/innobase/trx/trx0trx.c must contain
-the prototype for this function! */
+Prints info of a THD object (== user session thread) to the given file.
+NOTE that /mysql/innobase/trx/trx0trx.c must contain the prototype for
+this function! */
 extern "C"
 void
 innobase_mysql_print_thd(
 /*=====================*/
-	FILE*   f,	/* in: output stream */
-        void*   input_thd)/* in: pointer to a MySQL THD object */
+	FILE*   f,		/* in: output stream */
+	void*   input_thd,	/* in: pointer to a MySQL THD object */
+	uint	max_query_len)	/* in: max query length to print, or 0 to
+				   use the default max length */
 {
 	const THD*	thd;
 	const char*	s;
-	char		buf[301];
 
         thd = (const THD*) input_thd;
 
@@ -589,25 +594,47 @@ innobase_mysql_print_thd(
 	}
 
 	if ((s = thd->query)) {
-		/* determine the length of the query string */
-		uint32 i, len;
+		/* 3100 is chosen because currently 3000 is the maximum
+		   max_query_len we ever give this. */
+		char	buf[3100];
+		uint	len;
+
+		/* If buf is too small, we dynamically allocate storage
+		   in this. */
+		char*	dyn_str = NULL;
+
+		/* Points to buf or dyn_str. */
+		char*	str = buf;
 		
-		len = thd->query_length;
-
-		if (len > 300) {
-			len = 300;	/* ADDITIONAL SAFETY: print at most
-					300 chars to reduce the probability of
-					a seg fault if there is a race in
-					thd->query_length in MySQL; after
-					May 14, 2004 probably no race any more,
-					but better be safe */
+		if (max_query_len == 0)
+		{
+			/* ADDITIONAL SAFETY: the default is to print at
+			   most 300 chars to reduce the probability of a
+			   seg fault if there is a race in
+			   thd->query_length in MySQL; after May 14, 2004
+			   probably no race any more, but better be
+			   safe */
+			max_query_len = 300;
+		}
+		
+		len = min(thd->query_length, max_query_len);
+
+		if (len > (sizeof(buf) - 1))
+		{
+			dyn_str = my_malloc(len + 1, MYF(0));
+			str = dyn_str;
 		}
 
-                /* Use strmake to reduce the timeframe
-                   for a race, compared to fwrite() */
-		i= (uint) (strmake(buf, s, len) - buf);
+                /* Use strmake to reduce the timeframe for a race,
+                   compared to fwrite() */
+		len = (uint) (strmake(str, s, len) - str);
 		putc('\n', f);
-		fwrite(buf, 1, i, f);
+		fwrite(str, 1, len, f);
+
+		if (dyn_str)
+		{
+			my_free(dyn_str, MYF(0));
+		}
 	}
 
 	putc('\n', f);
@@ -948,9 +975,9 @@ innobase_query_caching_of_table_permitted(
         trx = check_trx_exists(thd);
 	if (trx->has_search_latch) {
 		ut_print_timestamp(stderr);
-		fprintf(stderr,
-"  InnoDB: Error: the calling thread is holding the adaptive search\n"
-"InnoDB: latch though calling innobase_query_caching_of_table_permitted\n");
+		sql_print_error("The calling thread is holding the adaptive "
+				"search, latch though calling "
+				"innobase_query_caching_of_table_permitted.");
 	}
 
 	innobase_release_stat_resources(trx);
@@ -1266,9 +1293,8 @@ innobase_init(void)
 						&srv_log_group_home_dirs);
 
 	if (ret == FALSE || innobase_mirrored_log_groups != 1) {
-		fprintf(stderr,
-		"InnoDB: syntax error in innodb_log_group_home_dir\n"
-		"InnoDB: or a wrong number of mirrored log groups\n");
+	  sql_print_error("syntax error in innodb_log_group_home_dir, or a "
+			  "wrong number of mirrored log groups");
 
 	  	my_free(internal_innobase_data_file_path,
 						MYF(MY_ALLOW_ZERO_PTR));
@@ -1367,6 +1393,9 @@ innobase_init(void)
 			 		(hash_get_key) innobase_get_key, 0, 0);
         pthread_mutex_init(&innobase_share_mutex, MY_MUTEX_INIT_FAST);
         pthread_mutex_init(&prepare_commit_mutex, MY_MUTEX_INIT_FAST);
+        pthread_mutex_init(&commit_threads_m, MY_MUTEX_INIT_FAST);
+        pthread_mutex_init(&commit_cond_m, MY_MUTEX_INIT_FAST);
+        pthread_cond_init(&commit_cond, NULL);
 	innodb_inited= 1;
 
 	/* If this is a replication slave and we needed to do a crash recovery,
@@ -1416,6 +1445,9 @@ innobase_end(void)
 						MYF(MY_ALLOW_ZERO_PTR));
                 pthread_mutex_destroy(&innobase_share_mutex);
                 pthread_mutex_destroy(&prepare_commit_mutex);
+                pthread_mutex_destroy(&commit_threads_m);
+                pthread_mutex_destroy(&commit_cond_m);
+                pthread_cond_destroy(&commit_cond);
 	}
 
   	DBUG_RETURN(err);
@@ -1542,8 +1574,10 @@ innobase_commit(
 	reserve the kernel mutex, we have to release the search system latch
 	first to obey the latching order. */
 
-	innobase_release_stat_resources(trx);
-
+        if (trx->has_search_latch) {
+                          trx_search_latch_release_if_reserved(trx);
+        }
+        
         /* The flag trx->active_trans is set to 1 in
 
 	1. ::external_lock(),
@@ -1562,11 +1596,9 @@ innobase_commit(
         if (trx->active_trans == 0
 	    && trx->conc_state != TRX_NOT_STARTED) {
 	    
-	        fprintf(stderr,
-"InnoDB: Error: trx->active_trans == 0\n"
-"InnoDB: but trx->conc_state != TRX_NOT_STARTED\n");
+	  sql_print_error("trx->active_trans == 0, but trx->conc_state != "
+			  "TRX_NOT_STARTED");
 	}
-
         if (all
 	    || (!(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)))) {
 	        
@@ -1575,18 +1607,43 @@ innobase_commit(
 
                 /* We need current binlog position for ibbackup to work.
                 Note, the position is current because of prepare_commit_mutex */
+retry:
+                if (srv_commit_concurrency > 0)
+                {
+                  pthread_mutex_lock(&commit_cond_m);
+                  commit_threads++;
+                  if (commit_threads > srv_commit_concurrency)
+                  {
+                    commit_threads--;
+                    pthread_cond_wait(&commit_cond, &commit_cond_m);
+                    pthread_mutex_unlock(&commit_cond_m);
+                    goto retry;
+                  }
+                  else
+                    pthread_mutex_unlock(&commit_cond_m);
+                }
+                
                 trx->mysql_log_file_name = mysql_bin_log.get_log_fname();
                 trx->mysql_log_offset =
                         (ib_longlong)mysql_bin_log.get_log_file()->pos_in_file;
 
 		innobase_commit_low(trx);
 
+                if (srv_commit_concurrency > 0)
+                {
+                  pthread_mutex_lock(&commit_cond_m);
+                  commit_threads--;
+                  pthread_cond_signal(&commit_cond);
+                  pthread_mutex_unlock(&commit_cond_m);
+                }
+                
                 if (trx->active_trans == 2) {
 
                         pthread_mutex_unlock(&prepare_commit_mutex);
                 }
+               
                 trx->active_trans = 0;
-
+               
 	} else {
 	        /* We just mark the SQL statement ended and do not do a
 		transaction commit */
@@ -1606,7 +1663,11 @@ innobase_commit(
 
 	/* Tell the InnoDB server that there might be work for utility
 	threads: */
+        if (trx->declared_to_be_inside_innodb) {
+                          /* Release our possible ticket in the FIFO */
 
+                          srv_conc_force_exit_innodb(trx);
+        }
 	srv_active_wake_master_thread();
 
 	DBUG_RETURN(0);
@@ -1700,7 +1761,7 @@ innobase_store_binlog_offset_and_flush_log(
         /* Commits the mini-transaction */
         mtr_commit(&mtr);
 
-	/* Syncronous flush of the log buffer to disk */
+	/* Synchronous flush of the log buffer to disk */
 	log_buffer_flush_to_disk();
 }
 #endif
@@ -1813,21 +1874,23 @@ try_again:
                 if (ret != 0) {
                         ut_print_timestamp(stderr);
 
-                        fprintf(stderr,
-"  InnoDB: Error: MySQL synchronous replication\n"
-"InnoDB: was not able to send the binlog to the slave within the\n"
-"InnoDB: timeout %lu. We assume that the slave has become inaccessible,\n"
-"InnoDB: and switch off synchronous replication until the communication.\n"
-"InnoDB: to the slave works again.\n",
-				thd->variables.sync_replication_timeout);
-                        fprintf(stderr,
-"InnoDB: MySQL synchronous replication has sent binlog\n"
-"InnoDB: to the slave up to file %s, position %lu\n", innobase_repl_file_name,
-                                        (ulong)innobase_repl_pos);
-                        fprintf(stderr,
-"InnoDB: This transaction needs it to be sent up to\n"
-"InnoDB: file %s, position %lu\n", trx->repl_wait_binlog_name,
-                                        (ulong)trx->repl_wait_binlog_pos);
+			sql_print_error("MySQL synchronous replication was "
+					"not able to send the binlog to the "
+					"slave within the timeout %lu. We "
+					"assume that the slave has become "
+					"inaccessible, and switch off "
+					"synchronous replication until the "
+					"communication to the slave works "
+					"again. MySQL synchronous replication "
+					"has sent binlog to the slave up to "
+					"file %s, position %lu. This "
+					"transaction needs it to be sent up "
+					"to file %s, position %lu.",
+					thd->variables.sync_replication_timeout,
+					innobase_repl_file_name,
+					(ulong) innobase_repl_pos,
+					trx->repl_wait_binlog_name,
+					(ulong) trx->repl_wait_binlog_pos);
 
                         innobase_repl_state = 0;
 
@@ -1878,9 +1941,9 @@ innobase_repl_report_sent_binlog(
         if (innobase_repl_state == 0) {
 
                 ut_print_timestamp(stderr);
-                fprintf(stderr,
-"  InnoDB: Switching MySQL synchronous replication on again at\n"
-"InnoDB: binlog file %s, position %lu\n", log_file_name, (ulong)end_offset);
+		sql_print_warning("Switching MySQL synchronous replication on "
+				  "again at binlog file %s, position %lu",
+				  log_file_name, (ulong) end_offset);
 
                 innobase_repl_state = 1;
         }
@@ -1897,14 +1960,14 @@ innobase_repl_report_sent_binlog(
                     || (cmp == 0 && end_offset < innobase_repl_pos)) {
 
                         ut_print_timestamp(stderr);
-                        fprintf(stderr,
-"  InnoDB: Error: MySQL synchronous replication has sent binlog\n"
-"InnoDB: to the slave up to file %s, position %lu\n", innobase_repl_file_name,
-                                        (ulong)innobase_repl_pos);
-                        fprintf(stderr,
-"InnoDB: but now MySQL reports that it sent the binlog only up to\n"
-"InnoDB: file %s, position %lu\n", log_file_name, (ulong)end_offset);
-
+			sql_print_error("MySQL synchronous replication has "
+					"sent binlog to the slave up to file "
+					"%s, position %lu, but now MySQL "
+					"reports that it sent the binlog only "
+					"up to file %s, position %lu",
+					innobase_repl_file_name,
+					(ulong) innobase_repl_pos,
+					log_file_name, (ulong) end_offset);
                 }
         }
 
@@ -2132,15 +2195,39 @@ innobase_savepoint(
 
 /*********************************************************************
 Frees a possible InnoDB trx object associated with the current THD. */
-
-static int
+static
+int
 innobase_close_connection(
 /*======================*/
 			/* out: 0 or error number */
 	THD*	thd)	/* in: handle to the MySQL thread of the user
 			whose resources should be free'd */
 {
-        trx_free_for_mysql((trx_t*)thd->ha_data[innobase_hton.slot]);
+	trx_t*	trx;
+
+	trx = (trx_t*)thd->ha_data[innobase_hton.slot];
+
+	ut_a(trx);
+
+        if (trx->active_trans == 0
+	    && trx->conc_state != TRX_NOT_STARTED) {
+	    
+	  sql_print_error("trx->active_trans == 0, but trx->conc_state != "
+			  "TRX_NOT_STARTED");
+	}
+
+
+	if (trx->conc_state != TRX_NOT_STARTED &&
+            global_system_variables.log_warnings)
+          sql_print_warning("MySQL is closing a connection that has an active "
+                            "InnoDB transaction.  %lu row modifications will "
+                            "roll back.",
+                            (ulong)trx->undo_no.low);
+
+	innobase_rollback_trx(trx);
+
+        trx_free_for_mysql(trx);
+
 	return(0);
 }
 
@@ -2287,15 +2374,17 @@ ha_innobase::open(
 				      		     norm_name, NULL);
  	if (NULL == ib_table) {
 	        ut_print_timestamp(stderr);
-	        fprintf(stderr, "  InnoDB error:\n"
-"Cannot find table %s from the internal data dictionary\n"
-"of InnoDB though the .frm file for the table exists. Maybe you\n"
-"have deleted and recreated InnoDB data files but have forgotten\n"
-"to delete the corresponding .frm files of InnoDB tables, or you\n"
-"have moved .frm files to another database?\n"
-"Look from section 15.1 of http://www.innodb.com/ibman.html\n"
-"how you can resolve the problem.\n",
-			  norm_name);
+		sql_print_error("Cannot find table %s from the internal data "
+				"dictionary\nof InnoDB though the .frm file "
+				"for the table exists. Maybe you\nhave "
+				"deleted and recreated InnoDB data files but "
+				"have forgotten\nto delete the corresponding "
+				".frm files of InnoDB tables, or you\n"
+				"have moved .frm files to another database?\n"
+				"Look from section 15.1 of "
+				"http://www.innodb.com/ibman.html\n"
+				"how you can resolve the problem.\n",
+				norm_name);
 	        free_share(share);
     		my_free((char*) upd_buff, MYF(0));
     		my_errno = ENOENT;
@@ -2305,14 +2394,15 @@ ha_innobase::open(
 
  	if (ib_table->ibd_file_missing && !thd->tablespace_op) {
 	        ut_print_timestamp(stderr);
-	        fprintf(stderr, "  InnoDB error:\n"
-"MySQL is trying to open a table handle but the .ibd file for\n"
-"table %s does not exist.\n"
-"Have you deleted the .ibd file from the database directory under\n"
-"the MySQL datadir, or have you used DISCARD TABLESPACE?\n"
-"Look from section 15.1 of http://www.innodb.com/ibman.html\n"
-"how you can resolve the problem.\n",
-			  norm_name);
+		sql_print_error("MySQL is trying to open a table handle but "
+				"the .ibd file for\ntable %s does not exist.\n"
+				"Have you deleted the .ibd file from the "
+				"database directory under\nthe MySQL datadir, "
+				"or have you used DISCARD TABLESPACE?\n"
+				"Look from section 15.1 of "
+				"http://www.innodb.com/ibman.html\n"
+				"how you can resolve the problem.\n",
+				norm_name);
 	        free_share(share);
     		my_free((char*) upd_buff, MYF(0));
     		my_errno = ENOENT;
@@ -2338,9 +2428,8 @@ ha_innobase::open(
 
   	if (!row_table_got_default_clust_index(ib_table)) {
 	        if (primary_key >= MAX_KEY) {
-	                fprintf(stderr,
-		    "InnoDB: Error: table %s has a primary key in InnoDB\n"
-		    "InnoDB: data dictionary, but not in MySQL!\n", name);
+		  sql_print_error("Table %s has a primary key in InnoDB data "
+				  "dictionary, but not in MySQL!", name);
 		}
 
 		((row_prebuilt_t*)innobase_prebuilt)
@@ -2354,16 +2443,15 @@ ha_innobase::open(
   		ref_length = table->key_info[primary_key].key_length;
 	} else {
 	        if (primary_key != MAX_KEY) {
-	                fprintf(stderr,
-		    "InnoDB: Error: table %s has no primary key in InnoDB\n"
-		    "InnoDB: data dictionary, but has one in MySQL!\n"
-		    "InnoDB: If you created the table with a MySQL\n"
-                    "InnoDB: version < 3.23.54 and did not define a primary\n"
-                    "InnoDB: key, but defined a unique key with all non-NULL\n"
-                    "InnoDB: columns, then MySQL internally treats that key\n"
-                    "InnoDB: as the primary key. You can fix this error by\n"
-		    "InnoDB: dump + DROP + CREATE + reimport of the table.\n",
-				name);
+		  sql_print_error("Table %s has no primary key in InnoDB data "
+				  "dictionary, but has one in MySQL! If you "
+				  "created the table with a MySQL version < "
+				  "3.23.54 and did not define a primary key, "
+				  "but defined a unique key with all non-NULL "
+				  "columns, then MySQL internally treats that "
+				  "key as the primary key. You can fix this "
+				  "error by dump + DROP + CREATE + reimport "
+				  "of the table.", name);
 		}
 
 		((row_prebuilt_t*)innobase_prebuilt)
@@ -2380,10 +2468,9 @@ ha_innobase::open(
 		and it will never be updated anyway. */
 	       
 		if (key_used_on_scan != MAX_KEY) {
-	                fprintf(stderr,
-"InnoDB: Warning: table %s key_used_on_scan is %lu even though there is no\n"
-"InnoDB: primary key inside InnoDB.\n",
-				name, (ulong)key_used_on_scan);
+		  sql_print_warning("Table %s key_used_on_scan is %lu even "
+				    "though there is no primary key inside "
+				    "InnoDB.", name, (ulong) key_used_on_scan);
 		}
 	}
 
@@ -2538,9 +2625,10 @@ innobase_mysql_cmp(
 			charset = get_charset(charset_number, MYF(MY_WME));
 
 			if (charset == NULL) {
-				fprintf(stderr,
-"InnoDB: fatal error: InnoDB needs charset %lu for doing a comparison,\n"
-"InnoDB: but MySQL cannot find that charset.\n", (ulong)charset_number);
+			  sql_print_error("InnoDB needs charset %lu for doing "
+					  "a comparison, but MySQL cannot "
+					  "find that charset.",
+					  (ulong) charset_number);
 				ut_a(0);
 			}
 		}
@@ -2834,7 +2922,7 @@ ha_innobase::store_key_val_for_row(
 
 			/* All indexes on BLOB and TEXT are column prefix
 			indexes, and we may need to truncate the data to be
-			stored in the kay value: */
+			stored in the key value: */
 
 			if (blob_len > key_part->length) {
 			        blob_len = key_part->length;
@@ -3106,11 +3194,11 @@ ha_innobase::write_row(
 
 	if (prebuilt->trx !=
                         (trx_t*) current_thd->ha_data[innobase_hton.slot]) {
-		fprintf(stderr,
-"InnoDB: Error: the transaction object for the table handle is at\n"
-"InnoDB: %p, but for the current thread it is at %p\n",
-			prebuilt->trx,
-                        (trx_t*) current_thd->ha_data[innobase_hton.slot]);
+	  sql_print_error("The transaction object for the table handle is at "
+			  "%p, but for the current thread it is at %p",
+			  prebuilt->trx,
+			  (trx_t*) current_thd->ha_data[innobase_hton.slot]);
+
 		fputs("InnoDB: Dump of 200 bytes around prebuilt: ", stderr);
 		ut_print_buf(stderr, ((const byte*)prebuilt) - 100, 200);
 		fputs("\n"
@@ -3597,9 +3685,9 @@ ha_innobase::unlock_row(void)
 
 	if (last_query_id != user_thd->query_id) {
 		ut_print_timestamp(stderr);
-		fprintf(stderr,
-"  InnoDB: Error: last_query_id is %lu != user_thd_query_id is %lu\n",
-			(ulong)last_query_id, (ulong)user_thd->query_id);
+		sql_print_error("last_query_id is %lu != user_thd_query_id is "
+				"%lu", (ulong) last_query_id,
+				(ulong) user_thd->query_id);
 		mem_analyze_corruption((byte *) prebuilt->trx);
 		ut_error;
 	}
@@ -3891,9 +3979,10 @@ ha_innobase::change_active_index(
 	}
 
 	if (!prebuilt->index) {
-	       sql_print_error(
-"Innodb could not find key n:o %u with name %s from dict cache for table %s",
-	      keynr, key ? key->name : "NULL", prebuilt->table->name);
+	       sql_print_error("Innodb could not find key n:o %u with name %s "
+			       "from dict cache for table %s",
+			       keynr, key ? key->name : "NULL",
+			       prebuilt->table->name);
 	      DBUG_RETURN(1);
 	}
 
@@ -4259,9 +4348,8 @@ ha_innobase::position(
 	table. */
   
 	if (len != ref_length) {
-		fprintf(stderr,
-	 "InnoDB: Error: stored ref len is %lu, but table ref len is %lu\n",
-		  (ulong)len, (ulong)ref_length);
+	  sql_print_error("Stored ref len is %lu, but table ref len is %lu",
+			  (ulong) len, (ulong) ref_length);  
 	}
 }
 
@@ -4466,11 +4554,13 @@ create_index(
 			    || col_type == DATA_FLOAT
 			    || col_type == DATA_DOUBLE
 			    || col_type == DATA_DECIMAL) {
-			        fprintf(stderr,
-"InnoDB: error: MySQL is trying to create a column prefix index field\n"
-"InnoDB: on an inappropriate data type. Table name %s, column name %s.\n",
-				  table_name, key_part->field->field_name);
-			        
+			  sql_print_error("MySQL is trying to create a column "
+					  "prefix index field, on an "
+					  "inappropriate data type. Table "
+					  "name %s, column name %s.",
+					  table_name,
+					  key_part->field->field_name);
+        
 			        prefix_len = 0;
 			}
 		} else {
@@ -5353,12 +5443,14 @@ ha_innobase::info(
 		for (i = 0; i < table->s->keys; i++) {
 			if (index == NULL) {
 				ut_print_timestamp(stderr);
-			        fprintf(stderr,
-"  InnoDB: Error: table %s contains less indexes inside InnoDB\n"
-"InnoDB: than are defined in the MySQL .frm file. Have you mixed up\n"
-"InnoDB: .frm files from different installations? See section\n"
-"InnoDB: 15.1 at http://www.innodb.com/ibman.html\n",
-				   ib_table->name);
+				sql_print_error("Table %s contains less "
+						"indexes inside InnoDB than "
+						"are defined in the MySQL "
+						".frm file. Have you mixed up "
+						".frm files from different "
+						"installations? See section "
+						"15.1 at http://www.innodb.com/ibman.html",
+						ib_table->name);
 				break;
 			}
 
@@ -5366,15 +5458,21 @@ ha_innobase::info(
 
 				if (j + 1 > index->n_uniq) {
 				        ut_print_timestamp(stderr);
-			                fprintf(stderr,
-"  InnoDB: Error: index %s of %s has %lu columns unique inside InnoDB\n"
-"InnoDB: but MySQL is asking statistics for %lu columns. Have you mixed up\n"
-"InnoDB: .frm files from different installations? See section\n"
-"InnoDB: 15.1 at http://www.innodb.com/ibman.html\n",
-						index->name,
-						ib_table->name,
-						(unsigned long) index->n_uniq,
-						j + 1);
+					sql_print_error("Index %s of %s has "
+							"%lu columns unique "
+							"inside InnoDB, but "
+							"MySQL is asking "
+							"statistics for %lu "
+							"columns. Have you "
+							"mixed up .frm files "
+							"from different "
+							"installations? See "
+							"section 15.1 at "
+							"http://www.innodb.com/ibman.html",
+							index->name,
+							ib_table->name,
+							(unsigned long)
+							index->n_uniq, j + 1);
 				        break;
 				}
 
@@ -5879,7 +5977,7 @@ ha_innobase::start_stmt(
 	innobase_release_stat_resources(trx);
 
 	if (trx->isolation_level <= TRX_ISO_READ_COMMITTED
-	    						&& trx->read_view) {
+	    					&& trx->global_read_view) {
 	    	/* At low transaction isolation levels we let
 		each consistent read set its own snapshot */
 
@@ -5922,9 +6020,9 @@ ha_innobase::start_stmt(
 
 		if (prebuilt->stored_select_lock_type != LOCK_S
 		    && prebuilt->stored_select_lock_type != LOCK_X) {
-			fprintf(stderr,
-"InnoDB: Error: stored_select_lock_type is %lu inside ::start_stmt()!\n",
-			prebuilt->stored_select_lock_type);
+		  sql_print_error("stored_select_lock_type is %lu inside "
+				  "::start_stmt()!",
+				  prebuilt->stored_select_lock_type);
 
 			/* Set the value to LOCK_X: this is just fault
 			tolerance, we do not know what the correct value
@@ -6100,7 +6198,7 @@ ha_innobase::external_lock(
 			}
 		} else {
 			if (trx->isolation_level <= TRX_ISO_READ_COMMITTED
-	    						&& trx->read_view) {
+	    					&& trx->global_read_view) {
 
 				/* At low transaction isolation levels we let
 				each consistent read set its own snapshot */
@@ -6700,9 +6798,8 @@ ha_innobase::innobase_read_and_init_auto_inc(
 			error = 0;
 		} else {
 			/* This should not happen in a consistent read */
-			fprintf(stderr,
-"InnoDB: Error: consistent read of auto-inc column returned %lu\n",
-								(ulong)error);
+		  sql_print_error("Consistent read of auto-inc column "
+				  "returned %lu", (ulong) error);
   			auto_inc = -1;
 
   			goto func_exit;
@@ -6759,9 +6856,8 @@ ha_innobase::get_auto_increment()
 		initialized. */
 	
 		ut_print_timestamp(stderr);
-		fprintf(stderr,
-		"  InnoDB: Error: error %lu in ::get_auto_increment()\n",
-						(ulong)error);
+		sql_print_error("Error %lu in ::get_auto_increment()",
+				(ulong) error);
           	return(~(ulonglong) 0);
 	}
 
@@ -6836,8 +6932,8 @@ ha_innobase::cmp_ref(
 			return(result);
 		}
 
-		ref1 += key_part->length;
-		ref2 += key_part->length;
+		ref1 += key_part->store_length;
+		ref2 += key_part->store_length;
 	}
 
 	return(0);
@@ -7018,7 +7114,7 @@ innobase_xa_prepare(
 		return(0);
 	}
 
-        trx->xid=thd->transaction.xid;
+        trx->xid=thd->transaction.xid_state.xid;
 
 	/* Release a possible FIFO ticket and search latch. Since we will
 	reserve the kernel mutex, we have to release the search system latch
@@ -7028,9 +7124,8 @@ innobase_xa_prepare(
 
 	if (trx->active_trans == 0 && trx->conc_state != TRX_NOT_STARTED) {
 
-		fprintf(stderr,
-"InnoDB: Error: trx->active_trans == 0\n"
-"InnoDB: but trx->conc_state != TRX_NOT_STARTED\n");
+	  sql_print_error("trx->active_trans == 0, but trx->conc_state != "
+			  "TRX_NOT_STARTED");
 	}
 
 	if (all
@@ -7117,7 +7212,7 @@ int
 innobase_rollback_by_xid(
 /*=====================*/
 			/* out: 0 or error number */
-	XID	*xid)	/* in: X/Open XA transaction idenfification */
+	XID	*xid)	/* in: X/Open XA transaction identification */
 {
 	trx_t*	trx;
 
@@ -7130,4 +7225,48 @@ innobase_rollback_by_xid(
 	}
 }
 
+/***********************************************************************
+Create a consistent view for a cursor based on current transaction
+which is created if the corresponding MySQL thread still lacks one.
+This consistent view is then used inside of MySQL when accessing records 
+using a cursor. */
+
+void*
+innobase_create_cursor_view(void)
+/*=============================*/
+			/* out: Pointer to cursor view or NULL */
+{
+	return(read_cursor_view_create_for_mysql(
+					check_trx_exists(current_thd)));
+}
+
+/***********************************************************************
+Close the given consistent cursor view of a transaction and restore
+global read view to a transaction read view. Transaction is created if the 
+corresponding MySQL thread still lacks one. */
+
+void
+innobase_close_cursor_view(
+/*=======================*/
+	void*	curview)/* in: Consistent read view to be closed */
+{
+	read_cursor_view_close_for_mysql(check_trx_exists(current_thd),
+						(cursor_view_t*) curview);
+}
+
+/***********************************************************************
+Set the given consistent cursor view to a transaction which is created 
+if the corresponding MySQL thread still lacks one. If the given 
+consistent cursor view is NULL global read view of a transaction is
+restored to a transaction read view. */
+
+void
+innobase_set_cursor_view(
+/*=====================*/
+	void*	curview)/* in: Consistent cursor view to be set */
+{
+	read_cursor_set_for_mysql(check_trx_exists(current_thd), 
+						(cursor_view_t*) curview);
+}
+
 #endif /* HAVE_INNOBASE_DB */
diff --git a/sql/ha_innodb.h b/sql/ha_innodb.h
index 1584a2182c97303db8244a13a42bf764b5a16340..4817ab9b682a16ad5560a9fcc8adda0008402856 100644
--- a/sql/ha_innodb.h
+++ b/sql/ha_innodb.h
@@ -232,6 +232,7 @@ extern ulong srv_n_spin_wait_rounds;
 extern ulong srv_n_free_tickets_to_enter;
 extern ulong srv_thread_sleep_delay;
 extern ulong srv_thread_concurrency;
+extern ulong srv_commit_concurrency;
 }
 
 extern TYPELIB innobase_lock_typelib;
@@ -302,7 +303,7 @@ which is in the prepared state */
 
 int innobase_rollback_by_xid(
 			/* out: 0 or error number */
-	XID	*xid);	/* in : X/Open XA Transaction Idenfification */
+	XID	*xid);	/* in : X/Open XA Transaction Identification */
 
 
 int innobase_xa_end(THD *thd);
@@ -310,3 +311,35 @@ int innobase_xa_end(THD *thd);
 
 int innobase_repl_report_sent_binlog(THD *thd, char *log_file_name,
                                my_off_t end_offset);
+
+/***********************************************************************
+Create a consistent view for a cursor based on current transaction
+which is created if the corresponding MySQL thread still lacks one.
+This consistent view is then used inside of MySQL when accessing records 
+using a cursor. */
+
+void*
+innobase_create_cursor_view(void);
+/*=============================*/
+				/* out: Pointer to cursor view or NULL */
+
+/***********************************************************************
+Close the given consistent cursor view of a transaction and restore
+global read view to a transaction read view. Transaction is created if the 
+corresponding MySQL thread still lacks one. */
+
+void
+innobase_close_cursor_view(
+/*=======================*/
+	void*	curview);	/* in: Consistent read view to be closed */
+
+/***********************************************************************
+Set the given consistent cursor view to a transaction which is created 
+if the corresponding MySQL thread still lacks one. If the given 
+consistent cursor view is NULL global read view of a transaction is
+restored to a transaction read view. */
+
+void
+innobase_set_cursor_view(
+/*=====================*/
+	void*	curview);	/* in: Consistent read view to be closed */
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index fc68b5a2ea991de47bf9f63f976ea7326c4124f3..96d380d5ebba8d4a80d2e8ced6884ce8084251a7 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -2867,7 +2867,16 @@ void ha_ndbcluster::info(uint flag)
     errkey= m_dupkey;
   }
   if (flag & HA_STATUS_AUTO)
+  {
     DBUG_PRINT("info", ("HA_STATUS_AUTO"));
+    if (m_table)
+    {
+      Ndb *ndb= get_ndb();
+      
+      auto_increment_value= 
+        ndb->readAutoIncrementValue((const NDBTAB *) m_table);
+    }
+  }
   DBUG_VOID_RETURN;
 }
 
@@ -6353,12 +6362,14 @@ void ndb_serialize_cond(const Item *item, void *arg)
             // result type
             if (context->expecting(Item::FIELD_ITEM) &&
                 (context->expecting_field_result(field->result_type()) ||
-                 // Date and year can be written as strings
+                 // Date and year can be written as string or int
                  ((type == MYSQL_TYPE_TIME ||
                    type == MYSQL_TYPE_DATE || 
                    type == MYSQL_TYPE_YEAR ||
                    type == MYSQL_TYPE_DATETIME)
-                  ? context->expecting_field_result(STRING_RESULT) : true)) &&
+                  ? (context->expecting_field_result(STRING_RESULT) ||
+                     context->expecting_field_result(INT_RESULT))
+                  : true)) &&
                 // Bit fields no yet supported in scan filter
                 type != MYSQL_TYPE_BIT)
             {
@@ -6426,8 +6437,8 @@ void ndb_serialize_cond(const Item *item, void *arg)
             }
             else
             {
-              DBUG_PRINT("info", ("Was not expecting field of type %u",
-                                  field->result_type()));
+              DBUG_PRINT("info", ("Was not expecting field of type %u(%u)",
+                                  field->result_type(), type));
               context->supported= FALSE;
             }
           }
@@ -6568,17 +6579,6 @@ void ndb_serialize_cond(const Item *item, void *arg)
             context->expect(Item::FUNC_ITEM);
             break;
           }
-          case Item_func::NOTLIKE_FUNC:
-          {
-            DBUG_PRINT("info", ("NOTLIKE_FUNC"));      
-            curr_cond->ndb_item= new Ndb_item(func_item->functype(),
-                                              func_item);      
-            context->expect(Item::STRING_ITEM);
-            context->expect(Item::FIELD_ITEM);
-            context->expect_field_result(STRING_RESULT);
-            context->expect(Item::FUNC_ITEM);
-            break;
-          }
           case Item_func::ISNULL_FUNC:
           {
             DBUG_PRINT("info", ("ISNULL_FUNC"));      
@@ -6997,6 +6997,8 @@ ha_ndbcluster::build_scan_filter_predicate(Ndb_cond * &cond,
       break;
     Ndb_item *a= cond->next->ndb_item;
     Ndb_item *b, *field, *value= NULL;
+    LINT_INIT(field);
+
     switch (cond->ndb_item->argument_count()) {
     case 1:
       field= 
@@ -7021,7 +7023,7 @@ ha_ndbcluster::build_scan_filter_predicate(Ndb_cond * &cond,
     switch ((negated) ? 
             Ndb_item::negate(cond->ndb_item->qualification.function_type)
             : cond->ndb_item->qualification.function_type) {
-    case Item_func::EQ_FUNC:
+    case NDB_EQ_FUNC:
     {
       if (!value || !field) break;
       // Save value in right format for the field type
@@ -7035,7 +7037,7 @@ ha_ndbcluster::build_scan_filter_predicate(Ndb_cond * &cond,
       cond= cond->next->next->next;
       DBUG_RETURN(0);
     }
-    case Item_func::NE_FUNC:
+    case NDB_NE_FUNC:
     {
       if (!value || !field) break;
       // Save value in right format for the field type
@@ -7049,7 +7051,7 @@ ha_ndbcluster::build_scan_filter_predicate(Ndb_cond * &cond,
       cond= cond->next->next->next;
       DBUG_RETURN(0);
     }
-    case Item_func::LT_FUNC:
+    case NDB_LT_FUNC:
     {
       if (!value || !field) break;
       // Save value in right format for the field type
@@ -7075,7 +7077,7 @@ ha_ndbcluster::build_scan_filter_predicate(Ndb_cond * &cond,
       cond= cond->next->next->next;
       DBUG_RETURN(0);
     }
-    case Item_func::LE_FUNC:
+    case NDB_LE_FUNC:
     {
       if (!value || !field) break;
       // Save value in right format for the field type
@@ -7101,7 +7103,7 @@ ha_ndbcluster::build_scan_filter_predicate(Ndb_cond * &cond,
       cond= cond->next->next->next;
       DBUG_RETURN(0);
     }
-    case Item_func::GE_FUNC:
+    case NDB_GE_FUNC:
     {
       if (!value || !field) break;
       // Save value in right format for the field type
@@ -7127,7 +7129,7 @@ ha_ndbcluster::build_scan_filter_predicate(Ndb_cond * &cond,
       cond= cond->next->next->next;
       DBUG_RETURN(0);
     }
-    case Item_func::GT_FUNC:
+    case NDB_GT_FUNC:
     {
       if (!value || !field) break;
       // Save value in right format for the field type
@@ -7153,7 +7155,7 @@ ha_ndbcluster::build_scan_filter_predicate(Ndb_cond * &cond,
       cond= cond->next->next->next;
       DBUG_RETURN(0);
     }
-    case Item_func::LIKE_FUNC:
+    case NDB_LIKE_FUNC:
     {
       if (!value || !field) break;
       if ((value->qualification.value_type != Item::STRING_ITEM) &&
@@ -7172,12 +7174,12 @@ ha_ndbcluster::build_scan_filter_predicate(Ndb_cond * &cond,
       cond= cond->next->next->next;
       DBUG_RETURN(0);
     }
-    case Item_func::NOTLIKE_FUNC:
+    case NDB_NOTLIKE_FUNC:
     {
       if (!value || !field) break;
       if ((value->qualification.value_type != Item::STRING_ITEM) &&
           (value->qualification.value_type != Item::VARBIN_ITEM))
-        break;
+          break;
       // Save value in right format for the field type
       value->save_in_field(field);
       DBUG_PRINT("info", ("Generating NOTLIKE filter: notlike(%d,%s,%d)", 
@@ -7191,7 +7193,7 @@ ha_ndbcluster::build_scan_filter_predicate(Ndb_cond * &cond,
       cond= cond->next->next->next;
       DBUG_RETURN(0);
     }
-    case Item_func::ISNULL_FUNC:
+    case NDB_ISNULL_FUNC:
       if (!field)
         break;
       DBUG_PRINT("info", ("Generating ISNULL filter"));
@@ -7199,7 +7201,7 @@ ha_ndbcluster::build_scan_filter_predicate(Ndb_cond * &cond,
         DBUG_RETURN(1);
       cond= cond->next->next;
       DBUG_RETURN(0);
-    case Item_func::ISNOTNULL_FUNC:
+    case NDB_ISNOTNULL_FUNC:
     {
       if (!field)
         break;
@@ -7236,7 +7238,7 @@ ha_ndbcluster::build_scan_filter_group(Ndb_cond* &cond, NdbScanFilter *filter)
     case NDB_FUNCTION:
     {
       switch (cond->ndb_item->qualification.function_type) {
-      case Item_func::COND_AND_FUNC:
+      case NDB_COND_AND_FUNC:
       {
         level++;
         DBUG_PRINT("info", ("Generating %s group %u", (negated)?"NAND":"AND",
@@ -7248,7 +7250,7 @@ ha_ndbcluster::build_scan_filter_group(Ndb_cond* &cond, NdbScanFilter *filter)
         cond= cond->next;
         break;
       }
-      case Item_func::COND_OR_FUNC:
+      case NDB_COND_OR_FUNC:
       {
         level++;
         DBUG_PRINT("info", ("Generating %s group %u", (negated)?"NOR":"OR",
@@ -7260,7 +7262,7 @@ ha_ndbcluster::build_scan_filter_group(Ndb_cond* &cond, NdbScanFilter *filter)
         cond= cond->next;
         break;
       }
-      case Item_func::NOT_FUNC:
+      case NDB_NOT_FUNC:
       {
         DBUG_PRINT("info", ("Generating negated query"));
         cond= cond->next;
@@ -7303,8 +7305,8 @@ ha_ndbcluster::build_scan_filter(Ndb_cond * &cond, NdbScanFilter *filter)
     switch (cond->ndb_item->type) {
     case NDB_FUNCTION:
       switch (cond->ndb_item->qualification.function_type) {
-      case Item_func::COND_AND_FUNC:
-      case Item_func::COND_OR_FUNC:
+      case NDB_COND_AND_FUNC:
+      case NDB_COND_OR_FUNC:
         simple_cond= FALSE;
         break;
       default:
diff --git a/sql/ha_ndbcluster.h b/sql/ha_ndbcluster.h
index b34f8dd063c3ed2b815cc31d730c3629fe72e881..034bb9292e819c5e8f0860a93395e85bea64c035 100644
--- a/sql/ha_ndbcluster.h
+++ b/sql/ha_ndbcluster.h
@@ -72,10 +72,28 @@ typedef enum ndb_item_type {
   NDB_END_COND = 3 // End marker for condition group
 } NDB_ITEM_TYPE;
 
+typedef enum ndb_func_type {
+  NDB_EQ_FUNC = 0,
+  NDB_NE_FUNC = 1,
+  NDB_LT_FUNC = 2,
+  NDB_LE_FUNC = 3,
+  NDB_GT_FUNC = 4,
+  NDB_GE_FUNC = 5,
+  NDB_ISNULL_FUNC = 6,
+  NDB_ISNOTNULL_FUNC = 7,
+  NDB_LIKE_FUNC = 8,
+  NDB_NOTLIKE_FUNC = 9,
+  NDB_NOT_FUNC = 10,
+  NDB_UNKNOWN_FUNC = 11,
+  NDB_COND_AND_FUNC = 12,
+  NDB_COND_OR_FUNC = 13,
+  NDB_UNSUPPORTED_FUNC = 14
+} NDB_FUNC_TYPE;
+
 typedef union ndb_item_qualification {
   Item::Type value_type; 
-  enum_field_types field_type;       // Instead of Item::FIELD_ITEM
-  Item_func::Functype function_type; // Instead of Item::FUNC_ITEM
+  enum_field_types field_type; // Instead of Item::FIELD_ITEM
+  NDB_FUNC_TYPE function_type; // Instead of Item::FUNC_ITEM
 } NDB_ITEM_QUALIFICATION;
 
 typedef struct ndb_item_field_value {
@@ -91,23 +109,31 @@ typedef union ndb_item_value {
 
 struct negated_function_mapping
 {
-  Item_func::Functype pos_fun;
-  Item_func::Functype neg_fun;
+  NDB_FUNC_TYPE pos_fun;
+  NDB_FUNC_TYPE neg_fun;
 };
 
+/*
+  Define what functions can be negated in condition pushdown.
+  Note, these HAVE to be in the same order as in definition enum
+*/
 static const negated_function_mapping neg_map[]= 
 {
-  {Item_func::EQ_FUNC, Item_func::NE_FUNC},
-  {Item_func::NE_FUNC, Item_func::EQ_FUNC},
-  {Item_func::LT_FUNC, Item_func::GE_FUNC},
-  {Item_func::LE_FUNC, Item_func::GT_FUNC},
-  {Item_func::GT_FUNC, Item_func::LE_FUNC},
-  {Item_func::GE_FUNC, Item_func::LT_FUNC},
-  {Item_func::LIKE_FUNC, Item_func::NOTLIKE_FUNC},
-  {Item_func::NOTLIKE_FUNC, Item_func::LIKE_FUNC},
-  {Item_func::ISNULL_FUNC, Item_func::ISNOTNULL_FUNC},
-  {Item_func::ISNOTNULL_FUNC, Item_func::ISNULL_FUNC},
-  {Item_func::UNKNOWN_FUNC, Item_func::NOT_FUNC}
+  {NDB_EQ_FUNC, NDB_NE_FUNC},
+  {NDB_NE_FUNC, NDB_EQ_FUNC},
+  {NDB_LT_FUNC, NDB_GE_FUNC},
+  {NDB_LE_FUNC, NDB_GT_FUNC},
+  {NDB_GT_FUNC, NDB_LE_FUNC},
+  {NDB_GE_FUNC, NDB_LT_FUNC},
+  {NDB_ISNULL_FUNC, NDB_ISNOTNULL_FUNC},
+  {NDB_ISNOTNULL_FUNC, NDB_ISNULL_FUNC},
+  {NDB_LIKE_FUNC, NDB_NOTLIKE_FUNC},
+  {NDB_NOTLIKE_FUNC, NDB_LIKE_FUNC},
+  {NDB_NOT_FUNC, NDB_UNSUPPORTED_FUNC},
+  {NDB_UNKNOWN_FUNC, NDB_UNSUPPORTED_FUNC},
+  {NDB_COND_AND_FUNC, NDB_UNSUPPORTED_FUNC},
+  {NDB_COND_OR_FUNC, NDB_UNSUPPORTED_FUNC},
+  {NDB_UNSUPPORTED_FUNC, NDB_UNSUPPORTED_FUNC}
 };
   
 /*
@@ -162,14 +188,14 @@ class Ndb_item {
   Ndb_item(Item_func::Functype func_type, const Item *item_value) 
     : type(NDB_FUNCTION)
   {
-    qualification.function_type= func_type;
+    qualification.function_type= item_func_to_ndb_func(func_type);
     value.item= item_value;
     value.arg_count= ((Item_func *) item_value)->argument_count();
   };
   Ndb_item(Item_func::Functype func_type, uint no_args) 
     : type(NDB_FUNCTION)
   {
-    qualification.function_type= func_type;
+    qualification.function_type= item_func_to_ndb_func(func_type);
     value.arg_count= no_args;
   };
   ~Ndb_item()
@@ -231,13 +257,30 @@ class Ndb_item {
       ((Item *)item)->save_in_field(field, false);
   };
 
-  static Item_func::Functype negate(Item_func::Functype fun)
+  static NDB_FUNC_TYPE item_func_to_ndb_func(Item_func::Functype fun)
+  {
+    switch (fun) {
+    case (Item_func::EQ_FUNC): { return NDB_EQ_FUNC; }
+    case (Item_func::NE_FUNC): { return NDB_NE_FUNC; }
+    case (Item_func::LT_FUNC): { return NDB_LT_FUNC; }
+    case (Item_func::LE_FUNC): { return NDB_LE_FUNC; }
+    case (Item_func::GT_FUNC): { return NDB_GT_FUNC; }
+    case (Item_func::GE_FUNC): { return NDB_GE_FUNC; }
+    case (Item_func::ISNULL_FUNC): { return NDB_ISNULL_FUNC; }
+    case (Item_func::ISNOTNULL_FUNC): { return NDB_ISNOTNULL_FUNC; }
+    case (Item_func::LIKE_FUNC): { return NDB_LIKE_FUNC; }
+    case (Item_func::NOT_FUNC): { return NDB_NOT_FUNC; }
+    case (Item_func::UNKNOWN_FUNC): { return NDB_UNKNOWN_FUNC; }
+    case (Item_func::COND_AND_FUNC): { return NDB_COND_AND_FUNC; }
+    case (Item_func::COND_OR_FUNC): { return NDB_COND_OR_FUNC; }
+    default: { return NDB_UNSUPPORTED_FUNC; }
+    }
+  };
+
+  static NDB_FUNC_TYPE negate(NDB_FUNC_TYPE fun)
   {
-    uint i;
-    for (i=0; 
-         fun != neg_map[i].pos_fun &&
-           neg_map[i].pos_fun != Item_func::UNKNOWN_FUNC;
-         i++);
+    uint i= (uint) fun;
+    DBUG_ASSERT(fun == neg_map[i].pos_fun);
     return  neg_map[i].neg_fun;
   };
 
diff --git a/sql/handler.cc b/sql/handler.cc
index 2731cb8480d575cd0beb06cf9d00af6c12e53a10..0b247f83af14838c8b0ffc7d8feb9da8304c0a67 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -547,8 +547,8 @@ void trans_register_ha(THD *thd, bool all, handlerton *ht_arg)
   trans->ht[trans->nht++]=ht_arg;
   DBUG_ASSERT(*ht == ht_arg);
   trans->no_2pc|=(ht_arg->prepare==0);
-  if (thd->transaction.xid.is_null())
-    thd->transaction.xid.set(thd->query_id);
+  if (thd->transaction.xid_state.xid.is_null())
+    thd->transaction.xid_state.xid.set(thd->query_id);
   DBUG_VOID_RETURN;
 }
 
@@ -595,10 +595,10 @@ int ha_commit_trans(THD *thd, bool all)
   THD_TRANS *trans= all ? &thd->transaction.all : &thd->transaction.stmt;
   bool is_real_trans= all || thd->transaction.all.nht == 0;
   handlerton **ht= trans->ht;
-  my_xid xid= thd->transaction.xid.get_my_xid();
+  my_xid xid= thd->transaction.xid_state.xid.get_my_xid();
   DBUG_ENTER("ha_commit_trans");
 
-  if (thd->transaction.in_sub_stmt)
+  if (thd->in_sub_stmt)
   {
     /*
       Since we don't support nested statement transactions in 5.0,
@@ -695,7 +695,7 @@ int ha_commit_one_phase(THD *thd, bool all)
     trans->nht=0;
     trans->no_2pc=0;
     if (is_real_trans)
-      thd->transaction.xid.null();
+      thd->transaction.xid_state.xid.null();
     if (all)
     {
 #ifdef HAVE_QUERY_CACHE
@@ -717,7 +717,7 @@ int ha_rollback_trans(THD *thd, bool all)
   THD_TRANS *trans=all ? &thd->transaction.all : &thd->transaction.stmt;
   bool is_real_trans=all || thd->transaction.all.nht == 0;
   DBUG_ENTER("ha_rollback_trans");
-  if (thd->transaction.in_sub_stmt)
+  if (thd->in_sub_stmt)
   {
     /*
       If we are inside stored function or trigger we should not commit or
@@ -751,7 +751,7 @@ int ha_rollback_trans(THD *thd, bool all)
     trans->nht=0;
     trans->no_2pc=0;
     if (is_real_trans)
-      thd->transaction.xid.null();
+      thd->transaction.xid_state.xid.null();
     if (all)
     {
       thd->variables.tx_isolation=thd->session_tx_isolation;
@@ -945,6 +945,7 @@ int ha_recover(HASH *commit_list)
           char buf[XIDDATASIZE*4+6]; // see xid_to_str
           sql_print_information("ignore xid %s", xid_to_str(buf, list+i));
 #endif
+          xid_cache_insert(list+i, XA_PREPARED);
           found_foreign_xids++;
           continue;
         }
@@ -1008,10 +1009,8 @@ bool mysql_xa_recover(THD *thd)
 {
   List<Item> field_list;
   Protocol *protocol= thd->protocol;
-  handlerton **ht= handlertons, **end_ht=ht+total_ha;
-  bool error=TRUE;
-  int len, got;
-  XID *list=0;
+  int i=0;
+  XID_STATE *xs;
   DBUG_ENTER("mysql_xa_recover");
 
   field_list.push_back(new Item_int("formatID",0,11));
@@ -1021,48 +1020,30 @@ bool mysql_xa_recover(THD *thd)
 
   if (protocol->send_fields(&field_list,
                             Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
-    DBUG_RETURN(TRUE);
-
-  for (len= MAX_XID_LIST_SIZE ; list==0 && len > MIN_XID_LIST_SIZE; len/=2)
-  {
-    list=(XID *)my_malloc(len*sizeof(XID), MYF(0));
-  }
-  if (!list)
-  {
-    my_error(ER_OUTOFMEMORY, MYF(0), len);
     DBUG_RETURN(1);
-  }
 
-  for ( ; ht < end_ht ; ht++)
+  pthread_mutex_lock(&LOCK_xid_cache);
+  while (xs=(XID_STATE*)hash_element(&xid_cache, i++))
   {
-    if (!(*ht)->recover)
-      continue;
-    while ((got=(*(*ht)->recover)(list, len)) > 0 )
+    if (xs->xa_state==XA_PREPARED)
     {
-      XID *xid, *end;
-      for (xid=list, end=list+got; xid < end; xid++)
+      protocol->prepare_for_resend();
+      protocol->store_longlong((longlong)xs->xid.formatID, FALSE);
+      protocol->store_longlong((longlong)xs->xid.gtrid_length, FALSE);
+      protocol->store_longlong((longlong)xs->xid.bqual_length, FALSE);
+      protocol->store(xs->xid.data, xs->xid.gtrid_length+xs->xid.bqual_length,
+                      &my_charset_bin);
+      if (protocol->write())
       {
-        if (xid->get_my_xid())
-          continue; // skip "our" xids
-        protocol->prepare_for_resend();
-        protocol->store_longlong((longlong)xid->formatID, FALSE);
-        protocol->store_longlong((longlong)xid->gtrid_length, FALSE);
-        protocol->store_longlong((longlong)xid->bqual_length, FALSE);
-        protocol->store(xid->data, xid->gtrid_length+xid->bqual_length,
-                        &my_charset_bin);
-        if (protocol->write())
-          goto err;
+        pthread_mutex_unlock(&LOCK_xid_cache);
+        DBUG_RETURN(1);
       }
-      if (got < len)
-        break;
     }
   }
 
-  error=FALSE;
+  pthread_mutex_unlock(&LOCK_xid_cache);
   send_eof(thd);
-err:
-  my_free((gptr)list, MYF(0));
-  DBUG_RETURN(error);
+  DBUG_RETURN(0);
 }
 
 /*
@@ -1660,7 +1641,7 @@ void handler::print_error(int error, myf errflag)
   }
   case HA_ERR_NULL_IN_SPATIAL:
     textno= ER_UNKNOWN_ERROR;
-    DBUG_VOID_RETURN;
+    break;
   case HA_ERR_FOUND_DUPP_UNIQUE:
     textno=ER_DUP_UNIQUE;
     break;
@@ -1683,8 +1664,8 @@ void handler::print_error(int error, myf errflag)
     textno=ER_CRASHED_ON_REPAIR;
     break;
   case HA_ERR_OUT_OF_MEM:
-    my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), errflag);
-    DBUG_VOID_RETURN;
+    textno=ER_OUT_OF_RESOURCES;
+    break;
   case HA_ERR_WRONG_COMMAND:
     textno=ER_ILLEGAL_HA;
     break;
@@ -1695,10 +1676,8 @@ void handler::print_error(int error, myf errflag)
     textno=ER_UNSUPPORTED_EXTENSION;
     break;
   case HA_ERR_RECORD_FILE_FULL:
-    textno=ER_RECORD_FILE_FULL;
-    break;
   case HA_ERR_INDEX_FILE_FULL:
-    textno= errno;
+    textno=ER_RECORD_FILE_FULL;
     break;
   case HA_ERR_LOCK_WAIT_TIMEOUT:
     textno=ER_LOCK_WAIT_TIMEOUT;
diff --git a/sql/handler.h b/sql/handler.h
index 276f50bde63ea997ec77de05ad38a2b6147784e7..ef45676207bedab55f84f98e5f768e0e6b6f0976 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -227,11 +227,11 @@ struct xid_t {
   char data[XIDDATASIZE];  // not \0-terminated !
 
   bool eq(struct xid_t *xid)
-  { return !memcmp(this, xid, sizeof(long)*3+gtrid_length+bqual_length); }
+  { return !memcmp(this, xid, length()); }
   bool eq(long g, long b, const char *d)
   { return g == gtrid_length && b == bqual_length && !memcmp(d, data, g+b); }
   void set(struct xid_t *xid)
-  { memcpy(this, xid, sizeof(long)*3+xid->gtrid_length+xid->bqual_length); }
+  { memcpy(this, xid, xid->length()); }
   void set(long f, const char *g, long gl, const char *b, long bl)
   {
     formatID= f;
@@ -270,6 +270,11 @@ struct xid_t {
            !memcmp(data, MYSQL_XID_PREFIX, MYSQL_XID_PREFIX_LEN) ?
            quick_get_my_xid() : 0;
   }
+  uint length()
+  {
+    return sizeof(formatID)+sizeof(gtrid_length)+sizeof(bqual_length)+
+           gtrid_length+bqual_length;
+  }
 };
 typedef struct xid_t XID;
 
diff --git a/sql/hostname.cc b/sql/hostname.cc
index 12b69a978596d8fbc4b33cc8737f5e1e1994c0ae..3b1eeb63d378ee8b25038cb7d634240d52744890 100644
--- a/sql/hostname.cc
+++ b/sql/hostname.cc
@@ -143,8 +143,8 @@ my_string ip_to_hostname(struct in_addr *in, uint *errors)
   *errors=0;
 
   /* We always treat the loopback address as "localhost". */
-  if (in->s_addr == INADDR_LOOPBACK)
-    return (char *)my_localhost;
+  if (in->s_addr == htonl(INADDR_LOOPBACK))   // is expanded inline by gcc
+    DBUG_RETURN((char *)my_localhost);
 
   /* Check first if we have name in cache */
   if (!(specialflag & SPECIAL_NO_HOST_CACHE))
diff --git a/sql/init.cc b/sql/init.cc
index 4beb8db0c6f8ae428190707085999deb2fca14bd..e53eeab8902bbb165f850cb5995432b89f0c2c18 100644
--- a/sql/init.cc
+++ b/sql/init.cc
@@ -39,12 +39,11 @@ void unireg_init(ulong options)
 #endif
 
   VOID(strmov(reg_ext,".frm"));
-  specialflag=SPECIAL_SAME_DB_NAME;
+  specialflag=SPECIAL_SAME_DB_NAME | options;  /* Set options from argv */
   /* Make a tab of powers of 10 */
   for (i=0,nr=1.0; i < array_elements(log_10) ; i++)
   {					/* It's used by filesort... */
     log_10[i]= nr ; nr*= 10.0;
   }
-  specialflag|=options;			/* Set options from argv */
   DBUG_VOID_RETURN;
 }
diff --git a/sql/item.cc b/sql/item.cc
index 0e3907dd5a64eecfb36b9fd8604326940140a432..7575a6a218bb704cff4d7a1185e0554c2bbf8717 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -1016,14 +1016,18 @@ bool DTCollation::aggregate(DTCollation &dt, uint flags)
        ; // Do nothing
     }
     else if ((flags & MY_COLL_ALLOW_SUPERSET_CONV) &&
-             derivation < dt.derivation &&
-             collation->state & MY_CS_UNICODE)
+             collation->state & MY_CS_UNICODE &&
+             (derivation < dt.derivation ||
+             (derivation == dt.derivation &&
+             !(dt.collation->state & MY_CS_UNICODE))))
     {
       // Do nothing
     }
     else if ((flags & MY_COLL_ALLOW_SUPERSET_CONV) &&
-             dt.derivation < derivation &&
-             dt.collation->state & MY_CS_UNICODE)
+             dt.collation->state & MY_CS_UNICODE &&
+             (dt.derivation < derivation ||
+              (dt.derivation == derivation &&
+             !(collation->state & MY_CS_UNICODE))))
     {
       set(dt);
     }
@@ -1082,6 +1086,176 @@ bool DTCollation::aggregate(DTCollation &dt, uint flags)
   return 0;
 }
 
+/******************************/
+static
+void my_coll_agg_error(DTCollation &c1, DTCollation &c2, const char *fname)
+{
+  my_error(ER_CANT_AGGREGATE_2COLLATIONS,MYF(0),
+           c1.collation->name,c1.derivation_name(),
+           c2.collation->name,c2.derivation_name(),
+           fname);
+}
+
+
+static
+void my_coll_agg_error(DTCollation &c1, DTCollation &c2, DTCollation &c3,
+                       const char *fname)
+{
+  my_error(ER_CANT_AGGREGATE_3COLLATIONS,MYF(0),
+  	   c1.collation->name,c1.derivation_name(),
+	   c2.collation->name,c2.derivation_name(),
+	   c3.collation->name,c3.derivation_name(),
+	   fname);
+}
+
+
+static
+void my_coll_agg_error(Item** args, uint count, const char *fname)
+{
+  if (count == 2)
+    my_coll_agg_error(args[0]->collation, args[1]->collation, fname);
+  else if (count == 3)
+    my_coll_agg_error(args[0]->collation, args[1]->collation,
+                      args[2]->collation, fname);
+  else
+    my_error(ER_CANT_AGGREGATE_NCOLLATIONS,MYF(0),fname);
+}
+
+
+bool agg_item_collations(DTCollation &c, const char *fname,
+                         Item **av, uint count, uint flags)
+{
+  uint i;
+  c.set(av[0]->collation);
+  for (i= 1; i < count; i++)
+  {
+    if (c.aggregate(av[i]->collation, flags))
+    {
+      my_coll_agg_error(av, count, fname);
+      return TRUE;
+    }
+  }
+  if ((flags & MY_COLL_DISALLOW_NONE) &&
+      c.derivation == DERIVATION_NONE)
+  {
+    my_coll_agg_error(av, count, fname);
+    return TRUE;
+  }
+  return FALSE;
+}
+
+
+bool agg_item_collations_for_comparison(DTCollation &c, const char *fname,
+                                        Item **av, uint count, uint flags)
+{
+  return (agg_item_collations(c, fname, av, count,
+                              flags | MY_COLL_DISALLOW_NONE));
+}
+
+
+/* 
+  Collect arguments' character sets together.
+  We allow to apply automatic character set conversion in some cases.
+  The conditions when conversion is possible are:
+  - arguments A and B have different charsets
+  - A wins according to coercibility rules
+    (i.e. a column is stronger than a string constant,
+     an explicit COLLATE clause is stronger than a column)
+  - character set of A is either superset for character set of B,
+    or B is a string constant which can be converted into the
+    character set of A without data loss.
+    
+  If all of the above is true, then it's possible to convert
+  B into the character set of A, and then compare according
+  to the collation of A.
+  
+  For functions with more than two arguments:
+
+    collect(A,B,C) ::= collect(collect(A,B),C)
+*/
+
+bool agg_item_charsets(DTCollation &coll, const char *fname,
+                       Item **args, uint nargs, uint flags)
+{
+  Item **arg, **last, *safe_args[2];
+  if (agg_item_collations(coll, fname, args, nargs, flags))
+    return TRUE;
+
+  /*
+    For better error reporting: save the first and the second argument.
+    We need this only if the the number of args is 3 or 2:
+    - for a longer argument list, "Illegal mix of collations"
+      doesn't display each argument's characteristics.
+    - if nargs is 1, then this error cannot happen.
+  */
+  if (nargs >=2 && nargs <= 3)
+  {
+    safe_args[0]= args[0];
+    safe_args[1]= args[1];
+  }
+
+  THD *thd= current_thd;
+  Query_arena *arena, backup;
+  bool res= FALSE;
+  /*
+    In case we're in statement prepare, create conversion item
+    in its memory: it will be reused on each execute.
+  */
+  arena= thd->change_arena_if_needed(&backup);
+
+  for (arg= args, last= args + nargs; arg < last; arg++)
+  {
+    Item* conv;
+    uint32 dummy_offset;
+    if (!String::needs_conversion(0, coll.collation,
+                                  (*arg)->collation.collation,
+                                  &dummy_offset))
+      continue;
+
+    if (!(conv= (*arg)->safe_charset_converter(coll.collation)))
+    {
+      if (nargs >=2 && nargs <= 3)
+      {
+        /* restore the original arguments for better error message */
+        args[0]= safe_args[0];
+        args[1]= safe_args[1];
+      }
+      my_coll_agg_error(args, nargs, fname);
+      res= TRUE;
+      break; // we cannot return here, we need to restore "arena".
+    }
+    if ((*arg)->type() == Item::FIELD_ITEM)
+      ((Item_field *)(*arg))->no_const_subst= 1;
+    /*
+      If in statement prepare, then we create a converter for two
+      constant items, do it once and then reuse it.
+      If we're in execution of a prepared statement, arena is NULL,
+      and the conv was created in runtime memory. This can be
+      the case only if the argument is a parameter marker ('?'),
+      because for all true constants the charset converter has already
+      been created in prepare. In this case register the change for
+      rollback.
+    */
+    if (arena)
+      *arg= conv;
+    else
+      thd->change_item_tree(arg, conv);
+    /*
+      We do not check conv->fixed, because Item_func_conv_charset which can
+      be return by safe_charset_converter can't be fixed at creation
+    */
+    conv->fix_fields(thd, arg);
+  }
+  if (arena)
+    thd->restore_backup_item_arena(arena, &backup);
+  return res;
+}
+
+
+
+
+/**********************************************/
+
 Item_field::Item_field(Field *f)
   :Item_ident(0, NullS, *f->table_name, f->field_name),
   item_equal(0), no_const_subst(0),
@@ -2018,6 +2192,7 @@ bool Item_param::set_from_user_var(THD *thd, const user_var_entry *entry)
 
 void Item_param::reset()
 {
+  DBUG_ENTER("Item_param::reset");
   /* Shrink string buffer if it's bigger than max possible CHAR column */
   if (str_value.alloced_length() > MAX_CHAR_WIDTH)
     str_value.free();
@@ -2042,6 +2217,7 @@ void Item_param::reset()
     DBUG_ASSERTS(state != NO_VALUE) in all Item_param::get_*
     methods).
   */
+  DBUG_VOID_RETURN;
 }
 
 
@@ -2895,7 +3071,9 @@ bool Item_field::fix_fields(THD *thd, Item **reference)
       expression to 'reference', i.e. it substitute that expression instead
       of this Item_field
     */
-    if ((from_field= find_field_in_tables(thd, this, context->table_list,
+    if ((from_field= find_field_in_tables(thd, this,
+                                          context->first_name_resolution_table,
+                                          context->last_name_resolution_table,
                                           reference,
                                           IGNORE_EXCEPT_NON_UNIQUE,
                                           !any_privileges &&
@@ -2904,13 +3082,13 @@ bool Item_field::fix_fields(THD *thd, Item **reference)
 	not_found_field)
     {
       /*
-        If there is an outer contexts (outer selects, but current select is
+        If there are outer contexts (outer selects, but current select is
         not derived table or view) try to resolve this reference in the
         outer contexts.
 
         We treat each subselect as a separate namespace, so that different
-        subselects may contain columns with the same names. The subselects are
-         searched starting from the innermost.
+        subselects may contain columns with the same names. The subselects
+        are searched starting from the innermost.
       */
       Name_resolution_context *last_checked_context= context;
       Item **ref= (Item **) not_found_item;
@@ -2939,7 +3117,10 @@ bool Item_field::fix_fields(THD *thd, Item **reference)
              (!select->with_sum_func &&
               select->group_list.elements == 0)) &&
             (from_field= find_field_in_tables(thd, this,
-                                              outer_context->table_list,
+                                              outer_context->
+                                                first_name_resolution_table,
+                                              outer_context->
+                                                last_name_resolution_table,
                                               reference,
                                               IGNORE_EXCEPT_NON_UNIQUE,
                                               outer_context->
@@ -3014,7 +3195,9 @@ bool Item_field::fix_fields(THD *thd, Item **reference)
 	else
 	{
           /* Call find_field_in_tables only to report the error */
-	  find_field_in_tables(thd, this, context->table_list,
+	  find_field_in_tables(thd, this,
+                               context->first_name_resolution_table,
+                               context->last_name_resolution_table,
                                reference, REPORT_ALL_ERRORS,
                                !any_privileges &&
                                context->check_privileges, TRUE);
@@ -4182,7 +4365,10 @@ bool Item_ref::fix_fields(THD *thd, Item **reference)
             expression instead of this Item_ref
           */
           from_field= find_field_in_tables(thd, this,
-                                           outer_context->table_list,
+                                           outer_context->
+                                             first_name_resolution_table,
+                                           outer_context->
+                                             last_name_resolution_table,
                                            reference,
                                            IGNORE_EXCEPT_NON_UNIQUE,
                                            outer_context->check_privileges,
@@ -4801,9 +4987,8 @@ void Item_trigger_field::setup_field(THD *thd, TABLE *table)
     Try to find field by its name and if it will be found
     set field_idx properly.
   */
-  (void)find_field_in_real_table(thd, table, field_name,
-                                 (uint) strlen(field_name),
-                                 0, 0, &field_idx);
+  (void)find_field_in_table(thd, table, field_name, (uint) strlen(field_name),
+                            0, 0, &field_idx);
   thd->set_query_id= save_set_query_id;
   triggers= table->triggers;
 }
diff --git a/sql/item.h b/sql/item.h
index 5a1cf1938067eded79569f6a6492e0fb5d3263f9..ae5fbe5a44b5814363b811f99b63e2bd8307bcac 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -254,6 +254,19 @@ struct Name_resolution_context
     name resolution of different parts of the statement.
   */
   TABLE_LIST *table_list;
+  /*
+    In most cases the two table references below replace 'table_list' above
+    for the purpose of name resolution. The first and last name resolution
+    table references allow us to search only in a sub-tree of the nested
+    join tree in a FROM clause. This is needed for NATURAL JOIN, JOIN ... USING
+    and JOIN ... ON. 
+  */
+  TABLE_LIST *first_name_resolution_table;
+  /*
+    Last table to search in the list of leaf table references that begins
+    with first_name_resolution_table.
+  */
+  TABLE_LIST *last_name_resolution_table;
 
   /*
     SELECT_LEX item belong to, in case of merged VIEW it can differ from
@@ -293,11 +306,13 @@ struct Name_resolution_context
   {
     resolve_in_select_list= FALSE;
     error_processor= &dummy_error_processor;
+    first_name_resolution_table= NULL;
+    last_name_resolution_table= NULL;
   }
 
   void resolve_in_table_list_only(TABLE_LIST *tables)
   {
-    table_list= tables;
+    table_list= first_name_resolution_table= tables;
     resolve_in_select_list= FALSE;
   }
 
@@ -657,7 +672,8 @@ public:
     current value and pointer passed via parameter otherwise.
   */
   virtual Item **this_item_addr(THD *thd, Item **addr) { return addr; }
-  virtual Item *this_const_item() const { return const_cast<Item*>(this); } /* For SPs mostly. */
+  /* For SPs mostly. */
+  virtual Item *this_const_item() const { return const_cast<Item*>(this); }
 
   // Row emulation
   virtual uint cols() { return 1; }
@@ -767,6 +783,15 @@ public:
 };
 
 
+bool agg_item_collations(DTCollation &c, const char *name,
+                         Item **items, uint nitems, uint flags= 0);
+bool agg_item_collations_for_comparison(DTCollation &c, const char *name,
+                                        Item **items, uint nitems,
+                                        uint flags= 0);
+bool agg_item_charsets(DTCollation &c, const char *name,
+                       Item **items, uint nitems, uint flags= 0);
+
+
 class Item_num: public Item
 {
 public:
@@ -819,6 +844,10 @@ public:
   void print(String *str);
   virtual bool change_context_processor(byte *cntx)
     { context= (Name_resolution_context *)cntx; return FALSE; }
+  friend bool insert_fields(THD *thd, Name_resolution_context *context,
+                            const char *db_name,
+                            const char *table_name, List_iterator<Item> *it,
+                            bool any_privileges);
 };
 
 class Item_equal;
@@ -1120,7 +1149,8 @@ public:
   void cleanup() {}
   void print(String *str);
   Item_num *neg() { value= -value; return this; }
-  uint decimal_precision() const { return (uint)(max_length - test(value < 0)); }
+  uint decimal_precision() const
+  { return (uint)(max_length - test(value < 0)); }
   bool eq(const Item *, bool binary_cmp) const;
 };
 
@@ -1141,7 +1171,7 @@ class Item_uint :public Item_int
 {
 public:
   Item_uint(const char *str_arg, uint length);
-  Item_uint(uint32 i) :Item_int((ulonglong) i, 10) {}
+  Item_uint(ulonglong i) :Item_int((ulonglong) i, 10) {}
   Item_uint(const char *str_arg, longlong i, uint length);
   double val_real()
     { DBUG_ASSERT(fixed == 1); return ulonglong2double((ulonglong)value); }
@@ -1464,7 +1494,13 @@ public:
   void save_org_in_field(Field *field)	{ (*ref)->save_org_in_field(field); }
   enum Item_result result_type () const { return (*ref)->result_type(); }
   enum_field_types field_type() const   { return (*ref)->field_type(); }
-  Field *get_tmp_table_field() { return result_field; }
+  Field *get_tmp_table_field()
+  { return result_field ? result_field : (*ref)->get_tmp_table_field(); }
+  Item *get_tmp_table_item(THD *thd)
+  { 
+    return (result_field ? new Item_field(result_field) :
+                          (*ref)->get_tmp_table_item(thd));
+  }
   table_map used_tables() const		
   { 
     return depended_from ? OUTER_REF_TABLE_BIT : (*ref)->used_tables(); 
@@ -1551,6 +1587,15 @@ public:
   bool val_bool();
   bool get_date(TIME *ltime, uint fuzzydate);
   void print(String *str);
+  /*
+    we add RAND_TABLE_BIT to prevent moving this item from HAVING to WHERE
+  */
+  table_map used_tables() const
+  {
+    return (depended_from ?
+            OUTER_REF_TABLE_BIT :
+            (*ref)->used_tables() | RAND_TABLE_BIT);
+  }
 };
 
 class Item_null_helper :public Item_ref_null_helper
@@ -1632,7 +1677,9 @@ public:
   longlong val_int()
   {
     int err;
-    return null_value ? LL(0) : my_strntoll(str_value.charset(),str_value.ptr(),str_value.length(),10, (char**) 0,&err); 
+    return null_value ? LL(0) : my_strntoll(str_value.charset(),str_value.ptr(),
+                                            str_value.length(),10, (char**) 0,
+                                            &err); 
   }
   String *val_str(String*);
   my_decimal *val_decimal(my_decimal *);
@@ -1702,7 +1749,7 @@ class Cached_item_field :public Cached_item
 public:
   Cached_item_field(Item_field *item)
   {
-    field=item->field;
+    field= item->field;
     buff= (char*) sql_calloc(length=field->pack_length());
   }
   bool cmp(void);
diff --git a/sql/item_buff.cc b/sql/item_buff.cc
index a67e420170a5675c26655d824bb79cf263752ead..9db2f465080fc98d0676fb5703203b7c6cd83584 100644
--- a/sql/item_buff.cc
+++ b/sql/item_buff.cc
@@ -25,9 +25,9 @@
 
 Cached_item *new_Cached_item(THD *thd, Item *item)
 {
-  if (item->type() == Item::FIELD_ITEM &&
-      !(((Item_field *) item)->field->flags & BLOB_FLAG))
-    return new Cached_item_field((Item_field *) item);
+  if (item->real_item()->type() == Item::FIELD_ITEM &&
+      !(((Item_field *) (item->real_item()))->field->flags & BLOB_FLAG))
+    return new Cached_item_field((Item_field *) (item->real_item()));
   switch (item->result_type()) {
   case STRING_RESULT:
     return new Cached_item_str(thd, (Item_field *) item);
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index d430d0d3c2370d7bc6800fec4b2ea7595293129d..c305196615a18eb426a709bf810190c3c7169abe 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -1903,6 +1903,8 @@ in_row::~in_row()
 byte *in_row::get_value(Item *item)
 {
   tmp.store_value(item);
+  if (item->is_null())
+    return 0;
   return (byte *)&tmp;
 }
 
@@ -2790,8 +2792,14 @@ bool Item_func_like::fix_fields(THD *thd, Item **ref)
   {
     /* If we are on execution stage */
     String *escape_str= escape_item->val_str(&tmp_value1);
+    /* ESCAPE must be 1 char in length.*/
+    if (escape_str && escape_str->numchars() != 1)
+    {
+      my_error(ER_WRONG_ARGUMENTS,MYF(0),"ESCAPE");
+      return TRUE;
+    }
     escape= escape_str ? *(escape_str->ptr()) : '\\';
- 
+
     /*
       We could also do boyer-more for non-const items, but as we would have to
       recompute the tables for each row it's not worth it.
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index 75c8411b8448e793d099d176fa554904eff1fc11..a4165407159841d320665a8db04fda43857e7c0c 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -913,6 +913,11 @@ public:
   longlong val_int();
   const char *func_name() const { return "<is_not_null_test>"; }
   void update_used_tables();
+  /*
+    we add RAND_TABLE_BIT to prevent moving this item from HAVING to WHERE
+  */
+  table_map used_tables() const
+    { return used_tables_cache | RAND_TABLE_BIT; }
 };
 
 
diff --git a/sql/item_create.cc b/sql/item_create.cc
index b7d8d50f9b34f380b027c4048283b9e3424d613e..8798bf889fc1f4909c7f02124f47881641d83b80 100644
--- a/sql/item_create.cc
+++ b/sql/item_create.cc
@@ -354,6 +354,11 @@ Item *create_func_sha(Item* a)
   return new Item_func_sha(a);
 }
 
+Item *create_func_sleep(Item* a)
+{
+  return new Item_func_sleep(a);
+}
+
 Item *create_func_space(Item *a)
 {
   CHARSET_INFO *cs= current_thd->variables.collation_connection;
diff --git a/sql/item_create.h b/sql/item_create.h
index 0a9af144ec0c8db421c4434812db541cc009fba9..d757318bfc104e8ddcad17a2731b0930e4c1fd91 100644
--- a/sql/item_create.h
+++ b/sql/item_create.h
@@ -83,6 +83,7 @@ Item *create_func_sec_to_time(Item* a);
 Item *create_func_sign(Item* a);
 Item *create_func_sin(Item* a);
 Item *create_func_sha(Item* a);
+Item *create_func_sleep(Item* a);
 Item *create_func_soundex(Item* a);
 Item *create_func_space(Item *);
 Item *create_func_sqrt(Item* a);
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 53895cc7331b010e75aac8610864c3c2f554f101..61467595424fe75ffd736310fd97e89da37a08e0 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -42,73 +42,6 @@ bool check_reserved_words(LEX_STRING *name)
 }
 
 
-static void my_coll_agg_error(DTCollation &c1, DTCollation &c2,
-			      const char *fname)
-{
-  my_error(ER_CANT_AGGREGATE_2COLLATIONS, MYF(0),
-           c1.collation->name, c1.derivation_name(),
-           c2.collation->name, c2.derivation_name(),
-           fname);
-}
-
-static void my_coll_agg_error(DTCollation &c1,
-			       DTCollation &c2,
-			       DTCollation &c3,
-			       const char *fname)
-{
-  my_error(ER_CANT_AGGREGATE_3COLLATIONS, MYF(0),
-           c1.collation->name, c1.derivation_name(),
-           c2.collation->name, c2.derivation_name(),
-           c3.collation->name, c3.derivation_name(),
-           fname);
-}
-
-
-static void my_coll_agg_error(Item** args, uint count, const char *fname)
-{
-  if (count == 2)
-    my_coll_agg_error(args[0]->collation, args[1]->collation, fname);
-  else if (count == 3)
-    my_coll_agg_error(args[0]->collation,
-		      args[1]->collation,
-		      args[2]->collation,
-		      fname);
-  else
-    my_error(ER_CANT_AGGREGATE_NCOLLATIONS, MYF(0), fname);
-}
-
-
-bool Item_func::agg_arg_collations(DTCollation &c, Item **av, uint count,
-                                   uint flags)
-{
-  uint i;
-  c.set(av[0]->collation);
-  for (i= 1; i < count; i++)
-  {
-    if (c.aggregate(av[i]->collation, flags))
-    {
-      my_coll_agg_error(av, count, func_name());
-      return TRUE;
-    }
-  }
-  if ((flags & MY_COLL_DISALLOW_NONE) &&
-      c.derivation == DERIVATION_NONE)
-  {
-    my_coll_agg_error(av, count, func_name());
-    return TRUE;
-  }
-  return FALSE;
-}
-
-
-bool Item_func::agg_arg_collations_for_comparison(DTCollation &c,
-						  Item **av, uint count,
-                                                  uint flags)
-{
-  return (agg_arg_collations(c, av, count, flags | MY_COLL_DISALLOW_NONE));
-}
-
-
 /* return TRUE if item is a constant */
 
 bool
@@ -118,107 +51,6 @@ eval_const_cond(COND *cond)
 }
 
 
-
-/* 
-  Collect arguments' character sets together.
-  We allow to apply automatic character set conversion in some cases.
-  The conditions when conversion is possible are:
-  - arguments A and B have different charsets
-  - A wins according to coercibility rules
-    (i.e. a column is stronger than a string constant,
-     an explicit COLLATE clause is stronger than a column)
-  - character set of A is either superset for character set of B,
-    or B is a string constant which can be converted into the
-    character set of A without data loss.
-    
-  If all of the above is true, then it's possible to convert
-  B into the character set of A, and then compare according
-  to the collation of A.
-  
-  For functions with more than two arguments:
-
-    collect(A,B,C) ::= collect(collect(A,B),C)
-*/
-
-bool Item_func::agg_arg_charsets(DTCollation &coll,
-                                 Item **args, uint nargs, uint flags)
-{
-  Item **arg, **last, *safe_args[2];
-  if (agg_arg_collations(coll, args, nargs, flags))
-    return TRUE;
-
-  /*
-    For better error reporting: save the first and the second argument.
-    We need this only if the the number of args is 3 or 2:
-    - for a longer argument list, "Illegal mix of collations"
-      doesn't display each argument's characteristics.
-    - if nargs is 1, then this error cannot happen.
-  */
-  if (nargs >=2 && nargs <= 3)
-  {
-    safe_args[0]= args[0];
-    safe_args[1]= args[1];
-  }
-
-  THD *thd= current_thd;
-  Query_arena *arena, backup;
-  bool res= FALSE;
-  /*
-    In case we're in statement prepare, create conversion item
-    in its memory: it will be reused on each execute.
-  */
-  arena= thd->change_arena_if_needed(&backup);
-
-  for (arg= args, last= args + nargs; arg < last; arg++)
-  {
-    Item* conv;
-    uint32 dummy_offset;
-    if (!String::needs_conversion(0, coll.collation,
-                                  (*arg)->collation.collation,
-                                  &dummy_offset))
-      continue;
-
-    if (!(conv= (*arg)->safe_charset_converter(coll.collation)))
-    {
-      if (nargs >=2 && nargs <= 3)
-      {
-        /* restore the original arguments for better error message */
-        args[0]= safe_args[0];
-        args[1]= safe_args[1];
-      }
-      my_coll_agg_error(args, nargs, func_name());
-      res= TRUE;
-      break; // we cannot return here, we need to restore "arena".
-    }
-    if ((*arg)->type() == FIELD_ITEM)
-      ((Item_field *)(*arg))->no_const_subst= 1;
-    /*
-      If in statement prepare, then we create a converter for two
-      constant items, do it once and then reuse it.
-      If we're in execution of a prepared statement, arena is NULL,
-      and the conv was created in runtime memory. This can be
-      the case only if the argument is a parameter marker ('?'),
-      because for all true constants the charset converter has already
-      been created in prepare. In this case register the change for
-      rollback.
-    */
-    if (arena)
-      *arg= conv;
-    else
-      thd->change_item_tree(arg, conv);
-    /*
-      We do not check conv->fixed, because Item_func_conv_charset which can
-      be return by safe_charset_converter can't be fixed at creation
-    */
-    conv->fix_fields(thd, arg);
-  }
-  if (arena)
-    thd->restore_backup_item_arena(arena, &backup);
-  return res;
-}
-
-
-
 void Item_func::set_arguments(List<Item> &list)
 {
   allowed_arg_cols= 1;
@@ -1536,8 +1368,6 @@ my_decimal *Item_func_abs::decimal_op(my_decimal *decimal_value)
 void Item_func_abs::fix_length_and_dec()
 {
   Item_func_num1::fix_length_and_dec();
-  if (hybrid_type == INT_RESULT)
-    unsigned_flag= 1;
 }
 
 
@@ -2043,6 +1873,9 @@ bool Item_func_rand::fix_fields(THD *thd,Item **ref)
       Allocate rand structure once: we must use thd->current_arena
       to create rand in proper mem_root if it's a prepared statement or
       stored procedure.
+
+      No need to send a Rand log event if seed was given eg: RAND(seed),
+      as it will be replicated in the query as such.
     */
     if (!rand && !(rand= (struct rand_struct*)
                    thd->current_arena->alloc(sizeof(*rand))))
@@ -2065,16 +1898,16 @@ bool Item_func_rand::fix_fields(THD *thd,Item **ref)
   else
   {
     /*
-      No need to send a Rand log event if seed was given eg: RAND(seed),
-      as it will be replicated in the query as such.
-
       Save the seed only the first time RAND() is used in the query
       Once events are forwarded rather than recreated,
       the following can be skipped if inside the slave thread
     */
-    thd->rand_used=1;
-    thd->rand_saved_seed1=thd->rand.seed1;
-    thd->rand_saved_seed2=thd->rand.seed2;
+    if (!thd->rand_used)
+    {
+      thd->rand_used= 1;
+      thd->rand_saved_seed1= thd->rand.seed1;
+      thd->rand_saved_seed2= thd->rand.seed2;
+    }
     rand= &thd->rand;
   }
   return FALSE;
@@ -3429,6 +3262,17 @@ void Item_func_benchmark::print(String *str)
   str->append(')');
 }
 
+/* This function is just used to create tests with time gaps */
+
+longlong Item_func_sleep::val_int()
+{
+  DBUG_ASSERT(fixed == 1);
+  double time= args[0]->val_real();
+  my_sleep((ulong)time*1000000L);
+  return 0;
+}
+
+
 #define extra_size sizeof(double)
 
 static user_var_entry *get_variable(HASH *hash, LEX_STRING &name,
@@ -4605,7 +4449,7 @@ Item *get_system_var(THD *thd, enum_var_type var_type, LEX_STRING name,
 
   if (component.str == 0 &&
       !my_strcasecmp(system_charset_info, name.str, "VERSION"))
-    return new Item_string("@@VERSION", server_version,
+    return new Item_string(NULL, server_version,
 			   (uint) strlen(server_version),
 			   system_charset_info, DERIVATION_SYSCONST);
 
@@ -4632,28 +4476,10 @@ Item *get_system_var(THD *thd, enum_var_type var_type, LEX_STRING name,
   }
   thd->lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
 
-  buff[0]='@';
-  buff[1]='@';
-  pos=buff+2;
-  if (var_type == OPT_SESSION)
-    pos=strmov(pos,"session.");
-  else if (var_type == OPT_GLOBAL)
-    pos=strmov(pos,"global.");
-  
   set_if_smaller(component_name->length, MAX_SYS_VAR_LENGTH);
-  set_if_smaller(base_name->length, MAX_SYS_VAR_LENGTH);
-
-  if (component_name->str)
-  {
-    memcpy(pos, component_name->str, component_name->length);
-    pos+= component_name->length;
-    *pos++= '.';
-  }
-  memcpy(pos, base_name->str, base_name->length);
-  pos+= base_name->length;
 
   return new Item_func_get_system_var(var, var_type, component_name,
-                                      buff, pos - buff);
+                                      NULL, 0);
 }
 
 
@@ -4842,10 +4668,9 @@ Item_func_sp::execute(Item **itp)
 {
   DBUG_ENTER("Item_func_sp::execute");
   THD *thd= current_thd;
-  ulong old_client_capabilites;
   int res= -1;
-  bool save_in_sub_stmt= thd->transaction.in_sub_stmt;
-  my_bool save_no_send_ok;
+  Sub_statement_state statement_state;
+
 #ifndef NO_EMBEDDED_ACCESS_CHECKS
   st_sp_security_context save_ctx;
 #endif
@@ -4856,38 +4681,21 @@ Item_func_sp::execute(Item **itp)
     goto error;
   }
 
-  old_client_capabilites= thd->client_capabilities;
-  thd->client_capabilities &= ~CLIENT_MULTI_RESULTS;
-
-#ifndef EMBEDDED_LIBRARY
-  save_no_send_ok= thd->net.no_send_ok;
-  thd->net.no_send_ok= TRUE;
-#endif
-
 #ifndef NO_EMBEDDED_ACCESS_CHECKS
   if (check_routine_access(thd, EXECUTE_ACL, 
 			   m_sp->m_db.str, m_sp->m_name.str, 0, 0))
-    goto error_check;
+    goto error;
   sp_change_security_context(thd, m_sp, &save_ctx);
   if (save_ctx.changed && 
       check_routine_access(thd, EXECUTE_ACL, 
 			   m_sp->m_db.str, m_sp->m_name.str, 0, 0))
     goto error_check_ctx;
 #endif
-  /*
-    Like for SPs, we don't binlog the substatements. If the statement which
-    called this function is an update statement, it will be binlogged; but if
-    it's not (e.g. SELECT myfunc()) it won't be binlogged (documented known
-    problem).
-  */
-
-  tmp_disable_binlog(thd); /* don't binlog the substatements */
-  thd->transaction.in_sub_stmt= TRUE;
 
+  thd->reset_sub_statement_state(&statement_state, SUB_STMT_FUNCTION);
   res= m_sp->execute_function(thd, args, arg_count, itp);
+  thd->restore_sub_statement_state(&statement_state);
 
-  thd->transaction.in_sub_stmt= save_in_sub_stmt;
-  reenable_binlog(thd);
   if (res && mysql_bin_log.is_open() &&
       (m_sp->m_chistics->daccess == SP_CONTAINS_SQL ||
        m_sp->m_chistics->daccess == SP_MODIFIES_SQL_DATA))
@@ -4900,15 +4708,6 @@ error_check_ctx:
   sp_restore_security_context(thd, m_sp, &save_ctx);
 #endif
 
-  thd->client_capabilities|= old_client_capabilites &  CLIENT_MULTI_RESULTS;
-
-error_check:
-#ifndef EMBEDDED_LIBRARY
-  thd->net.no_send_ok= save_no_send_ok;
-#endif
-
-  thd->client_capabilities|= old_client_capabilites &  CLIENT_MULTI_RESULTS;
-
 error:
   DBUG_RETURN(res);
 }
diff --git a/sql/item_func.h b/sql/item_func.h
index 43a85e6aa0bf9f566c349833424647fdb869f76c..1f25b762b703ef3a1058f3d9e88ae8c16701e5b8 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -43,7 +43,7 @@ public:
   bool const_item_cache;
   enum Functype { UNKNOWN_FUNC,EQ_FUNC,EQUAL_FUNC,NE_FUNC,LT_FUNC,LE_FUNC,
 		  GE_FUNC,GT_FUNC,FT_FUNC,
-		  LIKE_FUNC,NOTLIKE_FUNC,ISNULL_FUNC,ISNOTNULL_FUNC,
+		  LIKE_FUNC,ISNULL_FUNC,ISNOTNULL_FUNC,
 		  COND_AND_FUNC, COND_OR_FUNC, COND_XOR_FUNC,
                   BETWEEN, IN_FUNC, MULT_EQUAL_FUNC,
 		  INTERVAL_FUNC, ISNOTNULLTEST_FUNC,
@@ -166,12 +166,22 @@ public:
   my_decimal *val_decimal(my_decimal *);
 
   bool agg_arg_collations(DTCollation &c, Item **items, uint nitems,
-                          uint flags= 0);
+                          uint flags= 0)
+  {
+    return agg_item_collations(c, func_name(), items, nitems, flags);
+  }
   bool agg_arg_collations_for_comparison(DTCollation &c,
                                          Item **items, uint nitems,
-                                         uint flags= 0);
+                                         uint flags= 0)
+  {
+    return agg_item_collations_for_comparison(c, func_name(),
+                                              items, nitems, flags);
+  }
   bool agg_arg_charsets(DTCollation &c, Item **items, uint nitems,
-                        uint flags= 0);
+                        uint flags= 0)
+  {
+    return agg_item_charsets(c, func_name(), items, nitems, flags);
+  }
   bool walk(Item_processor processor, byte *arg);
   Item *transform(Item_transformer transformer, byte *arg);
   void traverse_cond(Cond_traverser traverser,
@@ -864,6 +874,7 @@ public:
   }
 };
 
+
 class Item_func_benchmark :public Item_int_func
 {
   ulong loop_count;
@@ -878,6 +889,16 @@ public:
 };
 
 
+class Item_func_sleep :public Item_int_func
+{
+public:
+  Item_func_sleep(Item *a) :Item_int_func(a) {}
+  const char *func_name() const { return "sleep"; }
+  longlong val_int();
+};
+
+
+
 #ifdef HAVE_DLOPEN
 
 class Item_udf_func :public Item_func
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index eb37609c28efb842324aef4179427539e9646f33..1e1cc123e606ec5c218ffb6e7e9cdb375168a136 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -1177,11 +1177,23 @@ String *Item_func_substr_index::val_str(String *str)
       }
     }
     else
-    {					// Start counting at end
-      for (offset=res->length() ; ; offset-=delimeter_length-1)
+    {
+      /*
+        Negative index, start counting at the end
+      */
+      for (offset=res->length(); offset ;)
       {
+        /* 
+          this call will result in finding the position pointing to one 
+          address space less than where the found substring is located
+          in res
+        */
 	if ((int) (offset=res->strrstr(*delimeter,offset)) < 0)
 	  return res;			// Didn't find, return org string
+        /*
+          At this point, we've searched for the substring
+          the number of times as supplied by the index value
+        */
 	if (!++count)
 	{
 	  offset+=delimeter_length;
@@ -1558,6 +1570,7 @@ Item *Item_func_sysconst::safe_charset_converter(CHARSET_INFO *tocs)
     return NULL;
   }
   conv->str_value.copy();
+  conv->str_value.mark_as_const();
   return conv;
 }
 
@@ -2076,7 +2089,6 @@ void Item_func_rpad::fix_length_and_dec()
   {
     ulonglong length= ((ulonglong) args[1]->val_int() *
                        collation.collation->mbmaxlen);
-    length= max((ulonglong) args[0]->max_length, length);
     if (length >= MAX_BLOB_WIDTH)
     {
       length= MAX_BLOB_WIDTH;
@@ -2164,7 +2176,9 @@ void Item_func_lpad::fix_length_and_dec()
   {
     ulonglong length= ((ulonglong) args[1]->val_int() *
                        collation.collation->mbmaxlen);
-    length= max((ulonglong) args[0]->max_length, length);
+    /*a comment before (merged) */
+    length= max((ulonglong)args[0]->max_length, length);
+    /*a comment after */
     if (length >= MAX_BLOB_WIDTH)
     {
       length= MAX_BLOB_WIDTH;
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index ad1c9977e5b0db1c75456ea38997105caef8019d..a5985a6c4a9c081d882dc8cea3206c97970d5519 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -969,6 +969,7 @@ Item_in_subselect::single_value_transformer(JOIN *join,
 	argument (reference) to fix_fields()
       */
       select_lex->where= join->conds= and_items(join->conds, item);
+      select_lex->where->top_level_item();
       /*
         we do not check join->conds->fixed, because Item_and can't be fixed
         after creation
@@ -1032,8 +1033,12 @@ Item_in_subselect::single_value_transformer(JOIN *join,
 Item_subselect::trans_res
 Item_in_subselect::row_value_transformer(JOIN *join)
 {
-  Item *item= 0;
   SELECT_LEX *select_lex= join->select_lex;
+  Item *having_item= 0;
+  uint cols_num= left_expr->cols();
+  bool is_having_used= (join->having || select_lex->with_sum_func ||
+                        select_lex->group_list.first ||
+                        !select_lex->table_list.elements);
   DBUG_ENTER("Item_in_subselect::row_value_transformer");
 
   if (select_lex->item_list.elements != left_expr->cols())
@@ -1065,66 +1070,164 @@ Item_in_subselect::row_value_transformer(JOIN *join)
   }
 
   select_lex->uncacheable|= UNCACHEABLE_DEPENDENT;
+  if (is_having_used)
   {
-    uint n= left_expr->cols();
-    List_iterator_fast<Item> li(select_lex->item_list);
-    for (uint i= 0; i < n; i++)
+    /*
+      (l1, l2, l3) IN (SELECT v1, v2, v3 ... HAVING having) =>
+      EXISTS (SELECT ... HAVING having and
+                                (l1 = v1 or is null v1) and
+                                (l2 = v2 or is null v2) and
+                                (l3 = v3 or is null v3) and
+                                is_not_null_test(v1) and
+                                is_not_null_test(v2) and
+                                is_not_null_test(v3))
+      where is_not_null_test used to register nulls in case if we have
+      not found matching to return correct NULL value
+    */
+    Item *item_having_part2= 0;
+    for (uint i= 0; i < cols_num; i++)
     {
       DBUG_ASSERT(left_expr->fixed && select_lex->ref_pointer_array[i]->fixed);
       if (select_lex->ref_pointer_array[i]->
           check_cols(left_expr->el(i)->cols()))
         DBUG_RETURN(RES_ERROR);
-      Item *func= new Item_ref_null_helper(&select_lex->context,
-                                           this,
-                                           select_lex->ref_pointer_array+i,
-                                           (char *) "<no matter>",
-                                           (char *) "<list ref>");
-      func=
-	eq_creator.create(new Item_direct_ref(&select_lex->context,
-                                              (*optimizer->get_cache())->
-					      addr(i),
-					      (char *)"<no matter>",
-					      (char *)in_left_expr_name),
-			  func);
-      item= and_items(item, func);
+      Item *item_eq=
+        new Item_func_eq(new
+                         Item_direct_ref(&select_lex->context,
+                                         (*optimizer->get_cache())->
+                                         addr(i),
+                                         (char *)"<no matter>",
+                                         (char *)in_left_expr_name),
+                         new
+                         Item_direct_ref(&select_lex->context,
+                                         select_lex->ref_pointer_array + i,
+                                         (char *)"<no matter>",
+                                         (char *)"<list ref>")
+                        );
+      Item *item_isnull=
+        new Item_func_isnull(new
+                             Item_direct_ref(&select_lex->context,
+                                             select_lex->
+                                             ref_pointer_array+i,
+                                             (char *)"<no matter>",
+                                             (char *)"<list ref>")
+                            );
+      having_item=
+        and_items(having_item,
+                  new Item_cond_or(item_eq, item_isnull));
+      item_having_part2=
+        and_items(item_having_part2,
+                  new
+                  Item_is_not_null_test(this,
+                                        new
+                                        Item_direct_ref(&select_lex->context,
+                                                        select_lex->
+                                                        ref_pointer_array + i,
+                                                        (char *)"<no matter>",
+                                                        (char *)"<list ref>")
+                                       )
+                 );
+      item_having_part2->top_level_item();
     }
+    having_item= and_items(having_item, item_having_part2);
+    having_item->top_level_item();
   }
-  if (join->having || select_lex->with_sum_func ||
-      select_lex->group_list.first ||
-      !select_lex->table_list.elements)
+  else
   {
     /*
-      AND can't be changed during fix_fields()
-      we can assign select_lex->having here, and pass 0 as last
-      argument (reference) to fix_fields()
+      (l1, l2, l3) IN (SELECT v1, v2, v3 ... WHERE where) =>
+      EXISTS (SELECT ... WHERE where and
+                               (l1 = v1 or is null v1) and
+                               (l2 = v2 or is null v2) and
+                               (l3 = v3 or is null v3)
+                         HAVING is_not_null_test(v1) and
+                                is_not_null_test(v2) and
+                                is_not_null_test(v3))
+      where is_not_null_test register NULLs values but reject rows
+
+      in case when we do not need correct NULL, we have simplier construction:
+      EXISTS (SELECT ... WHERE where and
+                               (l1 = v1) and
+                               (l2 = v2) and
+                               (l3 = v3)
     */
-    select_lex->having= join->having= and_items(join->having, item);
-    select_lex->having_fix_field= 1;
+    Item *where_item= 0;
+    for (uint i= 0; i < cols_num; i++)
+    {
+      Item *item, *item_isnull;
+      DBUG_ASSERT(left_expr->fixed && select_lex->ref_pointer_array[i]->fixed);
+      if (select_lex->ref_pointer_array[i]->
+          check_cols(left_expr->el(i)->cols()))
+        DBUG_RETURN(RES_ERROR);
+      item=
+        new Item_func_eq(new
+                         Item_direct_ref(&select_lex->context,
+                                         (*optimizer->get_cache())->
+                                         addr(i),
+                                         (char *)"<no matter>",
+                                         (char *)in_left_expr_name),
+                         new
+                         Item_direct_ref(&select_lex->context,
+                                         select_lex->
+                                         ref_pointer_array+i,
+                                         (char *)"<no matter>",
+                                         (char *)"<list ref>")
+                        );
+      if (!abort_on_null)
+      {
+        having_item=
+          and_items(having_item,
+                    new
+                    Item_is_not_null_test(this,
+                                          new
+                                          Item_direct_ref(&select_lex->context,
+                                                          select_lex->
+                                                          ref_pointer_array + i,
+                                                          (char *)"<no matter>",
+                                                          (char *)"<list ref>")
+                                         )
+                  );
+        item_isnull= new
+          Item_func_isnull(new
+                           Item_direct_ref(&select_lex->context,
+                                           select_lex->
+                                           ref_pointer_array+i,
+                                           (char *)"<no matter>",
+                                           (char *)"<list ref>")
+                          );
+
+        item= new Item_cond_or(item, item_isnull);
+      }
+
+      where_item= and_items(where_item, item);
+    }
     /*
-      join->having can't be fixed after creation, so we do not check
-      join->having->fixed
+      AND can't be changed during fix_fields()
+      we can assign select_lex->where here, and pass 0 as last
+      argument (reference) to fix_fields()
     */
-    if (join->having->fix_fields(thd, 0))
-    {
-      select_lex->having_fix_field= 0;
+    select_lex->where= join->conds= and_items(join->conds, where_item);
+    select_lex->where->top_level_item();
+    if (join->conds->fix_fields(thd, 0))
       DBUG_RETURN(RES_ERROR);
-    }
-    select_lex->having_fix_field= 0;
   }
-  else
+  if (having_item)
   {
+    bool res;
+    select_lex->having= join->having= and_items(join->having, having_item);
+    select_lex->having->top_level_item();
     /*
       AND can't be changed during fix_fields()
       we can assign select_lex->having here, and pass 0 as last
       argument (reference) to fix_fields()
     */
-    select_lex->where= join->conds= and_items(join->conds, item);
-    /*
-      join->conds can't be fixed after creation, so we do not check
-      join->conds->fixed
-    */
-    if (join->conds->fix_fields(thd, 0))
+    select_lex->having_fix_field= 1;
+    res= join->having->fix_fields(thd, 0);
+    select_lex->having_fix_field= 0;
+    if (res)
+    {
       DBUG_RETURN(RES_ERROR);
+    }
   }
 
   DBUG_RETURN(RES_OK);
@@ -1271,6 +1374,14 @@ void Item_allany_subselect::print(String *str)
 }
 
 
+void subselect_engine::set_thd(THD *thd_arg)
+{
+  thd= thd_arg;
+  if (result)
+    result->set_thd(thd_arg);
+}
+
+
 subselect_single_select_engine::
 subselect_single_select_engine(st_select_lex *select,
 			       select_subselect *result,
diff --git a/sql/item_subselect.h b/sql/item_subselect.h
index 0b5736169fa26a24336b97a0354ab53e450cbc38..46623f7617025f9bf7e13557983dc5a1c39e31cf 100644
--- a/sql/item_subselect.h
+++ b/sql/item_subselect.h
@@ -299,8 +299,11 @@ public:
   virtual ~subselect_engine() {}; // to satisfy compiler
   virtual void cleanup()= 0;
 
-  // set_thd should be called before prepare()
-  void set_thd(THD *thd_arg) { thd= thd_arg; }
+  /*
+    Also sets "thd" for subselect_engine::result.
+    Should be called before prepare().
+  */
+  void set_thd(THD *thd_arg);
   THD * get_thd() { return thd; }
   virtual int prepare()= 0;
   virtual void fix_length_and_dec(Item_cache** row)= 0;
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index d2f1016891bd475fd2b9ecd51c5a160e76a7184b..e86d4f0d8babbadcc4ed79d5cbda988e6d578db0 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -321,6 +321,22 @@ Field *Item_sum_hybrid::create_tmp_field(bool group, TABLE *table,
       field->flags&= ~NOT_NULL_FLAG;
     return field;
   }
+  /*
+    DATE/TIME fields have STRING_RESULT result types.
+    In order to preserve field type, it's needed to handle DATE/TIME
+    fields creations separately.
+  */
+  switch (args[0]->field_type()) {
+  case MYSQL_TYPE_DATE:
+    return new Field_date(maybe_null, name, table, collation.collation);
+  case MYSQL_TYPE_TIME:
+    return new Field_time(maybe_null, name, table, collation.collation);
+  case MYSQL_TYPE_TIMESTAMP:
+  case MYSQL_TYPE_DATETIME:
+    return new Field_datetime(maybe_null, name, table, collation.collation);
+  default:
+    break;
+  }
   return Item_sum::create_tmp_field(group, table, convert_blob_length);
 }
 
@@ -2275,7 +2291,7 @@ bool Item_sum_count_distinct::setup(THD *thd)
   DBUG_ASSERT(table == 0);
   if (!(table= create_tmp_table(thd, tmp_table_param, list, (ORDER*) 0, 1,
 				0,
-				select_lex->options | thd->options,
+				(select_lex->options | thd->options),
 				HA_POS_ERROR, (char*)"")))
     return TRUE;
   table->file->extra(HA_EXTRA_NO_ROWS);		// Don't update rows
@@ -2632,7 +2648,11 @@ int group_concat_key_cmp_with_distinct(void* arg, byte* key1,
       the temporary table, not the original field
     */
     Field *field= (*field_item)->get_tmp_table_field();
-    if (field)
+    /* 
+      If field_item is a const item then either get_tp_table_field returns 0
+      or it is an item over a const table. 
+    */
+    if (field && !(*field_item)->const_item())
     {
       int res;
       uint offset= field->offset() - table->s->null_bytes;
@@ -2666,8 +2686,11 @@ int group_concat_key_cmp_with_order(void* arg, byte* key1, byte* key2)
       the temporary table, not the original field
     */
     Field *field= item->get_tmp_table_field();
-    /* If the item is a constant, there is no tmp table field */
-    if (field)
+    /* 
+      If item is a const item then either get_tp_table_field returns 0
+      or it is an item over a const table. 
+    */
+    if (field && !item->const_item())
     {
       int res;
       uint offset= field->offset() - table->s->null_bytes;
@@ -2976,6 +2999,10 @@ Item_func_group_concat::fix_fields(THD *thd, Item **ref)
       maybe_null|= args[i]->maybe_null;
   }
 
+  if (agg_item_charsets(collation, func_name(),
+                        args, arg_count, MY_COLL_ALLOW_CONV))
+    return 1;
+
   result_field= 0;
   null_value= 1;
   thd->allow_sum_func= 1;
@@ -3046,7 +3073,7 @@ bool Item_func_group_concat::setup(THD *thd)
   */
   if (!(table= create_tmp_table(thd, tmp_table_param, all_fields,
                                 (ORDER*) 0, 0, TRUE,
-                                select_lex->options | thd->options,
+                                (select_lex->options | thd->options),
                                 HA_POS_ERROR, (char*) "")))
     DBUG_RETURN(TRUE);
   table->file->extra(HA_EXTRA_NO_ROWS);
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index aa377d0bdd8c568f180cab3b2bcea68bf5c56537..dfbfca3b078a041e6a48919324a2d128a327b361 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -1070,7 +1070,7 @@ longlong Item_func_year::val_int()
 longlong Item_func_unix_timestamp::val_int()
 {
   TIME ltime;
-  bool not_used;
+  my_bool not_used;
   
   DBUG_ASSERT(fixed == 1);
   if (arg_count == 0)
@@ -1798,7 +1798,6 @@ bool Item_func_convert_tz::get_date(TIME *ltime,
                                     uint fuzzy_date __attribute__((unused)))
 {
   my_time_t my_time_tmp;
-  bool not_used;
   String str;
 
   if (!from_tz_cached)
@@ -1824,6 +1823,7 @@ bool Item_func_convert_tz::get_date(TIME *ltime,
       ltime->year==TIMESTAMP_MAX_YEAR && ltime->month==1 && ltime->day==1 ||
       ltime->year==TIMESTAMP_MIN_YEAR && ltime->month==12 && ltime->day==31)
   {
+    my_bool not_used;
     my_time_tmp= from_tz->TIME_to_gmt_sec(ltime, &not_used);
     if (my_time_tmp >= TIMESTAMP_MIN_VALUE && my_time_tmp <= TIMESTAMP_MAX_VALUE)
       to_tz->gmt_sec_to_TIME(ltime, my_time_tmp);
@@ -1938,7 +1938,7 @@ bool Item_date_add_interval::get_date(TIME *ltime, uint fuzzy_date)
     daynr= calc_daynr(ltime->year,ltime->month,1) + days;
     /* Day number from year 0 to 9999-12-31 */
     if ((ulonglong) daynr >= MAX_DAY_NUMBER)
-      goto null_date;
+      goto invalid_date;
     get_date_from_daynr((long) daynr, &ltime->year, &ltime->month,
                         &ltime->day);
     break;
@@ -1949,13 +1949,13 @@ bool Item_date_add_interval::get_date(TIME *ltime, uint fuzzy_date)
              sign * (long) interval.day);
     /* Daynumber from year 0 to 9999-12-31 */
     if ((ulong) period >= MAX_DAY_NUMBER)
-      goto null_date;
+      goto invalid_date;
     get_date_from_daynr((long) period,&ltime->year,&ltime->month,&ltime->day);
     break;
   case INTERVAL_YEAR:
     ltime->year+= sign * (long) interval.year;
     if ((ulong) ltime->year >= 10000L)
-      goto null_date;
+      goto invalid_date;
     if (ltime->month == 2 && ltime->day == 29 &&
 	calc_days_in_year(ltime->year) != 366)
       ltime->day=28;				// Was leap-year
@@ -1966,7 +1966,7 @@ bool Item_date_add_interval::get_date(TIME *ltime, uint fuzzy_date)
     period= (ltime->year*12 + sign * (long) interval.year*12 +
 	     ltime->month-1 + sign * (long) interval.month);
     if ((ulong) period >= 120000L)
-      goto null_date;
+      goto invalid_date;
     ltime->year= (uint) (period / 12);
     ltime->month= (uint) (period % 12L)+1;
     /* Adjust day if the new month doesn't have enough days */
@@ -1982,6 +1982,11 @@ bool Item_date_add_interval::get_date(TIME *ltime, uint fuzzy_date)
   }
   return 0;					// Ok
 
+invalid_date:
+  push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+                      ER_DATETIME_FUNCTION_OVERFLOW,
+                      ER(ER_DATETIME_FUNCTION_OVERFLOW),
+                      "datetime");
  null_date:
   return (null_value=1);
 }
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index 107d12e6da2584faf9facd2608b194969ae34921..d9300451fe7bde499c4ef6700e9ab49c6a1dde54 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -714,6 +714,12 @@ public:
   {
     return (new Field_date(maybe_null, name, t_arg, &my_charset_bin));
   }  
+  void fix_length_and_dec()
+  {
+    collation.set(&my_charset_bin);
+    max_length= 10;
+    maybe_null= 1;
+  }
 };
 
 
@@ -854,7 +860,7 @@ class Item_func_timestamp_diff :public Item_int_func
 public:
   Item_func_timestamp_diff(Item *a,Item *b,interval_type type_arg)
     :Item_int_func(a,b), int_type(type_arg) {}
-  const char *func_name() const { return "timestamp_diff"; }
+  const char *func_name() const { return "timestampdiff"; }
   longlong val_int();
   void fix_length_and_dec()
   {
diff --git a/sql/lex.h b/sql/lex.h
index 122e7040c80025347a16c4f91c136b8d6ddc6c94..7b6d86e327e389423254588eff722649b9db9018 100644
--- a/sql/lex.h
+++ b/sql/lex.h
@@ -734,6 +734,7 @@ static SYMBOL sql_functions[] = {
   { "SIN",		F_SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_sin)},
   { "SHA",              F_SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_sha)},
   { "SHA1",             F_SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_sha)},
+  { "SLEEP",            F_SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_sleep)},
   { "SOUNDEX",		F_SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_soundex)},
   { "SPACE",		F_SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_space)},
   { "SQRT",		F_SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_sqrt)},
diff --git a/sql/lock.cc b/sql/lock.cc
index 376a582ae32f4bbe3e11e0231678cdc8a3e21b2e..941d7baa76e8a18fba5424b2cb21645717c0f4b3 100644
--- a/sql/lock.cc
+++ b/sql/lock.cc
@@ -99,14 +99,15 @@ static void print_lock_error(int error, const char *);
     NULL on error.
 */
 
+static int thr_lock_errno_to_mysql[]=
+{ 0, 1, ER_LOCK_WAIT_TIMEOUT, ER_LOCK_DEADLOCK };
+
 MYSQL_LOCK *mysql_lock_tables(THD *thd, TABLE **tables, uint count, uint flags)
 {
   MYSQL_LOCK *sql_lock;
   TABLE *write_lock_used;
   int rc;
   /* Map the return value of thr_lock to an error from errmsg.txt */
-  const static int thr_lock_errno_to_mysql[]=
-  { 0, 1, ER_LOCK_WAIT_TIMEOUT, ER_LOCK_DEADLOCK };
   DBUG_ENTER("mysql_lock_tables");
 
   for (;;)
@@ -348,7 +349,18 @@ void mysql_lock_abort(THD *thd, TABLE *table)
 }
 
 
-/* Abort one thread / table combination */
+/*
+  Abort one thread / table combination
+
+  SYNOPSIS
+    mysql_lock_abort_for_thread()
+    thd		Thread handler
+    table	Table that should be removed from lock queue
+
+  RETURN
+    0  Table was not locked by another thread
+    1  Table was locked by at least one other thread
+*/
 
 bool mysql_lock_abort_for_thread(THD *thd, TABLE *table)
 {
@@ -361,10 +373,9 @@ bool mysql_lock_abort_for_thread(THD *thd, TABLE *table)
   {
     for (uint i=0; i < locked->lock_count; i++)
     {
-      bool found;
-      found= thr_abort_locks_for_thread(locked->locks[i]->lock,
-	         			 table->in_use->real_id);
-      result|= found;
+      if (thr_abort_locks_for_thread(locked->locks[i]->lock,
+                                     table->in_use->real_id))
+        result= TRUE;
     }
     my_free((gptr) locked,MYF(0));
   }
@@ -601,6 +612,7 @@ int lock_table_name(THD *thd, TABLE_LIST *table_list)
     DBUG_RETURN(-1);
   table->s= &table->share_not_to_be_used;
   memcpy((table->s->table_cache_key= (char*) (table+1)), key, key_length);
+  table->s->db= table->s->table_cache_key;
   table->s->key_length=key_length;
   table->in_use=thd;
   table->locked_by_name=1;
@@ -612,14 +624,9 @@ int lock_table_name(THD *thd, TABLE_LIST *table_list)
     DBUG_RETURN(-1);
   }
   
-  {
-    if (remove_table_from_cache(thd, db,
-                                table_list->table_name, RTFC_NO_FLAG))
-    {
-      DBUG_RETURN(1);				// Table is in use
-    }
-  }
-  DBUG_RETURN(0);
+  /* Return 1 if table is in use */
+  DBUG_RETURN(test(remove_table_from_cache(thd, db, table_list->table_name,
+                                           RTFC_NO_FLAG)));
 }
 
 
@@ -842,10 +849,6 @@ static void print_lock_error(int error, const char *table)
   So in this exceptional case the COMMIT should not be blocked by the FLUSH
   TABLES WITH READ LOCK.
 
-  TODO in MySQL 5.x: make_global_read_lock_block_commit() should be
-  killable. Normally CPU does not spend a long time in this function (COMMITs
-  are quite fast), but it would still be nice.
-
 ****************************************************************************/
 
 volatile uint global_read_lock=0;
@@ -983,7 +986,7 @@ bool make_global_read_lock_block_commit(THD *thd)
     make_global_read_lock_block_commit(), do nothing.
   */
   if (thd->global_read_lock != GOT_GLOBAL_READ_LOCK)
-    DBUG_RETURN(1);
+    DBUG_RETURN(0);
   pthread_mutex_lock(&LOCK_global_read_lock);
   /* increment this BEFORE waiting on cond (otherwise race cond) */
   global_read_lock_blocks_commit++;
@@ -996,7 +999,7 @@ bool make_global_read_lock_block_commit(THD *thd)
     pthread_cond_wait(&COND_refresh, &LOCK_global_read_lock);
   DBUG_EXECUTE_IF("make_global_read_lock_block_commit_loop",
                   protect_against_global_read_lock--;);
-  if (error= thd->killed)
+  if ((error= test(thd->killed)))
     global_read_lock_blocks_commit--; // undo what we did
   else
     thd->global_read_lock= MADE_GLOBAL_READ_LOCK_BLOCK_COMMIT;
diff --git a/sql/log.cc b/sql/log.cc
index 7b67a11ab53e547724f3113e458323ac20b374cb..5ad8ec818ef29e3f3ff26038178ff3b4f34787a8 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -58,7 +58,11 @@ static handlerton binlog_hton = {
   binlog_prepare,
   NULL,                         /* recover */
   NULL,                         /* commit_by_xid */
-  NULL                          /* rollback_by_xid */
+  NULL,                         /* rollback_by_xid */
+  NULL,                         /* create_cursor_read_view */
+  NULL,                         /* set_cursor_read_view */
+  NULL,    			/* close_cursor_read_view */
+  HTON_NO_FLAGS
 };
 
 /*
@@ -2209,7 +2213,7 @@ bool flush_error_log()
      On Windows is necessary a temporary file for to rename
      the current error file.
     */
-    strmov(strmov(err_temp, err_renamed),"-tmp");
+    strxmov(err_temp, err_renamed,"-tmp",NullS);
     (void) my_delete(err_temp, MYF(0)); 
     if (freopen(err_temp,"a+",stdout))
     {
diff --git a/sql/log_event.h b/sql/log_event.h
index 9f4681ae2c57deb5d88e075204bb5a879eeda897..3ac1cfaf4bc36a0f9916c97e66d59f63ea1af954 100644
--- a/sql/log_event.h
+++ b/sql/log_event.h
@@ -393,6 +393,10 @@ struct sql_ex_info
 #define OPTIONS_WRITTEN_TO_BIN_LOG (OPTION_AUTO_IS_NULL | \
 OPTION_NO_FOREIGN_KEY_CHECKS | OPTION_RELAXED_UNIQUE_CHECKS)
 
+#if OPTIONS_WRITTEN_TO_BIN_LOG != ((1L << 14) | (1L << 26) | (1L << 27))
+#error OPTIONS_WRITTEN_TO_BIN_LOG must NOT change their values!
+#endif
+
 enum Log_event_type
 {
   /*
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index 3db56a2a9d100b4431eb3e888b2cf5936a8ce95c..085bb0166cc3f7b7e4aabeea6ad632449aa5c121 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -284,6 +284,11 @@ extern CHARSET_INFO *national_charset_info, *table_alias_charset;
 #define OPTION_SETUP_TABLES_DONE        (1L << 30) // intern
 /* If not set then the thread will ignore all warnings with level notes. */
 #define OPTION_SQL_NOTES                (1L << 31) // THD, user
+/* 
+  Force the used temporary table to be a MyISAM table (because we will use
+  fulltext functions when reading from it.
+*/
+#define TMP_TABLE_FORCE_MYISAM          (LL(1) << 32)
 
 /*
   Maximum length of time zone name that we support
@@ -487,8 +492,7 @@ typedef Comp_creator* (*chooser_compare_func_creator)(bool invert);
 void free_items(Item *item);
 void cleanup_items(Item *item);
 class THD;
-void close_thread_tables(THD *thd, bool locked=0, bool skip_derived=0,
-                         TABLE *stopper= 0);
+void close_thread_tables(THD *thd, bool locked=0, bool skip_derived=0);
 bool check_one_table_access(THD *thd, ulong privilege,
 			   TABLE_LIST *tables);
 bool check_routine_access(THD *thd,ulong want_access,char *db,char *name,
@@ -526,6 +530,7 @@ struct Query_cache_query_flags
 {
   unsigned int client_long_flag:1;
   unsigned int client_protocol_41:1;
+  unsigned int more_results_exists:1;
   uint character_set_client_num;
   uint character_set_results_num;
   uint collation_connection_num;
@@ -580,7 +585,7 @@ int quick_rm_table(enum db_type base,const char *db,
 		   const char *table_name);
 void close_cached_table(THD *thd, TABLE *table);
 bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list);
-bool mysql_change_db(THD *thd,const char *name);
+bool mysql_change_db(THD *thd,const char *name,bool no_access_check);
 void mysql_parse(THD *thd,char *inBuf,uint length);
 bool mysql_test_parse_for_slave(THD *thd,char *inBuf,uint length);
 bool is_update_query(enum enum_sql_command command);
@@ -719,7 +724,7 @@ int mysql_update(THD *thd,TABLE_LIST *tables,List<Item> &fields,
 		 enum enum_duplicates handle_duplicates, bool ignore);
 bool mysql_multi_update(THD *thd, TABLE_LIST *table_list,
                         List<Item> *fields, List<Item> *values,
-                        COND *conds, ulong options,
+                        COND *conds, ulonglong options,
                         enum enum_duplicates handle_duplicates, bool ignore,
                         SELECT_LEX_UNIT *unit, SELECT_LEX *select_lex);
 bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list, TABLE *table,
@@ -735,7 +740,7 @@ int check_that_all_fields_are_given_values(THD *thd, TABLE *entry,
                                            TABLE_LIST *table_list);
 bool mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds);
 bool mysql_delete(THD *thd, TABLE_LIST *table, COND *conds, SQL_LIST *order,
-                  ha_rows rows, ulong options);
+                  ha_rows rows, ulonglong options);
 bool mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok);
 bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create);
 TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type update);
@@ -760,23 +765,24 @@ extern Field *view_ref_found;
 enum find_item_error_report_type {REPORT_ALL_ERRORS, REPORT_EXCEPT_NOT_FOUND,
 				  IGNORE_ERRORS, REPORT_EXCEPT_NON_UNIQUE,
                                   IGNORE_EXCEPT_NON_UNIQUE};
-Field *find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *tables,
-			    Item **ref,
-                            find_item_error_report_type report_error,
-                            bool check_privileges,
-                            bool register_tree_change);
 Field *
-find_field_in_table(THD *thd, TABLE_LIST *table_list,
-                    const char *name, const char *item_name,
-                    uint length, Item **ref,
-                    bool check_grants_table, bool check_grants_view,
-                    bool allow_rowid,
-                    uint *cached_field_index_ptr,
-                    bool register_tree_change);
+find_field_in_tables(THD *thd, Item_ident *item,
+                     TABLE_LIST *first_table, TABLE_LIST *last_table,
+                     Item **ref, find_item_error_report_type report_error,
+                     bool check_privileges, bool register_tree_change);
+Field *
+find_field_in_table_ref(THD *thd, TABLE_LIST *table_list,
+                        const char *name, const char *item_name,
+                        const char *table_name, const char *db_name,
+                        uint length, Item **ref,
+                        bool check_grants_table, bool check_grants_view,
+                        bool allow_rowid,
+                        uint *cached_field_index_ptr,
+                        bool register_tree_change, TABLE_LIST **actual_table);
 Field *
-find_field_in_real_table(THD *thd, TABLE *table, const char *name,
-                         uint length, bool check_grants, bool allow_rowid,
-                         uint *cached_field_index_ptr);
+find_field_in_table(THD *thd, TABLE *table, const char *name,
+                    uint length, bool check_grants, bool allow_rowid,
+                    uint *cached_field_index_ptr);
 #ifdef HAVE_OPENSSL
 #include <openssl/des.h>
 struct st_des_keyblock
@@ -822,8 +828,6 @@ bool mysqld_show_column_types(THD *thd);
 bool mysqld_help (THD *thd, const char *text);
 void calc_sum_of_all_status(STATUS_VAR *to);
 
-
-
 /* information schema */
 extern LEX_STRING information_schema_name;
 LEX_STRING *make_lex_string(THD *thd, LEX_STRING *lex_str,
@@ -885,8 +889,10 @@ create_field * new_create_field(THD *thd, char *field_name, enum_field_types typ
 				uint uint_geom_type);
 void store_position_for_column(const char *name);
 bool add_to_list(THD *thd, SQL_LIST &list,Item *group,bool asc);
+Name_resolution_context *make_join_on_context(THD *thd, TABLE_LIST *left_op,
+                                              TABLE_LIST *right_op);
 void add_join_on(TABLE_LIST *b,Item *expr);
-void add_join_natural(TABLE_LIST *a,TABLE_LIST *b);
+void add_join_natural(TABLE_LIST *a,TABLE_LIST *b,List<String> *using_fields);
 bool add_proc_to_list(THD *thd, Item *item);
 TABLE *unlink_open_table(THD *thd,TABLE *list,TABLE *find);
 
@@ -903,8 +909,8 @@ bool insert_fields(THD *thd, Name_resolution_context *context,
 		   const char *db_name, const char *table_name,
                    List_iterator<Item> *it, bool any_privileges);
 bool setup_tables(THD *thd, Name_resolution_context *context,
-                  TABLE_LIST *tables, Item **conds,
-		  TABLE_LIST **leaves, bool select_insert);
+                  List<TABLE_LIST> *from_clause, TABLE_LIST *tables,
+                  Item **conds, TABLE_LIST **leaves, bool select_insert);
 int setup_wild(THD *thd, TABLE_LIST *tables, List<Item> &fields,
 	       List<Item> *sum_func_list, uint wild_num);
 bool setup_fields(THD *thd, Item** ref_pointer_array,
@@ -927,10 +933,10 @@ int setup_conds(THD *thd, TABLE_LIST *tables, TABLE_LIST *leaves,
 int setup_ftfuncs(SELECT_LEX* select);
 int init_ftfuncs(THD *thd, SELECT_LEX* select, bool no_order);
 void wait_for_refresh(THD *thd);
-int open_tables(THD *thd, TABLE_LIST **tables, uint *counter);
+int open_tables(THD *thd, TABLE_LIST **tables, uint *counter, uint flags);
 int simple_open_n_lock_tables(THD *thd,TABLE_LIST *tables);
 bool open_and_lock_tables(THD *thd,TABLE_LIST *tables);
-bool open_normal_and_derived_tables(THD *thd, TABLE_LIST *tables);
+bool open_normal_and_derived_tables(THD *thd, TABLE_LIST *tables, uint flags);
 int lock_tables(THD *thd, TABLE_LIST *tables, uint counter);
 TABLE *open_temporary_table(THD *thd, const char *path, const char *db,
 			    const char *table_name, bool link_in_list);
@@ -951,12 +957,16 @@ bool rename_temporary_table(THD* thd, TABLE *table, const char *new_db,
 			    const char *table_name);
 void remove_db_from_cache(const char *db);
 void flush_tables();
+bool is_equal(const LEX_STRING *a, const LEX_STRING *b);
+
+/* bits for last argument to remove_table_from_cache() */
 #define RTFC_NO_FLAG                0x0000
 #define RTFC_OWNED_BY_THD_FLAG      0x0001
 #define RTFC_WAIT_OTHER_THREAD_FLAG 0x0002
 #define RTFC_CHECK_KILLED_FLAG      0x0004
 bool remove_table_from_cache(THD *thd, const char *db, const char *table,
                              uint flags);
+
 bool close_cached_tables(THD *thd, bool wait_for_refresh, TABLE_LIST *tables);
 void copy_field_from_tmp_record(Field *field,int offset);
 bool fill_record(THD *thd, Field **field, List<Item> &values,
@@ -971,7 +981,7 @@ bool fill_record_n_invoke_before_triggers(THD *thd, Field **field,
                                           bool ignore_errors,
                                           Table_triggers_list *triggers,
                                           enum trg_event_type event);
-OPEN_TABLE_LIST *list_open_tables(THD *thd, const char *wild);
+OPEN_TABLE_LIST *list_open_tables(THD *thd, const char *db, const char *wild);
 
 inline TABLE_LIST *find_table_in_global_list(TABLE_LIST *table,
                                              const char *db_name,
@@ -1098,6 +1108,7 @@ extern char log_error_file[FN_REFLEN], *opt_tc_log_file;
 extern double log_10[32];
 extern ulonglong log_10_int[20];
 extern ulonglong keybuff_size;
+extern ulonglong thd_startup_options;
 extern ulong refresh_version,flush_version, thread_id;
 extern ulong binlog_cache_use, binlog_cache_disk_use;
 extern ulong aborted_threads,aborted_connects;
@@ -1107,7 +1118,7 @@ extern ulong delayed_insert_threads, delayed_insert_writes;
 extern ulong delayed_rows_in_use,delayed_insert_errors;
 extern ulong slave_open_temp_tables;
 extern ulong query_cache_size, query_cache_min_res_unit;
-extern ulong thd_startup_options, slow_launch_threads, slow_launch_time;
+extern ulong slow_launch_threads, slow_launch_time;
 extern ulong table_cache_size;
 extern ulong max_connections,max_connect_errors, connect_timeout;
 extern ulong slave_net_timeout, slave_trans_retries;
@@ -1153,6 +1164,7 @@ extern uint opt_large_page_size;
 extern MYSQL_LOG mysql_log,mysql_slow_log,mysql_bin_log;
 extern FILE *bootstrap_file;
 extern int bootstrap_error;
+extern FILE *stderror_file;
 extern pthread_key(MEM_ROOT**,THR_MALLOC);
 extern pthread_mutex_t LOCK_mysql_create_db,LOCK_Acl,LOCK_open,
        LOCK_thread_count,LOCK_mapped_file,LOCK_user_locks, LOCK_status,
@@ -1187,6 +1199,7 @@ extern TABLE *unused_tables;
 extern I_List<i_string> binlog_do_db, binlog_ignore_db;
 extern const char* any_db;
 extern struct my_option my_long_options[];
+extern const LEX_STRING view_type;
 
 /* optional things, have_* variables */
 
@@ -1245,10 +1258,13 @@ void unlock_table_names(THD *thd, TABLE_LIST *table_list,
 void unireg_init(ulong options);
 void unireg_end(void);
 bool mysql_create_frm(THD *thd, my_string file_name,
+                      const char *db, const char *table,
 		      HA_CREATE_INFO *create_info,
 		      List<create_field> &create_field,
 		      uint key_count,KEY *key_info,handler *db_type);
-int rea_create_table(THD *thd, my_string file_name,HA_CREATE_INFO *create_info,
+int rea_create_table(THD *thd, my_string file_name,
+                     const char *db, const char *table,
+                     HA_CREATE_INFO *create_info,
 		     List<create_field> &create_field,
 		     uint key_count,KEY *key_info);
 int format_number(uint inputflag,uint max_length,my_string pos,uint length,
@@ -1266,7 +1282,7 @@ ulong convert_period_to_month(ulong period);
 ulong convert_month_to_period(ulong month);
 void get_date_from_daynr(long daynr,uint *year, uint *month,
 			 uint *day);
-my_time_t TIME_to_timestamp(THD *thd, const TIME *t, bool *not_exist);
+my_time_t TIME_to_timestamp(THD *thd, const TIME *t, my_bool *not_exist);
 bool str_to_time_with_warn(const char *str,uint length,TIME *l_time);
 timestamp_type str_to_datetime_with_warn(const char *str, uint length,
                                          TIME *l_time, uint flags);
@@ -1315,7 +1331,8 @@ ulong make_new_entry(File file,uchar *fileinfo,TYPELIB *formnames,
 		     const char *newname);
 ulong next_io_size(ulong pos);
 void append_unescaped(String *res, const char *pos, uint length);
-int create_frm(THD *thd, char *name,uint reclength,uchar *fileinfo,
+int create_frm(THD *thd, char *name, const char *db, const char *table,
+               uint reclength,uchar *fileinfo,
 	       HA_CREATE_INFO *create_info, uint keys);
 void update_create_info_from_table(HA_CREATE_INFO *info, TABLE *form);
 int rename_file_ext(const char * from,const char * to,const char * ext);
@@ -1441,6 +1458,12 @@ inline void setup_table_map(TABLE *table, TABLE_LIST *table_list, uint tablenr)
   table->status= STATUS_NO_RECORD;
   table->keys_in_use_for_query= table->s->keys_in_use;
   table->maybe_null= table_list->outer_join;
+  TABLE_LIST *embedding= table_list->embedding;
+  while (!table->maybe_null && embedding)
+  {
+    table->maybe_null= embedding->outer_join;
+    embedding= embedding->embedding;
+  }
   table->tablenr= tablenr;
   table->map= (table_map) 1 << tablenr;
   table->force_index= table_list->force_index;
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 798bd25fa7c85cceca66e143856181cea6a249ad..e58fa6691302d2c652903bb709bc537584f4c37d 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -220,21 +220,58 @@ extern "C" int gethostname(char *name, int namelen);
 /* Constants */
 
 const char *show_comp_option_name[]= {"YES", "NO", "DISABLED"};
-static const char *sql_mode_names[] =
+static const char *sql_mode_names[]=
 {
   "REAL_AS_FLOAT", "PIPES_AS_CONCAT", "ANSI_QUOTES", "IGNORE_SPACE",
   "?", "ONLY_FULL_GROUP_BY", "NO_UNSIGNED_SUBTRACTION",
   "NO_DIR_IN_CREATE",
   "POSTGRESQL", "ORACLE", "MSSQL", "DB2", "MAXDB", "NO_KEY_OPTIONS",
   "NO_TABLE_OPTIONS", "NO_FIELD_OPTIONS", "MYSQL323", "MYSQL40", "ANSI",
-  "NO_AUTO_VALUE_ON_ZERO", "NO_BACKSLASH_ESCAPES", "STRICT_TRANS_TABLES", "STRICT_ALL_TABLES",
-  "NO_ZERO_IN_DATE", "NO_ZERO_DATE", "ALLOW_INVALID_DATES", "ERROR_FOR_DIVISION_BY_ZERO",
+  "NO_AUTO_VALUE_ON_ZERO", "NO_BACKSLASH_ESCAPES", "STRICT_TRANS_TABLES",
+  "STRICT_ALL_TABLES",
+  "NO_ZERO_IN_DATE", "NO_ZERO_DATE", "ALLOW_INVALID_DATES",
+  "ERROR_FOR_DIVISION_BY_ZERO",
   "TRADITIONAL", "NO_AUTO_CREATE_USER", "HIGH_NOT_PRECEDENCE",
   "NO_ENGINE_SUBSTITUTION",
   NullS
 };
+static const unsigned int sql_mode_names_len[]=
+{
+  /*REAL_AS_FLOAT*/               13,
+  /*PIPES_AS_CONCAT*/             15,
+  /*ANSI_QUOTES*/                 11,
+  /*IGNORE_SPACE*/                12,
+  /*?*/                           1,
+  /*ONLY_FULL_GROUP_BY*/          18,
+  /*NO_UNSIGNED_SUBTRACTION*/     23,
+  /*NO_DIR_IN_CREATE*/            16,
+  /*POSTGRESQL*/                  10,
+  /*ORACLE*/                      6,
+  /*MSSQL*/                       5,
+  /*DB2*/                         3,
+  /*MAXDB*/                       5,
+  /*NO_KEY_OPTIONS*/              14,
+  /*NO_TABLE_OPTIONS*/            16,
+  /*NO_FIELD_OPTIONS*/            16,
+  /*MYSQL323*/                    8,
+  /*MYSQL40*/                     7,
+  /*ANSI*/                        4,
+  /*NO_AUTO_VALUE_ON_ZERO*/       21,
+  /*NO_BACKSLASH_ESCAPES*/        20,
+  /*STRICT_TRANS_TABLES*/         19,
+  /*STRICT_ALL_TABLES*/           17,
+  /*NO_ZERO_IN_DATE*/             15,
+  /*NO_ZERO_DATE*/                12,
+  /*ALLOW_INVALID_DATES*/         19,
+  /*ERROR_FOR_DIVISION_BY_ZERO*/  26,
+  /*TRADITIONAL*/                 11,
+  /*NO_AUTO_CREATE_USER*/         19,
+  /*HIGH_NOT_PRECEDENCE*/         19,
+  /*NO_ENGINE_SUBSTITUTION*/      22
+};
 TYPELIB sql_mode_typelib= { array_elements(sql_mode_names)-1,"",
-			    sql_mode_names, NULL };
+			    sql_mode_names,
+                            (unsigned int *)sql_mode_names_len };
 static const char *tc_heuristic_recover_names[]=
 {
   "COMMIT", "ROLLBACK", NullS
@@ -350,8 +387,8 @@ uint delay_key_write_options, protocol_version;
 uint lower_case_table_names;
 uint tc_heuristic_recover= 0;
 uint volatile thread_count, thread_running;
-ulong back_log, connect_timeout, concurrency;
-ulong server_id, thd_startup_options;
+ulonglong thd_startup_options;
+ulong back_log, connect_timeout, concurrency, server_id;
 ulong table_cache_size, thread_stack, what_to_log;
 ulong query_buff_size, slow_launch_time, slave_open_temp_tables;
 ulong open_files_limit, max_binlog_size, max_relay_log_size;
@@ -410,6 +447,7 @@ Le_creator le_creator;
 
 FILE *bootstrap_file;
 int bootstrap_error;
+FILE *stderror_file=0;
 
 I_List<i_string_pair> replicate_rewrite_db;
 I_List<i_string> replicate_do_db, replicate_ignore_db;
@@ -676,7 +714,6 @@ static void close_connections(void)
   }
 #endif
   end_thr_alarm(0);			 // Abort old alarms.
-  end_slave();
 
   /*
     First signal all threads that it's time to die
@@ -692,6 +729,9 @@ static void close_connections(void)
   {
     DBUG_PRINT("quit",("Informing thread %ld that it's time to die",
 		       tmp->thread_id));
+    /* We skip slave threads on this first loop through. */
+    if (tmp->slave_thread) continue;
+
     tmp->killed= THD::KILL_CONNECTION;
     if (tmp->mysys_var)
     {
@@ -708,6 +748,8 @@ static void close_connections(void)
   }
   (void) pthread_mutex_unlock(&LOCK_thread_count); // For unlink from list
 
+  end_slave();
+
   if (thread_count)
     sleep(2);					// Give threads time to die
 
@@ -1012,6 +1054,7 @@ void clean_up(bool print_message)
   (void) ha_panic(HA_PANIC_CLOSE);	/* close all tables and logs */
   if (tc_log)
     tc_log->close();
+  xid_cache_free();
   delete_elements(&key_caches, (void (*)(const char*, gptr)) free_key_cache);
   multi_keycache_free();
   end_thr_alarm(1);			/* Free allocated memory */
@@ -1870,7 +1913,8 @@ static void check_data_home(const char *path)
 static void sig_reload(int signo)
 {
  // Flush everything
-  reload_acl_and_cache((THD*) 0,REFRESH_LOG, (TABLE_LIST*) 0, NULL);
+  bool not_used;
+  reload_acl_and_cache((THD*) 0,REFRESH_LOG, (TABLE_LIST*) 0, &not_used);
   signal(signo, SIG_ACK);
 }
 
@@ -2229,12 +2273,13 @@ static void *signal_hand(void *arg __attribute__((unused)))
     case SIGHUP:
       if (!abort_loop)
       {
+        bool not_used;
 	mysql_print_status();		// Print some debug info
 	reload_acl_and_cache((THD*) 0,
 			     (REFRESH_LOG | REFRESH_TABLES | REFRESH_FAST |
 			      REFRESH_GRANT |
 			      REFRESH_THREADS | REFRESH_HOSTS),
-			     (TABLE_LIST*) 0, NULL); // Flush logs
+			     (TABLE_LIST*) 0, &not_used); // Flush logs
       }
       break;
 #ifdef USE_ONE_SIGNAL_HAND
@@ -2319,6 +2364,19 @@ static int my_message_sql(uint error, const char *str, myf MyFlags)
   DBUG_RETURN(0);
 }
 
+
+static void *my_str_malloc_mysqld(size_t size)
+{
+  return my_malloc(size, MYF(MY_FAE));
+}
+
+
+static void my_str_free_mysqld(void *ptr)
+{
+  my_free((gptr)ptr, MYF(MY_FAE));
+}
+
+
 #ifdef __WIN__
 
 struct utsname
@@ -2600,6 +2658,50 @@ static int init_common_variables(const char *conf_file_name, int argc,
   if (my_dbopt_init())
     return 1;
 
+  /*
+    Ensure that lower_case_table_names is set on system where we have case
+    insensitive names.  If this is not done the users MyISAM tables will
+    get corrupted if accesses with names of different case.
+  */
+  DBUG_PRINT("info", ("lower_case_table_names: %d", lower_case_table_names));
+  if (!lower_case_table_names &&
+      (lower_case_file_system=
+       (test_if_case_insensitive(mysql_real_data_home) == 1)))
+  {
+    if (lower_case_table_names_used)
+    {
+      if (global_system_variables.log_warnings)
+	sql_print_warning("\
+You have forced lower_case_table_names to 0 through a command-line \
+option, even though your file system '%s' is case insensitive.  This means \
+that you can corrupt a MyISAM table by accessing it with different cases. \
+You should consider changing lower_case_table_names to 1 or 2",
+			mysql_real_data_home);
+    }
+    else
+    {
+      if (global_system_variables.log_warnings)
+	sql_print_warning("Setting lower_case_table_names=2 because file system for %s is case insensitive", mysql_real_data_home);
+      lower_case_table_names= 2;
+    }
+  }
+  else if (lower_case_table_names == 2 &&
+           !(lower_case_file_system=
+             (test_if_case_insensitive(mysql_real_data_home) == 1)))
+  {
+    if (global_system_variables.log_warnings)
+      sql_print_warning("lower_case_table_names was set to 2, even though your "
+                        "the file system '%s' is case sensitive.  Now setting "
+                        "lower_case_table_names to 0 to avoid future problems.",
+			mysql_real_data_home);
+    lower_case_table_names= 0;
+  }
+
+  /* Reset table_alias_charset, now that lower_case_table_names is set. */
+  table_alias_charset= (lower_case_table_names ?
+			files_charset_info :
+			&my_charset_bin);
+
   return 0;
 }
 
@@ -2784,7 +2886,7 @@ server.");
 #ifndef EMBEDDED_LIBRARY
       if (freopen(log_error_file, "a+", stdout))
 #endif
-	freopen(log_error_file, "a+", stderr);
+	stderror_file= freopen(log_error_file, "a+", stderr);
     }
   }
 
@@ -2825,6 +2927,11 @@ server.");
     using_update_log=1;
   }
 
+  if (xid_cache_init())
+  {
+    sql_print_error("Out of memory");
+    unireg_abort(1);
+  }
   if (ha_init())
   {
     sql_print_error("Can't init databases");
@@ -3077,50 +3184,6 @@ int main(int argc, char **argv)
 
   (void) thr_setconcurrency(concurrency);	// 10 by default
 
-  /*
-    Ensure that lower_case_table_names is set on system where we have case
-    insensitive names.  If this is not done the users MyISAM tables will
-    get corrupted if accesses with names of different case.
-  */
-  DBUG_PRINT("info", ("lower_case_table_names: %d", lower_case_table_names));
-  if (!lower_case_table_names &&
-      (lower_case_file_system=
-       (test_if_case_insensitive(mysql_real_data_home) == 1)))
-  {
-    if (lower_case_table_names_used)
-    {
-      if (global_system_variables.log_warnings)
-	sql_print_warning("\
-You have forced lower_case_table_names to 0 through a command-line \
-option, even though your file system '%s' is case insensitive.  This means \
-that you can corrupt a MyISAM table by accessing it with different cases. \
-You should consider changing lower_case_table_names to 1 or 2",
-			mysql_real_data_home);
-    }
-    else
-    {
-      if (global_system_variables.log_warnings)
-	sql_print_warning("Setting lower_case_table_names=2 because file system for %s is case insensitive", mysql_real_data_home);
-      lower_case_table_names= 2;
-    }
-  }
-  else if (lower_case_table_names == 2 &&
-           !(lower_case_file_system=
-             (test_if_case_insensitive(mysql_real_data_home) == 1)))
-  {
-    if (global_system_variables.log_warnings)
-      sql_print_warning("lower_case_table_names was set to 2, even though your "
-                        "the file system '%s' is case sensitive.  Now setting "
-                        "lower_case_table_names to 0 to avoid future problems.",
-			mysql_real_data_home);
-    lower_case_table_names= 0;
-  }
-
-  /* Reset table_alias_charset, now that lower_case_table_names is set. */
-  table_alias_charset= (lower_case_table_names ?
-			files_charset_info :
-			&my_charset_bin);
-
   select_thread=pthread_self();
   select_thread_in_use=1;
   init_ssl();
@@ -3175,11 +3238,17 @@ we force server id to 2, but this MySQL server will not act as a slave.");
   }
 #endif
 
+  /*
+   Initialize my_str_malloc() and my_str_free()
+  */
+  my_str_malloc= &my_str_malloc_mysqld;
+  my_str_free= &my_str_free_mysqld;
+
   /*
     init signals & alarm
     After this we can't quit by a simple unireg_abort
   */
-  error_handler_hook = my_message_sql;
+  error_handler_hook= my_message_sql;
   start_signal_handler();				// Creates pidfile
   if (acl_init((THD *)0, opt_noacl) || 
       my_tz_init((THD *)0, default_tz_name, opt_bootstrap))
@@ -5257,6 +5326,10 @@ log and this option does nothing anymore.",
    "Helps in performance tuning in heavily concurrent environments.",
    (gptr*) &srv_thread_concurrency, (gptr*) &srv_thread_concurrency,
    0, GET_LONG, REQUIRED_ARG, 20, 1, 1000, 0, 1, 0},
+  {"innodb_commit_concurrency", OPT_INNODB_THREAD_CONCURRENCY,
+   "Helps in performance tuning in heavily concurrent environments.",
+   (gptr*) &srv_commit_concurrency, (gptr*) &srv_commit_concurrency,
+   0, GET_LONG, REQUIRED_ARG, 0, 0, 1000, 0, 1, 0},
   {"innodb_thread_sleep_delay", OPT_INNODB_THREAD_SLEEP_DELAY,
    "Time of innodb thread sleeping before joining InnoDB queue (usec). Value 0"
     " disable a sleep",
diff --git a/sql/parse_file.cc b/sql/parse_file.cc
index abca8736916ac50c5b52c418548604d654ef5f01..82ce2f2d7b513eddf3ccc51860929786573d47be 100644
--- a/sql/parse_file.cc
+++ b/sql/parse_file.cc
@@ -166,6 +166,25 @@ write_parameter(IO_CACHE *file, gptr base, File_option *parameter,
     }
     break;
   }
+  case FILE_OPTIONS_ULLLIST:
+  {
+    List_iterator_fast<ulonglong> it(*((List<ulonglong>*)
+                                       (base + parameter->offset)));
+    bool first= 1;
+    ulonglong *val;
+    while ((val= it++))
+    {
+      num.set(*val, &my_charset_bin);
+      // We need ' ' after string to detect list continuation
+      if ((!first && my_b_append(file, (const byte *)" ", 1)) ||
+          my_b_append(file, (const byte *)num.ptr(), num.length()))
+      {
+        DBUG_RETURN(TRUE);
+      }
+      first= 0;
+    }
+    break;
+  }
   default:
     DBUG_ASSERT(0); // never should happened
   }
@@ -615,6 +634,8 @@ File_parser::parse(gptr base, MEM_ROOT *mem_root,
   char *eol;
   LEX_STRING *str;
   List<LEX_STRING> *list;
+  ulonglong *num;
+  List<ulonglong> *nlist;
   DBUG_ENTER("File_parser::parse");
 
   while (ptr < end && found < required)
@@ -719,7 +740,7 @@ File_parser::parse(gptr base, MEM_ROOT *mem_root,
 	case FILE_OPTIONS_STRLIST:
 	{
           list= (List<LEX_STRING>*)(base + parameter->offset);
-	    
+
 	  list->empty();
 	  // list parsing
 	  while (ptr < end)
@@ -741,17 +762,56 @@ File_parser::parse(gptr base, MEM_ROOT *mem_root,
 	      goto list_err_w_message;
 	    }
 	  }
-      end_of_list:
+
+end_of_list:
 	  if (*(ptr++) != '\n')
 	    goto list_err;
 	  break;
 
-      list_err_w_message:
+list_err_w_message:
 	  my_error(ER_FPARSER_ERROR_IN_PARAMETER, MYF(0),
                    parameter->name.str, line);
-      list_err:
+list_err:
 	  DBUG_RETURN(TRUE);
 	}
+        case FILE_OPTIONS_ULLLIST:
+        {
+          nlist= (List<ulonglong>*)(base + parameter->offset);
+          nlist->empty();
+          // list parsing
+          while (ptr < end)
+          {
+            int not_used;
+            char *num_end= end;
+            if (!(num= (ulonglong*)alloc_root(mem_root, sizeof(ulonglong))) ||
+                nlist->push_back(num, mem_root))
+              goto nlist_err;
+            *num= my_strtoll10(ptr, &num_end, &not_used);
+            ptr= num_end;
+            switch (*ptr) {
+            case '\n':
+              goto end_of_nlist;
+            case ' ':
+              // we cant go over buffer bounds, because we have \0 at the end
+              ptr++;
+              break;
+            default:
+              goto nlist_err_w_message;
+            }
+          }
+
+end_of_nlist:
+          if (*(ptr++) != '\n')
+            goto nlist_err;
+          break;
+
+nlist_err_w_message:
+          my_error(ER_FPARSER_ERROR_IN_PARAMETER, MYF(0),
+                   parameter->name.str, line);
+nlist_err:
+          DBUG_RETURN(TRUE);
+
+        }
 	default:
 	  DBUG_ASSERT(0); // never should happened
 	}
diff --git a/sql/parse_file.h b/sql/parse_file.h
index 82a89dffd189844be7fbd96537c109992a6fe348..cc0aa6556f690cec446f45c059a80ddf4fb6ec8e 100644
--- a/sql/parse_file.h
+++ b/sql/parse_file.h
@@ -27,8 +27,10 @@ enum file_opt_type {
   FILE_OPTIONS_REV,		/* Revision version number (ulonglong) */
   FILE_OPTIONS_TIMESTAMP,	/* timestamp (LEX_STRING have to be
 				   allocated with length 20 (19+1) */
-  FILE_OPTIONS_STRLIST          /* list of escaped strings
+  FILE_OPTIONS_STRLIST,         /* list of escaped strings
                                    (List<LEX_STRING>) */
+  FILE_OPTIONS_ULLLIST          /* list of ulonglong values
+                                   (List<ulonglong>) */
 };
 
 struct File_option
diff --git a/sql/protocol_cursor.cc b/sql/protocol_cursor.cc
index ed2d0b583d0a87250e8af4982edf750fc11720af..093a2bf2b90625ab29d767d720aecad6b02d69f4 100644
--- a/sql/protocol_cursor.cc
+++ b/sql/protocol_cursor.cc
@@ -114,8 +114,7 @@ bool Protocol_cursor::write()
 
   for (; cur_field < fields_end; cur_field++, data_tmp++)
   {
-    if ((len= net_field_length((uchar **)&cp)) == 0 ||
-	len == NULL_LENGTH)
+    if ((len= net_field_length((uchar **)&cp)) == NULL_LENGTH)
     {
       *data_tmp= 0;
     }
diff --git a/sql/set_var.cc b/sql/set_var.cc
index 09581aed2172a20da4c982343bc22b7162097df4..53f3d45e5228b344daaa655fa98b6f37c37a005f 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -411,6 +411,8 @@ sys_var_long_ptr  sys_innodb_thread_sleep_delay("innodb_thread_sleep_delay",
                                                 &srv_thread_sleep_delay);
 sys_var_long_ptr  sys_innodb_thread_concurrency("innodb_thread_concurrency",
                                                 &srv_thread_concurrency);
+sys_var_long_ptr  sys_innodb_commit_concurrency("innodb_commit_concurrency",
+                                                &srv_commit_concurrency);
 #endif
 
 /* Condition pushdown to storage engine */
@@ -708,6 +710,7 @@ sys_var *sys_variables[]=
   &sys_innodb_concurrency_tickets,
   &sys_innodb_thread_sleep_delay,
   &sys_innodb_thread_concurrency,
+  &sys_innodb_commit_concurrency,
 #endif  
   &sys_trust_routine_creators,
   &sys_engine_condition_pushdown,
@@ -828,6 +831,7 @@ struct show_var_st init_vars[]= {
   {sys_innodb_table_locks.name, (char*) &sys_innodb_table_locks, SHOW_SYS},
   {sys_innodb_support_xa.name, (char*) &sys_innodb_support_xa, SHOW_SYS},
   {sys_innodb_thread_concurrency.name, (char*) &sys_innodb_thread_concurrency, SHOW_SYS},
+  {sys_innodb_commit_concurrency.name, (char*) &sys_innodb_commit_concurrency, SHOW_SYS},
   {sys_innodb_thread_sleep_delay.name, (char*) &sys_innodb_thread_sleep_delay, SHOW_SYS},
 #endif
   {sys_interactive_timeout.name,(char*) &sys_interactive_timeout,   SHOW_SYS},
@@ -1426,6 +1430,12 @@ bool sys_var_thd_ulong::update(THD *thd, set_var *var)
   if ((ulong) tmp > max_system_variables.*offset)
     tmp= max_system_variables.*offset;
 
+#if SIZEOF_LONG == 4
+  /* Avoid overflows on 32 bit systems */
+  if (tmp > (ulonglong) ~(ulong) 0)
+    tmp= ((ulonglong) ~(ulong) 0);
+#endif
+
   if (option_limits)
     tmp= (ulong) getopt_ull_limit_value(tmp, option_limits);
   if (var->type == OPT_GLOBAL)
@@ -1679,7 +1689,7 @@ Item *sys_var::item(THD *thd, enum_var_type var_type, LEX_STRING *base)
     pthread_mutex_lock(&LOCK_global_system_variables);
     value= *(uint*) value_ptr(thd, var_type, base);
     pthread_mutex_unlock(&LOCK_global_system_variables);
-    return new Item_uint((int32) value);
+    return new Item_uint((ulonglong) value);
   }
   case SHOW_LONG:
   {
@@ -1687,7 +1697,7 @@ Item *sys_var::item(THD *thd, enum_var_type var_type, LEX_STRING *base)
     pthread_mutex_lock(&LOCK_global_system_variables);
     value= *(ulong*) value_ptr(thd, var_type, base);
     pthread_mutex_unlock(&LOCK_global_system_variables);
-    return new Item_uint((int32) value);
+    return new Item_uint((ulonglong) value);
   }
   case SHOW_LONGLONG:
   {
@@ -2287,7 +2297,12 @@ bool sys_var_key_buffer_size::update(THD *thd, set_var *var)
   if (!tmp)					// Zero size means delete
   {
     if (key_cache == dflt_key_cache)
+    {
+      push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+                          ER_WARN_CANT_DROP_DEFAULT_KEYCACHE,
+                          ER(ER_WARN_CANT_DROP_DEFAULT_KEYCACHE));
       goto end;					// Ignore default key cache
+    }
 
     if (key_cache->key_cache_inited)		// If initied
     {
@@ -3196,27 +3211,50 @@ bool sys_var_thd_table_type::update(THD *thd, set_var *var)
  Functions to handle sql_mode
 ****************************************************************************/
 
-byte *sys_var_thd_sql_mode::value_ptr(THD *thd, enum_var_type type,
-				      LEX_STRING *base)
+/*
+  Make string representation of mode
+
+  SYNOPSIS
+    thd   in  thread handler
+    val   in  sql_mode value
+    len   out pointer on length of string
+
+  RETURN
+    pointer to string with sql_mode representation
+*/
+
+byte *sys_var_thd_sql_mode::symbolic_mode_representation(THD *thd, ulong val,
+                                                         ulong *len)
 {
-  ulong val;
   char buff[256];
   String tmp(buff, sizeof(buff), &my_charset_latin1);
+  ulong length;
 
   tmp.length(0);
-  val= ((type == OPT_GLOBAL) ? global_system_variables.*offset :
-        thd->variables.*offset);
   for (uint i= 0; val; val>>= 1, i++)
   {
     if (val & 1)
     {
-      tmp.append(enum_names->type_names[i]);
+      tmp.append(sql_mode_typelib.type_names[i],
+                 sql_mode_typelib.type_lengths[i]);
       tmp.append(',');
     }
   }
-  if (tmp.length())
-    tmp.length(tmp.length() - 1);
-  return (byte*) thd->strmake(tmp.ptr(), tmp.length());
+
+  if ((length= tmp.length()))
+    length--;
+  *len= length;
+  return (byte*) thd->strmake(tmp.ptr(), length);
+}
+
+
+byte *sys_var_thd_sql_mode::value_ptr(THD *thd, enum_var_type type,
+				      LEX_STRING *base)
+{
+  ulong val= ((type == OPT_GLOBAL) ? global_system_variables.*offset :
+              thd->variables.*offset);
+  ulong length_unused;
+  return symbolic_mode_representation(thd, val, &length_unused);
 }
 
 
@@ -3228,6 +3266,7 @@ void sys_var_thd_sql_mode::set_default(THD *thd, enum_var_type type)
     thd->variables.*offset= global_system_variables.*offset;
 }
 
+
 void fix_sql_mode_var(THD *thd, enum_var_type type)
 {
   if (type == OPT_GLOBAL)
diff --git a/sql/set_var.h b/sql/set_var.h
index a7e680cc7fa1071be0d7924a9f47c23b7d356b18..c8b075ddd35417453f59a2c5e0c208055d79064a 100644
--- a/sql/set_var.h
+++ b/sql/set_var.h
@@ -361,6 +361,8 @@ public:
   }
   void set_default(THD *thd, enum_var_type type);
   byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base);
+  static byte *symbolic_mode_representation(THD *thd, ulong sql_mode,
+                                            ulong *length);
 };
 
 
diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt
index 4953004cc2431b8ff43866a22f3f80422a5afd5b..2c28eef1ea1d27810fff95397eaf7ba75986273d 100644
--- a/sql/share/errmsg.txt
+++ b/sql/share/errmsg.txt
@@ -4094,20 +4094,20 @@ ER_ERROR_DURING_CHECKPOINT
 	swe "Fick fel %d vid CHECKPOINT"
 	ukr "ïÔÒÉÍÁÎÏ ÐÏÍÉÌËÕ %d Ð¦Ä ÞÁÓ CHECKPOINT"
 ER_NEW_ABORTING_CONNECTION 08S01 
-	cze "Spojen-Bí %ld do databáze: '%-.64s' u¾ivatel: '%-.32s' stroj: `%-.64s' (%-.64s) bylo pøeru¹eno"
-	dan "Afbrød forbindelsen %ld til databasen '%-.64s' bruger: '%-.32s' vært: `%-.64s' (%-.64s)"
-	nla "Afgebroken verbinding %ld naar db: '%-.64s' gebruiker: '%-.32s' host: `%-.64s' (%-.64s)"
-	eng "Aborted connection %ld to db: '%-.64s' user: '%-.32s' host: `%-.64s' (%-.64s)"
-	est "Ühendus katkestatud %ld andmebaas: '%-.64s' kasutaja: '%-.32s' masin: `%-.64s' (%-.64s)"
-	fre "Connection %ld avortée vers la bd: '%-.64s' utilisateur: '%-.32s' hôte: `%-.64s' (%-.64s)"
-	ger "Verbindungsabbruch  %ld zur Datenbank '%-.64s'. Benutzer: '%-.32s', Host: `%-.64s' (%-.64s)"
+	cze "Spojen-Bí %ld do databáze: '%-.64s' u¾ivatel: '%-.32s' stroj: '%-.64s' (%-.64s) bylo pøeru¹eno"
+	dan "Afbrød forbindelsen %ld til databasen '%-.64s' bruger: '%-.32s' vært: '%-.64s' (%-.64s)"
+	nla "Afgebroken verbinding %ld naar db: '%-.64s' gebruiker: '%-.32s' host: '%-.64s' (%-.64s)"
+	eng "Aborted connection %ld to db: '%-.64s' user: '%-.32s' host: '%-.64s' (%-.64s)"
+	est "Ühendus katkestatud %ld andmebaas: '%-.64s' kasutaja: '%-.32s' masin: '%-.64s' (%-.64s)"
+	fre "Connection %ld avortée vers la bd: '%-.64s' utilisateur: '%-.32s' hôte: '%-.64s' (%-.64s)"
+	ger "Verbindungsabbruch  %ld zur Datenbank '%-.64s'. Benutzer: '%-.32s', Host: '%-.64s' (%-.64s)"
 	ita "Interrotta la connessione %ld al db: ''%-.64s' utente: '%-.32s' host: '%-.64s' (%-.64s)"
-	por "Conexão %ld abortada para banco de dados '%-.64s' - usuário '%-.32s' - 'host' `%-.64s' ('%-.64s')"
-	rus "ðÒÅÒ×ÁÎÏ ÓÏÅÄÉÎÅÎÉÅ %ld Ë ÂÁÚÅ ÄÁÎÎÙÈ '%-.64s' ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.32s' Ó ÈÏÓÔÁ `%-.64s' (%-.64s)"
-	serbian "Prekinuta konekcija broj %ld ka bazi: '%-.64s' korisnik je bio: '%-.32s' a host: `%-.64s' (%-.64s)"
-	spa "Abortada conexión %ld para db: '%-.64s' usuario: '%-.32s' servidor: `%-.64s' (%-.64s)"
+	por "Conexão %ld abortada para banco de dados '%-.64s' - usuário '%-.32s' - 'host' '%-.64s' ('%-.64s')"
+	rus "ðÒÅÒ×ÁÎÏ ÓÏÅÄÉÎÅÎÉÅ %ld Ë ÂÁÚÅ ÄÁÎÎÙÈ '%-.64s' ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.32s' Ó ÈÏÓÔÁ '%-.64s' (%-.64s)"
+	serbian "Prekinuta konekcija broj %ld ka bazi: '%-.64s' korisnik je bio: '%-.32s' a host: '%-.64s' (%-.64s)"
+	spa "Abortada conexión %ld para db: '%-.64s' usuario: '%-.32s' servidor: '%-.64s' (%-.64s)"
 	swe "Avbröt länken för tråd %ld till db '%-.64s', användare '%-.32s', host '%-.64s' (%-.64s)"
-	ukr "ðÅÒÅÒ×ÁÎÏ Ú'¤ÄÎÁÎÎÑ %ld ÄÏ ÂÁÚÉ ÄÁÎÎÉÈ: '%-.64s' ËÏÒÉÓÔÕ×ÁÞ: '%-.32s' ÈÏÓÔ: `%-.64s' (%-.64s)"
+	ukr "ðÅÒÅÒ×ÁÎÏ Ú'¤ÄÎÁÎÎÑ %ld ÄÏ ÂÁÚÉ ÄÁÎÎÉÈ: '%-.64s' ËÏÒÉÓÔÕ×ÁÞ: '%-.32s' ÈÏÓÔ: '%-.64s' (%-.64s)"
 ER_DUMP_NOT_IMPLEMENTED  
 	cze "Handler tabulky nepodporuje bin-Bární dump"
 	dan "Denne tabeltype unserstøtter ikke binært tabeldump"
@@ -5137,8 +5137,8 @@ ER_SP_CANT_ALTER
 	eng "Failed to ALTER %s %s"
 ER_SP_SUBSELECT_NYI 0A000 
 	eng "Subselect value not supported"
-ER_SP_NO_USE 42000 
-	eng "USE is not allowed in a stored procedure"
+ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG 0A000
+        eng "%s is not allowed in stored function or trigger"
 ER_SP_VARCOND_AFTER_CURSHNDLR 42000 
 	eng "Variable or condition declaration after cursor or handler declaration"
 ER_SP_CURSOR_AFTER_HANDLER 42000 
@@ -5342,8 +5342,8 @@ ER_SP_DUP_HANDLER 42000
 	eng "Duplicate handler declared in the same block"
 ER_SP_NOT_VAR_ARG 42000
 	eng "OUT or INOUT argument %d for routine %s is not a variable"
-ER_SP_NO_RETSET_IN_FUNC 0A000
-	eng "Not allowed to return a result set from a function"
+ER_SP_NO_RETSET 0A000
+	eng "Not allowed to return a result set from a %s"
 ER_CANT_CREATE_GEOMETRY_OBJECT 22003 
 	eng "Cannot get geometry object from data you send to the GEOMETRY field"
 ER_FAILED_ROUTINE_BREAK_BINLOG
@@ -5384,3 +5384,16 @@ ER_CANT_CREATE_FEDERATED_TABLE
 	eng "Can't create federated table. Foreign data src error : '%-.64s'"
 ER_TRG_IN_WRONG_SCHEMA  
 	eng "Trigger in wrong schema"
+ER_STACK_OVERRUN_NEED_MORE
+	eng "Thread stack overrun:  %ld bytes used of a %ld byte stack, and %ld bytes needed.  Use 'mysqld -O thread_stack=#' to specify a bigger stack."
+ER_TOO_LONG_BODY 42000 S1009
+	eng "Routine body for '%-.100s' is too long"
+ER_WARN_CANT_DROP_DEFAULT_KEYCACHE
+	eng "Cannot drop default keycache"
+        ger "Der Default-Keycache kann nicht gelöscht werden"
+ER_TOO_BIG_DISPLAYWIDTH 42000 S1009
+	eng "Display width out of range for column '%-.64s' (max = %d)"
+ER_XAER_DUPID XAE08
+        eng "XAER_DUPID: The XID already exists"
+ER_DATETIME_FUNCTION_OVERFLOW 22008
+        eng "Datetime function: %-.32s field overflow"
diff --git a/sql/slave.cc b/sql/slave.cc
index 86611566b93ff744ab8a60d0ae204ef11cdd5674..d2a60076cefe20eb8082e44e8cd7471571826d07 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -2396,7 +2396,8 @@ bool show_master_info(THD* thd, MASTER_INFO* mi)
 		    &my_charset_bin);
     protocol->store((ulonglong) mi->rli.group_relay_log_pos);
     protocol->store(mi->rli.group_master_log_name, &my_charset_bin);
-    protocol->store(mi->slave_running ? "Yes":"No", &my_charset_bin);
+    protocol->store(mi->slave_running == MYSQL_SLAVE_RUN_CONNECT ?
+                    "Yes" : "No", &my_charset_bin);
     protocol->store(mi->rli.slave_running ? "Yes":"No", &my_charset_bin);
     protocol->store(&replicate_do_db);
     protocol->store(&replicate_ignore_db);
@@ -3637,9 +3638,9 @@ err:
   mi->abort_slave = 0; // TODO: check if this is needed
   DBUG_ASSERT(thd->net.buff != 0);
   net_end(&thd->net); // destructor will not free it, because net.vio is 0
+  close_thread_tables(thd, 0);
   pthread_mutex_lock(&LOCK_thread_count);
   THD_CHECK_SENTRY(thd);
-  close_thread_tables(thd);
   delete thd;
   pthread_mutex_unlock(&LOCK_thread_count);
   pthread_cond_broadcast(&mi->stop_cond);	// tell the world we are done
diff --git a/sql/sp.cc b/sql/sp.cc
index a277c6bd253f76e55c2704111893ba50586b4148..b05cf6f39a7c655e7dd585ba48ee02b9ddfc4012 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -68,13 +68,16 @@ bool mysql_proc_table_exists= 1;
 
   SYNOPSIS
     close_proc_table()
-      thd  Thread context
+      thd     Thread context
+      backup  Pointer to Open_tables_state instance which holds
+              information about tables which were open before we
+              decided to access mysql.proc.
 */
 
-static void close_proc_table(THD *thd)
+void close_proc_table(THD *thd, Open_tables_state *backup)
 {
   close_thread_tables(thd);
-  thd->pop_open_tables_state();
+  thd->restore_backup_open_tables_state(backup);
 }
 
 
@@ -83,7 +86,10 @@ static void close_proc_table(THD *thd)
 
   SYNOPSIS
     open_proc_table_for_read()
-      thd  Thread context
+      thd     Thread context
+      backup  Pointer to Open_tables_state instance where information about
+              currently open tables will be saved, and from which will be
+              restored when we will end work with mysql.proc.
 
   NOTES
     Thanks to restrictions which we put on opening and locking of
@@ -97,11 +103,10 @@ static void close_proc_table(THD *thd)
     #	Pointer to TABLE object of mysql.proc
 */
 
-static TABLE *open_proc_table_for_read(THD *thd)
+TABLE *open_proc_table_for_read(THD *thd, Open_tables_state *backup)
 {
   TABLE_LIST tables;
   TABLE *table;
-  bool old_open_tables= thd->open_tables != 0;
   bool refresh;
   DBUG_ENTER("open_proc_table");
 
@@ -112,8 +117,7 @@ static TABLE *open_proc_table_for_read(THD *thd)
   if (!mysql_proc_table_exists)
     DBUG_RETURN(0);
 
-  if (thd->push_open_tables_state())
-    DBUG_RETURN(0);
+  thd->reset_n_backup_open_tables_state(backup);
 
   bzero((char*) &tables, sizeof(tables));
   tables.db= (char*) "mysql";
@@ -121,7 +125,7 @@ static TABLE *open_proc_table_for_read(THD *thd)
   if (!(table= open_table(thd, &tables, thd->mem_root, &refresh,
                           MYSQL_LOCK_IGNORE_FLUSH)))
   {
-    thd->pop_open_tables_state();
+    thd->restore_backup_open_tables_state(backup);
     mysql_proc_table_exists= 0;
     DBUG_RETURN(0);
   }
@@ -130,15 +134,13 @@ static TABLE *open_proc_table_for_read(THD *thd)
 
   table->reginfo.lock_type= TL_READ;
   /*
-    If we have other tables opened, we have to ensure we are not blocked
-    by a flush tables or global read lock, as this could lead to a deadlock
+    We have to ensure we are not blocked by a flush tables, as this
+    could lead to a deadlock if we have other tables opened.
   */
   if (!(thd->lock= mysql_lock_tables(thd, &table, 1,
-                                     old_open_tables ?
-                                     (MYSQL_LOCK_IGNORE_GLOBAL_READ_LOCK |
-                                      MYSQL_LOCK_IGNORE_FLUSH) : 0)))
+                                     MYSQL_LOCK_IGNORE_FLUSH)))
   {
-    close_proc_table(thd);
+    close_proc_table(thd, backup);
     DBUG_RETURN(0);
   }
   DBUG_RETURN(table);
@@ -271,12 +273,13 @@ db_find_routine(THD *thd, int type, sp_name *name, sp_head **sphp)
   char buff[65];
   String str(buff, sizeof(buff), &my_charset_bin);
   ulong sql_mode;
+  Open_tables_state open_tables_state_backup;
   DBUG_ENTER("db_find_routine");
   DBUG_PRINT("enter", ("type: %d name: %*s",
 		       type, name->m_name.length, name->m_name.str));
 
   *sphp= 0;                                     // In case of errors
-  if (!(table= open_proc_table_for_read(thd)))
+  if (!(table= open_proc_table_for_read(thd, &open_tables_state_backup)))
     DBUG_RETURN(SP_OPEN_TABLE_FAILED);
 
   if ((ret= db_find_routine_aux(thd, type, name, table)) != SP_OK)
@@ -371,7 +374,7 @@ db_find_routine(THD *thd, int type, sp_name *name, sp_head **sphp)
   chistics.comment.str= ptr;
   chistics.comment.length= length;
 
-  close_proc_table(thd);
+  close_proc_table(thd, &open_tables_state_backup);
   table= 0;
 
   {
@@ -424,7 +427,7 @@ db_find_routine(THD *thd, int type, sp_name *name, sp_head **sphp)
       LEX *newlex= thd->lex;
       sp_head *sp= newlex->sphead;
 
-      if (dbchanged && (ret= sp_change_db(thd, olddb, 1)))
+      if (dbchanged && (ret= mysql_change_db(thd, olddb, 1)))
 	goto done;
       if (sp)
       {
@@ -435,7 +438,7 @@ db_find_routine(THD *thd, int type, sp_name *name, sp_head **sphp)
     }
     else
     {
-      if (dbchanged && (ret= sp_change_db(thd, olddb, 1)))
+      if (dbchanged && (ret= mysql_change_db(thd, olddb, 1)))
 	goto done;
       *sphp= thd->lex->sphead;
       (*sphp)->set_info((char *)definer, (uint)strlen(definer),
@@ -449,7 +452,7 @@ db_find_routine(THD *thd, int type, sp_name *name, sp_head **sphp)
 
  done:
   if (table)
-    close_proc_table(thd);
+    close_proc_table(thd, &open_tables_state_backup);
   DBUG_RETURN(ret);
 }
 
@@ -503,6 +506,11 @@ db_create_routine(THD *thd, int type, sp_head *sp)
       ret= SP_BAD_IDENTIFIER;
       goto done;
     }
+    if (sp->m_body.length > table->field[MYSQL_PROC_FIELD_BODY]->field_length)
+    {
+      ret= SP_BODY_TOO_LONG;
+      goto done;
+    }
     table->field[MYSQL_PROC_FIELD_DB]->
       store(sp->m_db.str, sp->m_db.length, system_charset_info);
     table->field[MYSQL_PROC_FIELD_NAME]->
@@ -586,7 +594,7 @@ db_create_routine(THD *thd, int type, sp_head *sp)
 done:
   close_thread_tables(thd);
   if (dbchanged)
-    (void)sp_change_db(thd, olddb, 1);
+    (void)mysql_change_db(thd, olddb, 1);
   DBUG_RETURN(ret);
 }
 
@@ -781,6 +789,7 @@ db_show_routine_status(THD *thd, int type, const char *wild)
     */
     thd->lex->select_lex.context.resolve_in_table_list_only(&tables);
     setup_tables(thd, &thd->lex->select_lex.context,
+                 &thd->lex->select_lex.top_join_list,
                  &tables, 0, &leaves, FALSE);
     for (used_field= &used_fields[0];
 	 used_field->field_name;
@@ -790,7 +799,7 @@ db_show_routine_status(THD *thd, int type, const char *wild)
                                         "mysql", "proc",
 					used_field->field_name);
       if (!field ||
-          !(used_field->field= find_field_in_tables(thd, field, &tables,
+          !(used_field->field= find_field_in_tables(thd, field, &tables, NULL,
 						    0, REPORT_ALL_ERRORS, 1,
                                                     TRUE)))
       {
@@ -981,13 +990,11 @@ int
 sp_drop_procedure(THD *thd, sp_name *name)
 {
   int ret;
-  bool found;
   DBUG_ENTER("sp_drop_procedure");
   DBUG_PRINT("enter", ("name: %*s", name->m_name.length, name->m_name.str));
 
-  found= sp_cache_remove(&thd->sp_proc_cache, name);
   ret= db_drop_routine(thd, TYPE_ENUM_PROCEDURE, name);
-  if (!found && !ret)
+  if (!ret)
     sp_cache_invalidate();
   DBUG_RETURN(ret);
 }
@@ -997,13 +1004,11 @@ int
 sp_update_procedure(THD *thd, sp_name *name, st_sp_chistics *chistics)
 {
   int ret;
-  bool found;
   DBUG_ENTER("sp_update_procedure");
   DBUG_PRINT("enter", ("name: %*s", name->m_name.length, name->m_name.str));
 
-  found= sp_cache_remove(&thd->sp_proc_cache, name);
   ret= db_update_routine(thd, TYPE_ENUM_PROCEDURE, name, chistics);
-  if (!found && !ret)
+  if (!ret)
     sp_cache_invalidate();
   DBUG_RETURN(ret);
 }
@@ -1094,13 +1099,11 @@ int
 sp_drop_function(THD *thd, sp_name *name)
 {
   int ret;
-  bool found;
   DBUG_ENTER("sp_drop_function");
   DBUG_PRINT("enter", ("name: %*s", name->m_name.length, name->m_name.str));
 
-  found= sp_cache_remove(&thd->sp_func_cache, name);
   ret= db_drop_routine(thd, TYPE_ENUM_FUNCTION, name);
-  if (!found && !ret)
+  if (!ret)
     sp_cache_invalidate();
   DBUG_RETURN(ret);
 }
@@ -1110,13 +1113,11 @@ int
 sp_update_function(THD *thd, sp_name *name, st_sp_chistics *chistics)
 {
   int ret;
-  bool found;
   DBUG_ENTER("sp_update_procedure");
   DBUG_PRINT("enter", ("name: %*s", name->m_name.length, name->m_name.str));
 
-  found= sp_cache_remove(&thd->sp_func_cache, name);
   ret= db_update_routine(thd, TYPE_ENUM_FUNCTION, name, chistics);
-  if (!found && !ret)
+  if (!ret)
     sp_cache_invalidate();
   DBUG_RETURN(ret);
 }
@@ -1175,6 +1176,43 @@ extern "C" byte* sp_sroutine_key(const byte *ptr, uint *plen, my_bool first)
 }
 
 
+/*
+  Check if
+   - current statement (the one in thd->lex) needs table prelocking
+   - first routine in thd->lex->sroutines_list needs to execute its body in
+     prelocked mode.
+
+  SYNOPSIS
+    sp_get_prelocking_info()
+      thd                  Current thread, thd->lex is the statement to be
+                           checked.
+      need_prelocking      OUT TRUE  - prelocked mode should be activated
+                                       before executing the statement
+                               FALSE - Don't activate prelocking 
+      first_no_prelocking  OUT TRUE  - Tables used by first routine in
+                                       thd->lex->sroutines_list should be
+                                       prelocked.
+                               FALSE - Otherwise.
+  NOTES 
+    This function assumes that for any "CALL proc(...)" statement routines_list 
+    will have 'proc' as first element (it may have several, consider e.g.
+    "proc(sp_func(...)))". This property is currently guaranted by the parser.
+*/
+
+void sp_get_prelocking_info(THD *thd, bool *need_prelocking, 
+                            bool *first_no_prelocking)
+{
+  Sroutine_hash_entry *routine;
+  routine= (Sroutine_hash_entry*)thd->lex->sroutines_list.first;
+
+  DBUG_ASSERT(routine);
+  bool first_is_procedure= (routine->key.str[0] == TYPE_ENUM_PROCEDURE);
+
+  *first_no_prelocking= first_is_procedure;
+  *need_prelocking= !first_is_procedure || test(routine->next);
+}
+
+
 /*
   Auxilary function that adds new element to the set of stored routines
   used by statement.
@@ -1312,11 +1350,13 @@ static void sp_update_stmt_used_routines(THD *thd, LEX *lex, HASH *src)
 
   SYNOPSIS
     sp_cache_routines_and_add_tables_aux()
-      thd   - thread context
-      lex   - LEX representing statement
-      start - first routine from the list of routines to be cached
-              (this list defines mentioned sub-set).
-
+      thd              - thread context
+      lex              - LEX representing statement
+      start            - first routine from the list of routines to be cached
+                         (this list defines mentioned sub-set).
+      first_no_prelock - If true, don't add tables or cache routines used by
+                         the body of the first routine (i.e. *start)
+                         will be executed in non-prelocked mode.
   NOTE
     If some function is missing this won't be reported here.
     Instead this fact will be discovered during query execution.
@@ -1328,10 +1368,11 @@ static void sp_update_stmt_used_routines(THD *thd, LEX *lex, HASH *src)
 
 static bool
 sp_cache_routines_and_add_tables_aux(THD *thd, LEX *lex,
-                                     Sroutine_hash_entry *start)
+                                     Sroutine_hash_entry *start, 
+                                     bool first_no_prelock)
 {
   bool result= FALSE;
-
+  bool first= TRUE;
   DBUG_ENTER("sp_cache_routines_and_add_tables_aux");
 
   for (Sroutine_hash_entry *rt= start; rt; rt= rt->next)
@@ -1367,9 +1408,13 @@ sp_cache_routines_and_add_tables_aux(THD *thd, LEX *lex,
     }
     if (sp)
     {
-      sp_update_stmt_used_routines(thd, lex, &sp->m_sroutines);
-      result|= sp->add_used_tables_to_table_list(thd, &lex->query_tables_last);
+      if (!(first && first_no_prelock))
+      {
+        sp_update_stmt_used_routines(thd, lex, &sp->m_sroutines);
+        result|= sp->add_used_tables_to_table_list(thd, &lex->query_tables_last);
+      }
     }
+    first= FALSE;
   }
   DBUG_RETURN(result);
 }
@@ -1382,20 +1427,22 @@ sp_cache_routines_and_add_tables_aux(THD *thd, LEX *lex,
 
   SYNOPSIS
     sp_cache_routines_and_add_tables()
-      thd   - thread context
-      lex   - LEX representing statement
-
+      thd              - thread context
+      lex              - LEX representing statement
+      first_no_prelock - If true, don't add tables or cache routines used by
+                         the body of the first routine (i.e. *start)
+                         
   RETURN VALUE
     TRUE  - some tables were added
     FALSE - no tables were added.
 */
 
 bool
-sp_cache_routines_and_add_tables(THD *thd, LEX *lex)
+sp_cache_routines_and_add_tables(THD *thd, LEX *lex, bool first_no_prelock)
 {
-
   return sp_cache_routines_and_add_tables_aux(thd, lex,
-           (Sroutine_hash_entry *)lex->sroutines_list.first);
+           (Sroutine_hash_entry *)lex->sroutines_list.first,
+           first_no_prelock);
 }
 
 
@@ -1417,8 +1464,8 @@ sp_cache_routines_and_add_tables_for_view(THD *thd, LEX *lex, LEX *aux_lex)
   Sroutine_hash_entry **last_cached_routine_ptr=
                           (Sroutine_hash_entry **)lex->sroutines_list.next;
   sp_update_stmt_used_routines(thd, lex, &aux_lex->sroutines);
-  (void)sp_cache_routines_and_add_tables_aux(thd, lex,
-                                             *last_cached_routine_ptr);
+  (void)sp_cache_routines_and_add_tables_aux(thd, lex, 
+                                             *last_cached_routine_ptr, FALSE);
 }
 
 
@@ -1443,7 +1490,9 @@ sp_cache_routines_and_add_tables_for_triggers(THD *thd, LEX *lex,
     Sroutine_hash_entry **last_cached_routine_ptr=
                             (Sroutine_hash_entry **)lex->sroutines_list.next;
     for (int i= 0; i < (int)TRG_EVENT_MAX; i++)
+    {
       for (int j= 0; j < (int)TRG_ACTION_MAX; j++)
+      {
         if (triggers->bodies[i][j])
         {
           (void)triggers->bodies[i][j]->add_used_tables_to_table_list(thd,
@@ -1451,9 +1500,11 @@ sp_cache_routines_and_add_tables_for_triggers(THD *thd, LEX *lex,
           sp_update_stmt_used_routines(thd, lex,
                                        &triggers->bodies[i][j]->m_sroutines);
         }
-
+      }
+    }
     (void)sp_cache_routines_and_add_tables_aux(thd, lex,
-                                               *last_cached_routine_ptr);
+                                               *last_cached_routine_ptr, 
+                                               FALSE);
   }
 }
 
@@ -1562,112 +1613,10 @@ sp_use_new_db(THD *thd, char *newdb, char *olddb, uint olddblen,
   }
   else
   {
-    int ret= sp_change_db(thd, newdb, no_access_check);
+    int ret= mysql_change_db(thd, newdb, no_access_check);
 
     if (! ret)
       *dbchangedp= TRUE;
     DBUG_RETURN(ret);
   }
 }
-
-/*
-  Change database.
-
-  SYNOPSIS
-    sp_change_db()
-    thd		    Thread handler
-    name	    Database name
-    empty_is_ok     True= it's ok with "" as name
-    no_access_check True= don't do access check
-
-  DESCRIPTION
-    This is the same as mysql_change_db(), but with some extra
-    arguments for Stored Procedure usage; doing implicit "use" 
-    when executing an SP in a different database.
-    We also use different error routines, since this might be
-    invoked from a function when executing a query or statement.
-    Note: We would have prefered to reuse mysql_change_db(), but
-      the error handling in particular made that too awkward, so
-      we (reluctantly) have a "copy" here.
-
-  RETURN VALUES
-    0	ok
-    1	error
-*/
-
-int
-sp_change_db(THD *thd, char *name, bool no_access_check)
-{
-  int length, db_length;
-  char *dbname=my_strdup((char*) name,MYF(MY_WME));
-  char	path[FN_REFLEN];
-  HA_CREATE_INFO create;
-  DBUG_ENTER("sp_change_db");
-  DBUG_PRINT("enter", ("db: %s, no_access_check: %d", name, no_access_check));
-
-  db_length= (!dbname ? 0 : strip_sp(dbname));
-  if (dbname && db_length)
-  {
-    if ((db_length > NAME_LEN) || check_db_name(dbname))
-    {
-      my_error(ER_WRONG_DB_NAME, MYF(0), dbname);
-      x_free(dbname);
-      DBUG_RETURN(1);
-    }
-  }
-
-  if (dbname && db_length)
-  {
-#ifndef NO_EMBEDDED_ACCESS_CHECKS
-    if (! no_access_check)
-    {
-      ulong db_access;
-
-      if (test_all_bits(thd->master_access,DB_ACLS))
-	db_access=DB_ACLS;
-      else
-	db_access= (acl_get(thd->host,thd->ip, thd->priv_user,dbname,0) |
-		    thd->master_access);  
-      if (!(db_access & DB_ACLS) &&
-	  (!grant_option || check_grant_db(thd,dbname)))
-      {
-	my_error(ER_DBACCESS_DENIED_ERROR, MYF(0),
-                 thd->priv_user,
-                 thd->priv_host,
-                 dbname);
-	mysql_log.write(thd,COM_INIT_DB,ER(ER_DBACCESS_DENIED_ERROR),
-			thd->priv_user,
-			thd->priv_host,
-			dbname);
-	my_free(dbname,MYF(0));
-	DBUG_RETURN(1);
-      }
-    }
-#endif
-    (void) sprintf(path,"%s/%s",mysql_data_home,dbname);
-    length=unpack_dirname(path,path);		// Convert if not unix
-    if (length && path[length-1] == FN_LIBCHAR)
-      path[length-1]=0;				// remove ending '\'
-    if (access(path,F_OK))
-    {
-      my_error(ER_BAD_DB_ERROR, MYF(0), dbname);
-      my_free(dbname,MYF(0));
-      DBUG_RETURN(1);
-    }
-  }
-
-  x_free(thd->db);
-  thd->db=dbname;				// THD::~THD will free this
-  thd->db_length=db_length;
-
-  if (dbname && db_length)
-  {
-    strmov(path+unpack_dirname(path,path), MY_DB_OPT_FILE);
-    load_db_opt(thd, path, &create);
-    thd->db_charset= create.default_table_charset ?
-      create.default_table_charset :
-      thd->variables.collation_server;
-    thd->variables.collation_database= thd->db_charset;
-  }
-  DBUG_RETURN(0);
-}
diff --git a/sql/sp.h b/sql/sp.h
index b8af8d3a32148fd9946c42c562168364ee988a0f..c278da863e0e6b9a6f738b48b82d1ec2f2556604 100644
--- a/sql/sp.h
+++ b/sql/sp.h
@@ -29,6 +29,7 @@
 #define SP_INTERNAL_ERROR    -7
 #define SP_NO_DB_ERROR       -8
 #define SP_BAD_IDENTIFIER    -9
+#define SP_BODY_TOO_LONG    -10
 
 /* Drop all routines in database 'db' */
 int
@@ -79,10 +80,13 @@ sp_show_status_function(THD *thd, const char *wild);
   Procedures for pre-caching of stored routines and building table list
   for prelocking.
 */
+void sp_get_prelocking_info(THD *thd, bool *need_prelocking, 
+                            bool *first_no_prelocking);
 void sp_add_used_routine(LEX *lex, Query_arena *arena,
                          sp_name *rt, char rt_type);
 void sp_update_sp_used_routines(HASH *dst, HASH *src);
-bool sp_cache_routines_and_add_tables(THD *thd, LEX *lex);
+bool sp_cache_routines_and_add_tables(THD *thd, LEX *lex, 
+                                      bool first_no_prelock);
 void sp_cache_routines_and_add_tables_for_view(THD *thd, LEX *lex,
                                                LEX *aux_lex);
 void sp_cache_routines_and_add_tables_for_triggers(THD *thd, LEX *lex,
@@ -90,6 +94,13 @@ void sp_cache_routines_and_add_tables_for_triggers(THD *thd, LEX *lex,
 
 extern "C" byte* sp_sroutine_key(const byte *ptr, uint *plen, my_bool first);
 
+/*
+  Routines which allow open/lock and close mysql.proc table even when
+  we already have some tables open and locked.
+*/
+TABLE *open_proc_table_for_read(THD *thd, Open_tables_state *backup);
+void close_proc_table(THD *thd, Open_tables_state *backup);
+
 //
 // Utilities...
 //
@@ -101,8 +112,4 @@ int
 sp_use_new_db(THD *thd, char *newdb, char *olddb, uint olddbmax,
 	      bool no_access_check, bool *dbchangedp);
 
-// Like mysql_change_db() but handles empty db name and the  send_ok() problem.
-int
-sp_change_db(THD *thd, char *db, bool no_access_check);
-
 #endif /* _SP_H_ */
diff --git a/sql/sp_cache.cc b/sql/sp_cache.cc
index c8f0ed6ba2d8e780d6c073d1fb25e62fab6a7f88..495f969eeac8608d0181099b593e674f88f3ba05 100644
--- a/sql/sp_cache.cc
+++ b/sql/sp_cache.cc
@@ -22,16 +22,80 @@
 #include "sp_head.h"
 
 static pthread_mutex_t Cversion_lock;
-static ulong Cversion = 0;
+static ulong volatile Cversion= 0;
 
-void
-sp_cache_init()
+
+/*
+  Cache of stored routines. 
+*/
+
+class sp_cache
+{
+public:
+  ulong version;
+
+  sp_cache();
+  ~sp_cache();
+
+  inline void insert(sp_head *sp)
+  {
+    /* TODO: why don't we check return value? */
+    my_hash_insert(&m_hashtable, (const byte *)sp);
+  }
+
+  inline sp_head *lookup(char *name, uint namelen)
+  {
+    return (sp_head *)hash_search(&m_hashtable, (const byte *)name, namelen);
+  }
+
+#ifdef NOT_USED
+  inline bool remove(char *name, uint namelen)
+  {
+    sp_head *sp= lookup(name, namelen);
+    if (sp)
+    {
+      hash_delete(&m_hashtable, (byte *)sp);
+      return TRUE;
+    }
+    return FALSE;
+  }
+#endif 
+
+  inline void remove_all()
+  {
+    cleanup();
+    init();
+  }
+
+private:
+  void init();
+  void cleanup();
+
+  /* All routines in this cache */
+  HASH m_hashtable;
+}; // class sp_cache
+
+
+/* Initialize the SP caching once at startup */
+
+void sp_cache_init()
 {
   pthread_mutex_init(&Cversion_lock, MY_MUTEX_INIT_FAST);
 }
 
-void
-sp_cache_clear(sp_cache **cp)
+
+/*
+  Clear the cache *cp and set *cp to NULL.
+
+  SYNOPSIS
+    sp_cache_clear()
+    cp  Pointer to cache to clear
+
+  NOTE
+    This function doesn't invalidate other caches.
+*/
+
+void sp_cache_clear(sp_cache **cp)
 {
   sp_cache *c= *cp;
 
@@ -42,114 +106,145 @@ sp_cache_clear(sp_cache **cp)
   }
 }
 
-void
-sp_cache_insert(sp_cache **cp, sp_head *sp)
-{
-  sp_cache *c= *cp;
 
-  if (! c)
-    c= new sp_cache();
-  if (c)
-  {
-    ulong v;
+/*
+  Insert a routine into the cache.
 
-    pthread_mutex_lock(&Cversion_lock); // LOCK
-    v= Cversion;
-    pthread_mutex_unlock(&Cversion_lock); // UNLOCK
+  SYNOPSIS
+    sp_cache_insert()
+     cp  The cache to put routine into
+     sp  Routine to insert.
+      
+  TODO: Perhaps it will be more straightforward if in case we returned an 
+        error from this function when we couldn't allocate sp_cache. (right
+        now failure to put routine into cache will cause a 'SP not found'
+        error to be reported at some later time)
+*/
 
-    if (c->version < v)
-    {
-      if (*cp)
-	c->remove_all();
-      c->version= v;
-    }
-    c->insert(sp);
-    if (*cp == NULL)
-      *cp= c;
+void sp_cache_insert(sp_cache **cp, sp_head *sp)
+{
+  sp_cache *c;
+  ulong v;
+
+  if (!(c= *cp))
+  {
+    if (!(c= new sp_cache()))
+      return;                                   // End of memory error
+    c->version= Cversion;      // No need to lock when reading long variable
   }
+  DBUG_PRINT("info",("sp_cache: inserting: %*s", sp->m_qname.length,
+                     sp->m_qname.str));
+  c->insert(sp);
+  *cp= c;                                       // Update *cp if it was NULL
 }
 
-sp_head *
-sp_cache_lookup(sp_cache **cp, sp_name *name)
+
+/* 
+  Look up a routine in the cache.
+  SYNOPSIS
+    sp_cache_lookup()
+      cp    Cache to look into
+      name  Name of rutine to find
+      
+  NOTE
+    An obsolete (but not more obsolete then since last
+    sp_cache_flush_obsolete call) routine may be returned.
+
+  RETURN 
+    The routine or
+    NULL if the routine not found.
+*/
+
+sp_head *sp_cache_lookup(sp_cache **cp, sp_name *name)
 {
-  ulong v;
   sp_cache *c= *cp;
-
   if (! c)
     return NULL;
+  return c->lookup(name->m_qname.str, name->m_qname.length);
+}
 
-  pthread_mutex_lock(&Cversion_lock); // LOCK
-  v= Cversion;
-  pthread_mutex_unlock(&Cversion_lock); // UNLOCK
 
-  if (c->version < v)
-  {
-    c->remove_all();
-    c->version= v;
-    return NULL;
-  }
-  return c->lookup(name->m_qname.str, name->m_qname.length);
+/*
+  Invalidate all routines in all caches.
+
+  SYNOPSIS
+    sp_cache_invalidate()
+      
+  NOTE
+    This is called when a VIEW definition is modifed. We can't destroy sp_head
+    objects here as one may modify VIEW definitions from prelocking-free SPs.
+*/
+
+void sp_cache_invalidate()
+{
+  DBUG_PRINT("info",("sp_cache: invalidating"));
+  thread_safe_increment(Cversion, &Cversion_lock);
 }
 
-bool
-sp_cache_remove(sp_cache **cp, sp_name *name)
+
+/*
+  Remove out-of-date SPs from the cache. 
+  
+  SYNOPSIS
+    sp_cache_flush_obsolete()
+      cp  Cache to flush
+
+  NOTE
+    This invalidates pointers to sp_head objects this thread uses.
+    In practice that means 'dont call this function when inside SP'.
+*/
+
+void sp_cache_flush_obsolete(sp_cache **cp)
 {
   sp_cache *c= *cp;
-  bool found= FALSE;
-
   if (c)
   {
     ulong v;
-
-    pthread_mutex_lock(&Cversion_lock); // LOCK
-    v= Cversion++;
-    pthread_mutex_unlock(&Cversion_lock); // UNLOCK
-
+    v= Cversion;                 // No need to lock when reading long variable
     if (c->version < v)
+    {
+      DBUG_PRINT("info",("sp_cache: deleting all functions"));
+      /* We need to delete all elements. */
       c->remove_all();
-    else
-      found= c->remove(name->m_qname.str, name->m_qname.length);
-    c->version= v+1;
+      c->version= v;
+    }
   }
-  return found;
 }
 
-void
-sp_cache_invalidate()
-{
-  pthread_mutex_lock(&Cversion_lock); // LOCK
-  Cversion++;
-  pthread_mutex_unlock(&Cversion_lock); // UNLOCK
-}
 
-static byte *
-hash_get_key_for_sp_head(const byte *ptr, uint *plen,
+/*************************************************************************
+  Internal functions 
+ *************************************************************************/
+
+static byte *hash_get_key_for_sp_head(const byte *ptr, uint *plen,
 			       my_bool first)
 {
   sp_head *sp= (sp_head *)ptr;
-
   *plen= sp->m_qname.length;
   return (byte*) sp->m_qname.str;
 }
 
+
 static void
 hash_free_sp_head(void *p)
 {
   sp_head *sp= (sp_head *)p;
-
   delete sp;
 }
 
+
 sp_cache::sp_cache()
 {
   init();
 }
 
+
 sp_cache::~sp_cache()
 {
   hash_free(&m_hashtable);
 }
 
+
 void
 sp_cache::init()
 {
@@ -158,6 +253,7 @@ sp_cache::init()
   version= 0;
 }
 
+
 void
 sp_cache::cleanup()
 {
diff --git a/sql/sp_cache.h b/sql/sp_cache.h
index e9efe5b2a8cca820dd9d4fefd33708ba4bfb668e..1021d17b9e2823ee22126de29c7c74ade5a8188b 100644
--- a/sql/sp_cache.h
+++ b/sql/sp_cache.h
@@ -22,86 +22,42 @@
 #pragma interface			/* gcc class implementation */
 #endif
 
+/*
+  Stored procedures/functions cache. This is used as follows:
+   * Each thread has its own cache.
+   * Each sp_head object is put into its thread cache before it is used, and
+     then remains in the cache until deleted.
+*/
+
 class sp_head;
 class sp_cache;
 
-/* Initialize the SP caching once at startup */
-void sp_cache_init();
+/*
+  Cache usage scenarios:
+  1. Application-wide init:
+    sp_cache_init();
+
+  2. SP execution in thread:
+  2.1 While holding sp_head* pointers:
+  
+    // look up a routine in the cache (no checks if it is up to date or not)
+    sp_cache_lookup(); 
+    
+    sp_cache_insert();
+    sp_cache_invalidate();
+  
+  2.2 When not holding any sp_head* pointers:
+    sp_cache_flush_obsolete();
+  
+  3. Before thread exit:
+    sp_cache_clear();
+*/
 
-/* Clear the cache *cp and set *cp to NULL */
+void sp_cache_init();
 void sp_cache_clear(sp_cache **cp);
-
-/* Insert an SP to cache. If 'cp' points to NULL, it's set to a new cache */
 void sp_cache_insert(sp_cache **cp, sp_head *sp);
-
-/* Lookup an SP in cache */
 sp_head *sp_cache_lookup(sp_cache **cp, sp_name *name);
-
-/* Remove an SP from cache. Returns true if something was removed */
-bool sp_cache_remove(sp_cache **cp, sp_name *name);
-
-/* Invalidate a cache */
 void sp_cache_invalidate();
-
-
-/*
- *
- * The cache class. Don't use this directly, use the C API above
- *
- */
-
-class sp_cache
-{
-public:
-
-  ulong version;
-
-  sp_cache();
-
-  ~sp_cache();
-
-  void
-  init();
-
-  void
-  cleanup();
-
-  inline void
-  insert(sp_head *sp)
-  {
-    my_hash_insert(&m_hashtable, (const byte *)sp);
-  }
-
-  inline sp_head *
-  lookup(char *name, uint namelen)
-  {
-    return (sp_head *)hash_search(&m_hashtable, (const byte *)name, namelen);
-  }
-
-  inline bool
-  remove(char *name, uint namelen)
-  {
-    sp_head *sp= lookup(name, namelen);
-
-    if (sp)
-    {
-      hash_delete(&m_hashtable, (byte *)sp);
-      return TRUE;
-    }
-    return FALSE;
-  }
-
-  inline void
-  remove_all()
-  {
-    cleanup();
-    init();
-  }
-
-private:
-
-  HASH m_hashtable;
-
-}; // class sp_cache
+void sp_cache_flush_obsolete(sp_cache **cp);
 
 #endif /* _SP_CACHE_H_ */
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 02c006d01eefe6ae687458bc6896940d5a9a3c64..26d76804fca238dac975bc14ba0e9b779934c973 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -126,16 +126,47 @@ sp_prepare_func_item(THD* thd, Item **it_addr)
 }
 
 
-/* Evaluate a (presumed) func item. Always returns an item, the parameter
-** if nothing else.
+/* Macro to switch arena in sp_eval_func_item */
+#define CREATE_ON_CALLERS_ARENA(new_command, condition, backup_arena) do\
+        {\
+          if (condition) \
+            thd->set_n_backup_item_arena(thd->spcont->callers_arena,\
+                                         backup_arena);\
+          new_command;\
+          if (condition)\
+            thd->restore_backup_item_arena(thd->spcont->callers_arena,\
+                                           &backup_current_arena);\
+        } while(0)
+
+/*
+  Evaluate an item and store it in the returned item
+
+  SYNOPSIS
+    sp_eval_func_item()
+      name                  - current thread object
+      it_addr               - pointer to the item to evaluate
+      type                  - type of the item we evaluating
+      reuse                 - used if we would like to reuse existing item
+                              instead of allocation of the new one
+      use_callers_arena     - TRUE if we want to use caller's arena
+                              rather then current one.
+  DESCRIPTION
+   We use this function to evaluate result for stored functions
+   and stored procedure parameters. It is also used to evaluate and
+   (re) allocate variables.
+
+  RETURN VALUES
+    Evaluated item is returned
 */
+
 Item *
 sp_eval_func_item(THD *thd, Item **it_addr, enum enum_field_types type,
-		  Item *reuse)
+		  Item *reuse, bool use_callers_arena)
 {
   DBUG_ENTER("sp_eval_func_item");
   Item *it= sp_prepare_func_item(thd, it_addr);
   uint rsize;
+  Query_arena backup_current_arena;
   DBUG_PRINT("info", ("type: %d", type));
 
   if (!it)
@@ -145,90 +176,99 @@ sp_eval_func_item(THD *thd, Item **it_addr, enum enum_field_types type,
 
   /* QQ How do we do this? Is there some better way? */
   if (type == MYSQL_TYPE_NULL)
-    it= new(reuse, &rsize) Item_null();
-  else
-  {
-    switch (sp_map_result_type(type)) {
-    case INT_RESULT:
-      {
-	longlong i= it->val_int();
+    goto return_null_item;
 
-	if (it->null_value)
-	{
-	  DBUG_PRINT("info", ("INT_RESULT: null"));
-	  it= new(reuse, &rsize) Item_null();
-	}
-	else
-	{
-	  DBUG_PRINT("info", ("INT_RESULT: %d", i));
-          it= new(reuse, &rsize) Item_int(i);
-	}
-	break;
+  switch (sp_map_result_type(type)) {
+  case INT_RESULT:
+    {
+      longlong i= it->val_int();
+
+      if (it->null_value)
+      {
+        DBUG_PRINT("info", ("INT_RESULT: null"));
+        goto return_null_item;
       }
-    case REAL_RESULT:
+      else
       {
-	double d= it->val_real();
+        DBUG_PRINT("info", ("INT_RESULT: %d", i));
+        CREATE_ON_CALLERS_ARENA(it= new(reuse, &rsize) Item_int(i),
+                          use_callers_arena, &backup_current_arena);
+      }
+      break;
+    }
+  case REAL_RESULT:
+    {
+      double d= it->val_real();
 
-	if (it->null_value)
-	{
-	  DBUG_PRINT("info", ("REAL_RESULT: null"));
-	  it= new(reuse, &rsize) Item_null();
-	}
-	else
-	{
-	  /* There's some difference between Item::new_item() and the
-	   * constructor; the former crashes, the latter works... weird. */
-	  uint8 decimals= it->decimals;
-	  uint32 max_length= it->max_length;
-	  DBUG_PRINT("info", ("REAL_RESULT: %g", d));
-          it= new(reuse, &rsize) Item_float(d);
-	  it->decimals= decimals;
-	  it->max_length= max_length;
-	}
-	break;
+      if (it->null_value)
+      {
+        DBUG_PRINT("info", ("REAL_RESULT: null"));
+        goto return_null_item;
       }
-    case DECIMAL_RESULT:
+      else
       {
-        my_decimal value, *val= it->val_decimal(&value);
-        if (it->null_value)
-          it= new(reuse, &rsize) Item_null();
-        else
-          it= new(reuse, &rsize) Item_decimal(val);
+        /* There's some difference between Item::new_item() and the
+         * constructor; the former crashes, the latter works... weird. */
+        uint8 decimals= it->decimals;
+        uint32 max_length= it->max_length;
+        DBUG_PRINT("info", ("REAL_RESULT: %g", d));
+        CREATE_ON_CALLERS_ARENA(it= new(reuse, &rsize) Item_float(d),
+                          use_callers_arena, &backup_current_arena);
+        it->decimals= decimals;
+        it->max_length= max_length;
+      }
+      break;
+    }
+  case DECIMAL_RESULT:
+    {
+      my_decimal value, *val= it->val_decimal(&value);
+      if (it->null_value)
+        goto return_null_item;
+      else
+        CREATE_ON_CALLERS_ARENA(it= new(reuse, &rsize) Item_decimal(val),
+                          use_callers_arena, &backup_current_arena);
 #ifndef DBUG_OFF
-        char dbug_buff[DECIMAL_MAX_STR_LENGTH+1];
-        DBUG_PRINT("info", ("DECIMAL_RESULT: %s", dbug_decimal_as_string(dbug_buff, val)));
+      char dbug_buff[DECIMAL_MAX_STR_LENGTH+1];
+      DBUG_PRINT("info", ("DECIMAL_RESULT: %s", dbug_decimal_as_string(dbug_buff, val)));
 #endif
-        break;
+      break;
+    }
+  case STRING_RESULT:
+    {
+      char buffer[MAX_FIELD_WIDTH];
+      String tmp(buffer, sizeof(buffer), it->collation.collation);
+      String *s= it->val_str(&tmp);
+
+      if (it->null_value)
+      {
+        DBUG_PRINT("info", ("default result: null"));
+        goto return_null_item;
       }
-    case STRING_RESULT:
+      else
       {
-	char buffer[MAX_FIELD_WIDTH];
-	String tmp(buffer, sizeof(buffer), it->collation.collation);
-	String *s= it->val_str(&tmp);
-
-	if (it->null_value)
-	{
-	  DBUG_PRINT("info", ("default result: null"));
-	  it= new(reuse, &rsize) Item_null();
-	}
-	else
-	{
-	  DBUG_PRINT("info",("default result: %*s",
-                             s->length(), s->c_ptr_quick()));
-	  it= new(reuse, &rsize) Item_string(thd->strmake(s->ptr(),
-							  s->length()),
-					     s->length(),
-					     it->collation.collation);
-	}
-	break;
+        DBUG_PRINT("info",("default result: %*s",
+                           s->length(), s->c_ptr_quick()));
+        CREATE_ON_CALLERS_ARENA(it= new(reuse, &rsize)
+                              Item_string(thd->strmake(s->ptr(),
+                                          s->length()), s->length(),
+                                          it->collation.collation),
+                          use_callers_arena, &backup_current_arena);
       }
-    case ROW_RESULT:
-    default:
-      DBUG_ASSERT(0);
+      break;
     }
+  case ROW_RESULT:
+  default:
+    DBUG_ASSERT(0);
   }
   it->rsize= rsize;
 
+  DBUG_RETURN(it);
+
+return_null_item:
+  CREATE_ON_CALLERS_ARENA(it= new(reuse, &rsize) Item_null(),
+                    use_callers_arena, &backup_current_arena);
+  it->rsize= rsize;
+
   DBUG_RETURN(it);
 }
 
@@ -545,23 +585,14 @@ Field *
 sp_head::make_field(uint max_length, const char *name, TABLE *dummy)
 {
   Field *field;
-  MEM_ROOT *tmp_mem_root;
-  THD *thd;
   DBUG_ENTER("sp_head::make_field");
 
-  thd= current_thd;
-  tmp_mem_root= thd->mem_root;
-  if (thd->spcont && thd->spcont->callers_mem_root)
-    thd->mem_root= thd->spcont->callers_mem_root;
-  else
-    thd->mem_root= &thd->main_mem_root;
   field= ::make_field((char *)0,
 		!m_returns_len ? max_length : m_returns_len, 
 		(uchar *)"", 0, m_returns_pack, m_returns, m_returns_cs,
 		(enum Field::geometry_type)0, Field::NONE, 
 		m_returns_typelib,
 		name ? name : (const char *)m_name.str, dummy);
-  thd->mem_root= tmp_mem_root;
   DBUG_RETURN(field);
 }
 
@@ -574,13 +605,22 @@ sp_head::execute(THD *thd)
   sp_rcontext *ctx;
   int ret= 0;
   uint ip= 0;
+  ulong save_sql_mode;
   Query_arena *old_arena;
+  /* per-instruction arena */
+  MEM_ROOT execute_mem_root;
+  Query_arena execute_arena(&execute_mem_root, INITIALIZED_FOR_SP),
+              execute_backup_arena;
   query_id_t old_query_id;
   TABLE *old_derived_tables;
   LEX *old_lex;
   Item_change_list old_change_list;
   String old_packet;
 
+  /* init per-instruction memroot */
+  init_alloc_root(&execute_mem_root, MEM_ROOT_BLOCK_SIZE, 0);
+
+
   /* Use some extra margin for possible SP recursion and functions */
   if (check_stack_overrun(thd, 4*STACK_MIN_SIZE, olddb))
   {
@@ -626,6 +666,8 @@ sp_head::execute(THD *thd)
   old_query_id= thd->query_id;
   old_derived_tables= thd->derived_tables;
   thd->derived_tables= 0;
+  save_sql_mode= thd->variables.sql_mode;
+  thd->variables.sql_mode= m_sql_mode;
   /*
     It is also more efficient to save/restore current thd->lex once when
     do it in each instruction
@@ -647,6 +689,18 @@ sp_head::execute(THD *thd)
   */
   old_packet.swap(thd->packet);
 
+  /*
+    Switch to per-instruction arena here. We can do it since we cleanup
+    arena after every instruction.
+  */
+  thd->set_n_backup_item_arena(&execute_arena, &execute_backup_arena);
+
+  /*
+    Save callers arena in order to store instruction results and out
+    parameters in it later during sp_eval_func_item()
+  */
+  thd->spcont->callers_arena= &execute_backup_arena;
+
   do
   {
     sp_instr *i;
@@ -656,7 +710,9 @@ sp_head::execute(THD *thd)
     if (i == NULL)
       break;
     DBUG_PRINT("execute", ("Instruction %u", ip));
-    thd->set_time();		// Make current_time() et al work
+    /* Don't change NOW() in FUNCTION or TRIGGER */
+    if (!thd->in_sub_stmt)
+      thd->set_time();		// Make current_time() et al work
     /*
       We have to set thd->current_arena before executing the instruction
       to store in the instruction free_list all new items, created
@@ -665,6 +721,7 @@ sp_head::execute(THD *thd)
     */
     thd->current_arena= i;
     ret= i->execute(thd, &ip);
+
     /*
       If this SP instruction have sent eof, it has caused no_send_error to be
       set. Clear it back to allow the next instruction to send error. (multi-
@@ -675,23 +732,30 @@ sp_head::execute(THD *thd)
       cleanup_items(i->free_list);
     i->state= Query_arena::EXECUTED;
 
-    // Check if an exception has occurred and a handler has been found
-    // Note: We havo to check even if ret==0, since warnings (and some
-    //       errors don't return a non-zero value.
-    //       We also have to check even if thd->killed != 0, since some
-    //       errors return with this even when a handler has been found
-    //       (e.g. "bad data").
+    /* we should cleanup free_list and memroot, used by instruction */
+    thd->free_items();
+    free_root(&execute_mem_root, MYF(0));
+
+    /*
+      Check if an exception has occurred and a handler has been found
+      Note: We havo to check even if ret==0, since warnings (and some
+      errors don't return a non-zero value.
+      We also have to check even if thd->killed != 0, since some
+      errors return with this even when a handler has been found
+      (e.g. "bad data").
+    */
     if (ctx)
     {
       uint hf;
 
-      switch (ctx->found_handler(&hip, &hf))
-      {
+      switch (ctx->found_handler(&hip, &hf)) {
       case SP_HANDLER_NONE:
 	break;
       case SP_HANDLER_CONTINUE:
-	ctx->save_variables(hf);
-	ctx->push_hstack(ip);
+        thd->restore_backup_item_arena(&execute_arena, &execute_backup_arena);
+        ctx->save_variables(hf);
+        thd->set_n_backup_item_arena(&execute_arena, &execute_backup_arena);
+        ctx->push_hstack(ip);
         // Fall through
       default:
 	ip= hip;
@@ -705,6 +769,9 @@ sp_head::execute(THD *thd)
     }
   } while (ret == 0 && !thd->killed);
 
+  thd->restore_backup_item_arena(&execute_arena, &execute_backup_arena);
+
+
   /* Restore all saved */
   old_packet.swap(thd->packet);
   DBUG_ASSERT(thd->change_list.is_empty());
@@ -715,6 +782,7 @@ sp_head::execute(THD *thd)
   thd->query_id= old_query_id;
   DBUG_ASSERT(!thd->derived_tables);
   thd->derived_tables= old_derived_tables;
+  thd->variables.sql_mode= save_sql_mode;
 
   thd->current_arena= old_arena;
   state= EXECUTED;
@@ -730,7 +798,7 @@ sp_head::execute(THD *thd)
   if (dbchanged)
   {
     if (! thd->killed)
-      ret= sp_change_db(thd, olddb, 0);
+      ret= mysql_change_db(thd, olddb, 0);
   }
   m_is_invoked= FALSE;
   DBUG_RETURN(ret);
@@ -750,28 +818,25 @@ sp_head::execute_function(THD *thd, Item **argp, uint argcount, Item **resp)
   sp_rcontext *nctx = NULL;
   uint i;
   int ret;
-  MEM_ROOT call_mem_root;
-  Query_arena call_arena(&call_mem_root, INITIALIZED_FOR_SP), backup_arena;
 
   if (argcount != params)
   {
-    // Need to use my_printf_error here, or it will not terminate the
-    // invoking query properly.
+    /*
+      Need to use my_printf_error here, or it will not terminate the
+      invoking query properly.
+    */
     my_error(ER_SP_WRONG_NO_OF_ARGS, MYF(0),
              "FUNCTION", m_qname.str, params, argcount);
     DBUG_RETURN(-1);
   }
 
-  init_alloc_root(&call_mem_root, MEM_ROOT_BLOCK_SIZE, 0);
-
 
   // QQ Should have some error checking here? (types, etc...)
   nctx= new sp_rcontext(csize, hmax, cmax);
-  nctx->callers_mem_root= thd->mem_root;
   for (i= 0 ; i < argcount ; i++)
   {
     sp_pvar_t *pvar = m_pcont->find_pvar(i);
-    Item *it= sp_eval_func_item(thd, argp++, pvar->type, NULL);
+    Item *it= sp_eval_func_item(thd, argp++, pvar->type, NULL, FALSE);
 
     if (it)
       nctx->push_item(it);
@@ -780,9 +845,11 @@ sp_head::execute_function(THD *thd, Item **argp, uint argcount, Item **resp)
       DBUG_RETURN(-1);
     }
   }
-  // The rest of the frame are local variables which are all IN.
-  // Default all variables to null (those with default clauses will
-  // be set by an set instruction).
+  /*
+    The rest of the frame are local variables which are all IN.
+    Default all variables to null (those with default clauses will
+    be set by an set instruction).
+  */
   {
     Item_null *nit= NULL;	// Re-use this, and only create if needed
     for (; i < csize ; i++)
@@ -793,24 +860,16 @@ sp_head::execute_function(THD *thd, Item **argp, uint argcount, Item **resp)
     }
   }
   thd->spcont= nctx;
-  thd->set_n_backup_item_arena(&call_arena, &backup_arena);
-  /* mem_root was moved to backup_arena */
-  DBUG_ASSERT(nctx->callers_mem_root == backup_arena.mem_root);
 
   ret= execute(thd);
 
-  // Partially restore context now.
-  // We still need the call mem root and free list for processing
-  // of the result.
-  thd->restore_backup_item_arena(&call_arena, &backup_arena);
-
   if (m_type == TYPE_ENUM_FUNCTION && ret == 0)
   {
     /* We need result only in function but not in trigger */
     Item *it= nctx->get_result();
 
     if (it)
-      *resp= sp_eval_func_item(thd, &it, m_returns, NULL);
+      *resp= sp_eval_func_item(thd, &it, m_returns, NULL, FALSE);
     else
     {
       my_error(ER_SP_NORETURNEND, MYF(0), m_name.str);
@@ -819,12 +878,9 @@ sp_head::execute_function(THD *thd, Item **argp, uint argcount, Item **resp)
   }
 
   nctx->pop_all_cursors();	// To avoid memory leaks after an error
+  delete nctx;
   thd->spcont= octx;
 
-  // Now get rid of the rest of the callee context
-  call_arena.free_items();
-  free_root(&call_mem_root, MYF(0));
-
   DBUG_RETURN(ret);
 }
 
@@ -853,9 +909,7 @@ sp_head::execute_procedure(THD *thd, List<Item> *args)
   uint cmax = m_pcont->max_cursors();
   sp_rcontext *octx = thd->spcont;
   sp_rcontext *nctx = NULL;
-  my_bool tmp_octx = FALSE;	// True if we have allocated a temporary octx
-  MEM_ROOT call_mem_root;
-  Query_arena call_arena(&call_mem_root, INITIALIZED_FOR_SP), backup_arena;
+  my_bool is_tmp_octx = FALSE;  // True if we have allocated a temporary octx
 
   if (args->elements != params)
   {
@@ -864,7 +918,17 @@ sp_head::execute_procedure(THD *thd, List<Item> *args)
     DBUG_RETURN(-1);
   }
 
-  init_alloc_root(&call_mem_root, MEM_ROOT_BLOCK_SIZE, 0);
+  if (! octx)
+  {				// Create a temporary old context
+    octx= new sp_rcontext(csize, hmax, cmax);
+    is_tmp_octx= TRUE;
+    thd->spcont= octx;
+
+    /* set callers_arena to thd, for upper-level function to work */
+    thd->spcont->callers_arena= thd;
+  }
+
+  nctx= new sp_rcontext(csize, hmax, cmax);
 
   if (csize > 0 || hmax > 0 || cmax > 0)
   {
@@ -873,13 +937,10 @@ sp_head::execute_procedure(THD *thd, List<Item> *args)
     List_iterator<Item> li(*args);
     Item *it;
 
-    nctx= new sp_rcontext(csize, hmax, cmax);
-    if (! octx)
-    {				// Create a temporary old context
-      octx= new sp_rcontext(csize, hmax, cmax);
-      tmp_octx= TRUE;
-    }
+
+    /* Evaluate SP arguments (i.e. get the values passed as parameters) */
     // QQ: Should do type checking?
+    DBUG_PRINT("info",(" %.*s: eval args", m_name.length, m_name.str));
     for (i = 0 ; (it= li++) && i < params ; i++)
     {
       sp_pvar_t *pvar= m_pcont->find_pvar(i);
@@ -903,7 +964,7 @@ sp_head::execute_procedure(THD *thd, List<Item> *args)
 	}
 	else
 	{
-	  Item *it2= sp_eval_func_item(thd, li.ref(), pvar->type, NULL);
+	  Item *it2= sp_eval_func_item(thd, li.ref(), pvar->type, NULL, FALSE);
 
 	  if (it2)
 	    nctx->push_item(it2); // IN or INOUT
@@ -916,32 +977,50 @@ sp_head::execute_procedure(THD *thd, List<Item> *args)
       }
     }
 
-    // The rest of the frame are local variables which are all IN.
-    // Default all variables to null (those with default clauses will
-    // be set by an set instruction).
+    /* 
+      Okay, got values for all arguments. Close tables that might be used by 
+      arguments evaluation. If arguments evaluation required prelocking mode, 
+      we'll leave it here.
+    */
+    if (!thd->in_sub_stmt)
+      close_thread_tables(thd, 0, 0);
+
+    DBUG_PRINT("info",(" %.*s: eval args done", m_name.length, m_name.str));
+    /*
+      The rest of the frame are local variables which are all IN.
+      Default all variables to null (those with default clauses will
+      be set by an set instruction).
+    */
     for (; i < csize ; i++)
     {
       if (! nit)
 	nit= new Item_null();
       nctx->push_item(nit);
     }
-    thd->spcont= nctx;
   }
 
+  thd->spcont= nctx;
+
   if (! ret)
-  {
-    thd->set_n_backup_item_arena(&call_arena, &backup_arena);
     ret= execute(thd);
-    thd->restore_backup_item_arena(&call_arena, &backup_arena);
-  }
+
+  /*
+    In the case when we weren't able to employ reuse mechanism for
+    OUT/INOUT paranmeters, we should reallocate memory. This
+    allocation should be done on the arena which will live through
+    all execution of calling routine.
+  */
+  thd->spcont->callers_arena= octx->callers_arena;
 
   if (!ret && csize > 0)
   {
     List_iterator<Item> li(*args);
     Item *it;
 
-    // Copy back all OUT or INOUT values to the previous frame, or
-    // set global user variables
+    /*
+      Copy back all OUT or INOUT values to the previous frame, or
+      set global user variables
+    */
     for (uint i = 0 ; (it= li++) && i < params ; i++)
     {
       sp_pvar_t *pvar= m_pcont->find_pvar(i);
@@ -956,12 +1035,20 @@ sp_head::execute_procedure(THD *thd, List<Item> *args)
 	  Item *val= nctx->get_item(i);
 	  Item *orig= octx->get_item(offset);
 	  Item *o_item_next;
-	  Item *o_free_list= thd->free_list;
+          /* we'll use callers_arena in sp_eval_func_item */
+	  Item *o_free_list= thd->spcont->callers_arena->free_list;
+
 	  LINT_INIT(o_item_next);
 
 	  if (orig)
 	    o_item_next= orig->next;
-	  copy= sp_eval_func_item(thd, &val, pvar->type, orig); // Copy
+
+          /*
+            We might need to allocate new item if we weren't able to
+            employ reuse mechanism. Then we should do it on the callers arena.
+          */
+	  copy= sp_eval_func_item(thd, &val, pvar->type, orig, TRUE); // Copy
+
 	  if (!copy)
 	  {
 	    ret= -1;
@@ -971,9 +1058,11 @@ sp_head::execute_procedure(THD *thd, List<Item> *args)
 	    octx->set_item(offset, copy);
 	  if (orig && copy == orig)
 	  {
-	    // A reused item slot, where the constructor put it in the
-	    // free_list, so we have to restore the list.
-	    thd->free_list= o_free_list;
+	    /*
+              A reused item slot, where the constructor put it in the
+              free_list, so we have to restore the list.
+            */
+	    thd->spcont->callers_arena->free_list= o_free_list;
 	    copy->next= o_item_next;
 	  }
 	}
@@ -1001,16 +1090,15 @@ sp_head::execute_procedure(THD *thd, List<Item> *args)
     }
   }
 
-  if (tmp_octx)
+  if (is_tmp_octx)
+  {
+    delete octx;                                /* call destructor */
     octx= NULL;
-  if (nctx)
-    nctx->pop_all_cursors();	// To avoid memory leaks after an error
-  thd->spcont= octx;
+  }
 
-  // Now get rid of the rest of the callee context
-  call_arena.free_items();
-  thd->lex->unit.cleanup();
-  free_root(&call_mem_root, MYF(0));
+  nctx->pop_all_cursors();	// To avoid memory leaks after an error
+  delete nctx;
+  thd->spcont= octx;
 
   DBUG_RETURN(ret);
 }
@@ -1245,8 +1333,6 @@ sp_head::show_create_procedure(THD *thd)
   String buffer(buff, sizeof(buff), system_charset_info);
   int res;
   List<Item> field_list;
-  ulong old_sql_mode;
-  sys_var *sql_mode_var;
   byte *sql_mode_str;
   ulong sql_mode_len;
   bool full_access;
@@ -1258,19 +1344,13 @@ sp_head::show_create_procedure(THD *thd)
 
   if (check_show_routine_access(thd, this, &full_access))
     return 1;
-  
-  old_sql_mode= thd->variables.sql_mode;
-  thd->variables.sql_mode= m_sql_mode;
-  sql_mode_var= find_sys_var("SQL_MODE", 8);
-  if (sql_mode_var)
-  {
-    sql_mode_str= sql_mode_var->value_ptr(thd, OPT_SESSION, 0);
-    sql_mode_len= strlen((char*) sql_mode_str);
-  }
 
+  sql_mode_str=
+    sys_var_thd_sql_mode::symbolic_mode_representation(thd,
+                                                       m_sql_mode,
+                                                       &sql_mode_len);
   field_list.push_back(new Item_empty_string("Procedure", NAME_LEN));
-  if (sql_mode_var)
-    field_list.push_back(new Item_empty_string("sql_mode", sql_mode_len));
+  field_list.push_back(new Item_empty_string("sql_mode", sql_mode_len));
   // 1024 is for not to confuse old clients
   field_list.push_back(new Item_empty_string("Create Procedure",
 					     max(buffer.length(), 1024)));
@@ -1282,15 +1362,13 @@ sp_head::show_create_procedure(THD *thd)
   }
   protocol->prepare_for_resend();
   protocol->store(m_name.str, m_name.length, system_charset_info);
-  if (sql_mode_var)
-    protocol->store((char*) sql_mode_str, sql_mode_len, system_charset_info);
+  protocol->store((char*) sql_mode_str, sql_mode_len, system_charset_info);
   if (full_access)
     protocol->store(m_defstr.str, m_defstr.length, system_charset_info);
   res= protocol->write();
   send_eof(thd);
 
  done:
-  thd->variables.sql_mode= old_sql_mode;
   DBUG_RETURN(res);
 }
 
@@ -1326,8 +1404,6 @@ sp_head::show_create_function(THD *thd)
   String buffer(buff, sizeof(buff), system_charset_info);
   int res;
   List<Item> field_list;
-  ulong old_sql_mode;
-  sys_var *sql_mode_var;
   byte *sql_mode_str;
   ulong sql_mode_len;
   bool full_access;
@@ -1339,18 +1415,12 @@ sp_head::show_create_function(THD *thd)
   if (check_show_routine_access(thd, this, &full_access))
     return 1;
 
-  old_sql_mode= thd->variables.sql_mode;
-  thd->variables.sql_mode= m_sql_mode;
-  sql_mode_var= find_sys_var("SQL_MODE", 8);
-  if (sql_mode_var)
-  {
-    sql_mode_str= sql_mode_var->value_ptr(thd, OPT_SESSION, 0);
-    sql_mode_len= strlen((char*) sql_mode_str);
-  }
-
+  sql_mode_str=
+    sys_var_thd_sql_mode::symbolic_mode_representation(thd,
+                                                       m_sql_mode,
+                                                       &sql_mode_len);
   field_list.push_back(new Item_empty_string("Function",NAME_LEN));
-  if (sql_mode_var)
-    field_list.push_back(new Item_empty_string("sql_mode", sql_mode_len));
+  field_list.push_back(new Item_empty_string("sql_mode", sql_mode_len));
   field_list.push_back(new Item_empty_string("Create Function",
 					     max(buffer.length(),1024)));
   if (protocol->send_fields(&field_list,
@@ -1361,15 +1431,13 @@ sp_head::show_create_function(THD *thd)
   }
   protocol->prepare_for_resend();
   protocol->store(m_name.str, m_name.length, system_charset_info);
-  if (sql_mode_var)
-    protocol->store((char*) sql_mode_str, sql_mode_len, system_charset_info);
+  protocol->store((char*) sql_mode_str, sql_mode_len, system_charset_info);
   if (full_access)
     protocol->store(m_defstr.str, m_defstr.length, system_charset_info);
   res= protocol->write();
   send_eof(thd);
 
  done:
-  thd->variables.sql_mode= old_sql_mode;
   DBUG_RETURN(res);
 }
 
@@ -1424,8 +1492,6 @@ sp_head::opt_mark(uint ip)
     ip= i->opt_mark(this);
 }
 
-// ------------------------------------------------------------------
-
 
 /*
   Prepare LEX and thread for execution of instruction, if requested open
@@ -1480,8 +1546,27 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp,
            implemented at the same time as ability not to store LEX for
            instruction if it is not really used.
   */
-  reinit_stmt_before_use(thd, m_lex);
 
+  if (thd->prelocked_mode == NON_PRELOCKED)
+  {
+    /*
+      This statement will enter/leave prelocked mode on its own.
+      Entering prelocked mode changes table list and related members
+      of LEX, so we'll need to restore them.
+    */
+    if (lex_query_tables_own_last)
+    {
+      /*
+        We've already entered/left prelocked mode with this statement.
+        Attach the list of tables that need to be prelocked and mark m_lex
+        as having such list attached.
+      */
+      *lex_query_tables_own_last= prelocking_tables;
+      m_lex->mark_as_requiring_prelocking(lex_query_tables_own_last);
+    }
+  }
+    
+  reinit_stmt_before_use(thd, m_lex);
   /*
     If requested check whenever we have access to tables in LEX's table list
     and open and lock them before executing instructtions core function.
@@ -1498,7 +1583,28 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp,
 
   thd->proc_info="closing tables";
   close_thread_tables(thd);
+  thd->proc_info= 0;
 
+  if (m_lex->query_tables_own_last)
+  {
+    /*
+      We've entered and left prelocking mode when executing statement
+      stored in m_lex. 
+      m_lex->query_tables(->next_global)* list now has a 'tail' - a list
+      of tables that are added for prelocking. (If this is the first
+      execution, the 'tail' was added by open_tables(), otherwise we've
+      attached it above in this function).
+      Now we'll save the 'tail', and detach it.
+    */
+    DBUG_ASSERT(!lex_query_tables_own_last ||
+                lex_query_tables_own_last == m_lex->query_tables_own_last &&
+                prelocking_tables == *(m_lex->query_tables_own_last));
+
+    lex_query_tables_own_last= m_lex->query_tables_own_last;
+    prelocking_tables= *lex_query_tables_own_last;
+    *lex_query_tables_own_last= NULL;
+    m_lex->mark_as_requiring_prelocking(NULL);
+  }
   thd->rollback_item_tree_changes();
 
   /*
@@ -1514,9 +1620,10 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp,
 }
 
 
-//
-// sp_instr
-//
+/*
+  sp_instr class functions
+*/
+
 int sp_instr::exec_core(THD *thd, uint *nextp)
 {
   DBUG_ASSERT(0);
@@ -1524,9 +1631,10 @@ int sp_instr::exec_core(THD *thd, uint *nextp)
 }
 
 
-//
-// sp_instr_stmt
-//
+/*
+  sp_instr_stmt class functions
+*/
+
 int
 sp_instr_stmt::execute(THD *thd, uint *nextp)
 {
@@ -1571,9 +1679,11 @@ sp_instr_stmt::exec_core(THD *thd, uint *nextp)
   return res;
 }
 
-//
-// sp_instr_set
-//
+
+/*
+  sp_instr_set class functions
+*/
+
 int
 sp_instr_set::execute(THD *thd, uint *nextp)
 {
@@ -1583,6 +1693,7 @@ sp_instr_set::execute(THD *thd, uint *nextp)
   DBUG_RETURN(m_lex_keeper.reset_lex_and_exec_core(thd, nextp, TRUE, this));
 }
 
+
 int
 sp_instr_set::exec_core(THD *thd, uint *nextp)
 {
@@ -1603,9 +1714,10 @@ sp_instr_set::print(String *str)
 }
 
 
-//
-// sp_instr_set_trigger_field
-//
+/*
+  sp_instr_set_trigger_field class functions
+*/
+
 int
 sp_instr_set_trigger_field::execute(THD *thd, uint *nextp)
 {
@@ -1636,9 +1748,11 @@ sp_instr_set_trigger_field::print(String *str)
   value->print(str);
 }
 
-//
-// sp_instr_jump
-//
+
+/*
+ sp_instr_jump class functions
+*/
+
 int
 sp_instr_jump::execute(THD *thd, uint *nextp)
 {
@@ -1697,9 +1811,10 @@ sp_instr_jump::opt_move(uint dst, List<sp_instr> *bp)
   m_ip= dst;
 }
 
-//
-// sp_instr_jump_if
-//
+
+/*
+  sp_instr_jump_if class functions
+*/
 
 int
 sp_instr_jump_if::execute(THD *thd, uint *nextp)
@@ -1755,9 +1870,11 @@ sp_instr_jump_if::opt_mark(sp_head *sp)
   return m_ip+1;
 }
 
-//
-// sp_instr_jump_if_not
-//
+
+/*
+  sp_instr_jump_if_not class functions
+*/
+
 int
 sp_instr_jump_if_not::execute(THD *thd, uint *nextp)
 {
@@ -1788,6 +1905,7 @@ sp_instr_jump_if_not::exec_core(THD *thd, uint *nextp)
   return res;
 }
 
+
 void
 sp_instr_jump_if_not::print(String *str)
 {
@@ -1798,6 +1916,7 @@ sp_instr_jump_if_not::print(String *str)
   m_expr->print(str);
 }
 
+
 uint
 sp_instr_jump_if_not::opt_mark(sp_head *sp)
 {
@@ -1813,9 +1932,10 @@ sp_instr_jump_if_not::opt_mark(sp_head *sp)
   return m_ip+1;
 }
 
-//
-// sp_instr_freturn
-//
+
+/*
+  sp_instr_freturn class functions
+*/
 
 int
 sp_instr_freturn::execute(THD *thd, uint *nextp)
@@ -1831,7 +1951,7 @@ sp_instr_freturn::exec_core(THD *thd, uint *nextp)
   Item *it;
   int res;
 
-  it= sp_eval_func_item(thd, &m_value, m_type, NULL);
+  it= sp_eval_func_item(thd, &m_value, m_type, NULL, TRUE);
   if (! it)
     res= -1;
   else
@@ -1854,9 +1974,10 @@ sp_instr_freturn::print(String *str)
   m_value->print(str);
 }
 
-//
-// sp_instr_hpush_jump
-//
+/*
+  sp_instr_hpush_jump class functions
+*/
+
 int
 sp_instr_hpush_jump::execute(THD *thd, uint *nextp)
 {
@@ -1900,9 +2021,11 @@ sp_instr_hpush_jump::opt_mark(sp_head *sp)
   return m_ip+1;
 }
 
-//
-// sp_instr_hpop
-//
+
+/*
+  sp_instr_hpop class functions
+*/
+
 int
 sp_instr_hpop::execute(THD *thd, uint *nextp)
 {
@@ -1927,9 +2050,10 @@ sp_instr_hpop::backpatch(uint dest, sp_pcontext *dst_ctx)
 }
 
 
-//
-// sp_instr_hreturn
-//
+/*
+  sp_instr_hreturn class functions
+*/
+
 int
 sp_instr_hreturn::execute(THD *thd, uint *nextp)
 {
@@ -1945,6 +2069,7 @@ sp_instr_hreturn::execute(THD *thd, uint *nextp)
   DBUG_RETURN(0);
 }
 
+
 void
 sp_instr_hreturn::print(String *str)
 {
@@ -1955,6 +2080,7 @@ sp_instr_hreturn::print(String *str)
     str->qs_append(m_dest);
 }
 
+
 uint
 sp_instr_hreturn::opt_mark(sp_head *sp)
 {
@@ -1968,27 +2094,45 @@ sp_instr_hreturn::opt_mark(sp_head *sp)
 }
 
 
-//
-// sp_instr_cpush
-//
+/*
+  sp_instr_cpush class functions
+*/
+
 int
 sp_instr_cpush::execute(THD *thd, uint *nextp)
 {
+  Query_arena backup_current_arena;
   DBUG_ENTER("sp_instr_cpush::execute");
+
+  /*
+    We should create cursors in the callers arena, as
+    it could be (and usually is) used in several instructions.
+  */
+  thd->set_n_backup_item_arena(thd->spcont->callers_arena,
+                               &backup_current_arena);
+
   thd->spcont->push_cursor(&m_lex_keeper, this);
+
+  thd->restore_backup_item_arena(thd->spcont->callers_arena,
+                                 &backup_current_arena);
+
   *nextp= m_ip+1;
+
   DBUG_RETURN(0);
 }
 
+
 void
 sp_instr_cpush::print(String *str)
 {
   str->append("cpush");
 }
 
-//
-// sp_instr_cpop
-//
+
+/*
+  sp_instr_cpop class functions
+*/
+
 int
 sp_instr_cpop::execute(THD *thd, uint *nextp)
 {
@@ -1998,6 +2142,7 @@ sp_instr_cpop::execute(THD *thd, uint *nextp)
   DBUG_RETURN(0);
 }
 
+
 void
 sp_instr_cpop::print(String *str)
 {
@@ -2012,9 +2157,11 @@ sp_instr_cpop::backpatch(uint dest, sp_pcontext *dst_ctx)
   m_count= m_ctx->diff_cursors(dst_ctx);
 }
 
-//
-// sp_instr_copen
-//
+
+/*
+  sp_instr_copen class functions
+*/
+
 int
 sp_instr_copen::execute(THD *thd, uint *nextp)
 {
@@ -2082,9 +2229,11 @@ sp_instr_copen::print(String *str)
   str->qs_append(m_cursor);
 }
 
-//
-// sp_instr_cclose
-//
+
+/*
+  sp_instr_cclose class functions
+*/
+
 int
 sp_instr_cclose::execute(THD *thd, uint *nextp)
 {
@@ -2100,6 +2249,7 @@ sp_instr_cclose::execute(THD *thd, uint *nextp)
   DBUG_RETURN(res);
 }
 
+
 void
 sp_instr_cclose::print(String *str)
 {
@@ -2108,24 +2258,35 @@ sp_instr_cclose::print(String *str)
   str->qs_append(m_cursor);
 }
 
-//
-// sp_instr_cfetch
-//
+
+/*
+  sp_instr_cfetch class functions
+*/
+
 int
 sp_instr_cfetch::execute(THD *thd, uint *nextp)
 {
   sp_cursor *c= thd->spcont->get_cursor(m_cursor);
   int res;
+  Query_arena backup_current_arena;
   DBUG_ENTER("sp_instr_cfetch::execute");
 
   if (! c)
     res= -1;
   else
+  {
+    thd->set_n_backup_item_arena(thd->spcont->callers_arena,
+                                 &backup_current_arena);
     res= c->fetch(thd, &m_varlist);
+    thd->restore_backup_item_arena(thd->spcont->callers_arena,
+                                   &backup_current_arena);
+  }
+
   *nextp= m_ip+1;
   DBUG_RETURN(res);
 }
 
+
 void
 sp_instr_cfetch::print(String *str)
 {
@@ -2143,9 +2304,11 @@ sp_instr_cfetch::print(String *str)
   }
 }
 
-//
-// sp_instr_error
-//
+
+/*
+  sp_instr_error class functions
+*/
+
 int
 sp_instr_error::execute(THD *thd, uint *nextp)
 {
@@ -2156,6 +2319,7 @@ sp_instr_error::execute(THD *thd, uint *nextp)
   DBUG_RETURN(-1);
 }
 
+
 void
 sp_instr_error::print(String *str)
 {
@@ -2164,12 +2328,12 @@ sp_instr_error::print(String *str)
   str->qs_append(m_errcode);
 }
 
-/* ------------------------------------------------------------------ */
 
+/* ------------------------------------------------------------------ */
 
-//
-// Security context swapping
-//
+/*
+  Security context swapping
+*/
 
 #ifndef NO_EMBEDDED_ACCESS_CHECKS
 void
@@ -2418,11 +2582,12 @@ sp_head::add_used_tables_to_table_list(THD *thd,
   DBUG_RETURN(result);
 }
 
+
 /*
- * Simple function for adding an explicetly named (systems) table to
- * the global table list, e.g. "mysql", "proc".
- *
- */
+  Simple function for adding an explicetly named (systems) table to
+  the global table list, e.g. "mysql", "proc".
+*/
+
 TABLE_LIST *
 sp_add_to_query_tables(THD *thd, LEX *lex,
 		       const char *db, const char *name,
diff --git a/sql/sp_head.h b/sql/sp_head.h
index 32dc4449174260421ab625e90fdde2613ba966d7..e15b68be15823163369ff40e96675cb5fab0986d 100644
--- a/sql/sp_head.h
+++ b/sql/sp_head.h
@@ -121,7 +121,7 @@ public:
   uchar *m_tmp_query;		// Temporary pointer to sub query string
   uint m_old_cmq;		// Old CLIENT_MULTI_QUERIES value
   st_sp_chistics *m_chistics;
-  ulong m_sql_mode;		// For SHOW CREATE
+  ulong m_sql_mode;		// For SHOW CREATE and execution
   LEX_STRING m_qname;		// db.name
   LEX_STRING m_db;
   LEX_STRING m_name;
@@ -282,6 +282,10 @@ private:
   /*
     Multi-set representing optimized list of tables to be locked by this
     routine. Does not include tables which are used by invoked routines.
+
+    Note: for prelocking-free SPs this multiset is constructed too.
+    We do so because the same instance of sp_head may be called both
+    in prelocked mode and in non-prelocked mode.
   */
   HASH m_sptabs;
 
@@ -383,7 +387,8 @@ class sp_lex_keeper
 public:
 
   sp_lex_keeper(LEX *lex, bool lex_resp)
-    : m_lex(lex), m_lex_resp(lex_resp)
+    : m_lex(lex), m_lex_resp(lex_resp), 
+      lex_query_tables_own_last(NULL)
   {
     lex->sp_lex_in_use= TRUE;
   }
@@ -418,6 +423,25 @@ private:
     for LEX deletion.
   */
   bool m_lex_resp;
+
+  /*
+    Support for being able to execute this statement in two modes:
+    a) inside prelocked mode set by the calling procedure or its ancestor.
+    b) outside of prelocked mode, when this statement enters/leaves
+       prelocked mode itself.
+  */
+  
+  /*
+    List of additional tables this statement needs to lock when it
+    enters/leaves prelocked mode on its own.
+  */
+  TABLE_LIST *prelocking_tables;
+
+  /*
+    The value m_lex->query_tables_own_last should be set to this when the
+    statement enters/leaves prelocked mode on its own.
+  */
+  TABLE_LIST **lex_query_tables_own_last;
 };
 
 
diff --git a/sql/sp_rcontext.cc b/sql/sp_rcontext.cc
index d0817e437901f575cd9c88df6ee846569680213c..748c09f56c7cb5d01cce2a46cc7647870114c87b 100644
--- a/sql/sp_rcontext.cc
+++ b/sql/sp_rcontext.cc
@@ -32,7 +32,6 @@ sp_rcontext::sp_rcontext(uint fsize, uint hmax, uint cmax)
   : m_count(0), m_fsize(fsize), m_result(NULL), m_hcount(0), m_hsp(0),
     m_hfound(-1), m_ccount(0)
 {
-  callers_mem_root= NULL;
   in_handler= FALSE;
   m_frame= (Item **)sql_alloc(fsize * sizeof(Item*));
   m_handler= (sp_handler_t *)sql_alloc(hmax * sizeof(sp_handler_t));
@@ -47,17 +46,18 @@ sp_rcontext::set_item_eval(THD *thd, uint idx, Item **item_addr,
 			   enum_field_types type)
 {
   extern Item *sp_eval_func_item(THD *thd, Item **it, enum_field_types type,
-				 Item *reuse);
+				 Item *reuse, bool use_callers_arena);
   Item *it;
   Item *reuse_it;
   Item *old_item_next;
-  Item *old_free_list= thd->free_list;
+  /* sp_eval_func_item will use callers_arena */
+  Item *old_free_list= thd->spcont->callers_arena->free_list;
   int res;
   LINT_INIT(old_item_next);
 
   if ((reuse_it= get_item(idx)))
     old_item_next= reuse_it->next;
-  it= sp_eval_func_item(thd, item_addr, type, reuse_it);
+  it= sp_eval_func_item(thd, item_addr, type, reuse_it, TRUE);
   if (! it)
     res= -1;
   else
@@ -67,7 +67,7 @@ sp_rcontext::set_item_eval(THD *thd, uint idx, Item **item_addr,
     {
       // A reused item slot, where the constructor put it in the free_list,
       // so we have to restore the list.
-      thd->free_list= old_free_list;
+      thd->spcont->callers_arena->free_list= old_free_list;
       it->next= old_item_next;
     }
     set_item(idx, it);
diff --git a/sql/sp_rcontext.h b/sql/sp_rcontext.h
index 856beb13f6d085eca8d572d3107190091f5ff8c3..dedbc7bdef10c8286b59d7cd32982cf3312bed61 100644
--- a/sql/sp_rcontext.h
+++ b/sql/sp_rcontext.h
@@ -48,8 +48,14 @@ class sp_rcontext : public Sql_alloc
 
  public:
 
-  MEM_ROOT *callers_mem_root;	// Used to store result fields
   bool in_handler;
+  /*
+    Arena used to (re) allocate items on . E.g. reallocate INOUT/OUT
+    SP parameters when they don't fit into prealloced items. This
+    is common situation with String items. It is used mainly in
+    sp_eval_func_item().
+  */
+  Query_arena *callers_arena;
 
   sp_rcontext(uint fsize, uint hmax, uint cmax);
 
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 04666469e9c4150eff58fc0a99d0cd2561c21b51..12eb7a5d84b876b31d9cd3d8b15e4642cd64fbac 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -2638,10 +2638,11 @@ bool mysql_table_grant(THD *thd, TABLE_LIST *table_list,
       while ((column = column_iter++))
       {
         uint unused_field_idx= NO_CACHED_FIELD_INDEX;
-        Field *f=find_field_in_table(thd, table_list, column->column.ptr(),
-                                     column->column.ptr(),
-                                     column->column.length(), 0, 1, 1, 0,
-                                     &unused_field_idx, FALSE);
+        TABLE_LIST *dummy;
+        Field *f=find_field_in_table_ref(thd, table_list, column->column.ptr(),
+                                         column->column.ptr(), NULL, NULL,
+                                         column->column.length(), 0, 1, 1, 0,
+                                         &unused_field_idx, FALSE, &dummy);
         if (f == (Field*)0)
         {
           my_error(ER_BAD_FIELD_ERROR, MYF(0),
@@ -3547,9 +3548,9 @@ bool check_grant_db(THD *thd,const char *db)
 {
   char helping [NAME_LEN+USERNAME_LENGTH+2];
   uint len;
-  bool error=1;
+  bool error= 1;
 
-  len  = (uint) (strmov(strmov(helping,thd->priv_user)+1,db)-helping)+ 1;
+  len= (uint) (strmov(strmov(helping,thd->priv_user)+1,db)-helping)+ 1;
   rw_rdlock(&LOCK_grant);
 
   for (uint idx=0 ; idx < column_priv_hash.records ; idx++)
@@ -3695,6 +3696,24 @@ ulong get_table_grant(THD *thd, TABLE_LIST *table)
 }
 
 
+/*
+  Determine the access priviliges for a field.
+
+  SYNOPSIS
+    get_column_grant()
+    thd         thread handler
+    grant       grants table descriptor
+    db_name     name of database that the field belongs to
+    table_name  name of table that the field belongs to
+    field_name  name of field
+
+  DESCRIPTION
+    The procedure may also modify: grant->grant_table and grant->version.
+
+  RETURN
+    The access priviliges for the field db_name.table_name.field_name
+*/
+
 ulong get_column_grant(THD *thd, GRANT_INFO *grant,
                        const char *db_name, const char *table_name,
                        const char *field_name)
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 65bb0ec047be66d2be5e6406a4f20d1cef969789..98ce12eb7de411344533d6a161e16928b1eae1a2 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -129,12 +129,11 @@ static void check_unused(void)
     #		Pointer to list of names of open tables.
 */
 
-OPEN_TABLE_LIST *list_open_tables(THD *thd, const char *wild)
+OPEN_TABLE_LIST *list_open_tables(THD *thd, const char *db, const char *wild)
 {
   int result = 0;
   OPEN_TABLE_LIST **start_list, *open_list;
   TABLE_LIST table_list;
-  char name[NAME_LEN*2];
   DBUG_ENTER("list_open_tables");
 
   VOID(pthread_mutex_lock(&LOCK_open));
@@ -151,10 +150,12 @@ OPEN_TABLE_LIST *list_open_tables(THD *thd, const char *wild)
     DBUG_ASSERT(share->table_name != 0);
     if ((!share->table_name))			// To be removed
       continue;					// Shouldn't happen
+    if (db && my_strcasecmp(system_charset_info, db, share->table_cache_key))
+      continue;
+
     if (wild)
     {
-      strxmov(name,share->table_cache_key,".",share->table_name,NullS);
-      if (wild_compare(name,wild,0))
+      if (wild_compare(share->table_name,wild,0))
 	continue;
     }
 
@@ -391,6 +392,8 @@ static void mark_used_tables_as_free_for_reuse(THD *thd, TABLE *table)
 			LOCK_open
     skip_derived	Set to 1 (0 = default) if we should not free derived
 			tables.
+    stopper             When closing tables from thd->open_tables(->next)*, 
+                        don't close/remove tables starting from stopper.
 
   IMPLEMENTATION
     Unlocks tables and frees derived tables.
@@ -402,8 +405,7 @@ static void mark_used_tables_as_free_for_reuse(THD *thd, TABLE *table)
     upper level) and will leave prelocked mode if needed.
 */
 
-void close_thread_tables(THD *thd, bool lock_in_use, bool skip_derived, 
-                         TABLE *stopper)
+void close_thread_tables(THD *thd, bool lock_in_use, bool skip_derived)
 {
   bool found_old_table;
   prelocked_mode_type prelocked_mode= thd->prelocked_mode;
@@ -474,6 +476,7 @@ void close_thread_tables(THD *thd, bool lock_in_use, bool skip_derived,
       We are in prelocked mode, so we have to leave it now with doing
       implicit UNLOCK TABLES if need.
     */
+    DBUG_PRINT("info",("thd->prelocked_mode= NON_PRELOCKED"));
     thd->prelocked_mode= NON_PRELOCKED;
 
     if (prelocked_mode == PRELOCKED_UNDER_LOCK_TABLES)
@@ -499,7 +502,7 @@ void close_thread_tables(THD *thd, bool lock_in_use, bool skip_derived,
   */
   bzero(&thd->transaction.stmt, sizeof(thd->transaction.stmt));
   if (!thd->active_transaction())
-    thd->transaction.xid.null();
+    thd->transaction.xid_state.xid.null();
 
   /* VOID(pthread_sigmask(SIG_SETMASK,&thd->block_signals,NULL)); */
   if (!lock_in_use)
@@ -509,7 +512,7 @@ void close_thread_tables(THD *thd, bool lock_in_use, bool skip_derived,
   DBUG_PRINT("info", ("thd->open_tables: %p", thd->open_tables));
 
  found_old_table= 0;
-  while (thd->open_tables != stopper)
+  while (thd->open_tables)
     found_old_table|=close_thread_table(thd, &thd->open_tables);
   thd->some_tables_deleted=0;
 
@@ -1043,26 +1046,26 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
   if (thd->locked_tables || thd->prelocked_mode)
   {						// Using table locks
     TABLE *best_table= 0;
-    int best_distance= INT_MIN, distance;
+    int best_distance= INT_MIN;
     for (table=thd->open_tables; table ; table=table->next)
     {
       if (table->s->key_length == key_length &&
           !memcmp(table->s->table_cache_key, key, key_length) &&
           !my_strcasecmp(system_charset_info, table->alias, alias) &&
-          table->query_id != thd->query_id && /* skip tables already used by this query */
+          table->query_id != thd->query_id && /* skip tables already used */
           !(thd->prelocked_mode && table->query_id))
       {
-        distance= ((int) table->reginfo.lock_type -
-                   (int) table_list->lock_type);
+        int distance= ((int) table->reginfo.lock_type -
+                       (int) table_list->lock_type);
         /*
           Find a table that either has the exact lock type requested,
           or has the best suitable lock. In case there is no locked
           table that has an equal or higher lock than requested,
-          we still maitain the best_table to produce an error message
-          about wrong lock mode on the table. The best_table is changed
+          we us the closest matching lock to be able to produce an error
+          message about wrong lock mode on the table. The best_table is changed
           if bd < 0 <= d or bd < d < 0 or 0 <= d < bd.
 
-          distance <  0 - we have not enough high lock mode
+          distance <  0 - No suitable lock found
           distance >  0 - we have lock mode higher then we require
           distance == 0 - we have lock mode exactly which we need
         */
@@ -1071,7 +1074,7 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
         {
           best_distance= distance;
           best_table= table;
-          if (best_distance == 0)
+          if (best_distance == 0)               // Found perfect lock
             break;
         }
       }
@@ -1666,7 +1669,7 @@ static int open_unireg_entry(THD *thd, TABLE *entry, const char *db,
       {
         /* Give right error message */
         thd->clear_error();
-        DBUG_PRINT("error", ("Dicovery of %s/%s failed", db, name));
+        DBUG_PRINT("error", ("Discovery of %s/%s failed", db, name));
         my_printf_error(ER_UNKNOWN_ERROR,
                         "Failed to open '%-.64s', error while "
                         "unpacking from engine",
@@ -1792,6 +1795,7 @@ err:
   DBUG_RETURN(1);
 }
 
+
 /*
   Open all tables in list
 
@@ -1800,6 +1804,9 @@ err:
     thd - thread handler
     start - list of tables in/out
     counter - number of opened tables will be return using this parameter
+    flags   - bitmap of flags to modify how the tables will be open:
+              MYSQL_LOCK_IGNORE_FLUSH - open table even if someone has
+              done a flush or namelock on it.
 
   NOTE
     Unless we are already in prelocked mode, this function will also precache
@@ -1817,7 +1824,7 @@ err:
     -1 - error
 */
 
-int open_tables(THD *thd, TABLE_LIST **start, uint *counter)
+int open_tables(THD *thd, TABLE_LIST **start, uint *counter, uint flags)
 {
   TABLE_LIST *tables;
   bool refresh;
@@ -1843,10 +1850,6 @@ int open_tables(THD *thd, TABLE_LIST **start, uint *counter)
     statement for which table list for prelocking is already built, let
     us cache routines and try to build such table list.
 
-    NOTE: If we want queries with functions to work under explicit
-    LOCK TABLES we have to additionaly lock mysql.proc table in it.
-    At least until Monty will fix SP loading :)
-
     NOTE: We can't delay prelocking until we will met some sub-statement
     which really uses tables, since this will imply that we have to restore
     its table list to be able execute it in some other context.
@@ -1860,16 +1863,23 @@ int open_tables(THD *thd, TABLE_LIST **start, uint *counter)
     mode we will have some locked tables, because queries which use only
     derived/information schema tables and views possible. Thus "counter"
     may be still zero for prelocked statement...
+
+    NOTE: The above notes may be out of date. Please wait for psergey to 
+          document new prelocked behavior.
   */
-  if (!thd->prelocked_mode && !thd->lex->requires_prelocking() &&
-      thd->lex->sroutines.records)
+  
+  if (!thd->prelocked_mode && !thd->lex->requires_prelocking() && 
+      thd->lex->sroutines_list.elements)
   {
+    bool first_no_prelocking, need_prelocking;
     TABLE_LIST **save_query_tables_last= thd->lex->query_tables_last;
 
     DBUG_ASSERT(thd->lex->query_tables == *start);
+    sp_get_prelocking_info(thd, &need_prelocking, &first_no_prelocking);
 
-    if (sp_cache_routines_and_add_tables(thd, thd->lex) ||
-        *start)
+    if ((sp_cache_routines_and_add_tables(thd, thd->lex,
+                                         first_no_prelocking) ||
+        *start) && need_prelocking)
     {
       query_tables_last_own= save_query_tables_last;
       *start= thd->lex->query_tables;
@@ -1891,14 +1901,31 @@ int open_tables(THD *thd, TABLE_LIST **start, uint *counter)
       DBUG_RETURN(-1);
     }
     (*counter)++;
+    
     if (!tables->table &&
-	!(tables->table= open_table(thd, tables, &new_frm_mem, &refresh, 0)))
+	!(tables->table= open_table(thd, tables, &new_frm_mem, &refresh, flags)))
     {
       free_root(&new_frm_mem, MYF(MY_KEEP_PREALLOC));
+
       if (tables->view)
       {
         /* VIEW placeholder */
 	(*counter)--;
+
+        /* 
+          tables->next_global list consists of two parts:
+          1) Query tables and underlying tables of views.
+          2) Tables used by all stored routines that this statement invokes on
+             execution.
+          We need to know where the bound between these two parts is. If we've
+          just opened a view, which was the last table in part #1, and it
+          has added its base tables after itself, adjust the boundary pointer
+          accordingly.
+        */
+        if (query_tables_last_own == &(tables->next_global) &&
+            tables->view->query_tables)
+          query_tables_last_own= tables->view->query_tables_last;
+        
         /*
           Again if needed we have to get cache all routines used by this view
           and add tables used by them to table list.
@@ -2118,7 +2145,8 @@ int simple_open_n_lock_tables(THD *thd, TABLE_LIST *tables)
 {
   DBUG_ENTER("simple_open_n_lock_tables");
   uint counter;
-  if (open_tables(thd, &tables, &counter) || lock_tables(thd, tables, counter))
+  if (open_tables(thd, &tables, &counter, 0) ||
+      lock_tables(thd, tables, counter))
     DBUG_RETURN(-1);				/* purecov: inspected */
   DBUG_RETURN(0);
 }
@@ -2145,7 +2173,7 @@ bool open_and_lock_tables(THD *thd, TABLE_LIST *tables)
 {
   uint counter;
   DBUG_ENTER("open_and_lock_tables");
-  if (open_tables(thd, &tables, &counter) ||
+  if (open_tables(thd, &tables, &counter, 0) ||
       lock_tables(thd, tables, counter) ||
       mysql_handle_derived(thd->lex, &mysql_derived_prepare) ||
       (thd->fill_derived_tables() &&
@@ -2162,6 +2190,9 @@ bool open_and_lock_tables(THD *thd, TABLE_LIST *tables)
     open_normal_and_derived_tables
     thd		- thread handler
     tables	- list of tables for open
+    flags       - bitmap of flags to modify how the tables will be open:
+                  MYSQL_LOCK_IGNORE_FLUSH - open table even if someone has
+                  done a flush or namelock on it.
 
   RETURN
     FALSE - ok
@@ -2172,12 +2203,12 @@ bool open_and_lock_tables(THD *thd, TABLE_LIST *tables)
     data from the tables.
 */
 
-bool open_normal_and_derived_tables(THD *thd, TABLE_LIST *tables)
+bool open_normal_and_derived_tables(THD *thd, TABLE_LIST *tables, uint flags)
 {
   uint counter;
   DBUG_ENTER("open_normal_and_derived_tables");
   DBUG_ASSERT(!thd->fill_derived_tables());
-  if (open_tables(thd, &tables, &counter) ||
+  if (open_tables(thd, &tables, &counter, flags) ||
       mysql_handle_derived(thd->lex, &mysql_derived_prepare))
     DBUG_RETURN(TRUE); /* purecov: inspected */
   DBUG_RETURN(0);
@@ -2323,6 +2354,7 @@ int lock_tables(THD *thd, TABLE_LIST *tables, uint count)
         and was marked as occupied during open_tables() as free for reuse.
       */
       mark_real_tables_as_free_for_reuse(first_not_own);
+      DBUG_PRINT("info",("prelocked_mode= PRELOCKED"));
       thd->prelocked_mode= PRELOCKED;
     }
   }
@@ -2346,6 +2378,7 @@ int lock_tables(THD *thd, TABLE_LIST *tables, uint count)
     if (thd->lex->requires_prelocking())
     {
       mark_real_tables_as_free_for_reuse(first_not_own);
+      DBUG_PRINT("info", ("thd->prelocked_mode= PRELOCKED_UNDER_LOCK_TABLES"));
       thd->prelocked_mode= PRELOCKED_UNDER_LOCK_TABLES;
     }
   }
@@ -2439,154 +2472,260 @@ bool rm_temporary_table(enum db_type base, char *path)
 
 
 /*****************************************************************************
-** find field in list or tables. if field is unqualifed and unique,
-** return unique field
+* The following find_field_in_XXX procedures implement the core of the
+* name resolution functionality. The entry point to resolve a column name in a
+* list of tables is 'find_field_in_tables'. It calls 'find_field_in_table_ref'
+* for each table reference. In turn, depending on the type of table reference,
+* 'find_field_in_table_ref' calls one of the 'find_field_in_XXX' procedures
+* below specific for the type of table reference.
 ******************************************************************************/
 
-/* Special Field pointers for find_field_in_tables returning */
+/* Special Field pointers as return values of find_field_in_XXX functions. */
 Field *not_found_field= (Field*) 0x1;
 Field *view_ref_found= (Field*) 0x2; 
 
 #define WRONG_GRANT (Field*) -1
 
+static void update_field_dependencies(THD *thd, Field *field, TABLE *table)
+{
+  if (thd->set_query_id)
+  {
+    if (field->query_id != thd->query_id)
+    {
+      field->query_id= thd->query_id;
+      table->used_fields++;
+      table->used_keys.intersect(field->part_of_key);
+    }
+    else
+      thd->dupp_field= field;
+  }
+}
+
 
 /*
-  Find field in table or view
+  Find a field by name in a view that uses merge algorithm.
 
   SYNOPSIS
-    find_field_in_table()
+    find_field_in_view()
     thd				thread handler
-    table_list			table where to find
+    table_list			view to search for 'name'
     name			name of field
     item_name                   name of item if it will be created (VIEW)
     length			length of name
-    ref	[in/out]		expression substituted in VIEW should be
-				  passed using this reference (return
-				  view_ref_found)
-                                  (*ref != NULL) only if *ref contains
-                                  the item that we need to replace.
-    check_grants_table		do check columns grants for table?
-    check_grants_view		do check columns grants for view?
-    allow_rowid			do allow finding of "_rowid" field?
-    cached_field_index_ptr	cached position in field list (used to
-				  speedup prepared tables field finding)
+    ref				expression substituted in VIEW should be passed
+                                using this reference (return view_ref_found)
+    check_grants		do check columns grants for view?
     register_tree_change        TRUE if ref is not stack variable and we
-                                  need register changes in item tree
+                                need register changes in item tree
 
   RETURN
     0			field is not found
     view_ref_found	found value in VIEW (real result is in *ref)
-    #			pointer to field
+    #			pointer to field - only for schema table fields
 */
 
-Field *
-find_field_in_table(THD *thd, TABLE_LIST *table_list,
-                    const char *name, const char *item_name,
-                    uint length, Item **ref,
-                    bool check_grants_table, bool check_grants_view,
-                    bool allow_rowid,
-                    uint *cached_field_index_ptr,
-                    bool register_tree_change)
+static Field *
+find_field_in_view(THD *thd, TABLE_LIST *table_list,
+                   const char *name, const char *item_name,
+                   uint length, Item **ref, bool check_grants,
+                   bool register_tree_change)
 {
-  Field *fld;
-  DBUG_ENTER("find_field_in_table");
-  DBUG_PRINT("enter", ("table: '%s'  name: '%s'  item name: '%s'  ref 0x%lx",
-		       table_list->alias, name, item_name, (ulong) ref));
-  if (table_list->field_translation)
+  DBUG_ENTER("find_field_in_view");
+  DBUG_PRINT("enter",
+             ("view: '%s', field name: '%s', item name: '%s', ref 0x%lx",
+              table_list->alias, name, item_name, (ulong) ref));
+  Field_iterator_view field_it;
+  field_it.set(table_list);
+  DBUG_ASSERT(table_list->schema_table_reformed ||
+              (ref != 0 && table_list->view != 0));
+  for (; !field_it.end_of_fields(); field_it.next())
   {
-    Field_iterator_view field_it;
-    field_it.set(table_list);
-    DBUG_ASSERT(table_list->schema_table_reformed ||
-                (ref != 0 && table_list->view != 0));
-    for (; !field_it.end_of_fields(); field_it.next())
+    if (!my_strcasecmp(system_charset_info, field_it.name(), name))
     {
-      if (!my_strcasecmp(system_charset_info, field_it.name(), name))
-      {
-        if (table_list->schema_table_reformed)
-        {
-          /*
-            Translation table items are always Item_fields 
-            and fixed already('mysql_schema_table' function). 
-            So we can return ->field. It is used only for 
-            'show & where' commands.
-          */
-          DBUG_RETURN(((Item_field*) (field_it.item()))->field);
-        }
+      if (table_list->schema_table_reformed)
+        /*
+          Translation table items are always Item_fields and fixed already
+          ('mysql_schema_table' function). So we can return ->field. It is
+          used only for 'show & where' commands.
+        */
+        DBUG_RETURN(((Item_field*) (field_it.item()))->field);
 #ifndef NO_EMBEDDED_ACCESS_CHECKS
-	if (check_grants_view &&
-	    check_grant_column(thd, &table_list->grant,
-			       table_list->view_db.str,
-			       table_list->view_name.str,
-			       name, length))
-	  DBUG_RETURN(WRONG_GRANT);
+      if (check_grants &&
+          check_grant_column(thd, &table_list->grant,
+                             table_list->view_db.str,
+                             table_list->view_name.str,
+                             name, length))
+        DBUG_RETURN(WRONG_GRANT);
 #endif
-        Item *item= field_it.create_item(thd);
-        if (!item)
-        {
-          DBUG_RETURN(0);
-        }
-        /*
-          *ref != NULL means that *ref contains the item that we need to
-          replace. If the item was aliased by the user, set the alias to
-          the replacing item.
-         */
-        if (*ref && !(*ref)->is_autogenerated_name)
-          item->set_name((*ref)->name, (*ref)->name_length,
-                         system_charset_info);
-        if (register_tree_change)
-          thd->change_item_tree(ref, item);
-        else
-          *ref= item;
-	DBUG_RETURN((Field*) view_ref_found);
+      Item *item= field_it.create_item(thd);
+      if (!item)
+        DBUG_RETURN(0);
+      /*
+       *ref != NULL means that *ref contains the item that we need to
+       replace. If the item was aliased by the user, set the alias to
+       the replacing item.
+      */
+      if (*ref && !(*ref)->is_autogenerated_name)
+        item->set_name((*ref)->name, (*ref)->name_length,
+                       system_charset_info);
+      if (register_tree_change)
+        thd->change_item_tree(ref, item);
+      else
+        *ref= item;
+      DBUG_RETURN((Field*) view_ref_found);
+    }
+  }
+  DBUG_RETURN(0);
+}
+
+
+/*
+  Find field by name in a NATURAL/USING join table reference.
+
+  SYNOPSIS
+    find_field_in_natural_join()
+    thd			 [in]  thread handler
+    table_ref            [in]  table reference to search
+    name		 [in]  name of field
+    table_name           [in]  optional table name that qualifies the field
+    db_name              [in]  optional database name that qualifies the field
+    length		 [in]  length of name
+    ref                  [in/out] if 'name' is resolved to a view field, ref is
+                               set to point to the found view field
+    check_grants	 [in]  do check columns grants?
+    register_tree_change [in]  TRUE if ref is not stack variable and we
+                               need register changes in item tree
+    actual_table         [out] the original table reference where the field
+                               belongs - differs from 'table_list' only for
+                               NATURAL/USING joins
+
+  RETURN
+    NULL        if the field was not found
+    WRONG_GRANT if no access rights to the found field
+    #           Pointer to the found Field
+*/
+
+static Field *
+find_field_in_natural_join(THD *thd, TABLE_LIST *table_ref, const char *name,
+                           const char *table_name, const char *db_name,
+                           uint length, Item **ref, bool check_grants,
+                           bool register_tree_change,
+                           TABLE_LIST **actual_table)
+{
+  List_iterator_fast<Natural_join_column>
+    field_it(*(table_ref->join_columns));
+  Natural_join_column *nj_col;
+  Field *found_field;
+  DBUG_ENTER("find_field_in_natural_join");
+  DBUG_PRINT("enter", ("field name: '%s', ref 0x%lx",
+		       name, (ulong) ref));
+  DBUG_ASSERT(table_ref->is_natural_join && table_ref->join_columns);
+  DBUG_ASSERT(*actual_table == NULL);
+
+  LINT_INIT(found_field);
+
+  for (;;)
+  {
+    if (!(nj_col= field_it++))
+      DBUG_RETURN(NULL);
+
+    if (table_name)
+    {
+      /*
+        Coalesced columns cannot be qualified unless this is the execute phase
+        of prepared statements. The reason is that they do not belong to any
+        table, but for PS the prepare phase already resolves and stores
+        items, so during the execution phase we resolve fully qualified items.
+      */
+      if (!thd->current_arena->is_stmt_execute() && nj_col->is_coalesced)
+        continue;
+      if (table_name[0] &&
+          my_strcasecmp(table_alias_charset, nj_col->table_name(), table_name))
+        continue;
+      if (db_name && db_name[0])
+      {
+        const char *cur_db_name= nj_col->db_name();
+        if (cur_db_name && strcmp(db_name, cur_db_name))
+          continue;
       }
     }
-    DBUG_RETURN(0);
+
+    if (!my_strcasecmp(system_charset_info, nj_col->name(), name))
+      break;
   }
-  fld= find_field_in_real_table(thd, table_list->table, name, length,
-				check_grants_table, allow_rowid,
-				cached_field_index_ptr);
+
 #ifndef NO_EMBEDDED_ACCESS_CHECKS
-  /* check for views with temporary table algorithm */
-  if (check_grants_view && table_list->view &&
-      fld && fld != WRONG_GRANT &&
-      check_grant_column(thd, &table_list->grant,
-			 table_list->view_db.str,
-			 table_list->view_name.str,
-			 name, length))
-  {
+  if (check_grants && nj_col->check_grants(thd, name, length))
     DBUG_RETURN(WRONG_GRANT);
-  }
 #endif
-  DBUG_RETURN(fld);
+
+  if (nj_col->view_field)
+  {
+    /*
+      The found field is a view field, we do as in find_field_in_view()
+      and return a pointer to pointer to the Item of that field.
+    */
+    Item *item= nj_col->create_item(thd);
+    if (!item)
+      DBUG_RETURN(NULL);
+    DBUG_ASSERT(nj_col->table_field == NULL);
+    if (nj_col->table_ref->schema_table_reformed)
+    {
+      /*
+        Translation table items are always Item_fields and fixed
+        already('mysql_schema_table' function). So we can return
+        ->field. It is used only for 'show & where' commands.
+      */
+      DBUG_RETURN(((Item_field*) (nj_col->view_field->item))->field);
+    }
+    if (register_tree_change)
+      thd->change_item_tree(ref, item);
+    else
+      *ref= item;
+    found_field= (Field*) view_ref_found;
+  }
+  else
+  {
+    /* This is a base table. */
+    DBUG_ASSERT(nj_col->view_field == NULL);
+    found_field= nj_col->table_field;
+    update_field_dependencies(thd, found_field, nj_col->table_ref->table);
+  }
+
+  *actual_table= nj_col->table_ref;
+  
+  DBUG_RETURN(found_field);
 }
 
 
 /*
-  Find field in table
+  Find field by name in a base table or a view with temp table algorithm.
 
   SYNOPSIS
-    find_field_in_real_table()
+    find_field_in_table()
     thd				thread handler
-    table_list			table where to find
+    table			table where to search for the field
     name			name of field
     length			length of name
     check_grants		do check columns grants?
     allow_rowid			do allow finding of "_rowid" field?
-    cached_field_index_ptr	cached position in field list (used to
-				  speedup prepared tables field finding)
+    cached_field_index_ptr	cached position in field list (used to speedup
+                                lookup for fields in prepared tables)
 
   RETURN
-    0			field is not found
-    #			pointer to field
+    0	field is not found
+    #	pointer to field
 */
 
-Field *find_field_in_real_table(THD *thd, TABLE *table,
-                                const char *name, uint length,
-                                bool check_grants, bool allow_rowid,
-                                uint *cached_field_index_ptr)
+Field *
+find_field_in_table(THD *thd, TABLE *table, const char *name, uint length,
+                    bool check_grants, bool allow_rowid,
+                    uint *cached_field_index_ptr)
 {
   Field **field_ptr, *field;
   uint cached_field_index= *cached_field_index_ptr;
+  DBUG_ENTER("find_field_in_table");
+  DBUG_PRINT("enter", ("table: '%s', field name: '%s'", table->alias, name));
 
   /* We assume here that table->field < NO_CACHED_FIELD_INDEX = UINT_MAX */
   if (cached_field_index < table->s->fields &&
@@ -2599,7 +2738,7 @@ Field *find_field_in_real_table(THD *thd, TABLE *table,
   else
   {
     if (!(field_ptr= table->field))
-      return (Field *)0;
+      DBUG_RETURN((Field *)0);
     for (; *field_ptr; ++field_ptr)
       if (!my_strcasecmp(system_charset_info, (*field_ptr)->field_name, name))
         break;
@@ -2615,27 +2754,117 @@ Field *find_field_in_real_table(THD *thd, TABLE *table,
     if (!allow_rowid ||
         my_strcasecmp(system_charset_info, name, "_rowid") ||
         !(field=table->rowid_field))
-      return (Field*) 0;
+      DBUG_RETURN((Field*) 0);
   }
 
-  if (thd->set_query_id)
-  {
-    if (field->query_id != thd->query_id)
-    {
-      field->query_id=thd->query_id;
-      table->used_fields++;
-      table->used_keys.intersect(field->part_of_key);
-    }
-    else
-      thd->dupp_field=field;
-  }
+  update_field_dependencies(thd, field, table);
+
 #ifndef NO_EMBEDDED_ACCESS_CHECKS
   if (check_grants && check_grant_column(thd, &table->grant,
 					 table->s->db,
 					 table->s->table_name, name, length))
-    return WRONG_GRANT;
+    field= WRONG_GRANT;
+#endif
+  DBUG_RETURN(field);
+}
+
+
+/*
+  Find field in a table reference.
+
+  SYNOPSIS
+    find_field_in_table_ref()
+    thd			   [in]  thread handler
+    table_list		   [in]  table reference to search
+    name		   [in]  name of field
+    item_name              [in]  name of item if it will be created (VIEW)
+    table_name             [in]  optional table name that qualifies the field
+    db_name                [in]  optional database name that qualifies the
+    length		   [in]  field length of name
+    ref		       [in/out] if 'name' is resolved to a view field, ref
+                                 is set to point to the found view field
+    check_grants_table	   [in]  do check columns grants for table?
+    check_grants_view	   [in]  do check columns grants for view?
+    allow_rowid		   [in]  do allow finding of "_rowid" field?
+    cached_field_index_ptr [in]  cached position in field list (used to
+                                 speedup lookup for fields in prepared tables)
+    register_tree_change   [in]  TRUE if ref is not stack variable and we
+                                 need register changes in item tree
+    actual_table           [out] the original table reference where the field
+                                 belongs - differs from 'table_list' only for
+                                 NATURAL_USING joins.
+
+  RETURN
+    0			field is not found
+    view_ref_found	found value in VIEW (real result is in *ref)
+    #			pointer to field
+*/
+
+Field *
+find_field_in_table_ref(THD *thd, TABLE_LIST *table_list,
+                        const char *name, const char *item_name,
+                        const char *table_name, const char *db_name,
+                        uint length, Item **ref,
+                        bool check_grants_table, bool check_grants_view,
+                        bool allow_rowid, uint *cached_field_index_ptr,
+                        bool register_tree_change, TABLE_LIST **actual_table)
+{
+  Field *fld;
+  DBUG_ENTER("find_field_in_table_ref");
+  DBUG_PRINT("enter",
+             ("table: '%s'  field name: '%s'  item name: '%s'  ref 0x%lx",
+              table_list->alias, name, item_name, (ulong) ref));
+
+  /*
+    Check that the table and database that qualify the current field name
+    are the same as the table we are going to search for the field.
+    This is done differently for NATURAL/USING joins because there we can't
+    simply compare the qualifying table and database names with the ones of
+    'table_list' because each field in such a join may originate from a
+    different table.
+    TODO: Ensure that table_name, db_name and tables->db always points to
+          something !
+  */
+  if (!table_list->is_natural_join &&
+      table_name && table_name[0] &&
+      (my_strcasecmp(table_alias_charset, table_list->alias, table_name) ||
+       (db_name && db_name[0] && table_list->db && table_list->db[0] &&
+        strcmp(db_name, table_list->db))))
+    DBUG_RETURN(0);
+
+  *actual_table= NULL;
+  if (table_list->field_translation)
+  {
+    if ((fld= find_field_in_view(thd, table_list, name, item_name, length,
+                                 ref, check_grants_view,
+                                 register_tree_change)))
+      *actual_table= table_list;
+  }
+  else if (table_list->is_natural_join)
+    fld= find_field_in_natural_join(thd, table_list, name, table_name,
+                                    db_name,  length, ref,
+                                    /* TIMOUR_TODO: check this with Sanja */
+                                    check_grants_table || check_grants_view,
+                                    register_tree_change, actual_table);
+  else
+  {
+    if ((fld= find_field_in_table(thd, table_list->table, name, length,
+                                  check_grants_table, allow_rowid,
+                                  cached_field_index_ptr)))
+      *actual_table= table_list;
+#ifndef NO_EMBEDDED_ACCESS_CHECKS
+    /* check for views with temporary table algorithm */
+    if (check_grants_view && table_list->view &&
+        fld && fld != WRONG_GRANT &&
+        check_grant_column(thd, &table_list->grant,
+                           table_list->view_db.str,
+                           table_list->view_name.str,
+                           name, length))
+    fld= WRONG_GRANT;
 #endif
-  return field;
+  }
+
+  DBUG_RETURN(fld);
 }
 
 
@@ -2644,21 +2873,23 @@ Field *find_field_in_real_table(THD *thd, TABLE *table,
 
   SYNOPSIS
     find_field_in_tables()
-    thd                   Pointer to current thread structure
-    item                  Field item that should be found
-    tables                Tables to be searched for item
-    ref                   If 'item' is resolved to a view field, ref is set to
+    thd			  pointer to current thread structure
+    item		  field item that should be found
+    first_table           list of tables to be searched for item
+    last_table            end of the list of tables to search for item. If NULL
+                          then search to the end of the list 'first_table'.
+    ref			  if 'item' is resolved to a view field, ref is set to
                           point to the found view field
-    report_error          Degree of error reporting:
+    report_error	  Degree of error reporting:
                           - IGNORE_ERRORS then do not report any error
                           - IGNORE_EXCEPT_NON_UNIQUE report only non-unique
-                           fields, suppress all other errors
+                            fields, suppress all other errors
                           - REPORT_EXCEPT_NON_UNIQUE report all other errors
                             except when non-unique fields were found
                           - REPORT_ALL_ERRORS
     check_privileges      need to check privileges
-    register_tree_change  TRUE if ref is not stack variable and we
-                            need register changes in item tree
+    register_tree_change  TRUE if ref is not a stack variable and we
+                          to need register changes in item tree
 
   RETURN VALUES
     0			If error: the found field is not unique, or there are
@@ -2672,63 +2903,66 @@ Field *find_field_in_real_table(THD *thd, TABLE *table,
 */
 
 Field *
-find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *tables,
+find_field_in_tables(THD *thd, Item_ident *item,
+                     TABLE_LIST *first_table, TABLE_LIST *last_table,
 		     Item **ref, find_item_error_report_type report_error,
                      bool check_privileges, bool register_tree_change)
 {
   Field *found=0;
-  const char *db=item->db_name;
-  const char *table_name=item->table_name;
-  const char *name=item->field_name;
+  const char *db= item->db_name;
+  const char *table_name= item->table_name;
+  const char *name= item->field_name;
   uint length=(uint) strlen(name);
   char name_buff[NAME_LEN+1];
   bool allow_rowid;
+  TABLE_LIST *cur_table= first_table;
+  TABLE_LIST *actual_table;
 
   if (item->cached_table)
   {
     /*
-      This shortcut is used by prepared statements. We assuming that
-      TABLE_LIST *tables is not changed during query execution (which
+      This shortcut is used by prepared statements. We assume that
+      TABLE_LIST *first_table is not changed during query execution (which
       is true for all queries except RENAME but luckily RENAME doesn't
       use fields...) so we can rely on reusing pointer to its member.
       With this optimization we also miss case when addition of one more
       field makes some prepared query ambiguous and so erroneous, but we
       accept this trade off.
     */
-    if (item->cached_table->table && !item->cached_table->view)
-    {
-      found= find_field_in_real_table(thd, item->cached_table->table,
-				      name, length,
-				      test(item->cached_table->
-					   table->grant.want_privilege) &&
-				      check_privileges,
-				      1, &(item->cached_field_index));
-
-    }
+    TABLE_LIST *table_ref= item->cached_table;
+    /*
+      The condition (table_ref->view == NULL) ensures that we will call
+      find_field_in_table even in the case of information schema tables
+      when table_ref->field_translation != NULL.
+      */
+    if (table_ref->table && !table_ref->view)
+      found= find_field_in_table(thd, table_ref->table, name, length,
+                                 test(table_ref->table->
+                                      grant.want_privilege) &&
+                                 check_privileges,
+                                 1, &(item->cached_field_index));
     else
-    {
-      TABLE_LIST *table= item->cached_table;
-      found= find_field_in_table(thd, table, name, item->name, length,
-				       ref,
-				       (table->table &&
-					test(table->table->grant.
-					     want_privilege) &&
-					check_privileges),
-				       (test(table->grant.want_privilege) &&
-					check_privileges),
-				       1, &(item->cached_field_index),
-                                       register_tree_change);
-    }
+      found= find_field_in_table_ref(thd, table_ref, name, item->name,
+                                     NULL, NULL, length, ref,
+                                     (table_ref->table &&
+                                      test(table_ref->table->grant.
+                                           want_privilege) &&
+                                      check_privileges),
+                                     (test(table_ref->grant.want_privilege) &&
+                                      check_privileges),
+                                     1, &(item->cached_field_index),
+                                     register_tree_change,
+                                     &actual_table);
     if (found)
     {
       if (found == WRONG_GRANT)
 	return (Field*) 0;
       {
         SELECT_LEX *current_sel= thd->lex->current_select;
-        SELECT_LEX *last_select= item->cached_table->select_lex;
+        SELECT_LEX *last_select= table_ref->select_lex;
         /*
           If the field was an outer referencee, mark all selects using this
-          sub query as dependent of the outer query
+          sub query as dependent on the outer query
         */
         if (current_sel != last_select)
           mark_select_range_as_dependent(thd, last_select, current_sel,
@@ -2750,52 +2984,59 @@ find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *tables,
     db= name_buff;
   }
 
+  if (last_table)
+    last_table= last_table->next_name_resolution_table;
+
+  /* The field we search for is qualified with a table name and optional db. */
   if (table_name && table_name[0])
-  {						/* Qualified field */
-    bool found_table= 0;
-    for (; tables; tables= tables->next_local)
+  {
+    for (; cur_table != last_table ;
+         cur_table= cur_table->next_name_resolution_table)
     {
-      /* TODO; Ensure that db and tables->db always points to something ! */
-      if (!my_strcasecmp(table_alias_charset, tables->alias, table_name) &&
-	  (!db || !db[0] || !tables->db ||  !tables->db[0] ||
-           !strcmp(db,tables->db)))
+      Field *cur_field= find_field_in_table_ref(thd, cur_table, name,
+                                                item->name, table_name,
+                                                db, length, ref,
+                                                (cur_table->table &&
+                                                 test(cur_table->table->grant.
+                                                      want_privilege) &&
+                                                 check_privileges),
+                                                (test(cur_table->grant.
+                                                      want_privilege) &&
+                                                 check_privileges),
+                                                1, &(item->cached_field_index),
+                                                register_tree_change,
+                                                &actual_table);
+      if (cur_field)
       {
-	found_table=1;
-	Field *find= find_field_in_table(thd, tables, name, item->name,
-                                         length, ref,
-					 (tables->table &&
-					  test(tables->table->grant.
-                                               want_privilege) &&
-                                          check_privileges),
-					 (test(tables->grant.want_privilege) &&
-                                          check_privileges),
-					 1, &(item->cached_field_index),
-                                         register_tree_change);
-	if (find)
-	{
-	  item->cached_table= tables;
-	  if (!tables->cacheable_table)
-	    item->cached_table= 0;
-	  if (find == WRONG_GRANT)
-	    return (Field*) 0;
-	  if (db || !thd->where)
-	    return find;
-	  if (found)
-	  {
-            if (report_error == REPORT_ALL_ERRORS ||
-                report_error == IGNORE_EXCEPT_NON_UNIQUE)
-              my_error(ER_NON_UNIQ_ERROR, MYF(0),
-                       item->full_name(),thd->where);
-	    return (Field*) 0;
-	  }
-	  found=find;
-	}
+        /*
+          Store the original table of the field, which may be different from
+          cur_table in the case of NATURAL/USING join.
+        */
+        item->cached_table= (!actual_table->cacheable_table) ? 0 : actual_table;
+
+        if (cur_field == WRONG_GRANT)
+          return (Field*) 0;
+        if (db || !thd->where)
+          return cur_field;
+        if (found)
+        {
+          if (report_error == REPORT_ALL_ERRORS ||
+              report_error == IGNORE_EXCEPT_NON_UNIQUE)
+            my_error(ER_NON_UNIQ_ERROR, MYF(0),
+                     item->full_name(),thd->where);
+          return (Field*) 0;
+        }
+        found= cur_field;
       }
     }
     if (found)
       return found;
-    if (!found_table && (report_error == REPORT_ALL_ERRORS ||
-                         report_error == REPORT_EXCEPT_NON_UNIQUE))
+    /*
+      If there were no tables to search, we wouldn't go through the loop and
+      cur_table wouldn't be updated by the loop increment part.
+    */
+    if (cur_table == first_table && (report_error == REPORT_ALL_ERRORS ||
+                                     report_error == REPORT_EXCEPT_NON_UNIQUE))
     {
       char buff[NAME_LEN*2+1];
       if (db && db[0])
@@ -2813,34 +3054,37 @@ find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *tables,
 	return (Field*) not_found_field;
     return (Field*) 0;
   }
-  allow_rowid= tables && !tables->next_local;	// Only one table
-  for (; tables ; tables= tables->next_local)
-  {
-    Field *field;
-    if (!tables->table && !tables->ancestor)
-    {
-      if (report_error == REPORT_ALL_ERRORS ||
-          report_error == REPORT_EXCEPT_NON_UNIQUE)
-	my_error(ER_BAD_FIELD_ERROR, MYF(0), item->full_name(),thd->where);
-      return (Field*) not_found_field;
-    }
 
-    field= find_field_in_table(thd, tables, name, item->name,
-                               length, ref,
-                               (tables->table &&
-                                test(tables->table->grant.
-                                     want_privilege) &&
-                                check_privileges),
-                               (test(tables->grant.want_privilege) &&
-                                check_privileges),
-                               allow_rowid,
-                               &(item->cached_field_index),
-                               register_tree_change);
-    if (field)
+  /* The field we search for is not qualified. */
+  allow_rowid= cur_table && !cur_table->next_local;
+  for (; cur_table != last_table ;
+       cur_table= cur_table->next_name_resolution_table)
+  {
+    Field *cur_field= find_field_in_table_ref(thd, cur_table, name, item->name,
+                                              NULL, NULL, length, ref,
+                                              (cur_table->table &&
+                                               test(cur_table->table->grant.
+                                                    want_privilege) &&
+                                               check_privileges),
+                                              (test(cur_table->grant.
+                                                    want_privilege)
+                                               && check_privileges),
+                                              allow_rowid,
+                                              &(item->cached_field_index),
+                                              register_tree_change,
+                                              &actual_table);
+    if (cur_field)
     {
-      if (field == WRONG_GRANT)
+      if (cur_field == WRONG_GRANT)
 	return (Field*) 0;
-      item->cached_table= (!tables->cacheable_table || found) ? 0 : tables;
+
+      /*
+        Store the original table of the field, which may be different from
+        cur_table in the case of NATURAL/USING join.
+      */
+      item->cached_table= (!actual_table->cacheable_table || found) ?
+                          0 : actual_table;
+
       if (found)
       {
 	if (!thd->where)			// Returns first found
@@ -2850,7 +3094,7 @@ find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *tables,
           my_error(ER_NON_UNIQ_ERROR, MYF(0), name, thd->where);
 	return (Field*) 0;
       }
-      found= field;
+      found= cur_field;
     }
   }
   if (found)
@@ -3064,40 +3308,692 @@ find_item_in_list(Item *find, List<Item> &items, uint *counter,
     return (Item **) not_found_item;
 }
 
-/****************************************************************************
-** Expand all '*' in given fields
-****************************************************************************/
 
-int setup_wild(THD *thd, TABLE_LIST *tables, List<Item> &fields,
-	       List<Item> *sum_func_list,
-	       uint wild_num)
+/*
+  Test if a string is a member of a list of strings.
+
+  SYNOPSIS
+    test_if_string_in_list()
+    find      the string to look for
+    str_list  a list of strings to be searched
+
+  DESCRIPTION
+    Sequentially search a list of strings for a string, and test whether
+    the list contains the same string.
+
+  RETURN
+    TRUE  if find is in str_list
+    FALSE otherwise
+*/
+
+static bool
+test_if_string_in_list(const char *find, List<String> *str_list)
 {
-  if (!wild_num)
-    return(0);
+  List_iterator<String> str_list_it(*str_list);
+  String *curr_str;
+  size_t find_length= strlen(find);
+  while ((curr_str= str_list_it++))
+  {
+    if (find_length != curr_str->length())
+      continue;
+    if (!strncmp(find, curr_str->ptr(), find_length))
+      return TRUE;
+  }
+  return FALSE;
+}
 
-  Item *item;
-  List_iterator<Item> it(fields);
+
+/*
+  Create a new name resolution context for an item so that it is
+  being resolved in a specific table reference.
+
+  SYNOPSIS
+    set_new_item_local_context()
+    thd        pointer to current thread
+    item       item for which new context is created and set
+    table_ref  table ref where an item showld be resolved
+
+  DESCRIPTION
+    Create a new name resolution context for an item, so that the item
+    is resolved only the supplied 'table_ref'.
+
+  RETURN
+    FALSE  if all OK
+    TRUE   otherwise
+*/
+
+static bool
+set_new_item_local_context(THD *thd, Item_ident *item, TABLE_LIST *table_ref)
+{
+  Name_resolution_context *context;
+
+  if (!(context= (Name_resolution_context*)
+        thd->calloc(sizeof(Name_resolution_context))))
+    return TRUE;
+  context->init();
+  context->first_name_resolution_table=
+    context->last_name_resolution_table= table_ref;
+  item->context= context;
+  return FALSE;
+}
+
+
+/*
+  Find and mark the common columns of two table references.
+
+  SYNOPSIS
+    mark_common_columns()
+    thd                [in] current thread
+    table_ref_1        [in] the first (left) join operand
+    table_ref_2        [in] the second (right) join operand
+    using_fields       [in] if the join is JOIN...USING - the join columns,
+                            if NATURAL join, then NULL
+    found_using_fields [out] number of fields from the USING clause that were
+                             found among the common fields
+
+  DESCRIPTION
+    The procedure finds the common columns of two relations (either
+    tables or intermediate join results), and adds an equi-join condition
+    to the ON clause of 'table_ref_2' for each pair of matching columns.
+    If some of table_ref_XXX represents a base table or view, then we
+    create new 'Natural_join_column' instances for each column
+    reference and store them in the 'join_columns' of the table
+    reference.
+
+  IMPLEMENTATION
+    The procedure assumes that store_natural_using_join_columns() was
+    called for the previous level of NATURAL/USING joins.
+
+  RETURN
+    TRUE   error when some common column is non-unique, or out of memory
+    FALSE  OK
+*/
+
+static bool
+mark_common_columns(THD *thd, TABLE_LIST *table_ref_1, TABLE_LIST *table_ref_2,
+                    List<String> *using_fields, uint *found_using_fields)
+{
+  Field_iterator_table_ref it_1, it_2;
+  Natural_join_column *nj_col_1, *nj_col_2;
+  const char *field_name_1;
   Query_arena *arena, backup;
-  DBUG_ENTER("setup_wild");
+  bool add_columns= TRUE;
+  bool result= TRUE;
+
+  DBUG_ENTER("mark_common_columns");
+  DBUG_PRINT("info", ("operand_1: %s  operand_2: %s",
+                      table_ref_1->alias, table_ref_2->alias));
+
+  *found_using_fields= 0;
+  arena= thd->change_arena_if_needed(&backup);
 
   /*
-    Don't use arena if we are not in prepared statements or stored procedures
-    For PS/SP we have to use arena to remember the changes
+    TABLE_LIST::join_columns could be allocated by the previous call to
+    store_natural_using_join_columns() for the lower level of nested tables.
   */
-  arena= thd->change_arena_if_needed(&backup);
+  if (!table_ref_1->join_columns)
+  {
+    if (!(table_ref_1->join_columns= new List<Natural_join_column>))
+      goto err;
+    table_ref_1->is_join_columns_complete= FALSE;
+  }
+  if (!table_ref_2->join_columns)
+  {
+    if (!(table_ref_2->join_columns= new List<Natural_join_column>))
+      goto err;
+    table_ref_2->is_join_columns_complete= FALSE;
+  }
 
-  while (wild_num && (item= it++))
+  for (it_1.set(table_ref_1); !it_1.end_of_fields(); it_1.next())
   {
-    if (item->type() == Item::FIELD_ITEM &&
-        ((Item_field*) item)->field_name &&
-	((Item_field*) item)->field_name[0] == '*' &&
-	!((Item_field*) item)->field)
+    bool is_created_1;
+    bool found= FALSE;
+    if (!(nj_col_1= it_1.get_or_create_column_ref(thd, &is_created_1)))
+      goto err;
+    field_name_1= nj_col_1->name();
+
+    /* If nj_col_1 was just created add it to the list of join columns. */
+    if (is_created_1)
+      table_ref_1->join_columns->push_back(nj_col_1);
+
+    /*
+      Find a field with the same name in table_ref_2.
+
+      Note that for the second loop, it_2.set() will iterate over
+      table_ref_2->join_columns and not generate any new elements or
+      lists.
+    */
+    nj_col_2= NULL;
+    for (it_2.set(table_ref_2); !it_2.end_of_fields(); it_2.next())
     {
-      uint elem= fields.elements;
-      bool any_privileges= ((Item_field *) item)->any_privileges;
-      Item_subselect *subsel= thd->lex->current_select->master_unit()->item;
-      if (subsel &&
-          subsel->substype() == Item_subselect::EXISTS_SUBS)
+      bool is_created_2;
+      Natural_join_column *cur_nj_col_2;
+      const char *cur_field_name_2;
+      if (!(cur_nj_col_2= it_2.get_or_create_column_ref(thd, &is_created_2)))
+        goto err;
+      cur_field_name_2= cur_nj_col_2->name();
+
+      /* If nj_col_1 was just created add it to the list of join columns. */
+      if (add_columns && is_created_2)
+        table_ref_2->join_columns->push_back(cur_nj_col_2);
+
+      /* Compare the two columns and check for duplicate common fields. */
+      if (!my_strcasecmp(system_charset_info, field_name_1, cur_field_name_2))
+      {
+        if (found)
+        {
+          my_error(ER_NON_UNIQ_ERROR, MYF(0), field_name_1, thd->where);
+          goto err;
+        }
+        nj_col_2= cur_nj_col_2;
+        found= TRUE;
+      }
+    }
+    /* Force it_2.set() to use table_ref_2->join_columns. */
+    table_ref_2->is_join_columns_complete= TRUE;
+    add_columns= FALSE;
+    if (!found)
+      continue;                                 // No matching field
+
+    /*
+      field_1 and field_2 have the same names. Check if they are in the USING
+      clause (if present), mark them as common fields, and add a new
+      equi-join condition to the ON clause.
+    */
+    if (nj_col_2 &&
+        (!using_fields ||
+          test_if_string_in_list(field_name_1, using_fields)))
+    {
+      Item *item_1=   nj_col_1->create_item(thd);
+      Item *item_2=   nj_col_2->create_item(thd);
+      Field *field_1= nj_col_1->field();
+      Field *field_2= nj_col_2->field();
+      Item_ident *item_ident_1, *item_ident_2;
+      Name_resolution_context *context_1, *context_2;
+      Item_func_eq *eq_cond;
+
+      DBUG_PRINT("info", ("new equi-join condition:  %s.%s = %s.%s",
+                          table_ref_1->alias, field_1->field_name,
+                          table_ref_2->alias, field_2->field_name));
+
+      if (!item_1 || !item_2)
+        goto err;                               // out of memory
+
+      /*
+        The following assert checks that the two created items are of
+        type Item_ident.
+      */
+      DBUG_ASSERT(!thd->lex->current_select->no_wrap_view_item);
+      /*
+        In the case of no_wrap_view_item == 0, the created items must be
+        of sub-classes of Item_ident.
+      */
+      DBUG_ASSERT(item_1->type() == Item::FIELD_ITEM ||
+                  item_1->type() == Item::REF_ITEM);
+      DBUG_ASSERT(item_2->type() == Item::FIELD_ITEM ||
+                  item_2->type() == Item::REF_ITEM);
+
+      /*
+        We need to cast item_1,2 to Item_ident, because we need to hook name
+        resolution contexts specific to each item.
+      */
+      item_ident_1= (Item_ident*) item_1;
+      item_ident_2= (Item_ident*) item_2;
+      /*
+        Create and hook special name resolution contexts to each item in the
+        new join condition . We need this to both speed-up subsequent name
+        resolution of these items, and to enable proper name resolution of
+        the items during the execute phase of PS.
+      */
+      if (set_new_item_local_context(thd, item_ident_1, table_ref_1) ||
+          set_new_item_local_context(thd, item_ident_2, table_ref_2))
+        goto err;
+
+      if (!(eq_cond= new Item_func_eq(item_ident_1, item_ident_2)))
+        goto err;                               /* Out of memory. */
+
+      /*
+        Add the new equi-join condition to the ON clause. Notice that
+        fix_fields() is applied to all ON conditions in setup_conds()
+        so we don't do it here.
+       */
+      add_join_on((table_ref_1->outer_join & JOIN_TYPE_RIGHT ?
+                   table_ref_1 : table_ref_2),
+                  eq_cond);
+
+      nj_col_1->is_common= nj_col_2->is_common= TRUE;
+      nj_col_1->is_coalesced= nj_col_2->is_coalesced= TRUE;
+
+      if (field_1)
+      {
+        /* Mark field_1 used for table cache. */
+        field_1->query_id= thd->query_id;
+        nj_col_1->table_ref->table->used_keys.intersect(field_1->part_of_key);
+      }
+      if (field_2)
+      {
+        /* Mark field_2 used for table cache. */
+        field_2->query_id= thd->query_id;
+        nj_col_2->table_ref->table->used_keys.intersect(field_2->part_of_key);
+      }
+
+      if (using_fields != NULL)
+        ++(*found_using_fields);
+    }
+  }
+  table_ref_1->is_join_columns_complete= TRUE;
+
+  /*
+    Everything is OK.
+    Notice that at this point there may be some column names in the USING
+    clause that are not among the common columns. This is an SQL error and
+    we check for this error in store_natural_using_join_columns() when
+    (found_using_fields < length(join_using_fields)).
+  */
+  result= FALSE;
+
+err:
+  if (arena)
+    thd->restore_backup_item_arena(arena, &backup);
+  DBUG_RETURN(result);
+}
+
+
+
+/*
+  Materialize and store the row type of NATURAL/USING join.
+
+  SYNOPSIS
+    store_natural_using_join_columns()
+    thd                current thread
+    natural_using_join the table reference of the NATURAL/USING join
+    table_ref_1        the first (left) operand (of a NATURAL/USING join).
+    table_ref_2        the second (right) operand (of a NATURAL/USING join).
+    using_fields       if the join is JOIN...USING - the join columns,
+                       if NATURAL join, then NULL
+    found_using_fields number of fields from the USING clause that were
+                       found among the common fields
+
+  DESCRIPTION
+    Iterate over the columns of both join operands and sort and store
+    all columns into the 'join_columns' list of natural_using_join
+    where the list is formed by three parts:
+      part1: The coalesced columns of table_ref_1 and table_ref_2,
+             sorted according to the column order of the first table.
+      part2: The other columns of the first table, in the order in
+             which they were defined in CREATE TABLE.
+      part3: The other columns of the second table, in the order in
+             which they were defined in CREATE TABLE.
+    Time complexity - O(N1+N2), where Ni = length(table_ref_i).
+
+  IMPLEMENTATION
+    The procedure assumes that mark_common_columns() has been called
+    for the join that is being processed.
+
+  RETURN
+    TRUE    error: Some common column is ambiguous
+    FALSE   OK
+*/
+
+static bool
+store_natural_using_join_columns(THD *thd, TABLE_LIST *natural_using_join,
+                                 TABLE_LIST *table_ref_1,
+                                 TABLE_LIST *table_ref_2,
+                                 List<String> *using_fields,
+                                 uint found_using_fields)
+{
+  Field_iterator_table_ref it_1, it_2;
+  Natural_join_column *nj_col_1, *nj_col_2;
+  bool is_created;
+  Query_arena *arena, backup;
+  bool result= TRUE;
+  List<Natural_join_column> *non_join_columns;
+  DBUG_ENTER("store_natural_using_join_columns");
+
+  DBUG_ASSERT(!natural_using_join->join_columns);
+
+  arena= thd->change_arena_if_needed(&backup);
+
+  if (!(non_join_columns= new List<Natural_join_column>) ||
+      !(natural_using_join->join_columns= new List<Natural_join_column>))
+    goto err;
+
+  /* Append the columns of the first join operand. */
+  for (it_1.set(table_ref_1); !it_1.end_of_fields(); it_1.next())
+  {
+    if (!(nj_col_1= it_1.get_or_create_column_ref(thd, &is_created)))
+      goto err;
+    /*
+      The following assert checks that mark_common_columns() was run and
+      we created the list table_ref_1->join_columns.
+    */
+    DBUG_ASSERT(!is_created);
+    if (nj_col_1->is_common)
+    {
+      natural_using_join->join_columns->push_back(nj_col_1);
+      /* Reset the common columns for the next call to mark_common_columns. */
+      nj_col_1->is_common= FALSE;
+    }
+    else
+      non_join_columns->push_back(nj_col_1);
+  }
+
+  /*
+    Check that all columns in the USING clause are among the common
+    columns. If this is not the case, report the first one that was
+    not found in an error.
+  */
+  if (using_fields && found_using_fields < using_fields->elements)
+  {
+    String *using_field_name;
+    List_iterator_fast<String> using_fields_it(*using_fields);
+    while ((using_field_name= using_fields_it++))
+    {
+      const char *using_field_name_ptr= using_field_name->c_ptr();
+      List_iterator_fast<Natural_join_column>
+        it(*(natural_using_join->join_columns));
+      Natural_join_column *common_field;
+
+      for (;;)
+      {
+        /* If reached the end of fields, and none was found, report error. */
+        if (!(common_field= it++))
+        {
+          my_error(ER_BAD_FIELD_ERROR, MYF(0), using_field_name_ptr,
+                   current_thd->where);
+          goto err;
+        }
+        if (!my_strcasecmp(system_charset_info,
+                           common_field->name(), using_field_name_ptr))
+          break;                                // Found match
+      }
+    }
+  }
+
+  /* Append the non-equi-join columns of the second join operand. */
+  for (it_2.set(table_ref_2); !it_2.end_of_fields(); it_2.next())
+  {
+    if (!(nj_col_2= it_2.get_or_create_column_ref(thd, &is_created)))
+      goto err;
+    /*
+      The following assert checks that mark_common_columns() was run and
+      we created the list table_ref_2->join_columns.
+    */
+    DBUG_ASSERT(!is_created);
+    if (!nj_col_2->is_common)
+      non_join_columns->push_back(nj_col_2);
+    else
+    {
+      /* Reset the common columns for the next call to mark_common_columns. */
+      nj_col_2->is_common= FALSE;
+    }
+  }
+
+  if (non_join_columns->elements > 0)
+    natural_using_join->join_columns->concat(non_join_columns);
+  natural_using_join->is_join_columns_complete= TRUE;
+
+  result= FALSE;
+
+err:
+  if (arena)
+    thd->restore_backup_item_arena(arena, &backup);
+  DBUG_RETURN(result);
+}
+
+
+/*
+  Precompute and store the row types of the top-most NATURAL/USING joins.
+
+  SYNOPSIS
+    store_top_level_join_columns()
+    thd            current thread
+    table_ref      nested join or table in a FROM clause
+    left_neighbor  neighbor table reference to the left of table_ref at the
+                   same level in the join tree
+    right_neighbor neighbor table reference to the right of table_ref at the
+                   same level in the join tree
+
+  DESCRIPTION
+    The procedure performs a post-order traversal of a nested join tree
+    and materializes the row types of NATURAL/USING joins in a
+    bottom-up manner until it reaches the TABLE_LIST elements that
+    represent the top-most NATURAL/USING joins. The procedure should be
+    applied to each element of SELECT_LEX::top_join_list (i.e. to each
+    top-level element of the FROM clause).
+
+  IMPLEMENTATION
+    Notice that the table references in the list nested_join->join_list
+    are in reverse order, thus when we iterate over it, we are moving
+    from the right to the left in the FROM clause.
+
+  RETURN
+    TRUE   Error
+    FALSE  OK
+*/
+
+static bool
+store_top_level_join_columns(THD *thd, TABLE_LIST *table_ref,
+                             TABLE_LIST *left_neighbor,
+                             TABLE_LIST *right_neighbor)
+{
+  DBUG_ENTER("store_top_level_join_columns");
+
+  /* Call the procedure recursively for each nested table reference. */
+  if (table_ref->nested_join)
+  {
+    List_iterator_fast<TABLE_LIST> nested_it(table_ref->nested_join->join_list);
+    TABLE_LIST *cur_left_neighbor= nested_it++;
+    TABLE_LIST *cur_right_neighbor= NULL;
+
+    while (cur_left_neighbor)
+    {
+      TABLE_LIST *cur_table_ref= cur_left_neighbor;
+      cur_left_neighbor= nested_it++;
+      /*
+        The order of RIGHT JOIN operands is reversed in 'join list' to
+        transform it into a LEFT JOIN. However, in this procedure we need
+        the join operands in their lexical order, so below we reverse the
+        join operands. Notice that this happens only in the first loop, and
+        not in the second one, as in the second loop cur_left_neighbor == NULL.
+        This is the correct behavior, because the second loop
+        sets cur_table_ref reference correctly after the join operands are
+        swapped in the first loop.
+      */
+      if (cur_left_neighbor &&
+          cur_table_ref->outer_join & JOIN_TYPE_RIGHT)
+      {
+        DBUG_ASSERT(cur_table_ref);
+        /* This can happen only for JOIN ... ON. */
+        DBUG_ASSERT(table_ref->nested_join->join_list.elements == 2);
+        swap_variables(TABLE_LIST*, cur_left_neighbor, cur_table_ref);
+      }
+
+      if (cur_table_ref->nested_join &&
+          store_top_level_join_columns(thd, cur_table_ref,
+                                       cur_left_neighbor, cur_right_neighbor))
+        DBUG_RETURN(TRUE);
+     cur_right_neighbor= cur_table_ref;
+    }
+  }
+
+  /*
+    If this is a NATURAL/USING join, materialize its result columns and
+    convert to a JOIN ... ON.
+  */
+  if (table_ref->is_natural_join)
+  {
+    DBUG_ASSERT(table_ref->nested_join &&
+                table_ref->nested_join->join_list.elements == 2);
+    List_iterator_fast<TABLE_LIST> operand_it(table_ref->nested_join->join_list);
+    /*
+      Notice that the order of join operands depends on whether table_ref
+      represents a LEFT or a RIGHT join. In a RIGHT join, the operands are
+      in inverted order.
+     */
+    TABLE_LIST *table_ref_2= operand_it++; /* Second NATURAL join operand.*/
+    TABLE_LIST *table_ref_1= operand_it++; /* First NATURAL join operand. */
+    List<String> *using_fields= table_ref->join_using_fields;
+    uint found_using_fields;
+
+    /*
+      The two join operands were interchanged in the parser, change the order
+      back for 'mark_common_columns'.
+    */
+    if (table_ref_2->outer_join & JOIN_TYPE_RIGHT)
+      swap_variables(TABLE_LIST*, table_ref_1, table_ref_2);
+    if (mark_common_columns(thd, table_ref_1, table_ref_2,
+                            using_fields, &found_using_fields))
+      DBUG_RETURN(TRUE);
+
+    /*
+      Swap the join operands back, so that we pick the columns of the second
+      one as the coalesced columns. In this way the coalesced columns are the
+      same as of an equivalent LEFT JOIN.
+    */
+    if (table_ref_1->outer_join & JOIN_TYPE_RIGHT)
+      swap_variables(TABLE_LIST*, table_ref_1, table_ref_2);
+    if (store_natural_using_join_columns(thd, table_ref, table_ref_1,
+                                         table_ref_2, using_fields,
+                                         found_using_fields))
+      DBUG_RETURN(TRUE);
+
+    /*
+      Change NATURAL JOIN to JOIN ... ON. We do this for both operands
+      because either one of them or the other is the one with the
+      natural join flag because RIGHT joins are transformed into LEFT,
+      and the two tables may be reordered.
+    */
+    table_ref_1->natural_join= table_ref_2->natural_join= NULL;
+
+    /* Change this table reference to become a leaf for name resolution. */
+    if (left_neighbor)
+    {
+      TABLE_LIST *last_leaf_on_the_left;
+      last_leaf_on_the_left= left_neighbor->last_leaf_for_name_resolution();
+      last_leaf_on_the_left->next_name_resolution_table= table_ref;
+    }
+    if (right_neighbor)
+    {
+      TABLE_LIST *first_leaf_on_the_right;
+      first_leaf_on_the_right= right_neighbor->first_leaf_for_name_resolution();
+      table_ref->next_name_resolution_table= first_leaf_on_the_right;
+    }
+    else
+      table_ref->next_name_resolution_table= NULL;
+  }
+  DBUG_RETURN(FALSE);
+}
+
+
+/*
+  Compute and store the row types of the top-most NATURAL/USING joins
+  in a FROM clause.
+
+  SYNOPSIS
+    setup_natural_join_row_types()
+    thd          current thread
+    from_clause  list of top-level table references in a FROM clause
+
+  DESCRIPTION
+    Apply the procedure 'store_top_level_join_columns' to each of the
+    top-level table referencs of the FROM clause. Adjust the list of tables
+    for name resolution - context->first_name_resolution_table to the
+    top-most, lef-most NATURAL/USING join.
+
+  IMPLEMENTATION
+    Notice that the table references in 'from_clause' are in reverse
+    order, thus when we iterate over it, we are moving from the right
+    to the left in the FROM clause.
+
+  RETURN
+    TRUE   Error
+    FALSE  OK
+*/
+static bool setup_natural_join_row_types(THD *thd,
+                                         List<TABLE_LIST> *from_clause,
+                                         Name_resolution_context *context)
+{
+  thd->where= "from clause";
+  if (from_clause->elements == 0)
+    return FALSE; /* We come here in the case of UNIONs. */
+
+  /* For stored procedures do not redo work if already done. */
+  if (!context->select_lex->first_execution)
+    return FALSE;
+
+  List_iterator_fast<TABLE_LIST> table_ref_it(*from_clause);
+  TABLE_LIST *table_ref; /* Current table reference. */
+  /* Table reference to the left of the current. */
+  TABLE_LIST *left_neighbor;
+  /* Table reference to the right of the current. */
+  TABLE_LIST *right_neighbor= NULL;
+
+  /* Note that tables in the list are in reversed order */
+  for (left_neighbor= table_ref_it++; left_neighbor ; )
+  {
+    table_ref= left_neighbor;
+    left_neighbor= table_ref_it++;
+    if (store_top_level_join_columns(thd, table_ref,
+                                     left_neighbor, right_neighbor))
+      return TRUE;
+    if (left_neighbor)
+    {
+      TABLE_LIST *first_leaf_on_the_right;
+      first_leaf_on_the_right= table_ref->first_leaf_for_name_resolution();
+      left_neighbor->next_name_resolution_table= first_leaf_on_the_right;
+    }
+    right_neighbor= table_ref;
+  }
+
+  /*
+    Store the top-most, left-most NATURAL/USING join, so that we start
+    the search from that one instead of context->table_list. At this point
+    right_neighbor points to the left-most top-level table reference in the
+    FROM clause.
+  */
+  DBUG_ASSERT(right_neighbor);
+  context->first_name_resolution_table=
+    right_neighbor->first_leaf_for_name_resolution();
+
+  return FALSE;
+}
+
+
+/****************************************************************************
+** Expand all '*' in given fields
+****************************************************************************/
+
+int setup_wild(THD *thd, TABLE_LIST *tables, List<Item> &fields,
+	       List<Item> *sum_func_list,
+	       uint wild_num)
+{
+  if (!wild_num)
+    return(0);
+
+  Item *item;
+  List_iterator<Item> it(fields);
+  Query_arena *arena, backup;
+  DBUG_ENTER("setup_wild");
+
+  /*
+    Don't use arena if we are not in prepared statements or stored procedures
+    For PS/SP we have to use arena to remember the changes
+  */
+  arena= thd->change_arena_if_needed(&backup);
+
+  while (wild_num && (item= it++))
+  {
+    if (item->type() == Item::FIELD_ITEM &&
+        ((Item_field*) item)->field_name &&
+	((Item_field*) item)->field_name[0] == '*' &&
+	!((Item_field*) item)->field)
+    {
+      uint elem= fields.elements;
+      bool any_privileges= ((Item_field *) item)->any_privileges;
+      Item_subselect *subsel= thd->lex->current_select->master_unit()->item;
+      if (subsel &&
+          subsel->substype() == Item_subselect::EXISTS_SUBS)
       {
         /*
           It is EXISTS(SELECT * ...) and we can replace * by any constant.
@@ -3148,6 +4044,7 @@ bool setup_fields(THD *thd, Item **ref_pointer_array,
                   List<Item> *sum_func_list, bool allow_sum_func)
 {
   reg2 Item *item;
+  bool save_set_query_id= thd->set_query_id;
   List_iterator<Item> it(fields);
   DBUG_ENTER("setup_fields");
 
@@ -3175,6 +4072,7 @@ bool setup_fields(THD *thd, Item **ref_pointer_array,
     if (!item->fixed && item->fix_fields(thd, it.ref()) ||
 	(item= *(it.ref()))->check_cols(1))
     {
+      thd->set_query_id= save_set_query_id;
       DBUG_RETURN(TRUE); /* purecov: inspected */
     }
     if (ref)
@@ -3182,8 +4080,9 @@ bool setup_fields(THD *thd, Item **ref_pointer_array,
     if (item->with_sum_func && item->type() != Item::SUM_FUNC_ITEM &&
 	sum_func_list)
       item->split_sum_func(thd, ref_pointer_array, *sum_func_list);
-    thd->used_tables|=item->used_tables();
+    thd->used_tables|= item->used_tables();
   }
+  thd->set_query_id= save_set_query_id;
   DBUG_RETURN(test(thd->net.report_error));
 }
 
@@ -3204,9 +4103,7 @@ TABLE_LIST **make_leaves_list(TABLE_LIST **list, TABLE_LIST *tables)
   for (TABLE_LIST *table= tables; table; table= table->next_local)
   {
     if (table->view && table->effective_algorithm == VIEW_ALGORITHM_MERGE)
-    {
       list= make_leaves_list(list, table->ancestor);
-    }
     else
     {
       *list= table;
@@ -3223,33 +4120,36 @@ TABLE_LIST **make_leaves_list(TABLE_LIST **list, TABLE_LIST *tables)
     setup_tables()
     thd		  Thread handler
     context       name resolution contest to setup table list there
-    tables	  Table list
+    from_clause   Top-level list of table references in the FROM clause
+    tables	  Table list (select_lex->table_list)
     conds	  Condition of current SELECT (can be changed by VIEW)
-    leaves        List of join table leaves list
+    leaves        List of join table leaves list (select_lex->leaf_tables)
     refresh       It is onle refresh for subquery
     select_insert It is SELECT ... INSERT command
 
   NOTE
     Check also that the 'used keys' and 'ignored keys' exists and set up the
-    table structure accordingly
-    Create leaf tables list
+    table structure accordingly.
+    Create a list of leaf tables. For queries with NATURAL/USING JOINs,
+    compute the row types of the top most natural/using join table references
+    and link these into a list of table references for name resolution.
 
     This has to be called for all tables that are used by items, as otherwise
     table->map is not set and all Item_field will be regarded as const items.
 
   RETURN
-    FALSE ok;  In this case *map will includes the choosed index
+    FALSE ok;  In this case *map will includes the chosen index
     TRUE  error
 */
 
 bool setup_tables(THD *thd, Name_resolution_context *context,
-                  TABLE_LIST *tables, Item **conds,
-                  TABLE_LIST **leaves, bool select_insert)
+                  List<TABLE_LIST> *from_clause, TABLE_LIST *tables,
+                  Item **conds, TABLE_LIST **leaves, bool select_insert)
 {
   uint tablenr= 0;
   DBUG_ENTER("setup_tables");
 
-  context->table_list= tables;
+  context->table_list= context->first_name_resolution_table= tables;
 
   /*
     this is used for INSERT ... SELECT.
@@ -3321,6 +4221,11 @@ bool setup_tables(THD *thd, Name_resolution_context *context,
         DBUG_RETURN(1);
     }
   }
+
+  /* Precompute and store the row types of NATURAL/USING joins. */
+  if (setup_natural_join_row_types(thd, from_clause, context))
+    DBUG_RETURN(1);
+
   DBUG_RETURN(0);
 }
 
@@ -3379,8 +4284,7 @@ bool get_key_map_from_key_list(key_map *map, TABLE *table,
 		          for all columns
                         1 If any privilege is ok
   RETURN
-    0	ok
-        'it' is updated to point at last inserted
+    0	ok     'it' is updated to point at last inserted
     1	error.  Error message is generated but not sent to client
 */
 
@@ -3389,12 +4293,11 @@ insert_fields(THD *thd, Name_resolution_context *context, const char *db_name,
 	      const char *table_name, List_iterator<Item> *it,
               bool any_privileges)
 {
-  /* allocate variables on stack to avoid pool alloaction */
-  Field_iterator_table table_iter;
-  Field_iterator_view view_iter;
-  uint found;
+  Field_iterator_table_ref field_iterator;
+  bool found;
   char name_buff[NAME_LEN+1];
   DBUG_ENTER("insert_fields");
+  DBUG_PRINT("arena", ("current arena: 0x%lx", (ulong)thd->current_arena));
 
   if (db_name && lower_case_table_names)
   {
@@ -3408,197 +4311,209 @@ insert_fields(THD *thd, Name_resolution_context *context, const char *db_name,
     db_name= name_buff;
   }
 
-  found= 0;
-  for (TABLE_LIST *tables= context->table_list;
+  found= FALSE;
+  for (TABLE_LIST *tables= context->first_name_resolution_table;
        tables;
-       tables= tables->next_local)
+       tables= tables->next_name_resolution_table)
   {
-    Field_iterator *iterator;
-    TABLE_LIST *natural_join_table;
     Field *field;
-    TABLE_LIST *embedded;
-    TABLE_LIST *last;
-    TABLE_LIST *embedding;
     TABLE *table= tables->table;
 
-    if (!table_name || (!my_strcasecmp(table_alias_charset, table_name,
-				       tables->alias) &&
-			(!db_name || !strcmp(tables->db,db_name))))
+    DBUG_ASSERT(tables->is_leaf_for_name_resolution());
+
+    /*
+      If optional table and db names do not match the ones used to qualify
+      the field being expanded, skip this table reference. However if this is
+      a NATURAL/USING join, we can't simply skip the whole table reference,
+      because  its columns may come from different tables/views. For NATURAL/
+      USING joins we perform this test for each column in the loop below.
+    */
+    if (!tables->is_natural_join)
     {
-      bool view;
+      if (table_name && my_strcasecmp(table_alias_charset, table_name,
+                                      tables->alias) ||
+          (db_name && strcmp(tables->db,db_name)))
+        continue;
+    }
+
+    bool view;
 #ifndef NO_EMBEDDED_ACCESS_CHECKS
-      /* Ensure that we have access right to all columns */
-      if (!((table && (table->grant.privilege & SELECT_ACL) ||
-	     tables->view && (tables->grant.privilege & SELECT_ACL))) &&
-	  !any_privileges)
-      {
-        if (tables->view)
-        {
-          view_iter.set(tables);
-          if (check_grant_all_columns(thd, SELECT_ACL, &tables->grant,
-                                      tables->view_db.str,
-                                      tables->view_name.str,
-                                      &view_iter))
-            goto err;
-        }
-        else if (!tables->schema_table)
-        {
-	  DBUG_ASSERT(table != 0);
-          table_iter.set(tables);
-          if (check_grant_all_columns(thd, SELECT_ACL, &table->grant,
-                                      table->s->db,
-                                      table->s->table_name,
-                                      &table_iter))
-            goto err;
-        }
-      }
+    /* Ensure that we have access rights to all fields to be inserted. */
+    if (!((table && (table->grant.privilege & SELECT_ACL) ||
+           tables->view && (tables->grant.privilege & SELECT_ACL))) &&
+        !any_privileges)
+    {
+      field_iterator.set(tables);
+      if (check_grant_all_columns(thd, SELECT_ACL, field_iterator.grant(),
+                                  field_iterator.db_name(),
+                                  field_iterator.table_name(),
+                                  &field_iterator))
+        DBUG_RETURN(TRUE);
+    }
 #endif
-      natural_join_table= 0;
-      last= embedded= tables;
 
-      while ((embedding= embedded->embedding) &&
-              embedding->join_list->elements != 1)
-      {
-        TABLE_LIST *next;
-        List_iterator_fast<TABLE_LIST> it(embedding->nested_join->join_list);
-        last= it++;
-        while ((next= it++))
-          last= next;
-        if (last != tables)
-          break;
-        embedded= embedding;
-      }
 
-      if (tables == last &&
-          !embedded->outer_join &&
-          embedded->natural_join &&
-          !embedded->natural_join->outer_join)
+    /*
+      Update the tables used in the query based on the referenced fields. For
+      views and natural joins this update is performed inside the loop below.
+    */
+    if (table)
+      thd->used_tables|= table->map;
+
+    /*
+      Initialize a generic field iterator for the current table reference.
+      Notice that it is guaranteed that this iterator will iterate over the
+      fields of a single table reference, because 'tables' is a leaf (for
+      name resolution purposes).
+    */
+    field_iterator.set(tables);
+
+    for (; !field_iterator.end_of_fields(); field_iterator.next())
+    {
+      Item *item;
+
+      /*
+        If this is a column of a NATURAL/USING join, and the star was
+        qualified with a table (and database) name, check if the
+        column is not a coalesced one, and if not, that is belongs to
+        the same table.
+      */
+      if (tables->is_natural_join && table_name)
       {
-        embedding= embedded->natural_join;
-        while (embedding->nested_join)
-          embedding= embedding->nested_join->join_list.head();
-        natural_join_table= embedding;
+        if (field_iterator.is_coalesced() ||
+            my_strcasecmp(table_alias_charset, table_name,
+                          field_iterator.table_name()) ||
+            (db_name && strcmp(db_name, field_iterator.db_name())))
+          continue;
       }
-      if (tables->field_translation)
+
+      if (!(item= field_iterator.create_item(thd)))
+        DBUG_RETURN(TRUE);
+
+      if (!found)
       {
-        iterator= &view_iter;
-	view= 1;
+        found= TRUE;
+        it->replace(item); /* Replace '*' with the first found item. */
       }
       else
-      {
-        iterator= &table_iter;
-	view= 0;
-      }
-      iterator->set(tables);
-
-      /* for view used tables will be collected in following loop */
-      if (table)
-	thd->used_tables|= table->map;
+        it->after(item);   /* Add 'item' to the SELECT list. */
 
-      for (; !iterator->end_of_fields(); iterator->next())
+#ifndef NO_EMBEDDED_ACCESS_CHECKS
+      /*
+        Set privilege information for the fields of newly created views.
+        We have that (any_priviliges == TRUE) if and only if we are creating
+        a view. In the time of view creation we can't use the MERGE algorithm,
+        therefore if 'tables' is itself a view, it is represented by a
+        temporary table. Thus in this case we can be sure that 'item' is an
+        Item_field.
+      */
+      if (any_privileges)
       {
-        Item *not_used_item;
-        uint not_used_field_index= NO_CACHED_FIELD_INDEX;
-        const char *field_name= iterator->name();
-        /* Skip duplicate field names if NATURAL JOIN is used */
-        if (!natural_join_table ||
-            !find_field_in_table(thd, natural_join_table, field_name,
-                                 field_name,
-                                 strlen(field_name), &not_used_item, 0, 0, 0,
-                                 &not_used_field_index, TRUE))
+        DBUG_ASSERT(tables->field_translation == NULL && table ||
+                    tables->is_natural_join);
+        DBUG_ASSERT(item->type() == Item::FIELD_ITEM);
+        Item_field *fld= (Item_field*) item;
+        const char *table_name= field_iterator.table_name();
+
+        if (!tables->schema_table && 
+            !(fld->have_privileges=
+              (get_column_grant(thd, field_iterator.grant(),
+                                field_iterator.db_name(),
+                                table_name, fld->field_name) &
+               VIEW_ANY_ACL)))
         {
-          Item *item= iterator->create_item(thd);
-          if (!item)
-            goto err;
-          thd->used_tables|= item->used_tables();
-          if (!found++)
-            (void) it->replace(item);		// Replace '*'
-          else
-            it->after(item);
-#ifndef NO_EMBEDDED_ACCESS_CHECKS
-          if (any_privileges)
-          {
-            /*
-              In time of view creation MEGRGE algorithm for underlying
-              VIEWs can't be used => it should be Item_field
-            */
-            DBUG_ASSERT(item->type() == Item::FIELD_ITEM);
-            Item_field *fld= (Item_field*)item;
-            char *db, *tab;
-            if (tables->view)
-            {
-              db= tables->view_db.str;
-              tab= tables->view_name.str;
-            }
-            else
-            {
-              db= tables->db;
-              tab= tables->table_name;
-            }
-            if (!tables->schema_table && 
-                !(fld->have_privileges= (get_column_grant(thd,
-                                                          &table->grant,
-                                                          db,
-                                                          tab,
-                                                          fld->field_name) &
-                                         VIEW_ANY_ACL)))
-            {
-              my_error(ER_COLUMNACCESS_DENIED_ERROR, MYF(0),
-                       "ANY",
-                       thd->priv_user,
-                       thd->host_or_ip,
-                       fld->field_name,
-                       tab);
-              goto err;
-            }
-          }
-#endif
+          my_error(ER_COLUMNACCESS_DENIED_ERROR, MYF(0), "ANY",
+                   thd->priv_user, thd->host_or_ip,
+                   fld->field_name, table_name);
+          DBUG_RETURN(TRUE);
         }
-        if ((field= iterator->field()))
+      }
+#endif
+
+      if ((field= field_iterator.field()))
+      {
+        /*
+          Mark if field used before in this select.
+          Used by 'insert' to verify if a field name is used twice.
+        */
+        if (field->query_id == thd->query_id)
+          thd->dupp_field= field;
+        field->query_id= thd->query_id;
+
+        if (table)
+          table->used_keys.intersect(field->part_of_key);
+
+        if (tables->is_natural_join)
         {
+          bool is_created;
+          TABLE *field_table;
           /*
-            Mark if field used before in this select.
-            Used by 'insert' to verify if a field name is used twice
+            In this case we are sure that the column ref will not be created
+            because it was already created and stored with the natural join.
           */
-          if (field->query_id == thd->query_id)
-            thd->dupp_field=field;
-          field->query_id=thd->query_id;
-          table->used_keys.intersect(field->part_of_key);
-        }
-        else
-        {
-          Item *item= ((Field_iterator_view *) iterator)->item();
-          item->walk(&Item::reset_query_id_processor,
-                     (byte *)(&thd->query_id));
+          Natural_join_column *nj_col;
+          if (!(nj_col= field_iterator.get_or_create_column_ref(thd,
+                                                                &is_created)))
+            DBUG_RETURN(TRUE);
+          DBUG_ASSERT(nj_col->table_field && !is_created);
+          field_table= nj_col->table_ref->table;
+          if (field_table)
+          {
+            thd->used_tables|= field_table->map;
+            field_table->used_keys.intersect(field->part_of_key);
+            field_table->used_fields++;
+          }
         }
       }
-      /*
-	All fields are used in case if usual tables (in case of view used
-	fields marked in setup_tables during fix_fields of view columns
-      */
-      if (table)
-	table->used_fields= table->s->fields;
+      else
+      {
+        thd->used_tables|= item->used_tables();
+        item->walk(&Item::reset_query_id_processor,
+                   (byte *)(&thd->query_id));
+      }
     }
+    /*
+      In case of stored tables, all fields are considered as used,
+      while in the case of views, the fields considered as used are the
+      ones marked in setup_tables during fix_fields of view columns.
+      For NATURAL joins, used_tables is updated in the IF above.
+    */
+    if (table)
+      table->used_fields= table->s->fields;
   }
   if (found)
-    DBUG_RETURN(0);
+    DBUG_RETURN(FALSE);
 
+  /*
+    TODO: in the case when we skipped all columns because there was a
+    qualified '*', and all columns were coalesced, we have to give a more
+    meaningful message than ER_BAD_TABLE_ERROR.
+  */
   if (!table_name)
     my_message(ER_NO_TABLES_USED, ER(ER_NO_TABLES_USED), MYF(0));
   else
     my_error(ER_BAD_TABLE_ERROR, MYF(0), table_name);
-err:
-  DBUG_RETURN(1);
+
+  DBUG_RETURN(TRUE);
 }
 
 
 /*
-  Fix all conditions and outer join expressions
+  Fix all conditions and outer join expressions.
 
   SYNOPSIS
     setup_conds()
     thd     thread handler
-    leaves  list of leaves of join table tree
+    tables  list of tables for name resolving (select_lex->table_list)
+    leaves  list of leaves of join table tree (select_lex->leaf_tables)
+    conds   WHERE clause
+
+  DESCRIPTION
+    TODO
+
+  RETURN
+    TRUE  if some error occured (e.g. out of memory)
+    FALSE if all is OK
 */
 
 int setup_conds(THD *thd, TABLE_LIST *tables, TABLE_LIST *leaves,
@@ -3624,6 +4539,7 @@ int setup_conds(THD *thd, TABLE_LIST *tables, TABLE_LIST *leaves,
     arena= 0;                                   // For easier test
 
   thd->set_query_id=1;
+  select_lex->cond_count= 0;
 
   for (table= tables; table; table= table->next_local)
   {
@@ -3631,7 +4547,6 @@ int setup_conds(THD *thd, TABLE_LIST *tables, TABLE_LIST *leaves,
       goto err_no_arena;
   }
 
-  select_lex->cond_count= 0;
   if (*conds)
   {
     thd->where="where clause";
@@ -3640,11 +4555,14 @@ int setup_conds(THD *thd, TABLE_LIST *tables, TABLE_LIST *leaves,
       goto err_no_arena;
   }
 
-  /* Check if we are using outer joins */
+  /*
+    Apply fix_fields() to all ON clauses at all levels of nesting,
+    including the ones inside view definitions.
+  */
   for (table= leaves; table; table= table->next_leaf)
   {
-    TABLE_LIST *embedded;
-    TABLE_LIST *embedding= table;
+    TABLE_LIST *embedded; /* The table at the current level of nesting. */
+    TABLE_LIST *embedding= table; /* The parent nested table reference. */
     do
     {
       embedded= embedding;
@@ -3658,144 +4576,6 @@ int setup_conds(THD *thd, TABLE_LIST *tables, TABLE_LIST *leaves,
 	  goto err_no_arena;
         select_lex->cond_count++;
       }
-
-      if (embedded->natural_join)
-      {
-        /* Make a join of all fields wich have the same name */
-        TABLE_LIST *tab1= embedded;
-        TABLE_LIST *tab2= embedded->natural_join;
-        if (!(embedded->outer_join & JOIN_TYPE_RIGHT))
-        {
-          while (tab1->nested_join)
-          {
-            TABLE_LIST *next;
-            List_iterator_fast<TABLE_LIST> it(tab1->nested_join->join_list);
-            tab1= it++;
-            while ((next= it++))
-              tab1= next;
-          }
-        }
-        else
-        {
-          while (tab1->nested_join)
-            tab1= tab1->nested_join->join_list.head();
-        }
-        if (embedded->outer_join & JOIN_TYPE_RIGHT)
-        {
-          while (tab2->nested_join)
-          {
-            TABLE_LIST *next;
-            List_iterator_fast<TABLE_LIST> it(tab2->nested_join->join_list);
-            tab2= it++;
-            while ((next= it++))
-              tab2= next;
-          }
-        }
-        else
-        {
-          while (tab2->nested_join)
-            tab2= tab2->nested_join->join_list.head();
-        }
-
-        if (arena)
-	  arena= thd->change_arena_if_needed(&backup);
-
-        TABLE *t1=tab1->table;
-        TABLE *t2=tab2->table;
-        Field_iterator_table table_iter;
-        Field_iterator_view view_iter;
-        Field_iterator *iterator;
-        Field *t1_field, *t2_field;
-        Item *item_t2= 0;
-        Item_cond_and *cond_and= new Item_cond_and();
-
-        if (!cond_and)				// If not out of memory
-	  goto err_no_arena;
-        cond_and->top_level_item();
-
-        if (table->field_translation)
-        {
-          iterator= &view_iter;
-          view_iter.set(tab1);
-        }
-        else
-        {
-          iterator= &table_iter;
-          table_iter.set(tab1);
-        }
-
-        for (; !iterator->end_of_fields(); iterator->next())
-        {
-          const char *t1_field_name= iterator->name();
-          uint not_used_field_index= NO_CACHED_FIELD_INDEX;
-
-          if ((t2_field= find_field_in_table(thd, tab2, t1_field_name,
-                                             t1_field_name,
-                                             strlen(t1_field_name), &item_t2,
-                                             0, 0, 0,
-                                             &not_used_field_index,
-                                             FALSE)))
-          {
-            if (t2_field != view_ref_found)
-            {
-              if (!(item_t2= new Item_field(thd, &select_lex->context,
-                                            t2_field)))
-                goto err;
-              /* Mark field used for table cache */
-              t2_field->query_id= thd->query_id;
-              t2->used_keys.intersect(t2_field->part_of_key);
-            }
-            if ((t1_field= iterator->field()))
-            {
-              /* Mark field used for table cache */
-              t1_field->query_id= thd->query_id;
-              t1->used_keys.intersect(t1_field->part_of_key);
-            }
-            Item_func_eq *tmp= new Item_func_eq(iterator->create_item(thd),
-                                                item_t2);
-            if (!tmp)
-              goto err;
-            cond_and->list.push_back(tmp);
-          }
-        }
-        select_lex->cond_count+= cond_and->list.elements;
-
-        // to prevent natural join processing during PS re-execution
-        embedding->natural_join= 0;
-
-        if (cond_and->list.elements)
-        {
-          COND *on_expr= cond_and;
-          if (!on_expr->fixed)
-            on_expr->fix_fields(thd, &on_expr);
-          if (!embedded->outer_join)			// Not left join
-          {
-            *conds= and_conds(*conds, cond_and);
-            // fix_fields() should be made with temporary memory pool
-            if (arena)
-              thd->restore_backup_item_arena(arena, &backup);
-            if (*conds && !(*conds)->fixed)
-            {
-              if ((*conds)->fix_fields(thd, conds))
-                goto err_no_arena;
-            }
-          }
-          else
-          {
-            embedded->on_expr= and_conds(embedded->on_expr, cond_and);
-            // fix_fields() should be made with temporary memory pool
-            if (arena)
-              thd->restore_backup_item_arena(arena, &backup);
-            if (embedded->on_expr && !embedded->on_expr->fixed)
-            {
-              if (embedded->on_expr->fix_fields(thd, &embedded->on_expr))
-                goto err_no_arena;
-            }
-          }
-        }
-        else if (arena)
-	  thd->restore_backup_item_arena(arena, &backup);
-      }
       embedding= embedded->embedding;
     }
     while (embedding &&
@@ -4082,6 +4862,9 @@ void flush_tables()
   The table will be closed (not stored in cache) by the current thread when
   close_thread_tables() is called.
 
+  PREREQUISITES
+    Lock on LOCK_open()
+
   RETURN
     0  This thread now have exclusive access to this table and no other thread
        can access the table until close_thread_tables() is called.
@@ -4097,6 +4880,7 @@ bool remove_table_from_cache(THD *thd, const char *db, const char *table_name,
   bool result=0, signalled= 0;
   DBUG_ENTER("remove_table_from_cache");
 
+
   key_length=(uint) (strmov(strmov(key,db)+1,table_name)-key)+1;
   for (;;)
   {
@@ -4154,15 +4938,12 @@ bool remove_table_from_cache(THD *thd, const char *db, const char *table_name,
     {
       if (!(flags & RTFC_CHECK_KILLED_FLAG) || !thd->killed)
       {
+        dropping_tables++;
         if (likely(signalled))
-        {
-          dropping_tables++;
           (void) pthread_cond_wait(&COND_refresh, &LOCK_open);
-          dropping_tables--;
-          continue;
-        }
         else
         {
+          struct timespec abstime;
           /*
             It can happen that another thread has opened the
             table but has not yet locked any table at all. Since
@@ -4173,11 +4954,11 @@ bool remove_table_from_cache(THD *thd, const char *db, const char *table_name,
             and then we retry another loop in the
             remove_table_from_cache routine.
           */
-          pthread_mutex_unlock(&LOCK_open);
-          my_sleep(10);
-          pthread_mutex_lock(&LOCK_open);
-          continue;
+          set_timespec(abstime, 10);
+          pthread_cond_timedwait(&COND_refresh, &LOCK_open, &abstime);
         }
+        dropping_tables--;
+        continue;
       }
     }
     break;
@@ -4257,7 +5038,7 @@ open_new_frm(const char *path, const char *alias,
 
   if ((parser= sql_parse_prepare(&pathstr, mem_root, 1)))
   {
-    if (!strncmp("VIEW", parser->type()->str, parser->type()->length))
+    if (is_equal(&view_type, parser->type()))
     {
       if (table_desc == 0 || table_desc->required_type == FRMTYPE_TABLE)
       {
@@ -4280,3 +5061,9 @@ err:
   bzero(outparam, sizeof(TABLE));	// do not run repair
   DBUG_RETURN(1);
 }
+
+
+bool is_equal(const LEX_STRING *a, const LEX_STRING *b)
+{
+  return a->length == b->length && !strncmp(a->str, b->str, a->length);
+}
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index 3d2d776f74e3555303c3b86309b64d19e1c7491e..0f4fdd52583a2deaf028703a4beee2d605469ce4 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -762,7 +762,7 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used)
   TABLE_COUNTER_TYPE local_tables;
   ulong tot_length;
   DBUG_ENTER("Query_cache::store_query");
-  if (query_cache_size == 0)
+  if (query_cache_size == 0 || thd->locked_tables)
     DBUG_VOID_RETURN;
   uint8 tables_type= 0;
 
@@ -774,10 +774,11 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used)
     Query_cache_query_flags flags;
     // fill all gaps between fields with 0 to get repeatable key
     bzero(&flags, QUERY_CACHE_FLAGS_SIZE);
-    flags.client_long_flag= (thd->client_capabilities & CLIENT_LONG_FLAG ?
-			     1 : 0);
-    flags.client_protocol_41= (thd->client_capabilities & CLIENT_PROTOCOL_41 ?
-			     1 : 0);
+    flags.client_long_flag= test(thd->client_capabilities & CLIENT_LONG_FLAG);
+    flags.client_protocol_41= test(thd->client_capabilities &
+                                   CLIENT_PROTOCOL_41);
+    flags.more_results_exists= test(thd->server_status &
+                                    SERVER_MORE_RESULTS_EXISTS);
     flags.character_set_client_num=
       thd->variables.character_set_client->number;
     flags.character_set_results_num=
@@ -791,6 +792,20 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used)
     flags.sql_mode= thd->variables.sql_mode;
     flags.max_sort_length= thd->variables.max_sort_length;
     flags.group_concat_max_len= thd->variables.group_concat_max_len;
+    DBUG_PRINT("qcache", ("long %d, 4.1: %d, more results %d, \
+CS client: %u, CS result: %u, CS conn: %u, limit: %lu, TZ: 0x%lx, \
+sql mode: 0x%lx, sort len: %lu, conncat len: %lu",
+                          (int)flags.client_long_flag,
+                          (int)flags.client_protocol_41,
+                          (int)flags.more_results_exists,
+                          flags.character_set_client_num,
+                          flags.character_set_results_num,
+                          flags.collation_connection_num,
+                          flags.limit,
+                          (ulong)flags.time_zone,
+                          flags.sql_mode,
+                          flags.max_sort_length,
+                          flags.group_concat_max_len));
     STRUCT_LOCK(&structure_guard_mutex);
 
     if (query_cache_size == 0)
@@ -921,8 +936,8 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length)
   Query_cache_query_flags flags;
   DBUG_ENTER("Query_cache::send_result_to_client");
 
-  if (query_cache_size == 0 || thd->variables.query_cache_type == 0)
-
+  if (query_cache_size == 0 || thd->locked_tables ||
+      thd->variables.query_cache_type == 0)
     goto err;
 
   /* Check that we haven't forgot to reset the query cache variables */
@@ -973,10 +988,11 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length)
 
   // fill all gaps between fields with 0 to get repeatable key
   bzero(&flags, QUERY_CACHE_FLAGS_SIZE);
-  flags.client_long_flag= (thd->client_capabilities & CLIENT_LONG_FLAG ?
-			   1 : 0);
-  flags.client_protocol_41= (thd->client_capabilities & CLIENT_PROTOCOL_41 ?
-                           1 : 0);
+  flags.client_long_flag= test(thd->client_capabilities & CLIENT_LONG_FLAG);
+  flags.client_protocol_41= test(thd->client_capabilities &
+                                 CLIENT_PROTOCOL_41);
+  flags.more_results_exists= test(thd->server_status &
+                                  SERVER_MORE_RESULTS_EXISTS);
   flags.character_set_client_num= thd->variables.character_set_client->number;
   flags.character_set_results_num=
     (thd->variables.character_set_results ?
@@ -988,6 +1004,20 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length)
   flags.sql_mode= thd->variables.sql_mode;
   flags.max_sort_length= thd->variables.max_sort_length;
   flags.group_concat_max_len= thd->variables.group_concat_max_len;
+  DBUG_PRINT("qcache", ("long %d, 4.1: %d, more results %d, \
+CS client: %u, CS result: %u, CS conn: %u, limit: %lu, TZ: 0x%lx, \
+sql mode: 0x%lx, sort len: %lu, conncat len: %lu",
+                          (int)flags.client_long_flag,
+                          (int)flags.client_protocol_41,
+                          (int)flags.more_results_exists,
+                          flags.character_set_client_num,
+                          flags.character_set_results_num,
+                          flags.collation_connection_num,
+                          flags.limit,
+                          (ulong)flags.time_zone,
+                          flags.sql_mode,
+                          flags.max_sort_length,
+                          flags.group_concat_max_len));
   memcpy((void *)(sql + (tot_length - QUERY_CACHE_FLAGS_SIZE)),
 	 &flags, QUERY_CACHE_FLAGS_SIZE);
   query_block = (Query_cache_block *)  hash_search(&queries, (byte*) sql,
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 89d5b543dfce9fe5e2b0150db5288e17287d5f70..d4f05456cad0e4fd615d72db850f50ee45f31562 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -157,8 +157,8 @@ bool foreign_key_prefix(Key *a, Key *b)
 ** Thread specific functions
 ****************************************************************************/
 
-Open_tables_state::Open_tables_state()
-  :version(refresh_version)
+Open_tables_state::Open_tables_state(ulong version_arg)
+  :version(version_arg)
 {
   reset_open_tables_state();
 }
@@ -172,9 +172,9 @@ Open_tables_state::Open_tables_state()
 
 THD::THD()
   :Statement(CONVENTIONAL_EXECUTION, 0, ALLOC_ROOT_MIN_BLOCK_SIZE, 0),
-   Open_tables_state(),
+   Open_tables_state(refresh_version),
    lock_id(&main_lock_id),
-   user_time(0), global_read_lock(0), is_fatal_error(0),
+   user_time(0), in_sub_stmt(0), global_read_lock(0), is_fatal_error(0),
    rand_used(0), time_zone_used(0),
    last_insert_id_used(0), insert_id_used(0), clear_next_insert_id(0),
    in_lock_tables(0), bootstrap(0), derived_tables_processing(FALSE),
@@ -323,7 +323,8 @@ void THD::init_for_queries()
                       variables.trans_alloc_block_size,
                       variables.trans_prealloc_size);
 #endif
-  transaction.xid.null();
+  transaction.xid_state.xid.null();
+  transaction.xid_state.in_thd=1;
 }
 
 
@@ -358,9 +359,15 @@ void THD::cleanup(void)
 {
   DBUG_ENTER("THD::cleanup");
 #ifdef ENABLE_WHEN_BINLOG_WILL_BE_ABLE_TO_PREPARE
-  if (transaction.xa_state != XA_PREPARED)
+  if (transaction.xid_state.xa_state == XA_PREPARED)
+  {
+#error xid_state in the cache should be replaced by the allocated value
+  }
 #endif
+  {
     ha_rollback(this);
+    xid_cache_delete(&transaction.xid_state);
+  }
   if (locked_tables)
   {
     lock=locked_tables; locked_tables=0;
@@ -523,6 +530,10 @@ bool THD::store_globals()
     if this is the slave SQL thread.
   */
   variables.pseudo_thread_id= thread_id;
+  /*
+    We have to call thr_lock_info_init() again here as THD may have been
+    created in another thread
+  */
   thr_lock_info_init(&lock_info);
   return 0;
 }
@@ -1809,31 +1820,195 @@ void THD::set_status_var_init()
   access to mysql.proc table to find definitions of stored routines.
 ****************************************************************************/
 
-bool THD::push_open_tables_state()
+void THD::reset_n_backup_open_tables_state(Open_tables_state *backup)
 {
-  Open_tables_state *state;
-  DBUG_ENTER("push_open_table_state");
-  /* Currently we only push things one level */
-  DBUG_ASSERT(open_state_list.elements == 0);
-
-  if (!(state= (Open_tables_state*) alloc(sizeof(*state))))
-    DBUG_RETURN(1);                             // Fatal error is set
-  /* Store state for currently open tables */
-  state->set_open_tables_state(this);
-  if (open_state_list.push_back(state, mem_root))
-    DBUG_RETURN(1);                             // Fatal error is set
+  DBUG_ENTER("reset_n_backup_open_tables_state");
+  backup->set_open_tables_state(this);
   reset_open_tables_state();
-  DBUG_RETURN(0);
+  DBUG_VOID_RETURN;
 }
 
-void THD::pop_open_tables_state()
-{
-  Open_tables_state *state;
-  DBUG_ENTER("pop_open_table_state");
-  /* Currently we only push things one level */
-  DBUG_ASSERT(open_state_list.elements == 1);
 
-  state= open_state_list.pop();
-  set_open_tables_state(state);
+void THD::restore_backup_open_tables_state(Open_tables_state *backup)
+{
+  DBUG_ENTER("restore_backup_open_tables_state");
+  /*
+    Before we will throw away current open tables state we want
+    to be sure that it was properly cleaned up.
+  */
+  DBUG_ASSERT(open_tables == 0 && temporary_tables == 0 &&
+              handler_tables == 0 && derived_tables == 0 &&
+              lock == 0 && locked_tables == 0 &&
+              prelocked_mode == NON_PRELOCKED);
+  set_open_tables_state(backup);
   DBUG_VOID_RETURN;
 }
+
+
+
+/****************************************************************************
+  Handling of statement states in functions and triggers.
+
+  This is used to ensure that the function/trigger gets a clean state
+  to work with and does not cause any side effects of the calling statement.
+
+  It also allows most stored functions and triggers to replicate even
+  if they are used items that would normally be stored in the binary
+  replication (like last_insert_id() etc...)
+
+  The following things is done
+  - Disable binary logging for the duration of the statement
+  - Disable multi-result-sets for the duration of the statement
+  - Value of last_insert_id() is reset and restored
+  - Value set by 'SET INSERT_ID=#' is reset and restored
+  - Value for found_rows() is reset and restored
+  - examined_row_count is added to the total
+  - cuted_fields is added to the total
+
+  NOTES:
+    Seed for random() is saved for the first! usage of RAND()
+    We reset examined_row_count and cuted_fields and add these to the
+    result to ensure that if we have a bug that would reset these within
+    a function, we are not loosing any rows from the main statement.
+****************************************************************************/
+
+void THD::reset_sub_statement_state(Sub_statement_state *backup,
+                                    uint new_state)
+{
+  backup->options=         options;
+  backup->in_sub_stmt=     in_sub_stmt;
+  backup->no_send_ok=      net.no_send_ok;
+  backup->enable_slow_log= enable_slow_log;
+  backup->last_insert_id=  last_insert_id;
+  backup->next_insert_id=  next_insert_id;
+  backup->insert_id_used=  insert_id_used;
+  backup->limit_found_rows= limit_found_rows;
+  backup->examined_row_count= examined_row_count;
+  backup->sent_row_count=   sent_row_count;
+  backup->cuted_fields=     cuted_fields;
+  backup->client_capabilities= client_capabilities;
+
+  options&= ~OPTION_BIN_LOG;
+  /* Disable result sets */
+  client_capabilities &= ~CLIENT_MULTI_RESULTS;
+  in_sub_stmt|= new_state;
+  last_insert_id= 0;
+  next_insert_id= 0;
+  insert_id_used= 0;
+  examined_row_count= 0;
+  sent_row_count= 0;
+  cuted_fields= 0;
+
+#ifndef EMBEDDED_LIBRARY
+  /* Surpress OK packets in case if we will execute statements */
+  net.no_send_ok= TRUE;
+#endif
+}
+
+
+void THD::restore_sub_statement_state(Sub_statement_state *backup)
+{
+  options=          backup->options;
+  in_sub_stmt=      backup->in_sub_stmt;
+  net.no_send_ok=   backup->no_send_ok;
+  enable_slow_log=  backup->enable_slow_log;
+  last_insert_id=   backup->last_insert_id;
+  next_insert_id=   backup->next_insert_id;
+  insert_id_used=   backup->insert_id_used;
+  limit_found_rows= backup->limit_found_rows;
+  sent_row_count=   backup->sent_row_count;
+  client_capabilities= backup->client_capabilities;
+
+  /*
+    The following is added to the old values as we are interested in the
+    total complexity of the query
+  */
+  examined_row_count+= backup->examined_row_count;
+  cuted_fields+=       backup->cuted_fields;
+}
+
+
+/***************************************************************************
+  Handling of XA id cacheing
+***************************************************************************/
+
+pthread_mutex_t LOCK_xid_cache;
+HASH xid_cache;
+
+static byte *xid_get_hash_key(const byte *ptr,uint *length,
+                                  my_bool not_used __attribute__((unused)))
+{
+  *length=((XID_STATE*)ptr)->xid.length();
+  return (byte *)&((XID_STATE*)ptr)->xid;
+}
+
+static void xid_free_hash (void *ptr)
+{
+  if (!((XID_STATE*)ptr)->in_thd)
+    my_free((byte *)ptr, MYF(0));
+}
+
+bool xid_cache_init()
+{
+  pthread_mutex_init(&LOCK_xid_cache, MY_MUTEX_INIT_FAST);
+  return hash_init(&xid_cache, &my_charset_bin, 100, 0, 0,
+                   xid_get_hash_key, xid_free_hash, 0) != 0;
+}
+
+void xid_cache_free()
+{
+  if (hash_inited(&xid_cache))
+  {
+    hash_free(&xid_cache);
+    pthread_mutex_destroy(&LOCK_xid_cache);
+  }
+}
+
+XID_STATE *xid_cache_search(XID *xid)
+{
+  pthread_mutex_lock(&LOCK_xid_cache);
+  XID_STATE *res=(XID_STATE *)hash_search(&xid_cache, (byte *)xid, xid->length());
+  pthread_mutex_unlock(&LOCK_xid_cache);
+  return res;
+}
+
+
+bool xid_cache_insert(XID *xid, enum xa_states xa_state)
+{
+  XID_STATE *xs;
+  my_bool res;
+  pthread_mutex_lock(&LOCK_xid_cache);
+  if (hash_search(&xid_cache, (byte *)xid, xid->length()))
+    res=0;
+  else if (!(xs=(XID_STATE *)my_malloc(sizeof(*xs), MYF(MY_WME))))
+    res=1;
+  else
+  {
+    xs->xa_state=xa_state;
+    xs->xid.set(xid);
+    xs->in_thd=0;
+    res=my_hash_insert(&xid_cache, (byte*)xs);
+  }
+  pthread_mutex_unlock(&LOCK_xid_cache);
+  return res;
+}
+
+
+bool xid_cache_insert(XID_STATE *xid_state)
+{
+  pthread_mutex_lock(&LOCK_xid_cache);
+  DBUG_ASSERT(hash_search(&xid_cache, (byte *)&xid_state->xid,
+                          xid_state->xid.length())==0);
+  my_bool res=my_hash_insert(&xid_cache, (byte*)xid_state);
+  pthread_mutex_unlock(&LOCK_xid_cache);
+  return res;
+}
+
+
+void xid_cache_delete(XID_STATE *xid_state)
+{
+  pthread_mutex_lock(&LOCK_xid_cache);
+  hash_delete(&xid_cache, (byte *)xid_state);
+  pthread_mutex_unlock(&LOCK_xid_cache);
+}
+
diff --git a/sql/sql_class.h b/sql/sql_class.h
index d6847f5fb3572f6b28baf8c2cc5e73dbcd82b133..a8d45a3a6b4b08206b2ed4008d113808f5a017ca 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -351,8 +351,6 @@ public:
   inline uint32 get_open_count() { return open_count; }
 };
 
-/* character conversion tables */
-
 
 typedef struct st_copy_info {
   ha_rows records;
@@ -564,11 +562,11 @@ struct system_variables
   my_bool ndb_use_transactions;
 #endif /* HAVE_NDBCLUSTER_DB */
   my_bool old_passwords;
-  
+
   /* Only charset part of these variables is sensible */
-  CHARSET_INFO 	*character_set_client;
+  CHARSET_INFO  *character_set_client;
   CHARSET_INFO  *character_set_results;
-  
+
   /* Both charset and collation parts of these variables are important */
   CHARSET_INFO	*collation_server;
   CHARSET_INFO	*collation_database;
@@ -631,7 +629,7 @@ typedef struct system_status_var
   ulong filesort_range_count;
   ulong filesort_rows;
   ulong filesort_scan_count;
-  /* Ppepared statements and binary protocol */
+  /* Prepared statements and binary protocol */
   ulong com_stmt_prepare;
   ulong com_stmt_execute;
   ulong com_stmt_send_long_data;
@@ -656,8 +654,8 @@ void free_tmp_table(THD *thd, TABLE *entry);
 /* The following macro is to make init of Query_arena simpler */
 #ifndef DBUG_OFF
 #define INIT_ARENA_DBUG_INFO is_backup_arena= 0
-#else 
-#define INIT_ARENA_DBUG_INFO  
+#else
+#define INIT_ARENA_DBUG_INFO
 #endif
 
 
@@ -925,6 +923,22 @@ struct st_savepoint {
 enum xa_states {XA_NOTR=0, XA_ACTIVE, XA_IDLE, XA_PREPARED};
 extern const char *xa_state_names[];
 
+typedef struct st_xid_state {
+  /* For now, this is only used to catch duplicated external xids */
+  XID  xid;                           // transaction identifier
+  enum xa_states xa_state;            // used by external XA only
+  bool in_thd;
+} XID_STATE;
+
+extern pthread_mutex_t LOCK_xid_cache;
+extern HASH xid_cache;
+bool xid_cache_init(void);
+void xid_cache_free(void);
+XID_STATE *xid_cache_search(XID *xid);
+bool xid_cache_insert(XID *xid, enum xa_states xa_state);
+bool xid_cache_insert(XID_STATE *xid_state);
+void xid_cache_delete(XID_STATE *xid_state);
+
 /*
   A registry for item tree transformations performed during
   query optimization. We register only those changes which require
@@ -946,7 +960,7 @@ enum prelocked_mode_type {NON_PRELOCKED= 0, PRELOCKED= 1,
 
 
 /*
-  Class that holds information about tables which were open and locked
+  Class that holds information about tables which were opened and locked
   by the thread. It is also used to save/restore this information in
   push_open_tables_state()/pop_open_tables_state().
 */
@@ -1009,7 +1023,13 @@ public:
   ulong	version;
   uint current_tablenr;
 
-  Open_tables_state();
+  /*
+    This constructor serves for creation of Open_tables_state instances
+    which are used as backup storage.
+  */
+  Open_tables_state() {};
+
+  Open_tables_state(ulong version_arg);
 
   void set_open_tables_state(Open_tables_state *state)
   {
@@ -1025,6 +1045,27 @@ public:
 };
 
 
+/* class to save context when executing a function or trigger */
+
+/* Defines used for Sub_statement_state::in_sub_stmt */
+
+#define SUB_STMT_TRIGGER 1
+#define SUB_STMT_FUNCTION 2
+
+class Sub_statement_state
+{
+public:
+  ulonglong options;
+  ulonglong last_insert_id, next_insert_id;
+  ulonglong limit_found_rows;
+  ha_rows    cuted_fields, sent_row_count, examined_row_count;
+  ulong client_capabilities;
+  uint in_sub_stmt;
+  bool enable_slow_log, insert_id_used;
+  my_bool no_send_ok;
+};
+
+
 /*
   For each client connection we create a separate thread with THD serving as
   a thread/connection descriptor
@@ -1062,7 +1103,7 @@ public:
                                         // the lock_id of a cursor.
   pthread_mutex_t LOCK_delete;		// Locked before thd is deleted
   /* all prepared statements and cursors of this connection */
-  Statement_map stmt_map; 
+  Statement_map stmt_map;
   /*
     A pointer to the stack frame of handle_one_connection(),
     which is called first in the thread for handling a client
@@ -1131,7 +1172,10 @@ public:
   time_t     connect_time,thr_create_time; // track down slow pthread_create
   thr_lock_type update_lock_default;
   delayed_insert *di;
-  my_bool    tablespace_op;	/* This is TRUE in DISCARD/IMPORT TABLESPACE */
+
+  /* <> 0 if we are inside of trigger or stored function. */
+  uint in_sub_stmt;
+
   /* container for handler's private per-connection data */
   void *ha_data[MAX_HA];
   struct st_transactions {
@@ -1139,10 +1183,7 @@ public:
     THD_TRANS all;			// Trans since BEGIN WORK
     THD_TRANS stmt;			// Trans for current statement
     bool on;                            // see ha_enable_transaction()
-    /* TRUE if we are inside of trigger or stored function. */
-    bool in_sub_stmt;
-    XID  xid;                           // transaction identifier
-    enum xa_states xa_state;            // used by external XA only
+    XID_STATE xid_state;
     /*
        Tables changed in transaction (that must be invalidated in query cache).
        List contain only transactional tables, that not invalidated in query
@@ -1162,7 +1203,7 @@ public:
     st_transactions()
     {
       bzero((char*)this, sizeof(*this));
-      xid.null();
+      xid_state.xid.null();
       init_sql_alloc(&mem_root, ALLOC_ROOT_MIN_BLOCK_SIZE, 0);
     }
 #endif
@@ -1215,8 +1256,16 @@ public:
   */
   ulonglong  current_insert_id;
   ulonglong  limit_found_rows;
+  ulonglong  options;           /* Bitmap of states */
+  longlong   row_count_func;	/* For the ROW_COUNT() function */
   ha_rows    cuted_fields,
              sent_row_count, examined_row_count;
+  /*
+    The set of those tables whose fields are referenced in all subqueries
+    of the query.
+    TODO: possibly this it is incorrect to have used tables in THD because
+    with more than one subquery, it is not clear what does the field mean.
+  */
   table_map  used_tables;
   USER_CONN *user_connect;
   CHARSET_INFO *db_charset;
@@ -1229,7 +1278,6 @@ public:
   List	     <MYSQL_ERROR> warn_list;
   uint	     warn_count[(uint) MYSQL_ERROR::WARN_LEVEL_END];
   uint	     total_warn_count;
-  List	     <Open_tables_state> open_state_list;
   /*
     Id of current query. Statement can be reused to execute several queries
     query_id is global in context of the whole MySQL server.
@@ -1239,7 +1287,7 @@ public:
     update auto-updatable fields (like auto_increment and timestamp).
   */
   query_id_t query_id, warn_id;
-  ulong	     options, thread_id, col_access;
+  ulong      thread_id, col_access;
 
   /* Statement id is thread-wide. This counter is used to generate ids */
   ulong      statement_id_counter;
@@ -1279,7 +1327,8 @@ public:
   bool	     no_warnings_for_error; /* no warnings on call to my_error() */
   /* set during loop of derived table processing */
   bool       derived_tables_processing;
-  longlong   row_count_func;	/* For the ROW_COUNT() function */
+  my_bool    tablespace_op;	/* This is TRUE in DISCARD/IMPORT TABLESPACE */
+
   sp_rcontext *spcont;		// SP runtime context
   sp_cache   *sp_proc_cache;
   sp_cache   *sp_func_cache;
@@ -1485,13 +1534,15 @@ public:
   void set_status_var_init();
   bool is_context_analysis_only()
     { return current_arena->is_stmt_prepare() || lex->view_prepare_mode; }
-  bool push_open_tables_state();
-  void pop_open_tables_state();
+  void reset_n_backup_open_tables_state(Open_tables_state *backup);
+  void restore_backup_open_tables_state(Open_tables_state *backup);
+  void reset_sub_statement_state(Sub_statement_state *backup, uint new_state);
+  void restore_sub_statement_state(Sub_statement_state *backup);
 };
 
 
 #define tmp_disable_binlog(A)       \
-  {ulong tmp_disable_binlog__save_options= (A)->options; \
+  {ulonglong tmp_disable_binlog__save_options= (A)->options; \
   (A)->options&= ~OPTION_BIN_LOG
 
 #define reenable_binlog(A)   (A)->options= tmp_disable_binlog__save_options;}
@@ -1558,6 +1609,7 @@ public:
     statement/stored procedure.
   */
   virtual void cleanup();
+  void set_thd(THD *thd_arg) { thd= thd_arg; }
 };
 
 
@@ -1710,8 +1762,8 @@ public:
 
   TMP_TABLE_PARAM()
     :copy_field(0), group_parts(0),
-    group_length(0), group_null_parts(0), convert_blob_length(0),
-    schema_table(0)
+     group_length(0), group_null_parts(0), convert_blob_length(0),
+     schema_table(0)
   {}
   ~TMP_TABLE_PARAM()
   {
@@ -1913,14 +1965,13 @@ class multi_delete :public select_result_interceptor
 {
   TABLE_LIST *delete_tables, *table_being_deleted;
   Unique **tempfiles;
-  THD *thd;
   ha_rows deleted, found;
   uint num_of_tables;
   int error;
   bool do_delete, transactional_tables, normal_tables, delete_while_scanning;
 
 public:
-  multi_delete(THD *thd, TABLE_LIST *dt, uint num_of_tables);
+  multi_delete(TABLE_LIST *dt, uint num_of_tables);
   ~multi_delete();
   int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
   bool send_data(List<Item> &items);
@@ -1936,7 +1987,6 @@ class multi_update :public select_result_interceptor
   TABLE_LIST *all_tables; /* query/update command tables */
   TABLE_LIST *leaves;     /* list of leves of join table tree */
   TABLE_LIST *update_tables, *table_being_updated;
-  THD *thd;
   TABLE **tmp_tables, *main_table, *table_to_update;
   TMP_TABLE_PARAM *tmp_table_param;
   ha_rows updated, found;
@@ -1948,7 +1998,7 @@ class multi_update :public select_result_interceptor
   bool do_update, trans_safe, transactional_tables, ignore;
 
 public:
-  multi_update(THD *thd_arg, TABLE_LIST *ut, TABLE_LIST *leaves_list,
+  multi_update(TABLE_LIST *ut, TABLE_LIST *leaves_list,
 	       List<Item> *fields, List<Item> *values,
 	       enum_duplicates handle_duplicates, bool ignore);
   ~multi_update();
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index d110ff6f77891279719fcc1afcbf5972d803eb30..67fc1053774c4f4b45843ecd510835e6d61ad167 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -996,8 +996,9 @@ err:
 
   SYNOPSIS
     mysql_change_db()
-    thd		Thread handler
-    name	Databasename
+    thd			Thread handler
+    name		Databasename
+    no_access_check	True= don't do access check
 
   DESCRIPTION
     Becasue the database name may have been given directly from the
@@ -1009,15 +1010,16 @@ err:
     replication slave SQL thread (for that thread, setting of thd->db is done
     in ::exec_event() methods of log_event.cc).
 
-    This function does not send the error message to the client, if that
-    should be sent to the client, call net_send_error after this function 
+    This function does not send anything, including error messages to the
+    client, if that should be sent to the client, call net_send_error after
+    this function.
 
   RETURN VALUES
     0	ok
     1	error
 */
 
-bool mysql_change_db(THD *thd, const char *name)
+bool mysql_change_db(THD *thd, const char *name, bool no_access_check)
 {
   int length, db_length;
   char *dbname=my_strdup((char*) name,MYF(MY_WME));
@@ -1053,23 +1055,25 @@ bool mysql_change_db(THD *thd, const char *name)
   }
 
 #ifndef NO_EMBEDDED_ACCESS_CHECKS
-  if (test_all_bits(thd->master_access,DB_ACLS))
-    db_access=DB_ACLS;
-  else
-    db_access= (acl_get(thd->host,thd->ip, thd->priv_user,dbname,0) |
-		thd->master_access);
-  if (!(db_access & DB_ACLS) && (!grant_option || check_grant_db(thd,dbname)))
-  {
-    my_error(ER_DBACCESS_DENIED_ERROR, MYF(0),
-             thd->priv_user,
-             thd->priv_host,
-             dbname);
-    mysql_log.write(thd,COM_INIT_DB,ER(ER_DBACCESS_DENIED_ERROR),
-		    thd->priv_user,
-		    thd->priv_host,
-		    dbname);
-    my_free(dbname,MYF(0));
-    DBUG_RETURN(1);
+  if (!no_access_check) {
+    if (test_all_bits(thd->master_access,DB_ACLS))
+      db_access=DB_ACLS;
+    else
+      db_access= (acl_get(thd->host,thd->ip, thd->priv_user,dbname,0) |
+                  thd->master_access);
+    if (!(db_access & DB_ACLS) && (!grant_option || check_grant_db(thd,dbname)))
+    {
+      my_error(ER_DBACCESS_DENIED_ERROR, MYF(0),
+               thd->priv_user,
+               thd->priv_host,
+               dbname);
+      mysql_log.write(thd,COM_INIT_DB,ER(ER_DBACCESS_DENIED_ERROR),
+                      thd->priv_user,
+                      thd->priv_host,
+                      dbname);
+      my_free(dbname,MYF(0));
+      DBUG_RETURN(1);
+    }
   }
 #endif
   (void) sprintf(path,"%s/%s",mysql_data_home,dbname);
@@ -1083,12 +1087,12 @@ bool mysql_change_db(THD *thd, const char *name)
     DBUG_RETURN(1);
   }
 end:
-  send_ok(thd);
   x_free(thd->db);
   thd->db=dbname;				// THD::~THD will free this
   thd->db_length=db_length;
 #ifndef NO_EMBEDDED_ACCESS_CHECKS
-  thd->db_access=db_access;
+  if (!no_access_check)
+    thd->db_access=db_access;
 #endif
   if (schema_db)
   {
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index d83937098e26a79d6acb8ef0563d93675dca7cf0..35183fc959ba8e0f41118e400fb55e96a0082bfa 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -30,7 +30,7 @@
 #include "sql_trigger.h"
 
 bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
-                  SQL_LIST *order, ha_rows limit, ulong options)
+                  SQL_LIST *order, ha_rows limit, ulonglong options)
 {
   int		error;
   TABLE		*table;
@@ -301,6 +301,7 @@ bool mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds)
   DBUG_ENTER("mysql_prepare_delete");
 
   if (setup_tables(thd, &thd->lex->select_lex.context,
+                   &thd->lex->select_lex.top_join_list,
                    table_list, conds, &select_lex->leaf_tables,
                    FALSE) ||
       setup_conds(thd, table_list, select_lex->leaf_tables, conds) ||
@@ -359,6 +360,7 @@ bool mysql_multi_delete_prepare(THD *thd)
     lex->query_tables also point on local list of DELETE SELECT_LEX
   */
   if (setup_tables(thd, &thd->lex->select_lex.context,
+                   &thd->lex->select_lex.top_join_list,
                    lex->query_tables, &lex->select_lex.where,
                    &lex->select_lex.leaf_tables, FALSE))
     DBUG_RETURN(TRUE);
@@ -407,9 +409,8 @@ bool mysql_multi_delete_prepare(THD *thd)
 }
 
 
-multi_delete::multi_delete(THD *thd_arg, TABLE_LIST *dt,
-			   uint num_of_tables_arg)
-  : delete_tables(dt), thd(thd_arg), deleted(0), found(0),
+multi_delete::multi_delete(TABLE_LIST *dt, uint num_of_tables_arg)
+  : delete_tables(dt), deleted(0), found(0),
     num_of_tables(num_of_tables_arg), error(0),
     do_delete(0), transactional_tables(0), normal_tables(0)
 {
@@ -808,7 +809,7 @@ bool mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
       ha_enable_transaction(thd, FALSE);
       mysql_init_select(thd->lex);
       error= mysql_delete(thd, table_list, (COND*) 0, (SQL_LIST*) 0,
-			  HA_POS_ERROR, 0);
+			  HA_POS_ERROR, LL(0));
       ha_enable_transaction(thd, TRUE);
       thd->options= save_options;
       DBUG_RETURN(error);
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc
index fc9d15e94c49137615b331f6387996b9d704de07..7b9191cd841b248b04bbad0d0cb99d53e29d137c 100644
--- a/sql/sql_derived.cc
+++ b/sql/sql_derived.cc
@@ -125,6 +125,11 @@ int mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *orig_table_list)
     if ((res= unit->prepare(thd, derived_result, 0, orig_table_list->alias)))
       goto exit;
 
+    if (check_duplicate_names(unit->types, 0))
+    {
+      res= -1;
+      goto exit;
+    }
 
     derived_result->tmp_table_param.init();
     derived_result->tmp_table_param.field_count= unit->types.elements;
diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc
index e109600bcd04bc3f188084966c8c99798cc183ca..169132e2185159ca48d890497fff370cc1a7527d 100644
--- a/sql/sql_handler.cc
+++ b/sql/sql_handler.cc
@@ -187,7 +187,7 @@ bool mysql_ha_open(THD *thd, TABLE_LIST *tables, bool reopen)
 
   /* for now HANDLER can be used only for real TABLES */
   tables->required_type= FRMTYPE_TABLE;
-  error= open_tables(thd, &tables, &counter);
+  error= open_tables(thd, &tables, &counter, 0);
 
   HANDLER_TABLES_HACK(thd);
   if (error)
diff --git a/sql/sql_help.cc b/sql/sql_help.cc
index 6780beec258130a2946fa02d918b02b77db4576e..799758f7d1ec64b88c5f4d037a86477a0bdf89d8 100644
--- a/sql/sql_help.cc
+++ b/sql/sql_help.cc
@@ -75,7 +75,7 @@ enum enum_used_fields
 
   RETURN VALUES
     0           all ok
-    1           one of the fileds didn't finded
+    1           one of the fileds was not found
 */
 
 static bool init_fields(THD *thd, TABLE_LIST *tables,
@@ -90,7 +90,7 @@ static bool init_fields(THD *thd, TABLE_LIST *tables,
     Item_field *field= new Item_field(context,
                                       "mysql", find_fields->table_name,
                                       find_fields->field_name);
-    if (!(find_fields->field= find_field_in_tables(thd, field, tables,
+    if (!(find_fields->field= find_field_in_tables(thd, field, tables, NULL,
 						   0, REPORT_ALL_ERRORS, 1,
                                                    TRUE)))
       DBUG_RETURN(1);
@@ -623,43 +623,45 @@ bool mysqld_help(THD *thd, const char *mask)
   Protocol *protocol= thd->protocol;
   SQL_SELECT *select;
   st_find_field used_fields[array_elements(init_used_fields)];
-  DBUG_ENTER("mysqld_help");
-
   TABLE_LIST *leaves= 0;
   TABLE_LIST tables[4];
+  List<String> topics_list, categories_list, subcategories_list;
+  String name, description, example;
+  int count_topics, count_categories, error;
+  uint mlen= strlen(mask);
+  size_t i;
+  MEM_ROOT *mem_root= thd->mem_root;
+  DBUG_ENTER("mysqld_help");
+
   bzero((gptr)tables,sizeof(tables));
   tables[0].alias= tables[0].table_name= (char*) "help_topic";
   tables[0].lock_type= TL_READ;
-  tables[0].next_global= tables[0].next_local= &tables[1];
+  tables[0].next_global= tables[0].next_local= 
+    tables[0].next_name_resolution_table= &tables[1];
   tables[1].alias= tables[1].table_name= (char*) "help_category";
   tables[1].lock_type= TL_READ;
-  tables[1].next_global= tables[1].next_local= &tables[2];
+  tables[1].next_global= tables[1].next_local= 
+    tables[1].next_name_resolution_table= &tables[2];
   tables[2].alias= tables[2].table_name= (char*) "help_relation";
   tables[2].lock_type= TL_READ;
-  tables[2].next_global= tables[2].next_local= &tables[3];
+  tables[2].next_global= tables[2].next_local= 
+    tables[2].next_name_resolution_table= &tables[3];
   tables[3].alias= tables[3].table_name= (char*) "help_keyword";
   tables[3].lock_type= TL_READ;
   tables[0].db= tables[1].db= tables[2].db= tables[3].db= (char*) "mysql";
 
-  List<String> topics_list, categories_list, subcategories_list;
-  String name, description, example;
-  int count_topics, count_categories, error;
-  uint mlen= strlen(mask);
-  MEM_ROOT *mem_root= thd->mem_root;
-
   if (open_and_lock_tables(thd, tables))
     goto error;
   /*
     Init tables and fields to be usable from items
-
     tables do not contain VIEWs => we can pass 0 as conds
   */
   setup_tables(thd, &thd->lex->select_lex.context,
+               &thd->lex->select_lex.top_join_list,
                tables, 0, &leaves, FALSE);
   memcpy((char*) used_fields, (char*) init_used_fields, sizeof(used_fields));
   if (init_fields(thd, tables, used_fields, array_elements(used_fields)))
     goto error;
-  size_t i;
   for (i=0; i<sizeof(tables)/sizeof(TABLE_LIST); i++)
     tables[i].table->file->init_table_handle_for_HANDLER();
 
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 125390e4411484e8681b5d9b4c72efba94bb3933..93c9991418ddcb6d707c10b13e8f9348eeb7fa65 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -106,12 +106,15 @@ static int check_insert_fields(THD *thd, TABLE_LIST *table_list,
   }
   else
   {						// Part field list
-    Name_resolution_context *context= &thd->lex->select_lex.context;
-    TABLE_LIST *save_next= table_list->next_local,
-               *save_context= context->table_list;
-    bool save_resolve_in_select_list=
-      thd->lex->select_lex.context.resolve_in_select_list;
+    SELECT_LEX *select_lex= &thd->lex->select_lex;
+    Name_resolution_context *context= &select_lex->context;
+    TABLE_LIST *save_next_local;
+    TABLE_LIST *save_table_list;
+    TABLE_LIST *save_first_name_resolution_table;
+    TABLE_LIST *save_next_name_resolution_table;
+    bool        save_resolve_in_select_list;
     int res;
+
     if (fields.elements != values.elements)
     {
       my_error(ER_WRONG_VALUE_COUNT_ON_ROW, MYF(0), 1L);
@@ -119,17 +122,39 @@ static int check_insert_fields(THD *thd, TABLE_LIST *table_list,
     }
 
     thd->dupp_field=0;
-    thd->lex->select_lex.no_wrap_view_item= TRUE;
-    /* fields only from first table */
+    select_lex->no_wrap_view_item= TRUE;
+
+    /* Save the state of the current name resolution context. */
+    save_table_list=                  context->table_list;
+    save_first_name_resolution_table= context->first_name_resolution_table;
+    save_next_name_resolution_table=  (context->first_name_resolution_table) ?
+                                      context->first_name_resolution_table->
+                                               next_name_resolution_table :
+                                      NULL;
+    save_resolve_in_select_list=      context->resolve_in_select_list;
+    save_next_local=                  table_list->next_local;
+
+    /*
+      Perform name resolution only in the first table - 'table_list',
+      which is the table that is inserted into.
+    */
     table_list->next_local= 0;
     context->resolve_in_table_list_only(table_list);
     res= setup_fields(thd, 0, fields, 1, 0, 0);
-    table_list->next_local= save_next;
+
+    /* Restore the current context. */
+    table_list->next_local=                save_next_local;
+    context->table_list=                   save_table_list;
+    context->first_name_resolution_table=  save_first_name_resolution_table;
+    if (context->first_name_resolution_table)
+      context->first_name_resolution_table->
+               next_name_resolution_table= save_next_name_resolution_table;
+    context->resolve_in_select_list=       save_resolve_in_select_list;
     thd->lex->select_lex.no_wrap_view_item= FALSE;
-    context->table_list= save_context;
-    context->resolve_in_select_list= save_resolve_in_select_list;
+
     if (res)
       return -1;
+
     if (table_list->effective_algorithm == VIEW_ALGORITHM_MERGE)
     {
       /* it is join view => we need to find table for update */
@@ -254,9 +279,13 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
   ulonglong id;
   COPY_INFO info;
   TABLE *table= 0;
-  TABLE_LIST *next_local;
+  TABLE_LIST *save_table_list;
+  TABLE_LIST *save_next_local;
+  TABLE_LIST *save_first_name_resolution_table;
+  TABLE_LIST *save_next_name_resolution_table;
   List_iterator_fast<List_item> its(values_list);
   List_item *values;
+  Name_resolution_context *context;
 #ifndef EMBEDDED_LIBRARY
   char *query= thd->query;
 #endif
@@ -335,9 +364,23 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
   /* mysql_prepare_insert set table_list->table if it was not set */
   table= table_list->table;
 
-  next_local= table_list->next_local;
+  context= &thd->lex->select_lex.context;
+  /* Save the state of the current name resolution context. */
+  save_table_list=                  context->table_list;
+  save_first_name_resolution_table= context->first_name_resolution_table;
+  save_next_name_resolution_table=  (context->first_name_resolution_table) ?
+                                    context->first_name_resolution_table->
+                                             next_name_resolution_table :
+                                    NULL;
+  save_next_local=                  table_list->next_local;
+
+  /*
+    Perform name resolution only in the first table - 'table_list',
+    which is the table that is inserted into.
+  */
   table_list->next_local= 0;
-  thd->lex->select_lex.context.resolve_in_table_list_only(table_list);
+  context->resolve_in_table_list_only(table_list);
+
   value_count= values->elements;
   while ((values= its++))
   {
@@ -351,7 +394,14 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
       goto abort;
   }
   its.rewind ();
-  table_list->next_local= next_local;
+ 
+  /* Restore the current context. */
+  table_list->next_local= save_next_local;
+  context->first_name_resolution_table= save_first_name_resolution_table;
+  if (context->first_name_resolution_table)
+    context->first_name_resolution_table->
+             next_name_resolution_table= save_next_name_resolution_table;
+
   /*
     Fill in the given fields and dump it to the table file
   */
@@ -707,6 +757,7 @@ static bool mysql_prepare_insert_check_table(THD *thd, TABLE_LIST *table_list,
   DBUG_ENTER("mysql_prepare_insert_check_table");
 
   if (setup_tables(thd, &thd->lex->select_lex.context,
+                   &thd->lex->select_lex.top_join_list,
                    table_list, where, &thd->lex->select_lex.leaf_tables,
 		   select_insert))
     DBUG_RETURN(TRUE);
@@ -761,10 +812,13 @@ bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list,
                           COND **where, bool select_insert)
 {
   SELECT_LEX *select_lex= &thd->lex->select_lex;
+  Name_resolution_context *context= &select_lex->context;
   TABLE_LIST *save_table_list;
   TABLE_LIST *save_next_local;
+  TABLE_LIST *save_first_name_resolution_table;
+  TABLE_LIST *save_next_name_resolution_table;
+  bool        save_resolve_in_select_list;
   bool insert_into_view= (table_list->view != 0);
-  bool save_resolve_in_select_list;
   bool res= 0;
   DBUG_ENTER("mysql_prepare_insert");
   DBUG_PRINT("enter", ("table_list 0x%lx, table 0x%lx, view %d",
@@ -802,35 +856,58 @@ bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list,
                                        select_insert))
     DBUG_RETURN(TRUE);
 
-  save_table_list= select_lex->context.table_list;
-  save_resolve_in_select_list= select_lex->context.resolve_in_select_list;
-  save_next_local= table_list->next_local;
+  /* Save the state of the current name resolution context. */
+  save_table_list=                  context->table_list;
+  /* Here first_name_resolution_table points to the first select table. */
+  save_first_name_resolution_table= context->first_name_resolution_table;
+  save_next_name_resolution_table=  (context->first_name_resolution_table) ?
+                                    context->first_name_resolution_table->
+                                             next_name_resolution_table :
+                                    NULL;
+  save_resolve_in_select_list=      context->resolve_in_select_list;
+  save_next_local=                  table_list->next_local;
 
+  /*
+    Perform name resolution only in the first table - 'table_list',
+    which is the table that is inserted into.
+  */
   table_list->next_local= 0;
-  select_lex->context.resolve_in_table_list_only(table_list);
-  if ((values && check_insert_fields(thd, table_list, fields, *values,
-                                     !insert_into_view)) ||
-      (values && setup_fields(thd, 0, *values, 0, 0, 0)))
-    res= TRUE;
-  else if (duplic == DUP_UPDATE)
+  context->resolve_in_table_list_only(table_list);
+
+  /* Prepare the fields in the statement. */
+  if (values &&
+      !(res= check_insert_fields(thd, context->table_list, fields, *values,
+                                 !insert_into_view) ||
+        setup_fields(thd, 0, *values, 0, 0, 0)) &&
+      duplic == DUP_UPDATE)
   {
     select_lex->no_wrap_view_item= TRUE;
-    res= check_update_fields(thd, table_list, update_fields);
+    res= check_update_fields(thd, context->table_list, update_fields);
     select_lex->no_wrap_view_item= FALSE;
+    /*
+      When we are not using GROUP BY we can refer to other tables in the
+      ON DUPLICATE KEY part.
+    */       
     if (select_lex->group_list.elements == 0)
     {
-      /*
-        When we are not using GROUP BY we can refer to other tables in the
-        ON DUPLICATE KEY part
-      */       
-      table_list->next_local= save_next_local;
+      context->table_list->next_local=       save_next_local;
+      /* first_name_resolution_table was set by resolve_in_table_list_only() */
+      context->first_name_resolution_table->
+        next_name_resolution_table=          save_next_local;
     }
     if (!res)
       res= setup_fields(thd, 0, update_values, 1, 0, 0);
   }
+
+  /* Restore the current context. */
   table_list->next_local= save_next_local;
-  select_lex->context.table_list= save_table_list;
-  select_lex->context.resolve_in_select_list= save_resolve_in_select_list;
+  context->table_list= save_table_list;
+  context->first_name_resolution_table= save_first_name_resolution_table;
+  if (context->first_name_resolution_table)
+    context->first_name_resolution_table->
+             next_name_resolution_table= save_next_name_resolution_table;
+  context->resolve_in_select_list= save_resolve_in_select_list;
+
   if (res)
     DBUG_RETURN(res);
 
@@ -1088,7 +1165,9 @@ ok_or_after_trg_err:
 
 err:
   info->last_errno= error;
-  thd->lex->current_select->no_error= 0;        // Give error
+  /* current_select is NULL if this is a delayed insert */
+  if (thd->lex->current_select)
+    thd->lex->current_select->no_error= 0;        // Give error
   table->file->print_error(error,MYF(0));
 
 before_trg_err:
@@ -2087,7 +2166,55 @@ select_insert::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
   */
   lex->current_select= &lex->select_lex;
   res= check_insert_fields(thd, table_list, *fields, values,
-                           !insert_into_view);
+                           !insert_into_view) ||
+       setup_fields(thd, 0, values, 0, 0, 0);
+
+  if (info.handle_duplicates == DUP_UPDATE)
+  {
+    /* Save the state of the current name resolution context. */
+    Name_resolution_context *context= &lex->select_lex.context;
+    TABLE_LIST *save_table_list;
+    TABLE_LIST *save_next_local;
+    TABLE_LIST *save_first_name_resolution_table;
+    TABLE_LIST *save_next_name_resolution_table;
+    save_table_list=                  context->table_list;
+    save_first_name_resolution_table= context->first_name_resolution_table;
+    save_next_name_resolution_table=  (context->first_name_resolution_table) ?
+                                      context->first_name_resolution_table->
+                                               next_name_resolution_table :
+                                      NULL;
+    save_next_local= table_list->next_local;
+
+    /* Perform name resolution only in the first table - 'table_list'. */
+    table_list->next_local= 0;
+    context->resolve_in_table_list_only(table_list);
+
+    lex->select_lex.no_wrap_view_item= TRUE;
+    res= res || check_update_fields(thd, context->table_list,
+                                    *info.update_fields);
+    lex->select_lex.no_wrap_view_item= FALSE;
+    /*
+      When we are not using GROUP BY we can refer to other tables in the
+      ON DUPLICATE KEY part
+    */       
+    if (lex->select_lex.group_list.elements == 0)
+    {
+      context->table_list->next_local=       save_next_local;
+      /* first_name_resolution_table was set by resolve_in_table_list_only() */
+      context->first_name_resolution_table->
+        next_name_resolution_table=          save_next_local;
+    }
+    res= res || setup_fields(thd, 0, *info.update_values, 1, 0, 0);
+
+    /* Restore the current context. */
+    table_list->next_local= save_next_local;
+    context->first_name_resolution_table= save_first_name_resolution_table;
+    if (context->first_name_resolution_table)
+      context->first_name_resolution_table->
+               next_name_resolution_table= save_next_name_resolution_table;
+
+  }
+
   lex->current_select= lex_current_select_save;
   if (res)
     DBUG_RETURN(1);
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 630a7e950f7b54c1be6559fe83e73c04789c6f19..7fcc16c681e6305d3e948a8f08d1555151491279 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -118,8 +118,11 @@ void lex_start(THD *thd, uchar *buf,uint length)
   lex->buf= lex->ptr= buf;
   lex->end_of_query= buf+length;
 
+  lex->context_stack.empty();
   lex->unit.init_query();
   lex->unit.init_select();
+  /* 'parent_lex' is used in init_query() so it must be before it. */
+  lex->select_lex.parent_lex= lex;
   lex->select_lex.init_query();
   lex->value_list.empty();
   lex->update_list.empty();
@@ -148,7 +151,6 @@ void lex_start(THD *thd, uchar *buf,uint length)
   lex->leaf_tables_insert= lex->query_tables= 0;
   lex->query_tables_last= &lex->query_tables;
   lex->variables_used= 0;
-  lex->select_lex.parent_lex= lex;
   lex->empty_field_list_on_rset= 0;
   lex->select_lex.select_number= 1;
   lex->next_state=MY_LEX_START;
@@ -563,7 +565,7 @@ int yylex(void *arg, void *yythd)
         grammatically correct.
       */
       else if (c == '?' && ((THD*) yythd)->command == COM_STMT_PREPARE &&
-               !ident_map[cs, yyPeek()])
+               !ident_map[yyPeek()])
         return(PARAM_MARKER);
       return((int) c);
 
@@ -1114,6 +1116,11 @@ void st_select_lex::init_query()
   having_fix_field= 0;
   context.select_lex= this;
   context.init();
+  /*
+    Add the name resolution context of the current (sub)query to the
+    stack of contexts for the whole query.
+  */
+  parent_lex->push_context(&context);
   cond_count= with_wild= 0;
   conds_processed_with_permanent_arena= 0;
   ref_pointer_array= 0;
@@ -1130,7 +1137,7 @@ void st_select_lex::init_select()
 {
   st_select_lex_node::init_select();
   group_list.empty();
-  type= db= db1= table1= db2= table2= 0;
+  type= db= 0;
   having= 0;
   use_index_ptr= ignore_index_ptr= 0;
   table_join_options= 0;
@@ -1860,8 +1867,9 @@ TABLE_LIST *st_lex::unlink_first_table(bool *link_to_local)
     */
     if ((*link_to_local= test(select_lex.table_list.first)))
     {
-      select_lex.table_list.first= (byte*) (select_lex.context.table_list=
-                                            first->next_local);
+      select_lex.context.table_list= 
+        select_lex.context.first_name_resolution_table= first->next_local;
+      select_lex.table_list.first= (byte*) (first->next_local);
       select_lex.table_list.elements--;	//safety
       first->next_local= 0;
       /*
@@ -1966,8 +1974,8 @@ void st_lex::link_first_table_back(TABLE_LIST *first,
     if (link_to_local)
     {
       first->next_local= (TABLE_LIST*) select_lex.table_list.first;
-      select_lex.table_list.first=
-        (byte*) (select_lex.context.table_list= first);
+      select_lex.context.table_list= first;
+      select_lex.table_list.first= (byte*) first;
       select_lex.table_list.elements++;	//safety
     }
   }
@@ -2008,6 +2016,7 @@ void st_lex::cleanup_after_one_table_open()
   time_zone_tables_used= 0;
   if (sroutines.records)
     my_hash_reset(&sroutines);
+  sroutines_list.empty();
 }
 
 
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index 4bba0c432c7fc028621474d495d55d652444b81e..59969ea09faf84b54c26229f990af24e2216c3f9 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -305,7 +305,7 @@ protected:
     *link_next, **link_prev;          /* list of whole SELECT_LEX */
 public:
 
-  ulong options;
+  ulonglong options;
   /*
     result of this query can't be cached, bit field, can be :
       UNCACHEABLE_DEPENDENT
@@ -458,6 +458,7 @@ public:
   inline bool is_prepared() { return prepared; }
   bool change_result(select_subselect *result, select_subselect *old_result);
   void set_limit(st_select_lex *values);
+  void set_thd(THD *thd_arg) { thd= thd_arg; }
 
   friend void lex_start(THD *thd, uchar *buf, uint length);
   friend int subselect_union_engine::exec();
@@ -471,14 +472,16 @@ class st_select_lex: public st_select_lex_node
 {
 public:
   Name_resolution_context context;
-  char *db, *db1, *table1, *db2, *table2;      	/* For outer join using .. */
+  char *db;
   Item *where, *having;                         /* WHERE & HAVING clauses */
   Item *prep_where; /* saved WHERE clause for prepared statement processing */
   /* point on lex in which it was created, used in view subquery detection */
   st_lex *parent_lex;
   enum olap_type olap;
-  SQL_LIST	      table_list, group_list;   /* FROM & GROUP BY clauses */
-  List<Item>          item_list; /* list of fields & expressions */
+  /* FROM clause - points to the beginning of the TABLE_LIST::next_local list. */
+  SQL_LIST	      table_list;
+  SQL_LIST	      group_list; /* GROUP BY clause. */
+  List<Item>          item_list;  /* list of fields & expressions */
   List<String>        interval_list, use_index, *use_index_ptr,
 		      ignore_index, *ignore_index_ptr;
   /* 
@@ -491,7 +494,12 @@ public:
   List<TABLE_LIST> top_join_list; /* join list of the top level          */
   List<TABLE_LIST> *join_list;    /* list for the currently parsed join  */
   TABLE_LIST *embedding;          /* table embedding to the above list   */
-  TABLE_LIST *leaf_tables;        /* list of leaves in join table tree   */
+  /*
+    Beginning of the list of leaves in a FROM clause, where the leaves
+    inlcude all base tables including view tables. The tables are connected
+    by TABLE_LIST::next_leaf, so leaf_tables points to the left-most leaf.
+  */
+  TABLE_LIST *leaf_tables;
   const char *type;               /* type of select for EXPLAIN          */
 
   SQL_LIST order_list;                /* ORDER clause */
@@ -593,7 +601,6 @@ public:
   bool init_nested_join(THD *thd);
   TABLE_LIST *end_nested_join(THD *thd);
   TABLE_LIST *nest_last_join(THD *thd);
-  void save_names_for_using_list(TABLE_LIST *tab1, TABLE_LIST *tab2);
   void add_joined_table(TABLE_LIST *table);
   TABLE_LIST *convert_right_join();
   List<Item>* get_item_list();
@@ -735,6 +742,21 @@ typedef struct st_lex
   List<set_var_base>  var_list;
   List<Item_param>    param_list;
   List<LEX_STRING>    view_list; // view list (list of field names in view)
+  /*
+    A stack of name resolution contexts for the query. This stack is used
+    at parse time to set local name resolution contexts for various parts
+    of a query. For example, in a JOIN ... ON (some_condition) clause the
+    Items in 'some_condition' must be resolved only against the operands
+    of the the join, and not against the whole clause. Similarly, Items in
+    subqueries should be resolved against the subqueries (and outer queries).
+    The stack is used in the following way: when the parser detects that
+    all Items in some clause need a local context, it creates a new context
+    and pushes it on the stack. All newly created Items always store the
+    top-most context in the stack. Once the parser leaves the clause that
+    required a local context, the parser pops the top-most context.
+  */
+  List<Name_resolution_context> context_stack;
+
   SQL_LIST	      proc_list, auxilliary_table_list, save_list;
   create_field	      *last_field;
   udf_func udf;
@@ -926,6 +948,21 @@ typedef struct st_lex
     return ( query_tables_own_last ? *query_tables_own_last : 0);
   }
   void cleanup_after_one_table_open();
+
+  void push_context(Name_resolution_context *context)
+  {
+    context_stack.push_front(context);
+  }
+
+  void pop_context()
+  {
+    context_stack.pop();
+  }
+
+  Name_resolution_context *current_context()
+  {
+    return context_stack.head();
+  }
 } LEX;
 
 struct st_lex_local: public st_lex
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index 1ec209aba851ce11b7e0f6c51c3886b0de15c217..e1684f9bb110d0918caca6496e0a9d688d241762 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -150,6 +150,7 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
   if (open_and_lock_tables(thd, table_list))
     DBUG_RETURN(TRUE);
   if (setup_tables(thd, &thd->lex->select_lex.context,
+                   &thd->lex->select_lex.top_join_list,
                    table_list, &unused_conds,
 		   &thd->lex->select_lex.leaf_tables, FALSE))
      DBUG_RETURN(-1);
diff --git a/sql/sql_olap.cc b/sql/sql_olap.cc
index 71e8fe4149f767dba6b49e75f3e95853b122b08c..b457ff5a6d6f901a325e56482618e74acca919b6 100644
--- a/sql/sql_olap.cc
+++ b/sql/sql_olap.cc
@@ -153,7 +153,7 @@ int handle_olaps(LEX *lex, SELECT_LEX *select_lex)
   List<Item>	all_fields(select_lex->item_list);
 
 
-  if (setup_tables(lex->thd, &select_lex->context,
+  if (setup_tables(lex->thd, &select_lex->context, &select_lex->top_join_list,
                    (TABLE_LIST *)select_lex->table_list.first
                    &select_lex->where, &select_lex->leaf_tables, FALSE) ||
       setup_fields(lex->thd, 0, select_lex->item_list, 1, &all_fields,1) ||
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 23403e6e00a9cf14c67d1c618474f235aecc7a36..2ba82954319c8146e59e2f73f4bed2d229ca3e7e 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -27,6 +27,7 @@
 
 #include "sp_head.h"
 #include "sp.h"
+#include "sp_cache.h"
 
 #ifdef HAVE_OPENSSL
 /*
@@ -124,7 +125,7 @@ static bool end_active_trans(THD *thd)
 {
   int error=0;
   DBUG_ENTER("end_active_trans");
-  if (unlikely(thd->transaction.in_sub_stmt))
+  if (unlikely(thd->in_sub_stmt))
   {
     my_error(ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG, MYF(0));
     DBUG_RETURN(1);
@@ -147,11 +148,7 @@ static bool end_active_trans(THD *thd)
 static bool begin_trans(THD *thd)
 {
   int error=0;
-  /*
-    QQ: May be it is better to simply prohibit COMMIT and ROLLBACK in
-        stored routines as SQL2003 suggests?
-  */
-  if (unlikely(thd->transaction.in_sub_stmt))
+  if (unlikely(thd->in_sub_stmt))
   {
     my_error(ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG, MYF(0));
     return 1;
@@ -193,7 +190,7 @@ static int get_or_create_user_conn(THD *thd, const char *user,
 				   const char *host,
 				   USER_RESOURCES *mqh)
 {
-  int return_val=0;
+  int return_val= 0;
   uint temp_len, user_len;
   char temp_user[USERNAME_LENGTH+HOSTNAME_LENGTH+2];
   struct  user_conn *uc;
@@ -201,7 +198,7 @@ static int get_or_create_user_conn(THD *thd, const char *user,
   DBUG_ASSERT(user != 0);
   DBUG_ASSERT(host != 0);
 
-  user_len=strlen(user);
+  user_len= strlen(user);
   temp_len= (strmov(strmov(temp_user, user)+1, host) - temp_user)+1;
   (void) pthread_mutex_lock(&LOCK_user_conn);
   if (!(uc = (struct  user_conn *) hash_search(&hash_user_connections,
@@ -213,21 +210,21 @@ static int get_or_create_user_conn(THD *thd, const char *user,
 			 MYF(MY_WME)))))
     {
       net_send_error(thd, 0, NullS);		// Out of memory
-      return_val=1;
+      return_val= 1;
       goto end;
     }
     uc->user=(char*) (uc+1);
     memcpy(uc->user,temp_user,temp_len+1);
     uc->host= uc->user + user_len +  1;
-    uc->len = temp_len;
+    uc->len= temp_len;
     uc->connections= uc->questions= uc->updates= uc->conn_per_hour= 0;
-    uc->user_resources=*mqh;
-    uc->intime=thd->thr_create_time;
+    uc->user_resources= *mqh;
+    uc->intime= thd->thr_create_time;
     if (my_hash_insert(&hash_user_connections, (byte*) uc))
     {
       my_free((char*) uc,0);
       net_send_error(thd, 0, NullS);		// Out of memory
-      return_val=1;
+      return_val= 1;
       goto end;
     }
   }
@@ -278,7 +275,7 @@ int check_user(THD *thd, enum enum_server_command command,
   {
     thd->db= 0;
     thd->db_length= 0;
-    if (mysql_change_db(thd, db))
+    if (mysql_change_db(thd, db, FALSE))
     {
       /* Send the error to the client */
       net_send_error(thd);
@@ -287,8 +284,7 @@ int check_user(THD *thd, enum enum_server_command command,
       DBUG_RETURN(-1);
     }
   }
-  else
-    send_ok(thd);
+  send_ok(thd);
   DBUG_RETURN(0);
 #else
 
@@ -413,7 +409,7 @@ int check_user(THD *thd, enum enum_server_command command,
       /* Change database if necessary */
       if (db && db[0])
       {
-        if (mysql_change_db(thd, db))
+        if (mysql_change_db(thd, db, FALSE))
         {
           /* Send error to the client */
           net_send_error(thd);
@@ -422,8 +418,7 @@ int check_user(THD *thd, enum enum_server_command command,
           DBUG_RETURN(-1);
         }
       }
-      else
-	send_ok(thd);
+      send_ok(thd);
       thd->password= test(passwd_len);          // remember for error messages 
       /* Ready to handle queries */
       DBUG_RETURN(0);
@@ -1104,11 +1099,11 @@ pthread_handler_decl(handle_one_connection,arg)
       execute_init_command(thd, &sys_init_connect, &LOCK_sys_init_connect);
       if (thd->query_error)
 	thd->killed= THD::KILL_CONNECTION;
+      thd->proc_info=0;
+      thd->set_time();
+      thd->init_for_queries();
     }
 
-    thd->proc_info=0;
-    thd->set_time();
-    thd->init_for_queries();
     while (!net->error && net->vio != 0 &&
            !(thd->killed == THD::KILL_CONNECTION))
     {
@@ -1340,11 +1335,7 @@ int end_trans(THD *thd, enum enum_mysql_completiontype completion)
   int res= 0;
   DBUG_ENTER("end_trans");
 
-  /*
-    QQ: May be it is better to simply prohibit COMMIT and ROLLBACK in
-        stored routines as SQL2003 suggests?
-  */
-  if (unlikely(thd->transaction.in_sub_stmt))
+  if (unlikely(thd->in_sub_stmt))
   {
     my_error(ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG, MYF(0));
     DBUG_RETURN(1);
@@ -1471,6 +1462,7 @@ bool do_command(THD *thd)
 
 /*
    Perform one connection-level (COM_XXXX) command.
+
   SYNOPSIS
     dispatch_command()
     thd             connection handle
@@ -1521,8 +1513,11 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
 			&LOCK_status);
     thd->convert_string(&tmp, system_charset_info,
 			packet, strlen(packet), thd->charset());
-    if (!mysql_change_db(thd, tmp.str))
+    if (!mysql_change_db(thd, tmp.str, FALSE))
+    {
       mysql_log.write(thd,command,"%s",thd->db);
+      send_ok(thd);
+    }
     break;
   }
 #ifdef HAVE_REPLICATION
@@ -1870,17 +1865,18 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
     }
 #endif
   case COM_REFRESH:
-    {
-      statistic_increment(thd->status_var.com_stat[SQLCOM_FLUSH],
-			  &LOCK_status);
-      ulong options= (ulong) (uchar) packet[0];
-      if (check_global_access(thd,RELOAD_ACL))
-	break;
-      mysql_log.write(thd,command,NullS);
-      if (!reload_acl_and_cache(thd, options, (TABLE_LIST*) 0, NULL))
-        send_ok(thd);
+  {
+    bool not_used;
+    statistic_increment(thd->status_var.com_stat[SQLCOM_FLUSH],
+                        &LOCK_status);
+    ulong options= (ulong) (uchar) packet[0];
+    if (check_global_access(thd,RELOAD_ACL))
       break;
-    }
+    mysql_log.write(thd,command,NullS);
+    if (!reload_acl_and_cache(thd, options, (TABLE_LIST*) 0, &not_used))
+      send_ok(thd);
+    break;
+  }
 #ifndef EMBEDDED_LIBRARY
   case COM_SHUTDOWN:
   {
@@ -2024,7 +2020,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
   */
   bzero(&thd->transaction.stmt, sizeof(thd->transaction.stmt));
   if (!thd->active_transaction())
-    thd->transaction.xid.null();
+    thd->transaction.xid_state.xid.null();
 
   /* report error issued during command execution */
   if (thd->killed_errno() && !thd->net.report_error)
@@ -2050,7 +2046,17 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
 
 void log_slow_statement(THD *thd)
 {
-  time_t start_of_query=thd->start_time;
+  time_t start_of_query;
+
+  /*
+    The following should never be true with our current code base,
+    but better to keep this here so we don't accidently try to log a
+    statement in a trigger or stored function
+  */
+  if (unlikely(thd->in_sub_stmt))
+    return;                                     // Don't set time for sub stmt
+
+  start_of_query= thd->start_time;
   thd->end_time();				// Set start time
 
   /*
@@ -2141,6 +2147,8 @@ int prepare_schema_table(THD *thd, LEX *lex, Table_ident *table_ident,
     {
       TABLE_LIST **query_tables_last= lex->query_tables_last;
       sel= new SELECT_LEX();
+      /* 'parent_lex' is used in init_query() so it must be before it. */
+      sel->parent_lex= lex;
       sel->init_query();
       if (!sel->add_table_to_list(thd, table_ident, 0, 0, TL_READ, 
                                  (List<String> *) 0, (List<String> *) 0))
@@ -2949,8 +2957,8 @@ end_with_restore_list:
   */
   if (thd->locked_tables || thd->active_transaction())
   {
-    my_message(ER_LOCK_OR_ACTIVE_TRANSACTION, ER(ER_LOCK_OR_ACTIVE_TRANSACTION),
-               MYF(0));
+    my_message(ER_LOCK_OR_ACTIVE_TRANSACTION,
+               ER(ER_LOCK_OR_ACTIVE_TRANSACTION), MYF(0));
     goto error;
   }
   {
@@ -3244,19 +3252,26 @@ end_with_restore_list:
     if (!(res= open_and_lock_tables(thd, all_tables)))
     {
       /* Skip first table, which is the table we are inserting in */
-      select_lex->table_list.first= (byte*)first_table->next_local;
-
+      TABLE_LIST *second_table= first_table->next_local;
+      select_lex->table_list.first= (byte*) second_table;
+      select_lex->context.table_list= 
+        select_lex->context.first_name_resolution_table= second_table;
       res= mysql_insert_select_prepare(thd);
-      lex->select_lex.context.table_list= first_table->next_local;
       if (!res && (result= new select_insert(first_table, first_table->table,
                                              &lex->field_list,
                                              &lex->update_list,
                                              &lex->value_list,
                                              lex->duplicates, lex->ignore)))
       {
-        /* Skip first table, which is the table we are inserting in */
-        select_lex->context.table_list= first_table->next_local;
-
+        /*
+          Skip first table, which is the table we are inserting in.
+          Below we set context.table_list again because the call above to
+          mysql_insert_select_prepare() calls resolve_in_table_list_only(),
+          which in turn resets context.table_list and
+          context.first_name_resolution_table.
+        */
+        select_lex->context.table_list= 
+          select_lex->context.first_name_resolution_table= second_table;
 	res= handle_select(thd, lex, result, OPTION_SETUP_TABLES_DONE);
         delete result;
       }
@@ -3325,7 +3340,7 @@ end_with_restore_list:
     if ((res= mysql_multi_delete_prepare(thd)))
       goto error;
 
-    if (!thd->is_fatal_error && (result= new multi_delete(thd,aux_tables,
+    if (!thd->is_fatal_error && (result= new multi_delete(aux_tables,
 							  lex->table_count)))
     {
       res= mysql_select(thd, &select_lex->ref_pointer_array,
@@ -3414,7 +3429,8 @@ end_with_restore_list:
     }
 #endif
   case SQLCOM_CHANGE_DB:
-    mysql_change_db(thd,select_lex->db);
+    if (!mysql_change_db(thd,select_lex->db,FALSE))
+      send_ok(thd);
     break;
 
   case SQLCOM_LOAD:
@@ -3645,6 +3661,7 @@ end_with_restore_list:
     if (!(res = mysql_create_function(thd, &lex->udf)))
       send_ok(thd);
 #else
+    my_error(ER_CANT_OPEN_LIBRARY, MYF(0), lex->udf.dl, 0, "feature disabled");
     res= TRUE;
 #endif
     break;
@@ -3828,13 +3845,13 @@ end_with_restore_list:
     lex->no_write_to_binlog= 1;
   case SQLCOM_FLUSH:
   {
+    bool write_to_binlog;
     if (check_global_access(thd,RELOAD_ACL) || check_db_used(thd, all_tables))
       goto error;
     /*
       reload_acl_and_cache() will tell us if we are allowed to write to the
       binlog or not.
     */
-    bool write_to_binlog;
     if (!reload_acl_and_cache(thd, lex->type, first_table, &write_to_binlog))
     {
       /*
@@ -4066,8 +4083,8 @@ end_with_restore_list:
     name= thd->strdup(name); 
     db= thd->strmake(lex->sphead->m_db.str, lex->sphead->m_db.length);
     res= (result= lex->sphead->create(thd));
-    switch (result) {
-    case SP_OK:
+    if (result == SP_OK)
+    {
       lex->unit.cleanup();
       delete lex->sphead;
       lex->sphead= 0;
@@ -4087,27 +4104,26 @@ end_with_restore_list:
       }
 #endif
       send_ok(thd);
-      break;
-    case SP_WRITE_ROW_FAILED:
-      my_error(ER_SP_ALREADY_EXISTS, MYF(0), SP_TYPE_STRING(lex), name);
-      lex->unit.cleanup();
-      delete lex->sphead;
-      lex->sphead= 0;
-      goto error;
-    case SP_NO_DB_ERROR:
-      my_error(ER_BAD_DB_ERROR, MYF(0), lex->sphead->m_db.str);
-      lex->unit.cleanup();
-      delete lex->sphead;
-      lex->sphead= 0;
-      goto error;
-    case SP_BAD_IDENTIFIER:
-      my_error(ER_TOO_LONG_IDENT, MYF(0), name);
-      lex->unit.cleanup();
-      delete lex->sphead;
-      lex->sphead= 0;
-      goto error;
-    default:
-      my_error(ER_SP_STORE_FAILED, MYF(0), SP_TYPE_STRING(lex), name);
+    }
+    else
+    {
+      switch (result) {
+      case SP_WRITE_ROW_FAILED:
+	my_error(ER_SP_ALREADY_EXISTS, MYF(0), SP_TYPE_STRING(lex), name);
+	break;
+      case SP_NO_DB_ERROR:
+	my_error(ER_BAD_DB_ERROR, MYF(0), lex->sphead->m_db.str);
+	break;
+      case SP_BAD_IDENTIFIER:
+	my_error(ER_TOO_LONG_IDENT, MYF(0), name);
+	break;
+      case SP_BODY_TOO_LONG:
+	my_error(ER_TOO_LONG_BODY, MYF(0), name);
+	break;
+      default:
+	my_error(ER_SP_STORE_FAILED, MYF(0), SP_TYPE_STRING(lex), name);
+	break;
+      }
       lex->unit.cleanup();
       delete lex->sphead;
       lex->sphead= 0;
@@ -4128,9 +4144,8 @@ end_with_restore_list:
        goto error;
 
       /*
-        By this moment all needed SPs should be in cache so no need
-        to look into DB. Moreover we may be unable to do it becuase
-        we may don't have read lock on mysql.proc
+        By this moment all needed SPs should be in cache so no need to look 
+        into DB. 
       */
       if (!(sp= sp_find_procedure(thd, lex->spname, TRUE)))
       {
@@ -4195,7 +4210,7 @@ end_with_restore_list:
 	select_limit= thd->variables.select_limit;
 	thd->variables.select_limit= HA_POS_ERROR;
 
-	thd->row_count_func= 0;
+        thd->row_count_func= 0;
         tmp_disable_binlog(thd); /* don't binlog the substatements */
 	res= sp->execute_procedure(thd, &lex->value_list);
         reenable_binlog(thd);
@@ -4503,14 +4518,15 @@ end_with_restore_list:
     break;
   }
   case SQLCOM_XA_START:
-    if (thd->transaction.xa_state == XA_IDLE && thd->lex->xa_opt == XA_RESUME)
+    if (thd->transaction.xid_state.xa_state == XA_IDLE &&
+        thd->lex->xa_opt == XA_RESUME)
     {
-      if (! thd->transaction.xid.eq(thd->lex->xid))
+      if (! thd->transaction.xid_state.xid.eq(thd->lex->xid))
       {
         my_error(ER_XAER_NOTA, MYF(0));
         break;
       }
-      thd->transaction.xa_state=XA_ACTIVE;
+      thd->transaction.xid_state.xa_state=XA_ACTIVE;
       send_ok(thd);
       break;
     }
@@ -4519,10 +4535,10 @@ end_with_restore_list:
       my_error(ER_XAER_INVAL, MYF(0));
       break;
     }
-    if (thd->transaction.xa_state != XA_NOTR)
+    if (thd->transaction.xid_state.xa_state != XA_NOTR)
     {
       my_error(ER_XAER_RMFAIL, MYF(0),
-               xa_state_names[thd->transaction.xa_state]);
+               xa_state_names[thd->transaction.xid_state.xa_state]);
       break;
     }
     if (thd->active_transaction() || thd->locked_tables)
@@ -4530,9 +4546,15 @@ end_with_restore_list:
       my_error(ER_XAER_OUTSIDE, MYF(0));
       break;
     }
-    DBUG_ASSERT(thd->transaction.xid.is_null());
-    thd->transaction.xa_state=XA_ACTIVE;
-    thd->transaction.xid.set(thd->lex->xid);
+    if (xid_cache_search(thd->lex->xid))
+    {
+      my_error(ER_XAER_DUPID, MYF(0));
+      break;
+    }
+    DBUG_ASSERT(thd->transaction.xid_state.xid.is_null());
+    thd->transaction.xid_state.xa_state=XA_ACTIVE;
+    thd->transaction.xid_state.xid.set(thd->lex->xid);
+    xid_cache_insert(&thd->transaction.xid_state);
     thd->options= ((thd->options & (ulong) ~(OPTION_STATUS_NO_TRANS_UPDATE)) |
                    OPTION_BEGIN);
     thd->server_status|= SERVER_STATUS_IN_TRANS;
@@ -4545,28 +4567,28 @@ end_with_restore_list:
       my_error(ER_XAER_INVAL, MYF(0));
       break;
     }
-    if (thd->transaction.xa_state != XA_ACTIVE)
+    if (thd->transaction.xid_state.xa_state != XA_ACTIVE)
     {
       my_error(ER_XAER_RMFAIL, MYF(0),
-               xa_state_names[thd->transaction.xa_state]);
+               xa_state_names[thd->transaction.xid_state.xa_state]);
       break;
     }
-    if (!thd->transaction.xid.eq(thd->lex->xid))
+    if (!thd->transaction.xid_state.xid.eq(thd->lex->xid))
     {
       my_error(ER_XAER_NOTA, MYF(0));
       break;
     }
-    thd->transaction.xa_state=XA_IDLE;
+    thd->transaction.xid_state.xa_state=XA_IDLE;
     send_ok(thd);
     break;
   case SQLCOM_XA_PREPARE:
-    if (thd->transaction.xa_state != XA_IDLE)
+    if (thd->transaction.xid_state.xa_state != XA_IDLE)
     {
       my_error(ER_XAER_RMFAIL, MYF(0),
-               xa_state_names[thd->transaction.xa_state]);
+               xa_state_names[thd->transaction.xid_state.xa_state]);
       break;
     }
-    if (!thd->transaction.xid.eq(thd->lex->xid))
+    if (!thd->transaction.xid_state.xid.eq(thd->lex->xid))
     {
       my_error(ER_XAER_NOTA, MYF(0));
       break;
@@ -4574,22 +4596,28 @@ end_with_restore_list:
     if (ha_prepare(thd))
     {
       my_error(ER_XA_RBROLLBACK, MYF(0));
-      thd->transaction.xa_state=XA_NOTR;
+      xid_cache_delete(&thd->transaction.xid_state);
+      thd->transaction.xid_state.xa_state=XA_NOTR;
       break;
     }
-    thd->transaction.xa_state=XA_PREPARED;
+    thd->transaction.xid_state.xa_state=XA_PREPARED;
     send_ok(thd);
     break;
   case SQLCOM_XA_COMMIT:
-    if (!thd->transaction.xid.eq(thd->lex->xid))
+    if (!thd->transaction.xid_state.xid.eq(thd->lex->xid))
     {
-      if (!(res= !ha_commit_or_rollback_by_xid(thd->lex->xid, 1)))
+      XID_STATE *xs=xid_cache_search(thd->lex->xid);
+      if (!xs || xs->in_thd)
         my_error(ER_XAER_NOTA, MYF(0));
       else
+      {
+        ha_commit_or_rollback_by_xid(thd->lex->xid, 1);
+        xid_cache_delete(xs);
         send_ok(thd);
+      }
       break;
     }
-    if (thd->transaction.xa_state == XA_IDLE &&
+    if (thd->transaction.xid_state.xa_state == XA_IDLE &&
         thd->lex->xa_opt == XA_ONE_PHASE)
     {
       int r;
@@ -4598,7 +4626,7 @@ end_with_restore_list:
       else
         send_ok(thd);
     }
-    else if (thd->transaction.xa_state == XA_PREPARED &&
+    else if (thd->transaction.xid_state.xa_state == XA_PREPARED &&
              thd->lex->xa_opt == XA_NONE)
     {
       if (wait_if_global_read_lock(thd, 0, 0))
@@ -4618,27 +4646,33 @@ end_with_restore_list:
     else
     {
       my_error(ER_XAER_RMFAIL, MYF(0),
-               xa_state_names[thd->transaction.xa_state]);
+               xa_state_names[thd->transaction.xid_state.xa_state]);
       break;
     }
     thd->options&= ~(ulong) (OPTION_BEGIN | OPTION_STATUS_NO_TRANS_UPDATE);
     thd->server_status&= ~SERVER_STATUS_IN_TRANS;
-    thd->transaction.xa_state=XA_NOTR;
+    xid_cache_delete(&thd->transaction.xid_state);
+    thd->transaction.xid_state.xa_state=XA_NOTR;
     break;
   case SQLCOM_XA_ROLLBACK:
-    if (!thd->transaction.xid.eq(thd->lex->xid))
+    if (!thd->transaction.xid_state.xid.eq(thd->lex->xid))
     {
-      if (!(res= !ha_commit_or_rollback_by_xid(thd->lex->xid, 0)))
+      XID_STATE *xs=xid_cache_search(thd->lex->xid);
+      if (!xs || xs->in_thd)
         my_error(ER_XAER_NOTA, MYF(0));
       else
+      {
+        ha_commit_or_rollback_by_xid(thd->lex->xid, 0);
+        xid_cache_delete(xs);
         send_ok(thd);
+      }
       break;
     }
-    if (thd->transaction.xa_state != XA_IDLE &&
-        thd->transaction.xa_state != XA_PREPARED)
+    if (thd->transaction.xid_state.xa_state != XA_IDLE &&
+        thd->transaction.xid_state.xa_state != XA_PREPARED)
     {
       my_error(ER_XAER_RMFAIL, MYF(0),
-               xa_state_names[thd->transaction.xa_state]);
+               xa_state_names[thd->transaction.xid_state.xa_state]);
       break;
     }
     if (ha_rollback(thd))
@@ -4647,7 +4681,8 @@ end_with_restore_list:
       send_ok(thd);
     thd->options&= ~(ulong) (OPTION_BEGIN | OPTION_STATUS_NO_TRANS_UPDATE);
     thd->server_status&= ~SERVER_STATUS_IN_TRANS;
-    thd->transaction.xa_state=XA_NOTR;
+    xid_cache_delete(&thd->transaction.xid_state);
+    thd->transaction.xid_state.xa_state=XA_NOTR;
     break;
   case SQLCOM_XA_RECOVER:
     res= mysql_xa_recover(thd);
@@ -5087,8 +5122,9 @@ bool check_stack_overrun(THD *thd, long margin,
   if ((stack_used=used_stack(thd->thread_stack,(char*) &stack_used)) >=
       (long) (thread_stack - margin))
   {
-    sprintf(errbuff[0],ER(ER_STACK_OVERRUN),stack_used,thread_stack);
-    my_message(ER_STACK_OVERRUN,errbuff[0],MYF(0));
+    sprintf(errbuff[0],ER(ER_STACK_OVERRUN_NEED_MORE),
+            stack_used,thread_stack,margin);
+    my_message(ER_STACK_OVERRUN_NEED_MORE,errbuff[0],MYF(0));
     thd->fatal_error();
     return 1;
   }
@@ -5163,17 +5199,21 @@ void mysql_reset_thd_for_next_command(THD *thd)
   DBUG_ENTER("mysql_reset_thd_for_next_command");
   thd->free_list= 0;
   thd->select_number= 1;
-  thd->total_warn_count=0;			// Warnings for this query
   thd->last_insert_id_used= thd->query_start_used= thd->insert_id_used=0;
-  thd->sent_row_count= thd->examined_row_count= 0;
-  thd->is_fatal_error= thd->rand_used= thd->time_zone_used= 0;
+  thd->is_fatal_error= thd->time_zone_used= 0;
   thd->server_status&= ~ (SERVER_MORE_RESULTS_EXISTS | 
                           SERVER_QUERY_NO_INDEX_USED |
                           SERVER_QUERY_NO_GOOD_INDEX_USED);
   thd->tmp_table_used= 0;
-  if (opt_bin_log)
-    reset_dynamic(&thd->user_var_events);
-  thd->clear_error();
+  if (!thd->in_sub_stmt)
+  {
+    if (opt_bin_log)
+      reset_dynamic(&thd->user_var_events);
+    thd->clear_error();
+    thd->total_warn_count=0;			// Warnings for this query
+    thd->rand_used= 0;
+    thd->sent_row_count= thd->examined_row_count= 0;
+  }
   DBUG_VOID_RETURN;
 }
 
@@ -5202,9 +5242,9 @@ mysql_new_select(LEX *lex, bool move_down)
   if (!(select_lex= new (thd->mem_root) SELECT_LEX()))
     DBUG_RETURN(1);
   select_lex->select_number= ++thd->select_number;
+  select_lex->parent_lex= lex; /* Used in init_query. */
   select_lex->init_query();
   select_lex->init_select();
-  select_lex->parent_lex= lex;
   /*
     Don't evaluate this subquery during statement prepare even if
     it's a constant one. The flag is switched off in the end of
@@ -5262,6 +5302,7 @@ mysql_new_select(LEX *lex, bool move_down)
       fake->include_standalone(unit,
 			       (SELECT_LEX_NODE**)&unit->fake_select_lex);
       fake->select_number= INT_MAX;
+      fake->parent_lex= lex; /* Used in init_query. */
       fake->make_empty_select();
       fake->linkage= GLOBAL_OPTIONS_TYPE;
       fake->select_limit= 0;
@@ -5270,6 +5311,11 @@ mysql_new_select(LEX *lex, bool move_down)
       /* allow item list resolving in fake select for ORDER BY */
       fake->context.resolve_in_select_list= TRUE;
       fake->context.select_lex= fake;
+      /*
+        Remove the name resolution context of the fake select from the
+        context stack.
+       */
+      lex->pop_context();
     }
     select_lex->context.outer_context= outer_context;
   }
@@ -5303,6 +5349,8 @@ void create_select_for_variable(const char *var_name)
   THD *thd;
   LEX *lex;
   LEX_STRING tmp, null_lex_string;
+  Item *var;
+  char buff[MAX_SYS_VAR_LENGTH*2+4+8], *end;
   DBUG_ENTER("create_select_for_variable");
 
   thd= current_thd;
@@ -5312,8 +5360,16 @@ void create_select_for_variable(const char *var_name)
   tmp.str= (char*) var_name;
   tmp.length=strlen(var_name);
   bzero((char*) &null_lex_string.str, sizeof(null_lex_string));
-  add_item_to_list(thd, get_system_var(thd, OPT_SESSION, tmp,
-				       null_lex_string));
+  /*
+    We set the name of Item to @@session.var_name because that then is used
+    as the column name in the output.
+  */
+  if ((var= get_system_var(thd, OPT_SESSION, tmp, null_lex_string)))
+  {
+    end= strxmov(buff, "@@session.", var_name, NullS);
+    var->set_name(buff, end-buff, system_charset_info);
+    add_item_to_list(thd, var);
+  }
   DBUG_VOID_RETURN;
 }
 
@@ -5339,11 +5395,12 @@ void mysql_init_multi_delete(LEX *lex)
 void mysql_parse(THD *thd, char *inBuf, uint length)
 {
   DBUG_ENTER("mysql_parse");
-
   mysql_init_query(thd, (uchar*) inBuf, length);
   if (query_cache_send_result_to_client(thd, inBuf, length) <= 0)
   {
     LEX *lex= thd->lex;
+    sp_cache_flush_obsolete(&thd->sp_proc_cache);
+    sp_cache_flush_obsolete(&thd->sp_func_cache);
     if (!yyparse((void *)thd) && ! thd->is_fatal_error)
     {
 #ifndef NO_EMBEDDED_ACCESS_CHECKS
@@ -5811,7 +5868,7 @@ new_create_field(THD *thd, char *field_name, enum_field_types type,
         new_field->length= 1;
       if (new_field->length > MAX_BIT_FIELD_LENGTH)
       {
-        my_error(ER_TOO_BIG_FIELDLENGTH, MYF(0), field_name,
+        my_error(ER_TOO_BIG_DISPLAYWIDTH, MYF(0), field_name,
                  MAX_BIT_FIELD_LENGTH);
         DBUG_RETURN(NULL);
       }
@@ -5830,7 +5887,10 @@ new_create_field(THD *thd, char *field_name, enum_field_types type,
         type != MYSQL_TYPE_STRING &&
         type != MYSQL_TYPE_VARCHAR && type != FIELD_TYPE_GEOMETRY)))
   {
-    my_error(ER_TOO_BIG_FIELDLENGTH, MYF(0),
+    my_error((type == MYSQL_TYPE_VAR_STRING || type == MYSQL_TYPE_VARCHAR ||
+              type == MYSQL_TYPE_STRING) ?  ER_TOO_BIG_FIELDLENGTH :
+             ER_TOO_BIG_DISPLAYWIDTH,
+             MYF(0),
              field_name, max_field_charlength); /* purecov: inspected */
     DBUG_RETURN(NULL);
   }
@@ -5949,9 +6009,11 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
                                              LEX_STRING *option)
 {
   register TABLE_LIST *ptr;
+  TABLE_LIST *previous_table_ref; /* The table preceding the current one. */
   char *alias_str;
   LEX *lex= thd->lex;
   DBUG_ENTER("add_table_to_list");
+  LINT_INIT(previous_table_ref);
 
   if (!table)
     DBUG_RETURN(0);				// End of memory
@@ -6044,8 +6106,34 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
       }
     }
   }
-  /* Link table in local list (list for current select) */
+  /* Store the table reference preceding the current one. */
+  if (table_list.elements > 0)
+  {
+    /*
+      table_list.next points to the last inserted TABLE_LIST->next_local'
+      element
+    */
+    previous_table_ref= (TABLE_LIST*) (table_list.next -
+                                       offsetof(TABLE_LIST, next_local));
+    DBUG_ASSERT(previous_table_ref);
+    /*
+      Set next_name_resolution_table of the previous table reference to point
+      to the current table reference. In effect the list
+      TABLE_LIST::next_name_resolution_table coincides with
+      TABLE_LIST::next_local. Later this may be changed in
+      store_top_level_join_columns() for NATURAL/USING joins.
+    */
+    previous_table_ref->next_name_resolution_table= ptr;
+  }
+
+  /*
+    Link the current table reference in a local list (list for current select).
+    Notice that as a side effect here we set the next_local field of the
+    previous table reference to 'ptr'. Here we also add one element to the
+    list 'table_list'.
+  */
   table_list.link_in_list((byte*) ptr, (byte**) &ptr->next_local);
+  ptr->next_name_resolution_table= NULL;
   /* Link table in global list (all used tables) */
   lex->add_to_query_tables(ptr);
   DBUG_RETURN(ptr);
@@ -6079,10 +6167,12 @@ bool st_select_lex::init_nested_join(THD *thd)
   NESTED_JOIN *nested_join;
   DBUG_ENTER("init_nested_join");
 
-  if (!(ptr = (TABLE_LIST *) thd->calloc(sizeof(TABLE_LIST))) ||
-      !(nested_join= ptr->nested_join=
-                    (NESTED_JOIN *) thd->calloc(sizeof(NESTED_JOIN))))
+  if (!(ptr= (TABLE_LIST*) thd->calloc(ALIGN_SIZE(sizeof(TABLE_LIST))+
+                                       sizeof(NESTED_JOIN))))
     DBUG_RETURN(1);
+  nested_join= ptr->nested_join=
+    ((NESTED_JOIN*) ((byte*) ptr + ALIGN_SIZE(sizeof(TABLE_LIST))));
+
   join_list->push_front(ptr);
   ptr->embedding= embedding;
   ptr->join_list= join_list;
@@ -6150,30 +6240,48 @@ TABLE_LIST *st_select_lex::end_nested_join(THD *thd)
     The function nest last join operation as if it was enclosed in braces.
 
   RETURN VALUE
-    Pointer to TABLE_LIST element created for the new nested join, if success
-    0, otherwise
+    0  Error
+    #  Pointer to TABLE_LIST element created for the new nested join
+
 */
 
 TABLE_LIST *st_select_lex::nest_last_join(THD *thd)
 {
   TABLE_LIST *ptr;
   NESTED_JOIN *nested_join;
+  List<TABLE_LIST> *embedded_list;
   DBUG_ENTER("nest_last_join");
 
-  if (!(ptr = (TABLE_LIST *) thd->calloc(sizeof(TABLE_LIST))) ||
-      !(nested_join= ptr->nested_join=
-                    (NESTED_JOIN *) thd->calloc(sizeof(NESTED_JOIN))))
+  if (!(ptr= (TABLE_LIST*) thd->calloc(ALIGN_SIZE(sizeof(TABLE_LIST))+
+                                       sizeof(NESTED_JOIN))))
     DBUG_RETURN(0);
+  nested_join= ptr->nested_join=
+    ((NESTED_JOIN*) ((byte*) ptr + ALIGN_SIZE(sizeof(TABLE_LIST))));
+
   ptr->embedding= embedding;
   ptr->join_list= join_list;
-  List<TABLE_LIST> *embedded_list= &nested_join->join_list;
+  embedded_list= &nested_join->join_list;
   embedded_list->empty();
-  for (int i=0; i < 2; i++)
+
+  for (uint i=0; i < 2; i++)
   {
     TABLE_LIST *table= join_list->pop();
     table->join_list= embedded_list;
     table->embedding= ptr;
     embedded_list->push_back(table);
+    if (table->natural_join)
+    {
+      ptr->is_natural_join= TRUE;
+      /*
+        If this is a JOIN ... USING, move the list of joined fields to the
+        table reference that describes the join.
+      */
+      if (table->join_using_fields)
+      {
+        ptr->join_using_fields= table->join_using_fields;
+        table->join_using_fields= NULL;
+      }
+    }
   }
   join_list->push_front(ptr);
   nested_join->used_tables= nested_join->not_null_tables= (table_map) 0;
@@ -6181,44 +6289,6 @@ TABLE_LIST *st_select_lex::nest_last_join(THD *thd)
 }
 
 
-/*
-  Save names for a join with using clause
-
-  SYNOPSIS
-    save_names_for_using_list
-    tab1      left table in join
-    tab2      right table in join
-
-  DESCRIPTION
-    The function saves the full names of the tables in st_select_lex
-    to be able to build later an on expression to replace the using clause.
-
-  RETURN VALUE
-    None
-*/
-
-void st_select_lex::save_names_for_using_list(TABLE_LIST *tab1,
-                                              TABLE_LIST *tab2)
-{
-  while (tab1->nested_join)
-  {
-    tab1= tab1->nested_join->join_list.head();
-  }
-  db1= tab1->db;
-  table1= tab1->alias;
-  while (tab2->nested_join)
-  {
-    TABLE_LIST *next;
-    List_iterator_fast<TABLE_LIST> it(tab2->nested_join->join_list);
-    tab2= it++;
-    while ((next= it++))
-      tab2= next;
-  }
-  db2= tab2->db;
-  table2= tab2->alias;
-}
-
-
 /*
   Add a table to the current join list
 
@@ -6322,16 +6392,71 @@ void st_select_lex::set_lock_for_tables(thr_lock_type lock_type)
 }
 
 
-void add_join_on(TABLE_LIST *b,Item *expr)
+/*
+  Create a new name resolution context for a JOIN ... ON clause.
+
+  SYNOPSIS
+    make_join_on_context()
+    thd       pointer to current thread
+    left_op   lefto operand of the JOIN
+    right_op  rigth operand of the JOIN
+
+  DESCRIPTION
+    Create a new name resolution context for a JOIN ... ON clause,
+    and set the first and last leaves of the list of table references
+    to be used for name resolution.
+
+  RETURN
+    A new context if all is OK
+    NULL - if a memory allocation error occured
+*/
+
+Name_resolution_context *
+make_join_on_context(THD *thd, TABLE_LIST *left_op, TABLE_LIST *right_op)
+{
+  Name_resolution_context *on_context;
+  if (!(on_context= (Name_resolution_context*)
+        thd->calloc(sizeof(Name_resolution_context))))
+    return NULL;
+  on_context->init();
+  on_context->first_name_resolution_table=
+    left_op->first_leaf_for_name_resolution();
+  on_context->last_name_resolution_table=
+    right_op->last_leaf_for_name_resolution();
+  return on_context;
+}
+
+
+/*
+  Add an ON condition to the second operand of a JOIN ... ON.
+
+  SYNOPSIS
+    add_join_on
+    b     the second operand of a JOIN ... ON
+    expr  the condition to be added to the ON clause
+
+  DESCRIPTION
+    Add an ON condition to the right operand of a JOIN ... ON clause.
+
+  RETURN
+    FALSE  if there was some error
+    TRUE   if all is OK
+*/
+
+void add_join_on(TABLE_LIST *b, Item *expr)
 {
   if (expr)
   {
     if (!b->on_expr)
-      b->on_expr=expr;
+      b->on_expr= expr;
     else
     {
-      /* This only happens if you have both a right and left join */
-      b->on_expr=new Item_cond_and(b->on_expr,expr);
+      /*
+        If called from the parser, this happens if you have both a
+        right and left join. If called later, it happens if we add more
+        than one condition to the ON clause.
+      */
+      b->on_expr= new Item_cond_and(b->on_expr,expr);
     }
     b->on_expr->top_level_item();
   }
@@ -6339,28 +6464,49 @@ void add_join_on(TABLE_LIST *b,Item *expr)
 
 
 /*
-  Mark that we have a NATURAL JOIN between two tables
+  Mark that there is a NATURAL JOIN or JOIN ... USING between two
+  tables.
 
   SYNOPSIS
     add_join_natural()
-    a			Table to do normal join with
-    b			Do normal join with this table
-
+    a			Left join argument
+    b			Right join argument
+    using_fields        Field names from USING clause
+  
   IMPLEMENTATION
-    This function just marks that table b should be joined with a.
-    The function setup_cond() will create in b->on_expr a list
-    of equal condition between all fields of the same name.
-
+    This function marks that table b should be joined with a either via
+    a NATURAL JOIN or via JOIN ... USING. Both join types are special
+    cases of each other, so we treat them together. The function
+    setup_conds() creates a list of equal condition between all fields
+    of the same name for NATURAL JOIN or the fields in 'using_fields'
+    for JOIN ... USING. The list of equality conditions is stored
+    either in b->on_expr, or in JOIN::conds, depending on whether there
+    was an outer join.
+
+  EXAMPLE
     SELECT * FROM t1 NATURAL LEFT JOIN t2
      <=>
     SELECT * FROM t1 LEFT JOIN t2 ON (t1.i=t2.i and t1.j=t2.j ... )
+
+    SELECT * FROM t1 NATURAL JOIN t2 WHERE <some_cond>
+     <=>
+    SELECT * FROM t1, t2 WHERE (t1.i=t2.i and t1.j=t2.j and <some_cond>)
+
+    SELECT * FROM t1 JOIN t2 USING(j) WHERE <some_cond>
+     <=>
+    SELECT * FROM t1, t2 WHERE (t1.j=t2.j and <some_cond>)
+
+  RETURN
+    None
 */
 
-void add_join_natural(TABLE_LIST *a,TABLE_LIST *b)
+void add_join_natural(TABLE_LIST *a, TABLE_LIST *b, List<String> *using_fields)
 {
-  b->natural_join=a;
+  b->natural_join= a;
+  b->join_using_fields= using_fields;
 }
 
+
 /*
   Reload/resets privileges and the different caches.
 
@@ -6372,13 +6518,13 @@ void add_join_natural(TABLE_LIST *a,TABLE_LIST *b)
     tables              Tables to flush (if any)
     write_to_binlog     Depending on 'options', it may be very bad to write the
                         query to the binlog (e.g. FLUSH SLAVE); this is a
-                        pointer where, if it is not NULL, reload_acl_and_cache()
-                        will put 0 if it thinks we really should not write to
-                        the binlog. Otherwise it will put 1.
+                        pointer where reload_acl_and_cache() will put 0 if
+                        it thinks we really should not write to the binlog.
+                        Otherwise it will put 1.
 
   RETURN
     0	 ok
-    !=0  error
+    !=0  error.  thd->killed or thd->net.report_error is set
 */
 
 bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables,
@@ -6387,6 +6533,13 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables,
   bool result=0;
   select_errors=0;				/* Write if more errors */
   bool tmp_write_to_binlog= 1;
+
+  if (thd->in_sub_stmt)
+  {
+    my_error(ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG, MYF(0), "FLUSH");
+    return 1;
+  }
+
 #ifndef NO_EMBEDDED_ACCESS_CHECKS
   if (options & REFRESH_GRANT)
   {
@@ -6441,16 +6594,35 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables,
   {
     if ((options & REFRESH_READ_LOCK) && thd)
     {
+      /*
+        We must not try to aspire a global read lock if we have a write
+        locked table. This would lead to a deadlock when trying to
+        reopen (and re-lock) the table after the flush.
+      */
+      if (thd->locked_tables)
+      {
+        THR_LOCK_DATA **lock_p= thd->locked_tables->locks;
+        THR_LOCK_DATA **end_p= lock_p + thd->locked_tables->lock_count;
+
+        for (; lock_p < end_p; lock_p++)
+        {
+          if ((*lock_p)->type == TL_WRITE)
+          {
+            my_error(ER_LOCK_OR_ACTIVE_TRANSACTION, MYF(0));
+            return 1;
+          }
+        }
+      }
       /*
 	Writing to the binlog could cause deadlocks, as we don't log
 	UNLOCK TABLES
       */
       tmp_write_to_binlog= 0;
       if (lock_global_read_lock(thd))
-	return 1;
+	return 1;                               // Killed
       result=close_cached_tables(thd,(options & REFRESH_FAST) ? 0 : 1,
                                  tables);
-      if (make_global_read_lock_block_commit(thd))
+      if (make_global_read_lock_block_commit(thd)) // Killed
       {
         /* Don't leave things in a half-locked state */
         unlock_global_read_lock(thd);
@@ -6472,7 +6644,10 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables,
   {
     tmp_write_to_binlog= 0;
     if (reset_master(thd))
+    {
       result=1;
+      thd->fatal_error();                       // Ensure client get error
+    }
   }
 #endif
 #ifdef OPENSSL
@@ -6494,8 +6669,7 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables,
 #endif
  if (options & REFRESH_USER_RESOURCES)
    reset_mqh((LEX_USER *) NULL);
- if (write_to_binlog)
-   *write_to_binlog= tmp_write_to_binlog;
+ *write_to_binlog= tmp_write_to_binlog;
  return result;
 }
 
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index cec432a86be84777de1c7e993e31afe2cbc28e64..8c3a61d39de6dfdb8a8caa8f5da560ac7d183684 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -73,6 +73,7 @@ Long data handling:
 #include <m_ctype.h>  // for isspace()
 #include "sp_head.h"
 #include "sp.h"
+#include "sp_cache.h"
 #ifdef EMBEDDED_LIBRARY
 /* include MYSQL_BIND headers */
 #include <mysql.h>
@@ -88,6 +89,7 @@ class Prepared_statement: public Statement
 {
 public:
   THD *thd;
+  Protocol *protocol;
   Item_param **param_array;
   uint param_count;
   uint last_errno;
@@ -927,7 +929,7 @@ static bool mysql_test_insert(Prepared_statement *stmt,
     If we would use locks, then we have to ensure we are not using
     TL_WRITE_DELAYED as having two such locks can cause table corruption.
   */
-  if (open_normal_and_derived_tables(thd, table_list))
+  if (open_normal_and_derived_tables(thd, table_list, 0))
     goto error;
 
   if ((values= its++))
@@ -1007,7 +1009,7 @@ static int mysql_test_update(Prepared_statement *stmt,
   if (update_precheck(thd, table_list))
     goto error;
 
-  if (open_tables(thd, &table_list, &table_count))
+  if (open_tables(thd, &table_list, &table_count, 0))
     goto error;
 
   if (table_list->multitable_view)
@@ -1682,10 +1684,12 @@ static bool init_param_array(Prepared_statement *stmt)
 
 static void cleanup_stmt_and_thd_after_use(Statement *stmt, THD *thd)
 {
+  DBUG_ENTER("cleanup_stmt_and_thd_after_use");
   stmt->lex->unit.cleanup();
   cleanup_items(stmt->free_list);
   thd->rollback_item_tree_changes();
   thd->cleanup_after_query();
+  DBUG_VOID_RETURN;
 }
 
 /*
@@ -1780,6 +1784,9 @@ bool mysql_stmt_prepare(THD *thd, char *packet, uint packet_length,
   lex= thd->lex;
   lex->safe_to_cache_query= 0;
 
+  sp_cache_flush_obsolete(&thd->sp_proc_cache);
+  sp_cache_flush_obsolete(&thd->sp_func_cache);
+
   error= yyparse((void *)thd) || thd->is_fatal_error ||
          thd->net.report_error || init_param_array(stmt);
   /*
@@ -1848,6 +1855,13 @@ void reinit_stmt_before_use(THD *thd, LEX *lex)
   SELECT_LEX *sl= lex->all_selects_list;
   DBUG_ENTER("reinit_stmt_before_use");
 
+  /*
+    We have to update "thd" pointer in LEX, all its units and in LEX::result,
+    since statements which belong to trigger body are associated with TABLE
+    object and because of this can be used in different threads.
+  */
+  lex->thd= thd;
+
   if (lex->empty_field_list_on_rset)
   {
     lex->empty_field_list_on_rset= 0;
@@ -1886,6 +1900,7 @@ void reinit_stmt_before_use(THD *thd, LEX *lex)
       unit->types.empty();
       /* for derived tables & PS (which can't be reset by Item_subquery) */
       unit->reinit_exec_mechanism();
+      unit->set_thd(thd);
     }
   }
 
@@ -1924,7 +1939,10 @@ void reinit_stmt_before_use(THD *thd, LEX *lex)
     lex->select_lex.leaf_tables= lex->leaf_tables_insert;
 
   if (lex->result)
+  {
     lex->result->cleanup();
+    lex->result->set_thd(thd);
+  }
 
   DBUG_VOID_RETURN;
 }
@@ -1982,7 +2000,8 @@ void mysql_stmt_execute(THD *thd, char *packet, uint packet_length)
   if (!(stmt= find_prepared_statement(thd, stmt_id, "mysql_stmt_execute")))
     DBUG_VOID_RETURN;
 
-  DBUG_PRINT("exec_query:", ("%s", stmt->query));
+  DBUG_PRINT("exec_query", ("%s", stmt->query));
+  DBUG_PRINT("info",("stmt: %p", stmt));
 
   /* Check if we got an error when sending long data */
   if (stmt->state == Query_arena::ERROR)
@@ -2018,6 +2037,7 @@ void mysql_stmt_execute(THD *thd, char *packet, uint packet_length)
         DBUG_VOID_RETURN;
       /* If lex->result is set, mysql_execute_command will use it */
       stmt->lex->result= &cursor->result;
+      stmt->protocol= &cursor->protocol;
       thd->lock_id= &cursor->lock_id;
     }
   }
@@ -2052,9 +2072,11 @@ void mysql_stmt_execute(THD *thd, char *packet, uint packet_length)
   }
   mysql_log.write(thd, thd->command, "[%lu] %s", stmt->id, thd->query);
 
-  thd->protocol= &thd->protocol_prep;           // Switch to binary protocol
+  thd->protocol= stmt->protocol;                // Switch to binary protocol
   if (!(specialflag & SPECIAL_NO_PRIOR))
     my_pthread_setprio(pthread_self(),QUERY_PRIOR);
+  sp_cache_flush_obsolete(&thd->sp_proc_cache);
+  sp_cache_flush_obsolete(&thd->sp_func_cache);
   mysql_execute_command(thd);
   if (!(specialflag & SPECIAL_NO_PRIOR))
     my_pthread_setprio(pthread_self(), WAIT_PRIOR);
@@ -2079,6 +2101,10 @@ void mysql_stmt_execute(THD *thd, char *packet, uint packet_length)
     reset_stmt_params(stmt);
   }
 
+  log_slow_statement(thd);
+  /* Prevent from second logging in the end of dispatch_command */
+  thd->enable_slow_log= FALSE;
+
   thd->set_statement(&stmt_backup);
   thd->lock_id= &thd->main_lock_id;
   thd->current_arena= thd;
@@ -2125,6 +2151,8 @@ void mysql_sql_stmt_execute(THD *thd, LEX_STRING *stmt_name)
     DBUG_VOID_RETURN;
   }
 
+  DBUG_PRINT("info",("stmt: %p", stmt));
+
   /* Must go before setting variables, as it clears thd->user_var_events */
   mysql_reset_thd_for_next_command(thd);
   thd->set_n_backup_statement(stmt, &stmt_backup);
@@ -2238,7 +2266,7 @@ void mysql_stmt_fetch(THD *thd, char *packet, uint packet_length)
   if (!(specialflag & SPECIAL_NO_PRIOR))
     my_pthread_setprio(pthread_self(), QUERY_PRIOR);
 
-  thd->protocol= &thd->protocol_prep;           // Switch to binary protocol
+  thd->protocol= stmt->protocol;                // Switch to binary protocol
   cursor->fetch(num_rows);
   thd->protocol= &thd->protocol_simple;         // Use normal protocol
 
@@ -2410,6 +2438,7 @@ Prepared_statement::Prepared_statement(THD *thd_arg)
              thd_arg->variables.query_alloc_block_size,
              thd_arg->variables.query_prealloc_size),
   thd(thd_arg),
+  protocol(&thd_arg->protocol_prep),
   param_array(0),
   param_count(0),
   last_errno(0)
@@ -2445,19 +2474,26 @@ void Prepared_statement::setup_set_params()
 
 Prepared_statement::~Prepared_statement()
 {
+  DBUG_ENTER("Prepared_statement::~Prepared_statement");
+  DBUG_PRINT("enter",("stmt: %p  cursor: %p", this, cursor));
   if (cursor)
   {
     if (cursor->is_open())
     {
       cursor->close(FALSE);
-      free_items();
+      cleanup_items(free_list);
+      thd->rollback_item_tree_changes();
       free_root(cursor->mem_root, MYF(0));
     }
     cursor->Cursor::~Cursor();
   }
-  else
-    free_items();
+  /*
+    We have to call free on the items even if cleanup is called as some items,
+    like Item_param, don't free everything until free_items()
+  */
+  free_items();
   delete lex->result;
+  DBUG_VOID_RETURN;
 }
 
 
@@ -2469,6 +2505,9 @@ Query_arena::Type Prepared_statement::type() const
 
 void Prepared_statement::close_cursor()
 {
+  DBUG_ENTER("Prepared_statement::close_cursor");
+  DBUG_PRINT("enter",("stmt: %p", this));
+
   if (cursor && cursor->is_open())
   {
     thd->change_list= cursor->change_list;
@@ -2483,4 +2522,5 @@ void Prepared_statement::close_cursor()
     mysql_stmt_send_long_data() call.
   */
   reset_stmt_params(this);
+  DBUG_VOID_RETURN;
 }
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 05fb2d4d83ebcb47a9beffc8fca76ac8cbed2864..901c4cbceded29ffd4ae0c2b4de22e32c10a273d 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -338,7 +338,7 @@ JOIN::prepare(Item ***rref_pointer_array,
   /* Check that all tables, fields, conds and order are ok */
 
   if ((!(select_options & OPTION_SETUP_TABLES_DONE) &&
-       setup_tables(thd, &select_lex->context,
+       setup_tables(thd, &select_lex->context, join_list,
                     tables_list, &conds, &select_lex->leaf_tables,
                     FALSE)) ||
       setup_wild(thd, tables_list, fields_list, &all_fields, wild_num) ||
@@ -1090,9 +1090,10 @@ JOIN::optimize()
 	  order=0;
       }
     }
-    
-    if (thd->lex->subqueries)
+
+    if (select_lex->uncacheable && !is_top_level_join())
     {
+      /* If this join belongs to an uncacheable subquery */
       if (!(tmp_join= (JOIN*)thd->alloc(sizeof(JOIN))))
 	DBUG_RETURN(-1);
       error= 0;				// Ensure that tmp_join.error= 0
@@ -1198,7 +1199,14 @@ JOIN::exec()
     {
       result->send_fields(fields_list,
                           Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF);
-      if (cond_value != Item::COND_FALSE && (!having || having->val_int()))
+      /*
+        We have to test for 'conds' here as the WHERE may not be constant
+        even if we don't have any tables for prepared statements or if
+        conds uses something like 'rand()'.
+      */
+      if (cond_value != Item::COND_FALSE &&
+          (!conds || conds->val_int()) &&
+          (!having || having->val_int()))
       {
 	if (do_send_rows && (procedure ? (procedure->send_row(fields_list) ||
                                           procedure->end_of_records())
@@ -1279,7 +1287,15 @@ JOIN::exec()
   if (need_tmp)
   {
     if (tmp_join)
+    {
+      /*
+        We are in a non cacheable sub query. Get the saved join structure
+        after optimization.
+        (curr_join may have been modified during last exection and we need
+        to reset it)
+      */
       curr_join= tmp_join;
+    }
     curr_tmp_table= exec_tmp_table1;
 
     /* Copy data to the temporary table */
@@ -1567,7 +1583,8 @@ JOIN::exec()
 	curr_join->tmp_having= make_cond_for_table(curr_join->tmp_having,
 						   ~ (table_map) 0,
 						   ~used_tables);
-	DBUG_EXECUTE("where",print_where(conds,"having after sort"););
+	DBUG_EXECUTE("where",print_where(curr_join->tmp_having,
+                                         "having after sort"););
       }
     }
     {
@@ -1628,9 +1645,7 @@ JOIN::exec()
   curr_join->fields= curr_fields_list;
   curr_join->procedure= procedure;
 
-  if (unit == &thd->lex->unit &&
-      (unit->fake_select_lex == 0 || select_lex == unit->fake_select_lex) &&
-      thd->cursor && tables != const_tables)
+  if (is_top_level_join() && thd->cursor && tables != const_tables)
   {
     /*
       We are here if this is JOIN::exec for the last select of the main unit
@@ -1707,6 +1722,7 @@ JOIN::destroy()
 Cursor::Cursor(THD *thd)
   :Query_arena(&main_mem_root, INITIALIZED),
    join(0), unit(0),
+   protocol(thd),
    close_at_commit(FALSE)
 {
   /* We will overwrite it at open anyway. */
@@ -1755,7 +1771,7 @@ Cursor::init_from_thd(THD *thd)
   for (handlerton **pht= thd->transaction.stmt.ht; *pht; pht++)
   {
     const handlerton *ht= *pht;
-    close_at_commit|= (ht->flags & HTON_CLOSE_CURSORS_AT_COMMIT);
+    close_at_commit|= test(ht->flags & HTON_CLOSE_CURSORS_AT_COMMIT);
     if (ht->create_cursor_read_view)
     {
       info->ht= ht;
@@ -1842,6 +1858,7 @@ Cursor::fetch(ulong num_rows)
   JOIN_TAB *join_tab= join->join_tab + join->const_tables;
   enum_nested_loop_state error= NESTED_LOOP_OK;
   Query_arena backup_arena;
+  Engine_info *info;
   DBUG_ENTER("Cursor::fetch");
   DBUG_PRINT("enter",("rows: %lu", num_rows));
 
@@ -1856,7 +1873,7 @@ Cursor::fetch(ulong num_rows)
   /* save references to memory, allocated during fetch */
   thd->set_n_backup_item_arena(this, &backup_arena);
 
-  for (Engine_info *info= ht_info; info->read_view ; info++)
+  for (info= ht_info; info->read_view ; info++)
     (info->ht->set_cursor_read_view)(info->read_view);
 
   join->fetch_limit+= num_rows;
@@ -1875,7 +1892,7 @@ Cursor::fetch(ulong num_rows)
   /* Grab free_list here to correctly free it in close */
   thd->restore_backup_item_arena(this, &backup_arena);
 
-  for (Engine_info *info= ht_info; info->read_view; info++)
+  for (info= ht_info; info->read_view; info++)
     (info->ht->set_cursor_read_view)(0);
 
   if (error == NESTED_LOOP_CURSOR_LIMIT)
@@ -2750,9 +2767,9 @@ add_key_field(KEY_FIELD **key_fields,uint and_level, Item_func *cond,
     We use null_rejecting in add_not_null_conds() to add
     'othertbl.field IS NOT NULL' to tab->select_cond.
   */
-  (*key_fields)->null_rejecting= (cond->functype() == Item_func::EQ_FUNC) &&
-                                 ((*value)->type() == Item::FIELD_ITEM) &&
-                                 ((Item_field*)*value)->field->maybe_null();
+  (*key_fields)->null_rejecting= ((cond->functype() == Item_func::EQ_FUNC) &&
+                                  ((*value)->type() == Item::FIELD_ITEM) &&
+                                  ((Item_field*)*value)->field->maybe_null());
   (*key_fields)++;
 }
 
@@ -7936,7 +7953,15 @@ static Field *create_tmp_field_from_item(THD *thd, Item *item, TABLE *table,
 				   item->name, table, item->unsigned_flag);
     break;
   case STRING_RESULT:
-    if (item->max_length > 255 && convert_blob_length)
+    enum enum_field_types type;
+    /*
+      DATE/TIME fields have STRING_RESULT result type. To preserve
+      type they needed to be handled separately.
+    */
+    if ((type= item->field_type()) == MYSQL_TYPE_DATETIME ||
+        type == MYSQL_TYPE_TIME || type == MYSQL_TYPE_DATE)
+      new_field= item->tmp_table_field_from_field_type(table);
+    else if (item->max_length > 255 && convert_blob_length)
       new_field= new Field_varstring(convert_blob_length, maybe_null,
                                      item->name, table,
                                      item->collation.collation);
@@ -8026,6 +8051,14 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
                         bool table_cant_handle_bit_fields,
                         uint convert_blob_length)
 {
+  if (type != Item::FIELD_ITEM &&
+      item->real_item()->type() == Item::FIELD_ITEM &&
+      (item->type() != Item::REF_ITEM ||
+       !((Item_ref *) item)->depended_from))
+  {
+    item= item->real_item();
+    type= Item::FIELD_ITEM;
+  }
   switch (type) {
   case Item::SUM_FUNC_ITEM:
   {
@@ -8039,30 +8072,31 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
   case Item::DEFAULT_VALUE_ITEM:
   {
     Item_field *field= (Item_field*) item;
-    if (table_cant_handle_bit_fields && field->field->type() == FIELD_TYPE_BIT)
+    /*
+      If item have to be able to store NULLs but underlaid field can't do it,
+      create_tmp_field_from_field() can't be used for tmp field creation.
+    */
+    if (field->maybe_null && !field->field->maybe_null())
+    {
+      Field *res= create_tmp_field_from_item(thd, item, table, NULL,
+                                       modify_item, convert_blob_length);
+      *from_field= field->field;
+      if (res && modify_item)
+        ((Item_field*)item)->result_field= res;
+      return res;
+    }
+
+    if (table_cant_handle_bit_fields && 
+        field->field->type() == FIELD_TYPE_BIT)
       return create_tmp_field_from_item(thd, item, table, copy_func,
                                         modify_item, convert_blob_length);
     return create_tmp_field_from_field(thd, (*from_field= field->field),
                                        item->name, table,
-                                       modify_item ? (Item_field*) item : NULL,
+                                       modify_item ? (Item_field*) item :
+                                       NULL,
                                        convert_blob_length);
   }
-  case Item::REF_ITEM:
-  {
-    Item *tmp_item;
-    if ((tmp_item= item->real_item())->type() == Item::FIELD_ITEM)
-    {
-      Item_field *field= (Item_field*) tmp_item;
-      Field *new_field= create_tmp_field_from_field(thd, 
-                               (*from_field= field->field),
-                               item->name, table,
-                               NULL,
-                               convert_blob_length);
-      if (modify_item)
-        item->set_result_field(new_field);
-      return new_field;
-    }
-  }
+  /* Fall through */
   case Item::FUNC_ITEM:
   case Item::COND_ITEM:
   case Item::FIELD_AVG_ITEM:
@@ -8074,6 +8108,7 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
   case Item::REAL_ITEM:
   case Item::DECIMAL_ITEM:
   case Item::STRING_ITEM:
+  case Item::REF_ITEM:
   case Item::NULL_ITEM:
   case Item::VARBIN_ITEM:
     return create_tmp_field_from_item(thd, item, table, copy_func, modify_item,
@@ -8101,7 +8136,7 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
 TABLE *
 create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
 		 ORDER *group, bool distinct, bool save_sum_fields,
-		 ulong select_options, ha_rows rows_limit,
+		 ulonglong select_options, ha_rows rows_limit,
 		 char *table_alias)
 {
   TABLE *table;
@@ -8355,7 +8390,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
   /* If result table is small; use a heap */
   if (blob_count || using_unique_constraint ||
       (select_options & (OPTION_BIG_TABLES | SELECT_SMALL_RESULT)) ==
-      OPTION_BIG_TABLES)
+      OPTION_BIG_TABLES || (select_options & TMP_TABLE_FORCE_MYISAM))
   {
     table->file=get_new_handler(table,table->s->db_type= DB_TYPE_MYISAM);
     if (group &&
@@ -9718,7 +9753,13 @@ join_read_const_table(JOIN_TAB *tab, POSITION *pos)
       table->file->extra(HA_EXTRA_KEYREAD);
       tab->index= tab->ref.key;
     }
-    if ((error=join_read_const(tab)))
+    error=join_read_const(tab);
+    if (table->key_read)
+    {
+      table->key_read=0;
+      table->file->extra(HA_EXTRA_NO_KEYREAD);
+    }
+    if (error)
     {
       tab->info="unique row not found";
       /* Mark for EXPLAIN that the row was not found */
@@ -9726,11 +9767,6 @@ join_read_const_table(JOIN_TAB *tab, POSITION *pos)
       if (!table->maybe_null || error > 0)
 	DBUG_RETURN(error);
     }
-    if (table->key_read)
-    {
-      table->key_read=0;
-      table->file->extra(HA_EXTRA_NO_KEYREAD);
-    }
   }
   if (*tab->on_expr_ref && !table->null_row)
   {
@@ -9851,6 +9887,11 @@ join_read_always_key(JOIN_TAB *tab)
   int error;
   TABLE *table= tab->table;
 
+  for (uint i= 0 ; i < tab->ref.key_parts ; i++)
+  {
+    if ((tab->ref.null_rejecting & 1 << i) && tab->ref.items[i]->is_null())
+        return -1;
+  } 
   if (!table->file->inited)
     table->file->ha_index_init(tab->ref.key);
   if (cp_buffer_from_ref(tab->join->thd, &tab->ref))
@@ -10904,13 +10945,13 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
   usable_keys.set_all();
   for (ORDER *tmp_order=order; tmp_order ; tmp_order=tmp_order->next)
   {
-    if ((*tmp_order->item)->type() != Item::FIELD_ITEM)
+    Item *item= (*tmp_order->item)->real_item();
+    if (item->type() != Item::FIELD_ITEM)
     {
       usable_keys.clear_all();
       DBUG_RETURN(0);
     }
-    usable_keys.intersect(((Item_field*) (*tmp_order->item))->
-			  field->part_of_sortkey);
+    usable_keys.intersect(((Item_field*) item)->field->part_of_sortkey);
     if (usable_keys.is_clear_all())
       DBUG_RETURN(0);					// No usable keys
   }
@@ -11871,13 +11912,14 @@ cp_buffer_from_ref(THD *thd, TABLE_REF *ref)
 
   SYNOPSIS
     find_order_in_list()
-    thd		      	Pointer to current thread structure
-    ref_pointer_array   All select, group and order by fields
-    tables              List of tables to search in (usually FROM clause)
-    order               Column reference to be resolved
-    fields              List of fields to search in (usually SELECT list)
-    all_fields          All select, group and order by fields
-    is_group_field      True if order is a GROUP field, false if ORDER by field
+    thd		      [in]     Pointer to current thread structure
+    ref_pointer_array [in/out] All select, group and order by fields
+    tables            [in]     List of tables to search in (usually FROM clause)
+    order             [in]     Column reference to be resolved
+    fields            [in]     List of fields to search in (usually SELECT list)
+    all_fields        [in/out] All select, group and order by fields
+    is_group_field    [in]     True if order is a GROUP field, false if
+                               ORDER by field
 
   DESCRIPTION
     Given a column reference (represented by 'order') from a GROUP BY or ORDER
@@ -11953,7 +11995,7 @@ find_order_in_list(THD *thd, Item **ref_pointer_array, TABLE_LIST *tables,
         order_item_type == Item::REF_ITEM)
     {
       from_field= find_field_in_tables(thd, (Item_ident*) order_item, tables,
-                                       &view_ref, IGNORE_ERRORS, TRUE,
+                                       NULL, &view_ref, IGNORE_ERRORS, TRUE,
                                        FALSE);
       if (!from_field)
         from_field= (Field*) not_found_field;
diff --git a/sql/sql_select.h b/sql/sql_select.h
index 1fa246370c64ea77d7c5f863ce1cff90ed67e0f4..78fa88801be44ddb307587f9c77539403ce5c2fa 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -202,7 +202,7 @@ class JOIN :public Sql_alloc
   Item	    *having;
   Item      *tmp_having; // To store having when processed temporary table
   Item      *having_history; // Store having for explain
-  uint	    select_options;
+  ulonglong  select_options;
   select_result *result;
   TMP_TABLE_PARAM tmp_table_param;
   MYSQL_LOCK *lock;
@@ -258,14 +258,14 @@ class JOIN :public Sql_alloc
   bool union_part; // this subselect is part of union 
   bool optimized; // flag to avoid double optimization in EXPLAIN
 
-  JOIN(THD *thd_arg, List<Item> &fields_arg, ulong select_options_arg,
+  JOIN(THD *thd_arg, List<Item> &fields_arg, ulonglong select_options_arg,
        select_result *result_arg)
     :fields_list(fields_arg)
   {
     init(thd_arg, fields_arg, select_options_arg, result_arg);
   }
   
-  void init(THD *thd_arg, List<Item> &fields_arg, ulong select_options_arg,
+  void init(THD *thd_arg, List<Item> &fields_arg, ulonglong select_options_arg,
        select_result *result_arg)
   {
     join_tab= join_tab_save= 0;
@@ -366,6 +366,11 @@ class JOIN :public Sql_alloc
 	    !group_list);
   }
   bool change_result(select_result *result);
+  bool is_top_level_join() const
+  {
+    return (unit == &thd->lex->unit && (unit->fake_select_lex == 0 ||
+                                        select_lex == unit->fake_select_lex));
+  }
 };
 
 
@@ -396,6 +401,7 @@ class Cursor: public Sql_alloc, public Query_arena
   };
   Engine_info ht_info[MAX_HA];
 public:
+  Protocol_prep protocol;
   Item_change_list change_list;
   select_send result;
   THR_LOCK_OWNER lock_id;
@@ -431,7 +437,7 @@ void TEST_join(JOIN *join);
 bool store_val_in_field(Field *field,Item *val);
 TABLE *create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
 			ORDER *group, bool distinct, bool save_sum_fields,
-			ulong select_options, ha_rows rows_limit,
+			ulonglong select_options, ha_rows rows_limit,
 			char* alias);
 TABLE *create_virtual_tmp_table(THD *thd, List<create_field> &field_list);
 void free_tmp_table(THD *thd, TABLE *entry);
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 6989eacf3347295c0292b12fbc8d24b0d7f28e3a..b06f1d683dd998bb27aad50e1fd6f64e453b89ad 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -20,6 +20,7 @@
 #include "mysql_priv.h"
 #include "sql_select.h"                         // For select_describe
 #include "repl_failsafe.h"
+#include "sp.h"
 #include "sp_head.h"
 #include "sql_trigger.h"
 #include <my_dir.h>
@@ -352,7 +353,7 @@ mysqld_show_create(THD *thd, TABLE_LIST *table_list)
   thd->lex->view_prepare_mode= TRUE;
 
   /* Only one table for now, but VIEW can involve several tables */
-  if (open_normal_and_derived_tables(thd, table_list))
+  if (open_normal_and_derived_tables(thd, table_list, 0))
   {
     DBUG_RETURN(TRUE);
   }
@@ -551,7 +552,7 @@ mysqld_list_fields(THD *thd, TABLE_LIST *table_list, const char *wild)
   DBUG_ENTER("mysqld_list_fields");
   DBUG_PRINT("enter",("table: %s",table_list->table_name));
 
-  if (open_normal_and_derived_tables(thd, table_list))
+  if (open_normal_and_derived_tables(thd, table_list, 0))
     DBUG_VOID_RETURN;
   table= table_list->table;
 
@@ -1936,6 +1937,8 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
   TABLE *table= tables->table;
   SELECT_LEX *select_lex= &lex->select_lex;
   SELECT_LEX *old_all_select_lex= lex->all_selects_list;
+  TABLE_LIST **save_query_tables_last= lex->query_tables_last;
+  enum_sql_command save_sql_command= lex->sql_command;
   SELECT_LEX *lsel= tables->schema_select_lex;
   ST_SCHEMA_TABLE *schema_table= tables->schema_table;
   SELECT_LEX sel;
@@ -1944,40 +1947,49 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
   uint len;
   bool with_i_schema;
   enum enum_schema_tables schema_table_idx;
-  thr_lock_type lock_type;
   List<char> bases;
   List_iterator_fast<char> it(bases);
   COND *partial_cond; 
   uint derived_tables= lex->derived_tables; 
   int error= 1;
+  Open_tables_state open_tables_state_backup;
   DBUG_ENTER("get_all_tables");
 
   LINT_INIT(end);
   LINT_INIT(len);
 
+  /*
+    Let us set fake sql_command so views won't try to merge
+    themselves into main statement.
+  */
+  lex->sql_command= SQLCOM_SHOW_FIELDS;
+
+  /*
+    We should not introduce deadlocks even if we already have some
+    tables open and locked, since we won't lock tables which we will
+    open and will ignore possible name-locks for these tables.
+  */
+  thd->reset_n_backup_open_tables_state(&open_tables_state_backup);
+
   if (lsel)
   {
-    TABLE *old_open_tables= thd->open_tables;
     TABLE_LIST *show_table_list= (TABLE_LIST*) lsel->table_list.first;
     bool res;
 
     lex->all_selects_list= lsel;
-    res= open_normal_and_derived_tables(thd, show_table_list);
+    res= open_normal_and_derived_tables(thd, show_table_list,
+                                        MYSQL_LOCK_IGNORE_FLUSH);
     if (schema_table->process_table(thd, show_table_list,
                                     table, res, show_table_list->db,
                                     show_table_list->alias))
       goto err;
-    close_thread_tables(thd, 0, 0, old_open_tables);
+    close_thread_tables(thd);
     show_table_list->table= 0;
     error= 0;
     goto err;
   }
 
   schema_table_idx= get_schema_table_idx(schema_table);
-  lock_type= TL_UNLOCK;
-
-  if (schema_table_idx == SCH_TABLES)
-    lock_type= TL_READ;
 
   if (make_db_list(thd, &bases, &idx_field_vals,
                    &with_i_schema, 0))
@@ -2060,19 +2072,23 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
           else
           {
             int res;
-            TABLE *old_open_tables= thd->open_tables;
+            /*
+              Set the parent lex of 'sel' because it is needed by sel.init_query()
+              which is called inside make_table_list.
+            */
+            sel.parent_lex= lex;
             if (make_table_list(thd, &sel, base_name, file_name))
               goto err;
             TABLE_LIST *show_table_list= (TABLE_LIST*) sel.table_list.first;
-            show_table_list->lock_type= lock_type;
             lex->all_selects_list= &sel;
             lex->derived_tables= 0;
-            res= open_normal_and_derived_tables(thd, show_table_list);
+            res= open_normal_and_derived_tables(thd, show_table_list,
+                                                MYSQL_LOCK_IGNORE_FLUSH);
             if (schema_table->process_table(thd, show_table_list, table,
                                             res, base_name,
                                             show_table_list->alias))
               goto err;
-            close_thread_tables(thd, 0, 0, old_open_tables);
+            close_thread_tables(thd);
           }
         }
       }
@@ -2086,8 +2102,12 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
 
   error= 0;
 err:
+  thd->restore_backup_open_tables_state(&open_tables_state_backup);
   lex->derived_tables= derived_tables;
   lex->all_selects_list= old_all_select_lex;
+  lex->query_tables_last= save_query_tables_last;
+  *save_query_tables_last= 0;
+  lex->sql_command= save_sql_command;
   DBUG_RETURN(error);
 }
 
@@ -2192,7 +2212,8 @@ static int get_schema_tables_record(THD *thd, struct st_table_list *tables,
     TABLE_SHARE *share= show_table->s;
     handler *file= show_table->file;
 
-    file->info(HA_STATUS_VARIABLE | HA_STATUS_TIME | HA_STATUS_NO_LOCK);
+    file->info(HA_STATUS_VARIABLE | HA_STATUS_TIME | HA_STATUS_AUTO |
+               HA_STATUS_NO_LOCK);
     if (share->tmp_table == TMP_TABLE)
       table->field[3]->store("TEMPORARY", 9, cs);
     else
@@ -2248,13 +2269,8 @@ static int get_schema_tables_record(THD *thd, struct st_table_list *tables,
     table->field[12]->store((longlong) file->delete_length);
     if (show_table->found_next_number_field)
     {
-      show_table->next_number_field=show_table->found_next_number_field;
-      show_table->next_number_field->reset();
-      file->update_auto_increment();
-      table->field[13]->store((longlong) show_table->
-                              next_number_field->val_int());
+      table->field[13]->store((longlong) file->auto_increment_value);
       table->field[13]->set_notnull();
-      show_table->next_number_field=0;
     }
     if (file->create_time)
     {
@@ -2446,6 +2462,7 @@ static int get_schema_column_record(THD *thd, struct st_table_list *tables,
         table->field[5]->set_notnull();
       }
       else if (field->unireg_check == Field::NEXT_NUMBER ||
+               lex->orig_sql_command != SQLCOM_SHOW_FIELDS ||
                field->maybe_null())
         table->field[5]->set_null();                // Null as default
       else
@@ -2496,6 +2513,8 @@ static int get_schema_column_record(THD *thd, struct st_table_list *tables,
         {
           table->field[10]->store((longlong) field->max_length() - 1);
           table->field[10]->set_notnull();
+          table->field[11]->store((longlong) 0);
+          table->field[11]->set_notnull();
           break;
         }
         case FIELD_TYPE_BIT:
@@ -2727,12 +2746,14 @@ int fill_schema_proc(THD *thd, TABLE_LIST *tables, COND *cond)
   TABLE_LIST proc_tables;
   const char *wild= thd->lex->wild ? thd->lex->wild->ptr() : NullS;
   int res= 0;
-  TABLE *table= tables->table, *old_open_tables= thd->open_tables;
+  TABLE *table= tables->table;
   bool full_access;
   char definer[HOSTNAME_LENGTH+USERNAME_LENGTH+2];
+  Open_tables_state open_tables_state_backup;
   DBUG_ENTER("fill_schema_proc");
 
   strxmov(definer, thd->priv_user, "@", thd->priv_host, NullS);
+  /* We use this TABLE_LIST instance only for checking of privileges. */
   bzero((char*) &proc_tables,sizeof(proc_tables));
   proc_tables.db= (char*) "mysql";
   proc_tables.db_length= 5;
@@ -2740,7 +2761,7 @@ int fill_schema_proc(THD *thd, TABLE_LIST *tables, COND *cond)
   proc_tables.table_name_length= 4;
   proc_tables.lock_type= TL_READ;
   full_access= !check_table_access(thd, SELECT_ACL, &proc_tables, 1);
-  if (!(proc_table= open_ltable(thd, &proc_tables, TL_READ)))
+  if (!(proc_table= open_proc_table_for_read(thd, &open_tables_state_backup)))
   {
     DBUG_RETURN(1);
   }
@@ -2766,7 +2787,7 @@ int fill_schema_proc(THD *thd, TABLE_LIST *tables, COND *cond)
 
 err:
   proc_table->file->ha_index_end();
-  close_thread_tables(thd, 0, 0, old_open_tables);
+  close_proc_table(thd, &open_tables_state_backup);
   DBUG_RETURN(res);
 }
 
@@ -2983,9 +3004,13 @@ static bool store_trigger(THD *thd, TABLE *table, const char *db,
                           const char *tname, LEX_STRING *trigger_name,
                           enum trg_event_type event,
                           enum trg_action_time_type timing,
-                          LEX_STRING *trigger_stmt)
+                          LEX_STRING *trigger_stmt,
+                          ulong sql_mode)
 {
   CHARSET_INFO *cs= system_charset_info;
+  byte *sql_mode_str;
+  ulong sql_mode_len;
+
   restore_record(table, s->default_values);
   table->field[1]->store(db, strlen(db), cs);
   table->field[2]->store(trigger_name->str, trigger_name->length, cs);
@@ -2999,6 +3024,12 @@ static bool store_trigger(THD *thd, TABLE *table, const char *db,
                           trg_action_time_type_names[timing].length, cs);
   table->field[14]->store("OLD", 3, cs);
   table->field[15]->store("NEW", 3, cs);
+
+  sql_mode_str=
+    sys_var_thd_sql_mode::symbolic_mode_representation(thd,
+                                                       sql_mode,
+                                                       &sql_mode_len);
+  table->field[17]->store((const char*)sql_mode_str, sql_mode_len, cs);
   return schema_table_store_record(thd, table);
 }
 
@@ -3031,13 +3062,16 @@ static int get_schema_triggers_record(THD *thd, struct st_table_list *tables,
       {
         LEX_STRING trigger_name;
         LEX_STRING trigger_stmt;
+        ulong sql_mode;
         if (triggers->get_trigger_info(thd, (enum trg_event_type) event,
                                        (enum trg_action_time_type)timing,
-                                       &trigger_name, &trigger_stmt))
+                                       &trigger_name, &trigger_stmt,
+                                       &sql_mode))
           continue;
         if (store_trigger(thd, table, base_name, file_name, &trigger_name,
                          (enum trg_event_type) event,
-                         (enum trg_action_time_type) timing, &trigger_stmt))
+                         (enum trg_action_time_type) timing, &trigger_stmt,
+                         sql_mode))
           DBUG_RETURN(1);
       }
     }
@@ -3157,7 +3191,8 @@ int fill_open_tables(THD *thd, TABLE_LIST *tables, COND *cond)
   TABLE *table= tables->table;
   CHARSET_INFO *cs= system_charset_info;
   OPEN_TABLE_LIST *open_list;
-  if (!(open_list=list_open_tables(thd,wild)) && thd->is_fatal_error)
+  if (!(open_list=list_open_tables(thd,thd->lex->select_lex.db, wild))
+            && thd->is_fatal_error)
     DBUG_RETURN(1);
 
   for (; open_list ; open_list=open_list->next)
@@ -3543,9 +3578,8 @@ int mysql_schema_table(THD *thd, LEX *lex, TABLE_LIST *table_list)
   if (table_list->schema_table_reformed) // show command
   {
     SELECT_LEX *sel= lex->current_select;
-    uint i= 0;
     Item *item;
-    Field_translator *transl;
+    Field_translator *transl, *org_transl;
 
     if (table_list->field_translation)
     {
@@ -3566,16 +3600,17 @@ int mysql_schema_table(THD *thd, LEX *lex, TABLE_LIST *table_list)
     {
       DBUG_RETURN(1);
     }
-    while ((item= it++))
+    for (org_transl= transl; (item= it++); transl++)
     {
-      char *name= item->name;
-      transl[i].item= item;
-      if (!item->fixed && item->fix_fields(thd, &transl[i].item))
+      transl->item= item;
+      transl->name= item->name;
+      if (!item->fixed && item->fix_fields(thd, &transl->item))
+      {
         DBUG_RETURN(1);
-      transl[i++].name= name;
+      }
     }
-    table_list->field_translation= transl;
-    table_list->field_translation_end= transl + sel->item_list.elements;
+    table_list->field_translation= org_transl;
+    table_list->field_translation_end= transl;
   }
 
   DBUG_RETURN(0);
@@ -3650,11 +3685,6 @@ bool get_schema_tables_result(JOIN *join)
     TABLE_LIST *table_list= tab->table->pos_in_table_list;
     if (table_list->schema_table && thd->fill_derived_tables())
     {
-      TABLE_LIST **query_tables_last= lex->query_tables_last;
-      TABLE *old_derived_tables= thd->derived_tables;
-      MYSQL_LOCK *sql_lock= thd->lock;
-      lex->sql_command= SQLCOM_SHOW_FIELDS;
-      DBUG_ASSERT(!*query_tables_last);
       if (&lex->unit != lex->current_select->master_unit()) // is subselect
       {
         table_list->table->file->extra(HA_EXTRA_RESET_STATE);
@@ -3665,16 +3695,9 @@ bool get_schema_tables_result(JOIN *join)
       else
         table_list->table->file->records= 0;
 
-      thd->derived_tables= 0;
-      thd->lock=0;
       if (table_list->schema_table->fill_table(thd, table_list,
                                                tab->select_cond))
         result= 1;
-      thd->lock= sql_lock;
-      lex->sql_command= SQLCOM_SELECT;
-      thd->derived_tables= old_derived_tables;
-      lex->query_tables_last= query_tables_last;
-      *query_tables_last= 0;
     }
   }
   thd->no_warnings_for_error= 0;
@@ -3949,6 +3972,7 @@ ST_FIELD_INFO triggers_fields_info[]=
   {"ACTION_REFERENCE_OLD_ROW", 3, MYSQL_TYPE_STRING, 0, 0, 0},
   {"ACTION_REFERENCE_NEW_ROW", 3, MYSQL_TYPE_STRING, 0, 0, 0},
   {"CREATED", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, "Created"},
+  {"SQL_MODE", 65535, MYSQL_TYPE_STRING, 0, 0, "sql_mode"},
   {0, 0, MYSQL_TYPE_STRING, 0, 0, 0}
 };
 
@@ -3967,46 +3991,46 @@ ST_FIELD_INFO variables_fields_info[]=
 
 ST_SCHEMA_TABLE schema_tables[]=
 {
-  {"SCHEMATA", schema_fields_info, create_schema_table,
-   fill_schema_shemata, make_schemata_old_format, 0, 1, -1, 0},
-  {"TABLES", tables_fields_info, create_schema_table, 
-   get_all_tables, make_old_format, get_schema_tables_record, 1, 2, 0},
-  {"COLUMNS", columns_fields_info, create_schema_table, 
-   get_all_tables, make_columns_old_format, get_schema_column_record, 1, 2, 0},
   {"CHARACTER_SETS", charsets_fields_info, create_schema_table, 
    fill_schema_charsets, make_character_sets_old_format, 0, -1, -1, 0},
   {"COLLATIONS", collation_fields_info, create_schema_table, 
    fill_schema_collation, make_old_format, 0, -1, -1, 0},
   {"COLLATION_CHARACTER_SET_APPLICABILITY", coll_charset_app_fields_info,
    create_schema_table, fill_schema_coll_charset_app, 0, 0, -1, -1, 0},
-  {"ROUTINES", proc_fields_info, create_schema_table, 
-    fill_schema_proc, make_proc_old_format, 0, -1, -1, 0},
-  {"STATISTICS", stat_fields_info, create_schema_table, 
-    get_all_tables, make_old_format, get_schema_stat_record, 1, 2, 0},
-  {"VIEWS", view_fields_info, create_schema_table, 
-    get_all_tables, 0, get_schema_views_record, 1, 2, 0},
-  {"USER_PRIVILEGES", user_privileges_fields_info, create_schema_table, 
-    fill_schema_user_privileges, 0, 0, -1, -1, 0},
-  {"SCHEMA_PRIVILEGES", schema_privileges_fields_info, create_schema_table,
-    fill_schema_schema_privileges, 0, 0, -1, -1, 0},
-  {"TABLE_PRIVILEGES", table_privileges_fields_info, create_schema_table,
-    fill_schema_table_privileges, 0, 0, -1, -1, 0},
+  {"COLUMNS", columns_fields_info, create_schema_table, 
+   get_all_tables, make_columns_old_format, get_schema_column_record, 1, 2, 0},
   {"COLUMN_PRIVILEGES", column_privileges_fields_info, create_schema_table,
     fill_schema_column_privileges, 0, 0, -1, -1, 0},
-  {"TABLE_CONSTRAINTS", table_constraints_fields_info, create_schema_table,
-    get_all_tables, 0, get_schema_constraints_record, 3, 4, 0},
   {"KEY_COLUMN_USAGE", key_column_usage_fields_info, create_schema_table,
     get_all_tables, 0, get_schema_key_column_usage_record, 4, 5, 0},
-  {"TABLE_NAMES", table_names_fields_info, create_schema_table,
-   get_all_tables, make_table_names_old_format, 0, 1, 2, 1},
   {"OPEN_TABLES", open_tables_fields_info, create_schema_table,
    fill_open_tables, make_old_format, 0, -1, -1, 1},
+  {"ROUTINES", proc_fields_info, create_schema_table, 
+    fill_schema_proc, make_proc_old_format, 0, -1, -1, 0},
+  {"SCHEMATA", schema_fields_info, create_schema_table,
+   fill_schema_shemata, make_schemata_old_format, 0, 1, -1, 0},
+  {"SCHEMA_PRIVILEGES", schema_privileges_fields_info, create_schema_table,
+    fill_schema_schema_privileges, 0, 0, -1, -1, 0},
+  {"STATISTICS", stat_fields_info, create_schema_table, 
+    get_all_tables, make_old_format, get_schema_stat_record, 1, 2, 0},
   {"STATUS", variables_fields_info, create_schema_table, fill_status, 
    make_old_format, 0, -1, -1, 1},
-  {"TRIGGERS", triggers_fields_info, create_schema_table, 
+  {"TABLES", tables_fields_info, create_schema_table, 
+   get_all_tables, make_old_format, get_schema_tables_record, 1, 2, 0},
+  {"TABLE_CONSTRAINTS", table_constraints_fields_info, create_schema_table,
+    get_all_tables, 0, get_schema_constraints_record, 3, 4, 0},
+  {"TABLE_NAMES", table_names_fields_info, create_schema_table,
+   get_all_tables, make_table_names_old_format, 0, 1, 2, 1},
+  {"TABLE_PRIVILEGES", table_privileges_fields_info, create_schema_table,
+    fill_schema_table_privileges, 0, 0, -1, -1, 0},
+  {"TRIGGERS", triggers_fields_info, create_schema_table,
    get_all_tables, make_old_format, get_schema_triggers_record, 5, 6, 0},
   {"VARIABLES", variables_fields_info, create_schema_table, fill_variables,
    make_old_format, 0, -1, -1, 1},
+  {"VIEWS", view_fields_info, create_schema_table, 
+    get_all_tables, 0, get_schema_views_record, 1, 2, 0},
+  {"USER_PRIVILEGES", user_privileges_fields_info, create_schema_table, 
+    fill_schema_user_privileges, 0, 0, -1, -1, 0},
   {0, 0, 0, 0, 0, 0, 0, 0, 0}
 };
 
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index e91142d450ad95ab31be15e84e292a0d3e2c377b..8874a70327edc8abe4db506bf57bd400882609d7 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -229,7 +229,6 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
   for (table= tables; table; table= table->next_local)
   {
     char *db=table->db;
-    uint flags;
     mysql_ha_flush(thd, table, MYSQL_HA_CLOSE_FINAL);
     if (!close_temporary_table(thd, db, table->table_name))
     {
@@ -240,10 +239,11 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
     error=0;
     if (!drop_temporary)
     {
-      abort_locked_tables(thd,db,table->table_name);
-      flags= RTFC_WAIT_OTHER_THREAD_FLAG | RTFC_CHECK_KILLED_FLAG;
-      remove_table_from_cache(thd,db,table->table_name,flags);
-      drop_locked_tables(thd,db,table->table_name);
+      abort_locked_tables(thd, db, table->table_name);
+      remove_table_from_cache(thd, db, table->table_name,
+	                      RTFC_WAIT_OTHER_THREAD_FLAG |
+			      RTFC_CHECK_KILLED_FLAG);
+      drop_locked_tables(thd, db, table->table_name);
       if (thd->killed)
       {
         thd->no_warnings_for_error= 0;
@@ -1620,12 +1620,10 @@ bool mysql_create_table(THD *thd,const char *db, const char *table_name,
     create_info->data_file_name= create_info->index_file_name= 0;
   create_info->table_options=db_options;
 
-  if (rea_create_table(thd, path, create_info, fields, key_count,
+  if (rea_create_table(thd, path, db, table_name,
+                       create_info, fields, key_count,
 		       key_info_buffer))
-  {
-    /* my_error(ER_CANT_CREATE_TABLE,MYF(0),table_name,my_errno); */
     goto end;
-  }
   if (create_info->options & HA_LEX_CREATE_TMP_TABLE)
   {
     /* Open table and put in temporary table list */
@@ -2250,14 +2248,14 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
     /* Close all instances of the table to allow repair to rename files */
     if (lock_type == TL_WRITE && table->table->s->version)
     {
-      uint flags;
       pthread_mutex_lock(&LOCK_open);
       const char *old_message=thd->enter_cond(&COND_refresh, &LOCK_open,
 					      "Waiting to get writelock");
       mysql_lock_abort(thd,table->table);
-      flags= RTFC_WAIT_OTHER_THREAD_FLAG | RTFC_CHECK_KILLED_FLAG;
       remove_table_from_cache(thd, table->table->s->db,
-                              table->table->s->table_name, flags);
+                              table->table->s->table_name,
+                              RTFC_WAIT_OTHER_THREAD_FLAG |
+                              RTFC_CHECK_KILLED_FLAG);
       thd->exit_cond(old_message);
       if (thd->killed)
 	goto err;
@@ -2631,6 +2629,15 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table,
     }
   }
 
+  /* 
+     create like should be not allowed for Views, Triggers, ... 
+  */
+  if (mysql_frm_type(src_path) != FRMTYPE_TABLE)
+  {
+    my_error(ER_WRONG_OBJECT, MYF(0), src_db, src_table, "BASE TABLE");
+    goto err;
+  }
+
   /*
     Validate the destination table
 
@@ -2660,8 +2667,14 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table,
   /*
     Create a new table by copying from source table
   */
-  if (my_copy(src_path, dst_path, MYF(MY_WME|MY_DONT_OVERWRITE_FILE)))
+  if (my_copy(src_path, dst_path, MYF(MY_DONT_OVERWRITE_FILE)))
+  {
+    if (my_errno == ENOENT)
+      my_error(ER_BAD_DB_ERROR,MYF(0),db);
+    else
+      my_error(ER_CANT_CREATE_FILE,MYF(0),dst_path,my_errno);
     goto err;
+  }
 
   /*
     As mysql_truncate don't work on a new table at this stage of
@@ -3729,9 +3742,10 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
     if (table)
     {
       VOID(table->file->extra(HA_EXTRA_FORCE_REOPEN)); // Use new file
+      /* Mark in-use copies old */
       remove_table_from_cache(thd,db,table_name,RTFC_NO_FLAG);
-                                                 // Mark in-use copies old
-      mysql_lock_abort(thd,table);		 // end threads waiting on lock
+      /* end threads waiting on lock */
+      mysql_lock_abort(thd,table);
     }
     VOID(quick_rm_table(old_db_type,db,old_name));
     if (close_data_tables(thd,db,table_name) ||
diff --git a/sql/sql_test.cc b/sql/sql_test.cc
index 722568e7f5378749fe756b30f64a1e09e6b94974..ddd0f3fe16240dde623753b2ab7f0d1894cf2250 100644
--- a/sql/sql_test.cc
+++ b/sql/sql_test.cc
@@ -370,7 +370,7 @@ static void display_table_locks(void)
 
   VOID(my_init_dynamic_array(&saved_table_locks,sizeof(TABLE_LOCK_INFO),open_cache.records + 20,50));
   VOID(pthread_mutex_lock(&THR_LOCK_lock));
-  for (list=thr_lock_thread_list ; list ; list=rest(list))
+  for (list= thr_lock_thread_list; list; list= list_rest(list))
   {
     THR_LOCK *lock=(THR_LOCK*) list->data;
 
diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc
index a7aee95197e5f9eec61c5c232d526a047b293e01..053dfdfc99029191237e8d1b4981944f68fb8da1 100644
--- a/sql/sql_trigger.cc
+++ b/sql/sql_trigger.cc
@@ -32,8 +32,12 @@ const char * const triggers_file_ext= ".TRG";
 */
 static File_option triggers_file_parameters[]=
 {
-  {{(char*)"triggers", 8}, offsetof(class Table_triggers_list, definitions_list),
-   FILE_OPTIONS_STRLIST},
+  {{(char*)"triggers", 8},
+    offsetof(class Table_triggers_list, definitions_list),
+    FILE_OPTIONS_STRLIST},
+  {{(char*)"sql_modes", 13},
+    offsetof(class Table_triggers_list, definition_modes_list),
+    FILE_OPTIONS_ULLLIST},
   {{0, 0}, 0, FILE_OPTIONS_STRING}
 };
 
@@ -127,12 +131,13 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create)
     DBUG_RETURN(TRUE);
 
   /*
-    We do not allow creation of triggers on views or temporary tables.
-    We have to do this check here and not in
-    Table_triggers_list::create_trigger() because we want to avoid messing
-    with table cash for views and temporary tables.
+    We do not allow creation of triggers on temporary tables. We also don't
+    allow creation of triggers on views but fulfilment of this restriction
+    is guaranteed by open_ltable(). It is better to have this check here
+    than do it in Table_triggers_list::create_trigger() and mess with table
+    cache.
   */
-  if (tables->view || table->s->tmp_table != NO_TMP_TABLE)
+  if (table->s->tmp_table != NO_TMP_TABLE)
   {
     my_error(ER_TRG_ON_VIEW_OR_TEMP_TABLE, MYF(0), tables->alias);
     DBUG_RETURN(TRUE);
@@ -221,12 +226,13 @@ bool Table_triggers_list::create_trigger(THD *thd, TABLE_LIST *tables)
        trigname_path[FN_REFLEN];
   LEX_STRING dir, file, trigname_file;
   LEX_STRING *trg_def, *name;
+  ulonglong *trg_sql_mode;
   Item_trigger_field *trg_field;
   struct st_trigname trigname;
 
 
   /* Trigger must be in the same schema as target table. */
-  if (my_strcasecmp(system_charset_info, table->s->db,
+  if (my_strcasecmp(table_alias_charset, table->s->db,
                     lex->spname->m_db.str ? lex->spname->m_db.str :
                                             thd->db))
   {
@@ -307,11 +313,15 @@ bool Table_triggers_list::create_trigger(THD *thd, TABLE_LIST *tables)
   */
   if (!(trg_def= (LEX_STRING *)alloc_root(&table->mem_root,
                                           sizeof(LEX_STRING))) ||
-      definitions_list.push_back(trg_def, &table->mem_root))
+      definitions_list.push_back(trg_def, &table->mem_root) ||
+      !(trg_sql_mode= (ulonglong*)alloc_root(&table->mem_root,
+                                             sizeof(ulonglong))) ||
+      definition_modes_list.push_back(trg_sql_mode, &table->mem_root))
     goto err_with_cleanup;
 
   trg_def->str= thd->query;
   trg_def->length= thd->query_length;
+  *trg_sql_mode= thd->variables.sql_mode;
 
   if (!sql_create_definition_file(&dir, &file, &triggers_file_type,
                                   (gptr)this, triggers_file_parameters, 3))
@@ -390,13 +400,15 @@ bool Table_triggers_list::drop_trigger(THD *thd, TABLE_LIST *tables)
   LEX_STRING *name;
   List_iterator_fast<LEX_STRING> it_name(names_list);
   List_iterator<LEX_STRING>      it_def(definitions_list);
+  List_iterator<ulonglong>       it_mod(definition_modes_list);
   char path[FN_REFLEN];
 
   while ((name= it_name++))
   {
     it_def++;
+    it_mod++;
 
-    if (my_strcasecmp(system_charset_info, lex->spname->m_name.str,
+    if (my_strcasecmp(table_alias_charset, lex->spname->m_name.str,
                       name->str) == 0)
     {
       /*
@@ -404,6 +416,7 @@ bool Table_triggers_list::drop_trigger(THD *thd, TABLE_LIST *tables)
         clean trigger removing since table will be reopened anyway.
       */
       it_def.remove();
+      it_mod.remove();
 
       if (definitions_list.is_empty())
       {
@@ -520,6 +533,7 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db,
   char path_buff[FN_REFLEN];
   LEX_STRING path;
   File_parser *parser;
+  LEX_STRING save_db;
 
   DBUG_ENTER("Table_triggers_list::check_n_load");
 
@@ -540,8 +554,7 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db,
 
   if ((parser= sql_parse_prepare(&path, &table->mem_root, 1)))
   {
-    if (!strncmp(triggers_file_type.str, parser->type()->str,
-                 parser->type()->length))
+    if (is_equal(&triggers_file_type, parser->type()))
     {
       Table_triggers_list *triggers=
         new (&table->mem_root) Table_triggers_list(table);
@@ -549,10 +562,48 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db,
       if (!triggers)
         DBUG_RETURN(1);
 
+      /*
+        We don't have sql_modes in old versions of .TRG file, so we should
+        initialize list for safety.
+      */
+      triggers->definition_modes_list.empty();
+
       if (parser->parse((gptr)triggers, &table->mem_root,
-                        triggers_file_parameters, 1))
+                        triggers_file_parameters, 2))
         DBUG_RETURN(1);
 
+      List_iterator_fast<LEX_STRING> it(triggers->definitions_list);
+      LEX_STRING *trg_create_str, *trg_name_str;
+      ulonglong *trg_sql_mode;
+
+      if (triggers->definition_modes_list.is_empty() &&
+          !triggers->definitions_list.is_empty())
+      {
+        /*
+          It is old file format => we should fill list of sql_modes.
+
+          We use one mode (current) for all triggers, because we have not
+          information about mode in old format.
+        */
+        if (!(trg_sql_mode= (ulonglong*)alloc_root(&table->mem_root,
+                                                   sizeof(ulonglong))))
+        {
+          DBUG_RETURN(1); // EOM
+        }
+        *trg_sql_mode= global_system_variables.sql_mode;
+        while ((trg_create_str= it++))
+        {
+          if (triggers->definition_modes_list.push_back(trg_sql_mode,
+                                                        &table->mem_root))
+          {
+            DBUG_RETURN(1); // EOM
+          }
+        }
+        it.rewind();
+      }
+
+      DBUG_ASSERT(triggers->definition_modes_list.elements ==
+                  triggers->definitions_list.elements);
       table->triggers= triggers;
 
       /*
@@ -564,8 +615,7 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db,
               alloc_root(&table->mem_root, triggers->sroutines_key.length)))
         DBUG_RETURN(1);
       triggers->sroutines_key.str[0]= TYPE_ENUM_TRIGGER;
-      strmov(strmov(strmov(triggers->sroutines_key.str+1, db), "."),
-             table_name);
+      strxmov(triggers->sroutines_key.str+1, db, ".", table_name, NullS);
 
       /*
         TODO: This could be avoided if there is no triggers
@@ -574,15 +624,21 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db,
       if (!names_only && triggers->prepare_record1_accessors(table))
         DBUG_RETURN(1);
 
-      List_iterator_fast<LEX_STRING> it(triggers->definitions_list);
-      LEX_STRING *trg_create_str, *trg_name_str;
       char *trg_name_buff;
+      List_iterator_fast<ulonglong> itm(triggers->definition_modes_list);
       LEX *old_lex= thd->lex, lex;
+      ulong save_sql_mode= thd->variables.sql_mode;
 
       thd->lex= &lex;
 
+      save_db.str= thd->db;
+      save_db.length= thd->db_length;
+      thd->db_length= strlen(db);
+      thd->db= (char *) db;
       while ((trg_create_str= it++))
       {
+        trg_sql_mode= itm++;
+        thd->variables.sql_mode= (ulong)*trg_sql_mode;
         lex_start(thd, (uchar*)trg_create_str->str, trg_create_str->length);
 
         if (yyparse((void *)thd) || thd->is_fatal_error)
@@ -595,9 +651,11 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db,
           goto err_with_lex_cleanup;
         }
 
+        lex.sphead->m_sql_mode= *trg_sql_mode;
         triggers->bodies[lex.trg_chistics.event]
                              [lex.trg_chistics.action_time]= lex.sphead;
-        if (triggers->names_list.push_back(&lex.sphead->m_name, &table->mem_root))
+        if (triggers->names_list.push_back(&lex.sphead->m_name,
+                                           &table->mem_root))
             goto err_with_lex_cleanup;
 
         if (names_only)
@@ -611,8 +669,9 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db,
           in old/new versions of row in trigger to Field objects in table being
           opened.
 
-          We ignore errors here, because if even something is wrong we still will
-          be willing to open table to perform some operations (e.g. SELECT)...
+          We ignore errors here, because if even something is wrong we still
+          will be willing to open table to perform some operations (e.g.
+          SELECT)...
           Anyway some things can be checked only during trigger execution.
         */
         for (Item_trigger_field *trg_field=
@@ -623,7 +682,10 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db,
 
         lex_end(&lex);
       }
+      thd->db= save_db.str;
+      thd->db_length= save_db.length;
       thd->lex= old_lex;
+      thd->variables.sql_mode= save_sql_mode;
 
       DBUG_RETURN(0);
 
@@ -631,6 +693,9 @@ err_with_lex_cleanup:
       // QQ: anything else ?
       lex_end(&lex);
       thd->lex= old_lex;
+      thd->variables.sql_mode= save_sql_mode;
+      thd->db= save_db.str;
+      thd->db_length= save_db.length;
       DBUG_RETURN(1);
     }
 
@@ -639,7 +704,7 @@ err_with_lex_cleanup:
       be merged into .FRM anyway.
     */
     my_error(ER_WRONG_OBJECT, MYF(0),
-             table_name, triggers_file_ext, "TRIGGER");
+             table_name, triggers_file_ext+1, "TRIGGER");
     DBUG_RETURN(1);
   }
 
@@ -657,6 +722,7 @@ err_with_lex_cleanup:
       time_type - trigger action time
       name      - returns name of trigger
       stmt      - returns statement of trigger
+      sql_mode  - returns sql_mode of trigger
 
   RETURN VALUE
     False - success
@@ -666,7 +732,8 @@ err_with_lex_cleanup:
 bool Table_triggers_list::get_trigger_info(THD *thd, trg_event_type event,
                                            trg_action_time_type time_type,
                                            LEX_STRING *trigger_name,
-                                           LEX_STRING *trigger_stmt)
+                                           LEX_STRING *trigger_stmt,
+                                           ulong *sql_mode)
 {
   sp_head *body;
   DBUG_ENTER("get_trigger_info");
@@ -674,6 +741,7 @@ bool Table_triggers_list::get_trigger_info(THD *thd, trg_event_type event,
   {
     *trigger_name= body->m_name;
     *trigger_stmt= body->m_body;
+    *sql_mode= body->m_sql_mode;
     DBUG_RETURN(0);
   }
   DBUG_RETURN(1);
@@ -718,10 +786,9 @@ static TABLE_LIST *add_table_for_trigger(THD *thd, sp_name *trig)
   if (!(parser= sql_parse_prepare(&path, thd->mem_root, 1)))
     DBUG_RETURN(0);
 
-  if (strncmp(trigname_file_type.str, parser->type()->str,
-              parser->type()->length))
+  if (!is_equal(&trigname_file_type, parser->type()))
   {
-    my_error(ER_WRONG_OBJECT, MYF(0), trig->m_name.str, trigname_file_ext,
+    my_error(ER_WRONG_OBJECT, MYF(0), trig->m_name.str, trigname_file_ext+1,
              "TRIGGERNAME");
     DBUG_RETURN(0);
   }
@@ -802,3 +869,39 @@ end:
   free_root(&table.mem_root, MYF(0));
   DBUG_RETURN(result);
 }
+
+
+
+bool Table_triggers_list::process_triggers(THD *thd, trg_event_type event,
+                                           trg_action_time_type time_type,
+                                           bool old_row_is_record1)
+{
+  int res= 0;
+
+  if (bodies[event][time_type])
+  {
+    Sub_statement_state statement_state;
+
+    if (old_row_is_record1)
+    {
+      old_field= record1_field;
+      new_field= table->field;
+    }
+    else
+    {
+      new_field= record1_field;
+      old_field= table->field;
+    }
+
+    /*
+      FIXME: We should juggle with security context here (because trigger
+      should be invoked with creator rights).
+    */
+
+    thd->reset_sub_statement_state(&statement_state, SUB_STMT_TRIGGER);
+    res= bodies[event][time_type]->execute_function(thd, 0, 0, 0);
+    thd->restore_sub_statement_state(&statement_state);
+  }
+
+  return res;
+}
diff --git a/sql/sql_trigger.h b/sql/sql_trigger.h
index e751741fa34428d8abb227e72a9197e162bee55e..d9b39cc30342918f95df681c73098e80bdb57f27 100644
--- a/sql/sql_trigger.h
+++ b/sql/sql_trigger.h
@@ -20,6 +20,7 @@
 
   QQ: Will it be merged into TABLE in future ?
 */
+
 class Table_triggers_list: public Sql_alloc
 {
   /* Triggers as SPs grouped by event, action_time */
@@ -60,6 +61,10 @@ public:
     It have to be public because we are using it directly from parser.
   */
   List<LEX_STRING>  definitions_list;
+  /*
+    List of sql modes for triggers
+  */
+  List<ulonglong> definition_modes_list;
 
   Table_triggers_list(TABLE *table_arg):
     record1_field(0), table(table_arg)
@@ -72,58 +77,11 @@ public:
   bool drop_trigger(THD *thd, TABLE_LIST *table);
   bool process_triggers(THD *thd, trg_event_type event,
                         trg_action_time_type time_type,
-                        bool old_row_is_record1)
-  {
-    int res= 0;
-
-    if (bodies[event][time_type])
-    {
-      bool save_in_sub_stmt= thd->transaction.in_sub_stmt;
-#ifndef EMBEDDED_LIBRARY
-      /* Surpress OK packets in case if we will execute statements */
-      my_bool nsok= thd->net.no_send_ok;
-      thd->net.no_send_ok= TRUE;
-#endif
-
-      if (old_row_is_record1)
-      {
-        old_field= record1_field;
-        new_field= table->field;
-      }
-      else
-      {
-        new_field= record1_field;
-        old_field= table->field;
-      }
-
-      /*
-        FIXME: We should juggle with security context here (because trigger
-        should be invoked with creator rights).
-      */
-      /*
-	We disable binlogging, as in SP/functions, even though currently
-        triggers can't do updates. When triggers can do updates, someone
-        should add such a trigger to rpl_sp.test to verify that the update
-        does NOT go into binlog.
-      */
-      tmp_disable_binlog(thd);
-      thd->transaction.in_sub_stmt= TRUE;
-
-      res= bodies[event][time_type]->execute_function(thd, 0, 0, 0);
-
-      thd->transaction.in_sub_stmt= save_in_sub_stmt;
-      reenable_binlog(thd);
-
-#ifndef EMBEDDED_LIBRARY
-      thd->net.no_send_ok= nsok;
-#endif
-    }
-
-    return res;
-  }
+                        bool old_row_is_record1);
   bool get_trigger_info(THD *thd, trg_event_type event,
                         trg_action_time_type time_type,
-                        LEX_STRING *trigger_name, LEX_STRING *trigger_stmt);
+                        LEX_STRING *trigger_name, LEX_STRING *trigger_stmt,
+                        ulong *sql_mode);
 
   static bool check_n_load(THD *thd, const char *db, const char *table_name,
                            TABLE *table, bool names_only);
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index f2b637dc5f499cf558f683baf2325241e1441df7..72c96e816828d162599c954720b5a4965721636e 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -119,8 +119,6 @@ void
 st_select_lex_unit::init_prepare_fake_select_lex(THD *thd) 
 {
   thd->lex->current_select= fake_select_lex;
-  fake_select_lex->ftfunc_list_alloc.empty();
-  fake_select_lex->ftfunc_list= &fake_select_lex->ftfunc_list_alloc;
   fake_select_lex->table_list.link_in_list((byte *)&result_table_list,
 					   (byte **)
 					   &result_table_list.next_local);
@@ -235,7 +233,13 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
 
     if ((res= (res || thd_arg->is_fatal_error)))
       goto err;
-    if (sl == first_select)
+    /*
+      Use items list of underlaid select for derived tables to preserve
+      information about fields lengths and exact types
+    */
+    if (!is_union)
+      types= first_select_in_union()->item_list;
+    else if (sl == first_select)
     {
       /*
         We need to create an empty table object. It is used
@@ -285,6 +289,7 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
     List_iterator_fast<Item> tp(types);
     Query_arena *arena= thd->current_arena;
     Item *type;
+    ulonglong create_options;
 
     while ((type= tp++))
     {
@@ -295,15 +300,24 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
         goto err;
       }
     }
+    
+    create_options= (first_select_in_union()->options | thd_arg->options |
+                     TMP_TABLE_ALL_COLUMNS);
+    /*
+      Force the temporary table to be a MyISAM table if we're going to use
+      fullext functions (MATCH ... AGAINST .. IN BOOLEAN MODE) when reading
+      from it (this should be removed in 5.2 when fulltext search is moved 
+      out of MyISAM).
+    */
+    if (global_parameters->ftfunc_list->elements)
+      create_options= create_options | TMP_TABLE_FORCE_MYISAM;
 
     union_result->tmp_table_param.field_count= types.elements;
     if (!(table= create_tmp_table(thd_arg,
 				  &union_result->tmp_table_param, types,
 				  (ORDER*) 0, (bool) union_distinct, 1, 
-				  (first_select_in_union()->options |
-				   thd_arg->options |
-				   TMP_TABLE_ALL_COLUMNS),
-				  HA_POS_ERROR, (char *) tmp_table_alias)))
+                                  create_options, HA_POS_ERROR,
+                                  (char *) tmp_table_alias)))
       goto err;
     table->file->extra(HA_EXTRA_WRITE_CACHE);
     table->file->extra(HA_EXTRA_IGNORE_DUP_KEY);
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 8a5b4ad8eaea2feee2c540afbb495672fed19d04..b596420692aea75a04cdcf9c2b0ebece55c9be58 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -138,7 +138,7 @@ int mysql_update(THD *thd,
 
   LINT_INIT(timestamp_query_id);
 
-  if (open_tables(thd, &table_list, &table_count))
+  if (open_tables(thd, &table_list, &table_count, 0))
     DBUG_RETURN(1);
 
   if (table_list->multitable_view)
@@ -555,7 +555,7 @@ bool mysql_prepare_update(THD *thd, TABLE_LIST *table_list,
   tables.table= table;
   tables.alias= table_list->alias;
 
-  if (setup_tables(thd, &select_lex->context,
+  if (setup_tables(thd, &select_lex->context, &select_lex->top_join_list,
                    table_list, conds, &select_lex->leaf_tables,
                    FALSE) ||
       setup_conds(thd, table_list, select_lex->leaf_tables, conds) ||
@@ -632,7 +632,8 @@ bool mysql_multi_update_prepare(THD *thd)
   thd->lex->sql_command= SQLCOM_UPDATE_MULTI;
 
   /* open tables and create derived ones, but do not lock and fill them */
-  if ((original_multiupdate && open_tables(thd, &table_list, & table_count)) ||
+  if ((original_multiupdate &&
+       open_tables(thd, &table_list, &table_count, 0)) ||
       mysql_handle_derived(lex, &mysql_derived_prepare))
     DBUG_RETURN(TRUE);
   /*
@@ -642,6 +643,7 @@ bool mysql_multi_update_prepare(THD *thd)
   */
 
   if (setup_tables(thd, &lex->select_lex.context,
+                   &lex->select_lex.top_join_list,
                    table_list, &lex->select_lex.where,
                    &lex->select_lex.leaf_tables, FALSE))
     DBUG_RETURN(TRUE);
@@ -760,6 +762,7 @@ bool mysql_multi_update_prepare(THD *thd)
       tbl->cleanup_items();
 
     if (setup_tables(thd, &lex->select_lex.context,
+                     &lex->select_lex.top_join_list,
                      table_list, &lex->select_lex.where,
                      &lex->select_lex.leaf_tables, FALSE) ||
         setup_fields_with_no_wrap(thd, 0, *fields, 1, 0, 0))
@@ -810,7 +813,7 @@ bool mysql_multi_update(THD *thd,
                         List<Item> *fields,
                         List<Item> *values,
                         COND *conds,
-                        ulong options,
+                        ulonglong options,
                         enum enum_duplicates handle_duplicates, bool ignore,
                         SELECT_LEX_UNIT *unit, SELECT_LEX *select_lex)
 {
@@ -820,7 +823,7 @@ bool mysql_multi_update(THD *thd,
   if (mysql_multi_update_prepare(thd))
     DBUG_RETURN(TRUE);
 
-  if (!(result= new multi_update(thd, table_list,
+  if (!(result= new multi_update(table_list,
 				 thd->lex->select_lex.leaf_tables,
 				 fields, values,
 				 handle_duplicates, ignore)))
@@ -846,13 +849,13 @@ bool mysql_multi_update(THD *thd,
 }
 
 
-multi_update::multi_update(THD *thd_arg, TABLE_LIST *table_list,
+multi_update::multi_update(TABLE_LIST *table_list,
 			   TABLE_LIST *leaves_list,
 			   List<Item> *field_list, List<Item> *value_list,
 			   enum enum_duplicates handle_duplicates_arg,
                            bool ignore_arg)
   :all_tables(table_list), leaves(leaves_list), update_tables(0),
-   thd(thd_arg), tmp_tables(0), updated(0), found(0), fields(field_list),
+   tmp_tables(0), updated(0), found(0), fields(field_list),
    values(value_list), table_count(0), copy_field(0),
    handle_duplicates(handle_duplicates_arg), do_update(1), trans_safe(0),
    transactional_tables(1), ignore(ignore_arg)
diff --git a/sql/sql_view.cc b/sql/sql_view.cc
index a60bf80a6d80f98844b007d3804127f333f7a245..577d1d32fccb71a02e7ac8c8a1ea9904e27bb0f8 100644
--- a/sql/sql_view.cc
+++ b/sql/sql_view.cc
@@ -24,6 +24,8 @@
 
 #define MD5_BUFF_LENGTH 33
 
+const LEX_STRING view_type= { (char*) STRING_WITH_LEN("VIEW") };
+
 static int mysql_register_view(THD *thd, TABLE_LIST *view,
 			       enum_view_create_mode mode);
 
@@ -92,6 +94,67 @@ static void make_unique_view_field_name(Item *target,
   target->set_name(buff, name_len, system_charset_info);
 }
 
+
+/*
+  Check if items with same names are present in list and possibly
+  generate unique names for them.
+
+  SYNOPSIS
+    item_list             list of Items which should be checked for duplicates
+    gen_unique_view_name  flag: generate unique name or return with error when
+                          duplicate names are found.
+
+  DESCRIPTION
+    This function is used on view creation and preparation of derived tables.
+    It checks item_list for items with duplicate names. If it founds two
+    items with same name and conversion to unique names isn't allowed, or
+    names for both items are set by user - function fails.
+    Otherwise it generates unique name for one item with autogenerated name
+    using make_unique_view_field_name()
+
+  RETURN VALUE
+    FALSE no duplicate names found, or they are converted to unique ones
+    TRUE  duplicate names are found and they can't be converted or conversion
+          isn't allowed
+*/
+
+bool check_duplicate_names(List<Item> &item_list, bool gen_unique_view_name)
+{
+  Item *item;
+  List_iterator_fast<Item> it(item_list);
+  List_iterator_fast<Item> itc(item_list);
+  DBUG_ENTER("check_duplicate_names");
+
+  while ((item= it++))
+  {
+    Item *check;
+    /* treat underlying fields like set by user names */
+    if (item->real_item()->type() == Item::FIELD_ITEM)
+      item->is_autogenerated_name= FALSE;
+    itc.rewind();
+    while ((check= itc++) && check != item)
+    {
+      if (my_strcasecmp(system_charset_info, item->name, check->name) == 0)
+      {
+        if (!gen_unique_view_name)
+          goto err;
+        if (item->is_autogenerated_name)
+          make_unique_view_field_name(item, item_list, item);
+        else if (check->is_autogenerated_name)
+          make_unique_view_field_name(check, item_list, item);
+        else
+          goto err;
+      }
+    }
+  }
+  DBUG_RETURN(FALSE);
+
+err:
+  my_error(ER_DUP_FIELDNAME, MYF(0), item->name);
+  DBUG_RETURN(TRUE);
+}
+
+
 /*
   Creating/altering VIEW procedure
 
@@ -306,35 +369,8 @@ bool mysql_create_view(THD *thd,
     }
   }
 
-  /* Test absence of duplicates names */
-  {
-    Item *item;
-    List_iterator_fast<Item> it(select_lex->item_list);
-    List_iterator_fast<Item> itc(select_lex->item_list);
-    while ((item= it++))
-    {
-      Item *check;
-      /* treat underlying fields like set by user names */
-      if (item->real_item()->type() == Item::FIELD_ITEM)
-        item->is_autogenerated_name= FALSE;
-      itc.rewind();
-      while ((check= itc++) && check != item)
-      {
-        if (my_strcasecmp(system_charset_info, item->name, check->name) == 0)
-        {
-          if (item->is_autogenerated_name)
-            make_unique_view_field_name(item, select_lex->item_list, item);
-          else if (check->is_autogenerated_name)
-            make_unique_view_field_name(check, select_lex->item_list, item);
-          else
-          {
-            my_error(ER_DUP_FIELDNAME, MYF(0), item->name);
-            DBUG_RETURN(TRUE);
-          }
-        }
-      }
-    }
-  }
+  if (check_duplicate_names(select_lex->item_list, 1))
+    DBUG_RETURN(TRUE);
 
 #ifndef NO_EMBEDDED_ACCESS_CHECKS
   /*
@@ -431,7 +467,7 @@ static File_option view_parameters[]=
   FILE_OPTIONS_STRING}
 };
 
-static LEX_STRING view_file_type[]= {{(char*)"VIEW", 4}};
+static LEX_STRING view_file_type[]= {{(char*) STRING_WITH_LEN("VIEW") }};
 
 
 /*
@@ -470,7 +506,7 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view,
     thd->variables.sql_mode|= sql_mode;
   }
   str.append('\0');
-  DBUG_PRINT("VIEW", ("View: %s", str.ptr()));
+  DBUG_PRINT("info", ("View: %s", str.ptr()));
 
   /* print file name */
   (void) my_snprintf(dir_buff, FN_REFLEN, "%s/%s/",
@@ -507,8 +543,7 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view,
       if (!(parser= sql_parse_prepare(&path, thd->mem_root, 0)))
 	DBUG_RETURN(1);
 
-      if (!parser->ok() ||
-          strncmp("VIEW", parser->type()->str, parser->type()->length))
+      if (!parser->ok() || !is_equal(&view_type, parser->type()))
       {
         my_error(ER_WRONG_OBJECT, MYF(0),
                  (view->db ? view->db : thd->db), view->table_name, "VIEW");
@@ -691,7 +726,7 @@ mysql_make_view(File_parser *parser, TABLE_LIST *table)
   view_select= &lex->select_lex;
   view_select->select_number= ++thd->select_number;
   {
-    ulong options= thd->options;
+    ulong save_mode= thd->variables.sql_mode;
     /* switch off modes which can prevent normal parsing of VIEW
       - MODE_REAL_AS_FLOAT            affect only CREATE TABLE parsing
       + MODE_PIPES_AS_CONCAT          affect expression parsing
@@ -716,13 +751,13 @@ mysql_make_view(File_parser *parser, TABLE_LIST *table)
       ? MODE_NO_AUTO_VALUE_ON_ZERO    affect UPDATEs
       + MODE_NO_BACKSLASH_ESCAPES     affect expression parsing
     */
-    thd->options&= ~(MODE_PIPES_AS_CONCAT | MODE_ANSI_QUOTES |
-                     MODE_IGNORE_SPACE | MODE_NO_BACKSLASH_ESCAPES);
+    thd->variables.sql_mode&= ~(MODE_PIPES_AS_CONCAT | MODE_ANSI_QUOTES |
+                                MODE_IGNORE_SPACE | MODE_NO_BACKSLASH_ESCAPES);
     CHARSET_INFO *save_cs= thd->variables.character_set_client;
     thd->variables.character_set_client= system_charset_info;
     res= yyparse((void *)thd);
     thd->variables.character_set_client= save_cs;
-    thd->options= options;
+    thd->variables.sql_mode= save_mode;
   }
   if (!res && !thd->is_fatal_error)
   {
@@ -843,6 +878,9 @@ mysql_make_view(File_parser *parser, TABLE_LIST *table)
                                                          view_tables);
       lex->select_lex.context.outer_context= 0;
       lex->select_lex.context.select_lex= table->select_lex;
+      lex->select_lex.select_n_having_items+=
+        table->select_lex->select_n_having_items;
+
       /* do not check privileges & hide errors for view underlyings */
       for (SELECT_LEX *sl= lex->all_selects_list;
            sl;
@@ -863,7 +901,11 @@ mysql_make_view(File_parser *parser, TABLE_LIST *table)
 
       {
         if (view_tables->next_local)
+        {
           table->multitable_view= TRUE;
+          if (table->belong_to_view)
+           table->belong_to_view->multitable_view= TRUE;
+        }
         /* make nested join structure for view tables */
         NESTED_JOIN *nested_join;
         if (!(nested_join= table->nested_join=
@@ -1109,7 +1151,10 @@ bool check_key_in_view(THD *thd, TABLE_LIST *view)
     for (Field_translator *fld= trans; fld < end_of_trans; fld++)
     {
       if (!fld->item->fixed && fld->item->fix_fields(thd, &fld->item))
+      {
+        thd->set_query_id= save_set_query_id;        
         return TRUE;
+      }
     }
     thd->set_query_id= save_set_query_id;
   }
diff --git a/sql/sql_view.h b/sql/sql_view.h
index 3246dbae38378b517d9a6e8e8ee6210dc2e86669..9d961feb1434198f828dd44995d1c37474391f03 100644
--- a/sql/sql_view.h
+++ b/sql/sql_view.h
@@ -33,5 +33,7 @@ int view_checksum(THD *thd, TABLE_LIST *view);
 
 extern TYPELIB updatable_views_with_limit_typelib;
 
+bool check_duplicate_names(List<Item>& item_list, bool gen_unique_view_names);
+
 #define VIEW_ANY_ACL (SELECT_ACL | UPDATE_ACL | INSERT_ACL | DELETE_ACL)
 
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index b680787b9a3978fdbc4541f3487a8b7bd3192330..7c040ff1def53755dfb992380f76452734c24c06 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -717,7 +717,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
 	bool_term bool_factor bool_test bool_pri 
 	predicate bit_expr bit_term bit_factor value_expr term factor
 	table_wild simple_expr udf_expr
-	using_list expr_or_default set_expr_or_default interval_expr
+	expr_or_default set_expr_or_default interval_expr
 	param_marker singlerow_subselect singlerow_subselect_init
 	exists_subselect exists_subselect_init geometry_function
 	signed_literal now_or_signed_literal opt_escape
@@ -739,7 +739,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
 	key_alg opt_btree_or_rtree
 
 %type <string_list>
-	key_usage_list
+	key_usage_list using_list
 
 %type <key_part>
 	key_part
@@ -1311,6 +1311,12 @@ create:
               YYTHD->client_capabilities |= CLIENT_MULTI_QUERIES;
             sp->restore_thd_mem_root(YYTHD);
 
+	    if (sp->m_multi_results)
+	    {
+	      my_error(ER_SP_NO_RETSET, MYF(0), "trigger");
+	      YYABORT;
+	    }
+
             /*
               We have to do it after parsing trigger body, because some of
               sp_proc_stmt alternatives are not saving/restoring LEX, so
@@ -1463,8 +1469,7 @@ create_function_tail:
 
 	    if (sp->m_multi_results)
 	    {
-	      my_message(ER_SP_NO_RETSET_IN_FUNC, ER(ER_SP_NO_RETSET_IN_FUNC),
-	                 MYF(0));
+	      my_error(ER_SP_NO_RETSET, MYF(0), "function");
 	      YYABORT;
 	    }
 	    if (sp->check_backpatch(YYTHD))
@@ -1960,7 +1965,7 @@ sp_proc_stmt:
 	    }
 	    if (lex->sql_command == SQLCOM_CHANGE_DB)
 	    { /* "USE db" doesn't work in a procedure */
-	      my_message(ER_SP_NO_USE, ER(ER_SP_NO_USE), MYF(0));
+	      my_error(ER_SP_BADSTATEMENT, MYF(0), "USE");
 	      YYABORT;
 	    }
 	    /*
@@ -4420,10 +4425,10 @@ simple_expr:
 	      my_error(ER_WRONG_COLUMN_NAME, MYF(0), name->str);
 	      YYABORT;
 	    }
-	    $$= new Item_default_value(&Select->context, $3);
+	    $$= new Item_default_value(Lex->current_context(), $3);
 	  }
 	| VALUES '(' simple_ident ')'
-	  { $$= new Item_insert_value(&Select->context, $3); }
+	  { $$= new Item_insert_value(Lex->current_context(), $3); }
 	| FUNC_ARG0 '(' ')'
 	  {
 	    if (!$1.symbol->create_func)
@@ -4714,9 +4719,9 @@ simple_expr:
 	    name->init_qname(YYTHD);
 	    sp_add_used_routine(lex, YYTHD, name, TYPE_ENUM_FUNCTION);
 	    if ($5)
-	      $$= new Item_func_sp(&lex->current_select->context, name, *$5);
+	      $$= new Item_func_sp(Lex->current_context(), name, *$5);
 	    else
-	      $$= new Item_func_sp(&lex->current_select->context, name);
+	      $$= new Item_func_sp(Lex->current_context(), name);
 	    lex->safe_to_cache_query=0;
 	  }
 	| IDENT_sys '(' udf_expr_list ')'
@@ -4804,9 +4809,9 @@ simple_expr:
 
               sp_add_used_routine(lex, YYTHD, name, TYPE_ENUM_FUNCTION);
               if ($3)
-                $$= new Item_func_sp(&lex->current_select->context, name, *$3);
+                $$= new Item_func_sp(Lex->current_context(), name, *$3);
               else
-                $$= new Item_func_sp(&lex->current_select->context, name);
+                $$= new Item_func_sp(Lex->current_context(), name);
 	      lex->safe_to_cache_query=0;
 	    }
           }
@@ -5010,7 +5015,7 @@ sum_expr:
 	  {
             SELECT_LEX *sel= Select;
 	    sel->in_sum_expr--;
-	    $$=new Item_func_group_concat(&sel->context, $3, $5,
+	    $$=new Item_func_group_concat(Lex->current_context(), $3, $5,
                                           sel->gorder_list, $7);
 	    $5->empty();
 	  };
@@ -5146,68 +5151,116 @@ join_table:
         table_ref normal_join table_ref { YYERROR_UNLESS($1 && ($$=$3)); }
 	| table_ref STRAIGHT_JOIN table_factor
 	  { YYERROR_UNLESS($1 && ($$=$3)); $3->straight=1; }
-	| table_ref normal_join table_ref ON expr
-	  { YYERROR_UNLESS($1 && ($$=$3)); add_join_on($3,$5); }
-        | table_ref STRAIGHT_JOIN table_factor ON expr
-          { YYERROR_UNLESS($1 && ($$=$3)); $3->straight=1; add_join_on($3,$5); }
+	| table_ref normal_join table_ref
+          ON
+          {
+            YYERROR_UNLESS($1 && ($$=$3));
+            /* Change the current name resolution context to a local context. */
+            Name_resolution_context *on_context;
+            if (!(on_context= make_join_on_context(YYTHD,$1,$3)))
+              YYABORT;
+            Lex->push_context(on_context);
+          }
+          expr
+	  {
+            add_join_on($3,$6);
+            Lex->pop_context();
+          }
+        | table_ref STRAIGHT_JOIN table_factor
+          ON
+          {
+            YYERROR_UNLESS($1 && ($$=$3));
+            /* Change the current name resolution context to a local context. */
+            Name_resolution_context *on_context;
+            if (!(on_context= make_join_on_context(YYTHD,$1,$3)))
+              YYABORT;
+            Lex->push_context(on_context);
+          }
+          expr
+          {
+            $3->straight=1;
+            add_join_on($3,$6);
+            Lex->pop_context();
+          }
 	| table_ref normal_join table_ref
 	  USING
 	  {
 	    SELECT_LEX *sel= Select;
             YYERROR_UNLESS($1 && $3);
-            sel->save_names_for_using_list($1, $3);
 	  }
 	  '(' using_list ')'
-	  { add_join_on($3,$7); $$=$3; }
-
-	| table_ref LEFT opt_outer JOIN_SYM table_ref ON expr
-	  { YYERROR_UNLESS($1 && $5); add_join_on($5,$7); $5->outer_join|=JOIN_TYPE_LEFT; $$=$5; }
+          { add_join_natural($1,$3,$7); $$=$3; }
+	| table_ref LEFT opt_outer JOIN_SYM table_ref
+          ON
+          {
+            /* Change the current name resolution context to a local context. */
+            Name_resolution_context *on_context;
+            if (!(on_context= make_join_on_context(YYTHD,$1,$5)))
+              YYABORT;
+            Lex->push_context(on_context);
+          }
+          expr
+	  {
+            YYERROR_UNLESS($1 && $5);
+            add_join_on($5,$8);
+            Lex->pop_context();
+            $5->outer_join|=JOIN_TYPE_LEFT;
+            $$=$5;
+          }
 	| table_ref LEFT opt_outer JOIN_SYM table_factor
 	  {
 	    SELECT_LEX *sel= Select;
             YYERROR_UNLESS($1 && $5);
-            sel->save_names_for_using_list($1, $5);
 	  }
 	  USING '(' using_list ')'
-	  { add_join_on($5,$9); $5->outer_join|=JOIN_TYPE_LEFT; $$=$5; }
+          { add_join_natural($1,$5,$9); $5->outer_join|=JOIN_TYPE_LEFT; $$=$5; }
 	| table_ref NATURAL LEFT opt_outer JOIN_SYM table_factor
 	  {
             YYERROR_UNLESS($1 && $6);
-	    add_join_natural($1,$6);
+ 	    add_join_natural($1,$6,NULL);
 	    $6->outer_join|=JOIN_TYPE_LEFT;
 	    $$=$6;
 	  }
-	| table_ref RIGHT opt_outer JOIN_SYM table_ref ON expr
+	| table_ref RIGHT opt_outer JOIN_SYM table_ref
+          ON
+          {
+            /* Change the current name resolution context to a local context. */
+            Name_resolution_context *on_context;
+            if (!(on_context= make_join_on_context(YYTHD,$1,$5)))
+              YYABORT;
+            Lex->push_context(on_context);
+          }
+          expr
           {
 	    LEX *lex= Lex;
             YYERROR_UNLESS($1 && $5);
             if (!($$= lex->current_select->convert_right_join()))
               YYABORT;
-            add_join_on($$, $7);
+            add_join_on($$, $8);
+            Lex->pop_context();
           }
 	| table_ref RIGHT opt_outer JOIN_SYM table_factor
 	  {
 	    SELECT_LEX *sel= Select;
             YYERROR_UNLESS($1 && $5);
-            sel->save_names_for_using_list($1, $5);
 	  }
 	  USING '(' using_list ')'
           {
 	    LEX *lex= Lex;
             if (!($$= lex->current_select->convert_right_join()))
               YYABORT;
-            add_join_on($$, $9);
+            add_join_natural($$,$5,$9);
           }
 	| table_ref NATURAL RIGHT opt_outer JOIN_SYM table_factor
 	  {
             YYERROR_UNLESS($1 && $6);
-	    add_join_natural($6,$1);
+	    add_join_natural($6,$1,NULL);
 	    LEX *lex= Lex;
             if (!($$= lex->current_select->convert_right_join()))
               YYABORT;
 	  }
 	| table_ref NATURAL JOIN_SYM table_factor
-	  { YYERROR_UNLESS($1 && ($$=$4)); add_join_natural($1,$4); };
+	  { YYERROR_UNLESS($1 && ($$=$4)); add_join_natural($1,$4,NULL); };
 
 
 normal_join:
@@ -5235,8 +5288,23 @@ table_factor:
 	    YYABORT;
           sel->add_joined_table($$);
 	}
-	| '{' ident table_ref LEFT OUTER JOIN_SYM table_ref ON expr '}'
-	  { YYERROR_UNLESS($3 && $7); add_join_on($7,$9); $7->outer_join|=JOIN_TYPE_LEFT; $$=$7; }
+	| '{' ident table_ref LEFT OUTER JOIN_SYM table_ref
+          ON
+          {
+            /* Change the current name resolution context to a local context. */
+            Name_resolution_context *on_context;
+            if (!(on_context= make_join_on_context(YYTHD,$3,$7)))
+              YYABORT;
+            Lex->push_context(on_context);
+          }
+          expr '}'
+	  {
+            YYERROR_UNLESS($3 && $7);
+            add_join_on($7,$10);
+            Lex->pop_context();
+            $7->outer_join|=JOIN_TYPE_LEFT;
+            $$=$7;
+          }
 	| select_derived_init get_select_lex select_derived2
           {
             LEX *lex= Lex;
@@ -5290,6 +5358,7 @@ table_factor:
 
 	      YYABORT;
             sel->add_joined_table($$);
+            lex->pop_context();
           }
 	  else
           if ($4 || $6)
@@ -5429,32 +5498,18 @@ key_usage_list2:
 using_list:
 	ident
 	  {
-	    SELECT_LEX *sel= Select;
-	    if (!($$= new Item_func_eq(new Item_field(&sel->context,
-                                                      sel->db1, sel->table1,
-						      $1.str),
-				       new Item_field(&sel->context,
-                                                      sel->db2, sel->table2,
-						      $1.str))))
+            if (!($$= new List<String>))
 	      YYABORT;
+            $$->push_back(new (YYTHD->mem_root)
+                              String((const char *) $1.str, $1.length,
+                                      system_charset_info));
 	  }
 	| using_list ',' ident
 	  {
-	    SELECT_LEX *sel= Select;
-	    if (!($$=
-                  new Item_cond_and(new
-                                    Item_func_eq(new
-                                                 Item_field(&sel->context,
-                                                            sel->db1,
-                                                            sel->table1,
-                                                            $3.str),
-                                                 new
-                                                 Item_field(&sel->context,
-                                                            sel->db2,
-                                                            sel->table2,
-                                                            $3.str)),
-                                    $1)))
-	      YYABORT;
+            $1->push_back(new (YYTHD->mem_root)
+                              String((const char *) $3.str, $3.length,
+                                      system_charset_info));
+            $$= $1;
 	  };
 
 interval:
@@ -6095,7 +6150,7 @@ values:
 
 expr_or_default:
 	expr	  { $$= $1;}
-	| DEFAULT {$$= new Item_default_value(&Select->context); }
+	| DEFAULT {$$= new Item_default_value(Lex->current_context()); }
 	;
 
 opt_insert_update:
@@ -6642,9 +6697,14 @@ flush:
 	FLUSH_SYM opt_no_write_to_binlog
 	{
 	  LEX *lex=Lex;
-	  if (lex->sphead && lex->sphead->m_type == TYPE_ENUM_FUNCTION)
+	  if (lex->sphead && lex->sphead->m_type != TYPE_ENUM_PROCEDURE)
 	  {
-	    my_error(ER_SP_BADSTATEMENT, MYF(0), "FLUSH");
+            /*
+              Note that both FLUSH TABLES and FLUSH PRIVILEGES will break
+              execution in prelocked mode. So it is better to disable
+              FLUSH in stored functions and triggers completely.
+            */
+            my_error(ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG, MYF(0), "FLUSH");
 	    YYABORT;
 	  }
 	  lex->sql_command= SQLCOM_FLUSH; lex->type=0;
@@ -7051,13 +7111,13 @@ table_wild:
 	ident '.' '*'
 	{
           SELECT_LEX *sel= Select;
-	  $$ = new Item_field(&sel->context, NullS, $1.str, "*");
+	  $$ = new Item_field(Lex->current_context(), NullS, $1.str, "*");
 	  sel->with_wild++;
 	}
 	| ident '.' ident '.' '*'
 	{
           SELECT_LEX *sel= Select;
-	  $$ = new Item_field(&sel->context, (YYTHD->client_capabilities &
+	  $$ = new Item_field(Lex->current_context(), (YYTHD->client_capabilities &
                              CLIENT_NO_SCHEMA ? NullS : $1.str),
                              $3.str,"*");
 	  sel->with_wild++;
@@ -7085,8 +7145,8 @@ simple_ident:
 	    SELECT_LEX *sel=Select;
 	    $$= (sel->parsing_place != IN_HAVING ||
 	         sel->get_in_sum_expr() > 0) ?
-                 (Item*) new Item_field(&sel->context, NullS, NullS, $1.str) :
-	         (Item*) new Item_ref(&sel->context, NullS, NullS, $1.str);
+                 (Item*) new Item_field(Lex->current_context(), NullS, NullS, $1.str) :
+	         (Item*) new Item_ref(Lex->current_context(), NullS, NullS, $1.str);
 	  }
         }
         | simple_ident_q { $$= $1; }
@@ -7098,8 +7158,8 @@ simple_ident_nospvar:
 	  SELECT_LEX *sel=Select;
 	  $$= (sel->parsing_place != IN_HAVING ||
 	       sel->get_in_sum_expr() > 0) ?
-              (Item*) new Item_field(&sel->context, NullS, NullS, $1.str) :
-	      (Item*) new Item_ref(&sel->context, NullS, NullS, $1.str);
+              (Item*) new Item_field(Lex->current_context(), NullS, NullS, $1.str) :
+	      (Item*) new Item_ref(Lex->current_context(), NullS, NullS, $1.str);
 	}
 	| simple_ident_q { $$= $1; }
 	;
@@ -7136,7 +7196,7 @@ simple_ident_q:
               YYABORT;
             }
 
-            if (!(trg_fld= new Item_trigger_field(&lex->current_select->context,
+            if (!(trg_fld= new Item_trigger_field(Lex->current_context(),
                                                   new_row ?
                                                   Item_trigger_field::NEW_ROW:
                                                   Item_trigger_field::OLD_ROW,
@@ -7162,8 +7222,8 @@ simple_ident_q:
 	    }
 	    $$= (sel->parsing_place != IN_HAVING ||
 	         sel->get_in_sum_expr() > 0) ?
-	        (Item*) new Item_field(&sel->context, NullS, $1.str, $3.str) :
-	        (Item*) new Item_ref(&sel->context, NullS, $1.str, $3.str);
+	        (Item*) new Item_field(Lex->current_context(), NullS, $1.str, $3.str) :
+	        (Item*) new Item_ref(Lex->current_context(), NullS, $1.str, $3.str);
           }
         }
 	| '.' ident '.' ident
@@ -7178,8 +7238,8 @@ simple_ident_q:
 	  }
 	  $$= (sel->parsing_place != IN_HAVING ||
 	       sel->get_in_sum_expr() > 0) ?
-	      (Item*) new Item_field(&sel->context, NullS, $2.str, $4.str) :
-              (Item*) new Item_ref(&sel->context, NullS, $2.str, $4.str);
+	      (Item*) new Item_field(Lex->current_context(), NullS, $2.str, $4.str) :
+              (Item*) new Item_ref(Lex->current_context(), NullS, $2.str, $4.str);
 	}
 	| ident '.' ident '.' ident
 	{
@@ -7193,11 +7253,11 @@ simple_ident_q:
 	  }
 	  $$= (sel->parsing_place != IN_HAVING ||
 	       sel->get_in_sum_expr() > 0) ?
-	      (Item*) new Item_field(&sel->context,
+	      (Item*) new Item_field(Lex->current_context(),
                                      (YYTHD->client_capabilities &
 				      CLIENT_NO_SCHEMA ? NullS : $1.str),
 				     $3.str, $5.str) :
-	      (Item*) new Item_ref(&sel->context,
+	      (Item*) new Item_ref(Lex->current_context(),
                                    (YYTHD->client_capabilities &
 				    CLIENT_NO_SCHEMA ? NullS : $1.str),
                                    $3.str, $5.str);
@@ -7747,7 +7807,8 @@ sys_option_value:
             /* We are in trigger and assigning value to field of new row */
             Item *it;
             Item_trigger_field *trg_fld;
-            sp_instr_set_trigger_field *i;
+            sp_instr_set_trigger_field *sp_fld;
+	    LINT_INIT(sp_fld);
             if ($1)
             {
               yyerror(ER(ER_SYNTAX_ERROR));
@@ -7761,14 +7822,14 @@ sys_option_value:
               it= new Item_null();
             }
 
-            if (!(trg_fld= new Item_trigger_field(&lex->current_select->
-                                                  context,
+            if (!(trg_fld= new Item_trigger_field(Lex->current_context(),
                                                   Item_trigger_field::NEW_ROW,
                                                   $2.base_name.str)) ||
-                !(i= new sp_instr_set_trigger_field(lex->sphead->
-                                                    instructions(),
-                                                    lex->spcont, trg_fld,
-                                                    it, lex)))
+                !(sp_fld= new sp_instr_set_trigger_field(lex->sphead->
+                          	                         instructions(),
+                                	                 lex->spcont,
+							 trg_fld,
+                                        	         it, lex)))
               YYABORT;
 
             /*
@@ -7778,7 +7839,7 @@ sys_option_value:
             lex->trg_table_fields.link_in_list((byte *)trg_fld,
                                     (byte **)&trg_fld->next_trg_field);
 
-            lex->sphead->add_instr(i);
+            lex->sphead->add_instr(sp_fld);
           }
           else if ($2.var)
           { /* System variable */
@@ -7792,7 +7853,7 @@ sys_option_value:
             /* An SP local variable */
             sp_pcontext *ctx= lex->spcont;
             sp_pvar_t *spv;
-            sp_instr_set *i;
+            sp_instr_set *sp_set;
             Item *it;
             if ($1)
             {
@@ -7808,9 +7869,9 @@ sys_option_value:
               it= spv->dflt;
             else
               it= new Item_null();
-            i= new sp_instr_set(lex->sphead->instructions(), ctx,
-                                spv->offset, it, spv->type, lex, TRUE);
-            lex->sphead->add_instr(i);
+            sp_set= new sp_instr_set(lex->sphead->instructions(), ctx,
+                                     spv->offset, it, spv->type, lex, TRUE);
+            lex->sphead->add_instr(sp_set);
             spv->isset= TRUE;
           }
         }
@@ -8618,7 +8679,14 @@ union_list:
             lex->current_select->master_unit()->union_distinct=
                                                       lex->current_select;
 	}
-	select_init {}
+	select_init
+        {
+          /*
+	    Remove from the name resolution context stack the context of the
+            last select in the union.
+	  */
+          Lex->pop_context();
+        }
 	;
 
 union_opt:
@@ -8722,6 +8790,7 @@ subselect_end:
 	')'
 	{
 	  LEX *lex=Lex;
+          lex->pop_context();
 	  lex->current_select = lex->current_select->return_after_parsing();
 	};
 
diff --git a/sql/table.cc b/sql/table.cc
index 220aba27d5b1990bcf334097d99f0855b80e7f08..b1dea25b8e03cbb3be3eb4c20bcc5a22ff1f7477 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -702,10 +702,9 @@ int openfrm(THD *thd, const char *name, const char *alias, uint db_stat,
             key_part->key_part_flag|= HA_BIT_PART;
 
 	  if (i == 0 && key != primary_key)
-	    field->flags |=
-	      ((keyinfo->flags & HA_NOSAME) &&
-	       field->key_length() ==
-	       keyinfo->key_length ? UNIQUE_KEY_FLAG : MULTIPLE_KEY_FLAG);
+	    field->flags |= ((keyinfo->flags & HA_NOSAME) &&
+                             (keyinfo->key_parts == 1)) ?
+                            UNIQUE_KEY_FLAG : MULTIPLE_KEY_FLAG;
 	  if (i == 0)
 	    field->key_start.set_bit(key);
 	  if (field->key_length() == key_part->length &&
@@ -1343,8 +1342,9 @@ void append_unescaped(String *res, const char *pos, uint length)
 
 	/* Create a .frm file */
 
-File create_frm(THD *thd, register my_string name, uint reclength,
-		uchar *fileinfo, HA_CREATE_INFO *create_info, uint keys)
+File create_frm(THD *thd, my_string name, const char *db,
+                const char *table, uint reclength, uchar *fileinfo,
+		HA_CREATE_INFO *create_info, uint keys)
 {
   register File file;
   ulong length;
@@ -1367,7 +1367,7 @@ File create_frm(THD *thd, register my_string name, uint reclength,
   */
   set_if_smaller(create_info->raid_chunks, 255);
 
-  if ((file= my_create(name, CREATE_MODE, create_flags, MYF(MY_WME))) >= 0)
+  if ((file= my_create(name, CREATE_MODE, create_flags, MYF(0))) >= 0)
   {
     uint key_length, tmp_key_length;
     uint tmp;
@@ -1414,6 +1414,13 @@ File create_frm(THD *thd, register my_string name, uint reclength,
       }
     }
   }
+  else
+  {
+    if (my_errno == ENOENT)
+      my_error(ER_BAD_DB_ERROR,MYF(0),db);
+    else
+      my_error(ER_CANT_CREATE_TABLE,MYF(0),table,my_errno);
+  }
   return (file);
 } /* create_frm */
 
@@ -1713,8 +1720,6 @@ void st_table_list::set_ancestor()
         */
         tbl->ancestor->set_ancestor();
       }
-      if (tbl->multitable_view)
-        multitable_view= TRUE;
     } while ((tbl= tbl->next_local));
 
     if (!multitable_view)
@@ -2140,8 +2145,291 @@ bool st_table_list::set_insert_values(MEM_ROOT *mem_root)
 }
 
 
+/*
+  Test if this is a leaf with respect to name resolution.
+
+  SYNOPSIS
+    st_table_list::is_leaf_for_name_resolution()
+
+  DESCRIPTION
+    A table reference is a leaf with respect to name resolution if
+    it is either a leaf node in a nested join tree (table, view,
+    schema table, subquery), or an inner node that represents a
+    NATURAL/USING join, or a nested join with materialized join
+    columns.
+
+  RETURN
+    TRUE if a leaf, FALSE otherwise.
+*/
+bool st_table_list::is_leaf_for_name_resolution()
+{
+  return (view || is_natural_join || is_join_columns_complete ||
+          !nested_join);
+}
+
+
+/*
+  Retrieve the first (left-most) leaf in a nested join tree with
+  respect to name resolution.
+
+  SYNOPSIS
+    st_table_list::first_leaf_for_name_resolution()
+
+  DESCRIPTION
+    Given that 'this' is a nested table reference, recursively walk
+    down the left-most children of 'this' until we reach a leaf
+    table reference with respect to name resolution.
+
+  IMPLEMENTATION
+    The left-most child of a nested table reference is the last element
+    in the list of children because the children are inserted in
+    reverse order.
+
+  RETURN
+    If 'this' is a nested table reference - the left-most child of
+      the tree rooted in 'this',
+    else return 'this'
+*/
+
+TABLE_LIST *st_table_list::first_leaf_for_name_resolution()
+{
+  TABLE_LIST *cur_table_ref;
+  NESTED_JOIN *cur_nested_join;
+  LINT_INIT(cur_table_ref);
+
+  if (is_leaf_for_name_resolution())
+    return this;
+  DBUG_ASSERT(nested_join);
+
+  for (cur_nested_join= nested_join;
+       cur_nested_join;
+       cur_nested_join= cur_table_ref->nested_join)
+  {
+    List_iterator_fast<TABLE_LIST> it(cur_nested_join->join_list);
+    cur_table_ref= it++;
+    /*
+      If 'this' is a RIGHT JOIN, the operands in 'join_list' are in reverse
+      order, thus the first operand is already at the front of the list.
+    */
+    if (!(cur_table_ref->outer_join & JOIN_TYPE_RIGHT))
+    {
+      TABLE_LIST *next;
+      while ((next= it++))
+        cur_table_ref= next;
+    }
+    if (cur_table_ref->is_leaf_for_name_resolution())
+      break;
+  }
+  return cur_table_ref;
+}
+
+
+/*
+  Retrieve the last (right-most) leaf in a nested join tree with
+  respect to name resolution.
+
+  SYNOPSIS
+    st_table_list::last_leaf_for_name_resolution()
+
+  DESCRIPTION
+    Given that 'this' is a nested table reference, recursively walk
+    down the right-most children of 'this' until we reach a leaf
+    table reference with respect to name resolution.
+
+  IMPLEMENTATION
+    The right-most child of a nested table reference is the first
+    element in the list of children because the children are inserted
+    in reverse order.
+
+  RETURN
+    - If 'this' is a nested table reference - the right-most child of
+      the tree rooted in 'this',
+    - else - 'this'
+*/
+
+TABLE_LIST *st_table_list::last_leaf_for_name_resolution()
+{
+  TABLE_LIST *cur_table_ref= this;
+  NESTED_JOIN *cur_nested_join;
+
+  if (is_leaf_for_name_resolution())
+    return this;
+  DBUG_ASSERT(nested_join);
+
+  for (cur_nested_join= nested_join;
+       cur_nested_join;
+       cur_nested_join= cur_table_ref->nested_join)
+  {
+    /*
+      If 'this' is a RIGHT JOIN, the operands in 'join_list' are in reverse
+      order, thus the last operand is in the end of the list.
+    */
+    if ((cur_table_ref->outer_join & JOIN_TYPE_RIGHT))
+    {
+      List_iterator_fast<TABLE_LIST> it(cur_nested_join->join_list);
+      TABLE_LIST *next;
+      cur_table_ref= it++;
+      while ((next= it++))
+        cur_table_ref= next;
+    }
+    else
+      cur_table_ref= cur_nested_join->join_list.head();
+    if (cur_table_ref->is_leaf_for_name_resolution())
+      break;
+  }
+  return cur_table_ref;
+}
+
+
+Natural_join_column::Natural_join_column(Field_translator *field_param,
+                                         TABLE_LIST *tab)
+{
+  DBUG_ASSERT(tab->field_translation);
+  view_field= field_param;
+  table_field= NULL;
+  table_ref= tab;
+  is_common= FALSE;
+  is_coalesced= FALSE;
+}
+
+
+Natural_join_column::Natural_join_column(Field *field_param,
+                                         TABLE_LIST *tab)
+{
+  table_field= field_param;
+  view_field= NULL;
+  table_ref= tab;
+  is_common= FALSE;
+  is_coalesced= FALSE;
+}
+
+
+const char *Natural_join_column::name()
+{
+  if (view_field)
+  {
+    DBUG_ASSERT(table_field == NULL);
+    return view_field->name;
+  }
+
+  return table_field->field_name;
+}
+
+
+Item *Natural_join_column::create_item(THD *thd)
+{
+  if (view_field)
+  {
+    DBUG_ASSERT(table_field == NULL);
+    return create_view_field(thd, table_ref, &view_field->item,
+                             view_field->name);
+  }
+  return new Item_field(thd, &thd->lex->current_select->context, table_field);
+}
+
+
+Field *Natural_join_column::field()
+{
+  if (view_field)
+  {
+    DBUG_ASSERT(table_field == NULL);
+    return NULL;
+  }
+  return table_field;
+}
+
+
+const char *Natural_join_column::table_name()
+{
+  return table_ref->alias;
+  /*
+    TODO:
+    I think that it is sufficient to return just
+    table->alias, which is correctly set to either
+    the view name, the table name, or the alias to
+    the table reference (view or stored table).
+  */
+#ifdef NOT_YET
+  if (view_field)
+    return table_ref->view_name.str;
+
+  DBUG_ASSERT(!strcmp(table_ref->table_name,
+                      table_ref->table->s->table_name));
+  return table_ref->table_name;
+}
+#endif
+}
+
+
+const char *Natural_join_column::db_name()
+{
+  if (view_field)
+    return table_ref->view_db.str;
+
+  DBUG_ASSERT(!strcmp(table_ref->db,
+                      table_ref->table->s->db));
+  return table_ref->db;
+}
+
+
+GRANT_INFO *Natural_join_column::grant()
+{
+  if (view_field)
+    return &(table_ref->grant);
+  return &(table_ref->table->grant);
+}
+
+
+
+#ifndef NO_EMBEDDED_ACCESS_CHECKS
+
+/*
+  Check the access rights for the current join column.
+  columns.
+
+  SYNOPSIS
+    Natural_join_column::check_grants()
+
+  DESCRIPTION
+    Check the access rights to a column from a natural join in a generic
+    way that hides the heterogeneity of the column representation - whether
+    it is a view or a stored table colum.
+
+  RETURN
+    FALSE  The column can be accessed
+    TRUE   There are no access rights to all equivalent columns
+*/
+
+bool
+Natural_join_column::check_grants(THD *thd, const char *name, uint length)
+{
+  GRANT_INFO *grant;
+  const char *db_name;
+  const char *table_name;
+
+  if (view_field)
+  {
+    DBUG_ASSERT(table_field == NULL);
+    grant= &(table_ref->grant);
+    db_name= table_ref->view_db.str;
+    table_name= table_ref->view_name.str;
+  }
+  else
+  {
+    DBUG_ASSERT(table_field && view_field == NULL);
+    grant= &(table_ref->table->grant);
+    db_name= table_ref->table->s->db;
+    table_name= table_ref->table->s->table_name;
+  }
+
+  return check_grant_column(thd, grant, db_name, table_name, name, length);
+}
+#endif
+
+
 void Field_iterator_view::set(TABLE_LIST *table)
 {
+  DBUG_ASSERT(table->field_translation);
   view= table;
   ptr= table->field_translation;
   array_end= table->field_translation_end;
@@ -2211,6 +2499,183 @@ Item *create_view_field(THD *thd, TABLE_LIST *view, Item **field_ref,
 }
 
 
+void Field_iterator_natural_join::set(TABLE_LIST *table_ref)
+{
+  DBUG_ASSERT(table_ref->join_columns);
+  delete column_ref_it;
+
+  /*
+    TODO: try not to allocate new iterator every time. If we have to,
+    then check for out of memory condition.
+  */
+  column_ref_it= new List_iterator_fast<Natural_join_column>
+                     (*(table_ref->join_columns));
+  cur_column_ref= (*column_ref_it)++;
+}
+
+
+void Field_iterator_table_ref::set_field_iterator()
+{
+  DBUG_ENTER("Field_iterator_table_ref::set_field_iterator");
+  /*
+    If the table reference we are iterating over is a natural join, or it is
+    an operand of a natural join, and TABLE_LIST::join_columns contains all
+    the columns of the join operand, then we pick the columns from
+    TABLE_LIST::join_columns, instead of the  orginial container of the
+    columns of the join operator.
+  */
+  if (table_ref->is_join_columns_complete)
+  {
+    /* Necesary, but insufficient conditions. */
+    DBUG_ASSERT(table_ref->is_natural_join ||
+                table_ref->nested_join ||
+                table_ref->join_columns &&
+                /* This is a merge view. */
+                ((table_ref->field_translation &&
+                  table_ref->join_columns->elements ==
+                  (ulong)(table_ref->field_translation_end -
+                          table_ref->field_translation)) ||
+                 /* This is stored table or a tmptable view. */
+                 (!table_ref->field_translation &&
+                  table_ref->join_columns->elements ==
+                  table_ref->table->s->fields)));
+    field_it= &natural_join_it;
+    DBUG_PRINT("info",("field_it for '%s' is Field_iterator_natural_join",
+                       table_ref->table_name));
+  }
+  /* This is a merge view, so use field_translation. */
+  else if (table_ref->field_translation)
+  {
+    DBUG_ASSERT(table_ref->view &&
+                table_ref->effective_algorithm == VIEW_ALGORITHM_MERGE);
+    field_it= &view_field_it;
+    DBUG_PRINT("info", ("field_it for '%s' is Field_iterator_view",
+                        table_ref->table_name));
+  }
+  /* This is a base table or stored view. */
+  else
+  {
+    DBUG_ASSERT(table_ref->table || table_ref->view);
+    field_it= &table_field_it;
+    DBUG_PRINT("info", ("field_it for '%s' is Field_iterator_table",
+                        table_ref->table_name));
+  }
+  field_it->set(table_ref);
+  DBUG_VOID_RETURN;
+}
+
+
+void Field_iterator_table_ref::set(TABLE_LIST *table)
+{
+  DBUG_ASSERT(table);
+  first_leaf= table->first_leaf_for_name_resolution();
+  last_leaf=  table->last_leaf_for_name_resolution();
+  DBUG_ASSERT(first_leaf && last_leaf);
+  table_ref= first_leaf;
+  set_field_iterator();
+}
+
+
+void Field_iterator_table_ref::next()
+{
+  /* Move to the next field in the current table reference. */
+  field_it->next();
+  /*
+    If all fields of the current table reference are exhausted, move to
+    the next leaf table reference.
+  */
+  if (field_it->end_of_fields() && table_ref != last_leaf)
+  {
+    table_ref= table_ref->next_name_resolution_table;
+    DBUG_ASSERT(table_ref);
+    set_field_iterator();
+  }
+}
+
+
+const char *Field_iterator_table_ref::table_name()
+{
+  if (table_ref->view)
+    return table_ref->view_name.str;
+  else if (table_ref->is_natural_join)
+    return natural_join_it.column_ref()->table_name();
+
+  DBUG_ASSERT(!strcmp(table_ref->table_name,
+                      table_ref->table->s->table_name));
+  return table_ref->table_name;
+}
+
+
+const char *Field_iterator_table_ref::db_name()
+{
+  if (table_ref->view)
+    return table_ref->view_db.str;
+  else if (table_ref->is_natural_join)
+    return natural_join_it.column_ref()->db_name();
+
+  DBUG_ASSERT(!strcmp(table_ref->db, table_ref->table->s->db));
+  return table_ref->db;
+}
+
+
+GRANT_INFO *Field_iterator_table_ref::grant()
+{
+  if (table_ref->view)
+    return &(table_ref->grant);
+  else if (table_ref->is_natural_join)
+    return natural_join_it.column_ref()->grant();
+  return &(table_ref->table->grant);
+}
+
+
+bool Field_iterator_table_ref::is_coalesced()
+{
+  if (table_ref->is_natural_join)
+    return natural_join_it.column_ref()->is_coalesced;
+  return FALSE;
+}
+
+/*
+  Create new or return existing column reference to a column of a
+  natural/using join.
+
+  SYNOPSIS
+    Field_iterator_table_ref::get_or_create_column_ref()
+    thd         [in]  pointer to current thread
+    is_created  [out] set to TRUE if the column was created,
+                      FALSE if we return an already created colum
+
+  DESCRIPTION
+    TODO
+
+  RETURN
+    #     Pointer to a column of a natural join (or its operand)
+    NULL  No memory to allocate the column
+*/
+
+Natural_join_column *
+Field_iterator_table_ref::get_or_create_column_ref(THD *thd, bool *is_created)
+{
+  Natural_join_column *nj_col;
+
+  *is_created= TRUE;
+  if (field_it == &table_field_it)
+    return new Natural_join_column(table_field_it.field(), table_ref);
+  if (field_it == &view_field_it)
+    return new Natural_join_column(view_field_it.field_translator(),
+                                   table_ref);
+
+  /*
+    This is NATURAL join, we already have created a column reference,
+    so just return it.
+  */
+  *is_created= FALSE;
+  nj_col= natural_join_it.column_ref();
+  DBUG_ASSERT(nj_col);
+  return nj_col;
+}
+
+
 /*****************************************************************************
 ** Instansiate templates
 *****************************************************************************/
diff --git a/sql/table.h b/sql/table.h
index 13d44766804c0e885442188c3cbca72185703df9..3d4f02e389b02a921b17911dfedb8356269d1390 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -92,7 +92,10 @@ class Field_timestamp;
 class Field_blob;
 class Table_triggers_list;
 
-/* This structure is shared between different table objects */
+/*
+  This structure is shared between different table objects. There is one
+  instance of table share per one table in the database.
+*/
 
 typedef struct st_table_share
 {
@@ -278,11 +281,26 @@ typedef struct st_foreign_key_info
 
 enum enum_schema_tables
 {
-  SCH_SCHEMATA= 0, SCH_TABLES, SCH_COLUMNS, SCH_CHARSETS, SCH_COLLATIONS,
-  SCH_COLLATION_CHARACTER_SET_APPLICABILITY, SCH_PROCEDURES, SCH_STATISTICS,
-  SCH_VIEWS, SCH_USER_PRIVILEGES, SCH_SCHEMA_PRIVILEGES, SCH_TABLE_PRIVILEGES,
-  SCH_COLUMN_PRIVILEGES, SCH_TABLE_CONSTRAINTS, SCH_KEY_COLUMN_USAGE,
-  SCH_TABLE_NAMES, SCH_OPEN_TABLES, SCH_STATUS, SCH_TRIGGERS, SCH_VARIABLES
+  SCH_CHARSETS= 0,
+  SCH_COLLATIONS,
+  SCH_COLLATION_CHARACTER_SET_APPLICABILITY,
+  SCH_COLUMNS,
+  SCH_COLUMN_PRIVILEGES,
+  SCH_KEY_COLUMN_USAGE,
+  SCH_OPEN_TABLES,
+  SCH_PROCEDURES,
+  SCH_SCHEMATA,
+  SCH_SCHEMA_PRIVILEGES,
+  SCH_STATISTICS,
+  SCH_STATUS,
+  SCH_TABLES,
+  SCH_TABLE_CONSTRAINTS,
+  SCH_TABLE_NAMES,
+  SCH_TABLE_PRIVILEGES,
+  SCH_TRIGGERS,
+  SCH_VARIABLES,
+  SCH_VIEWS,
+  SCH_USER_PRIVILEGES
 };
 
 
@@ -350,9 +368,86 @@ struct Field_translator
 };
 
 
+/*
+  Column reference of a NATURAL/USING join. Since column references in
+  joins can be both from views and stored tables, may point to either a
+  Field (for tables), or a Field_translator (for views).
+*/
+
+class Natural_join_column: public Sql_alloc
+{
+public:
+  Field_translator *view_field;  /* Column reference of merge view. */
+  Field            *table_field; /* Column reference of table or temp view. */
+  st_table_list *table_ref; /* Original base table/view reference. */
+  /*
+    True if a common join column of two NATURAL/USING join operands. Notice
+    that when we have a hierarchy of nested NATURAL/USING joins, a column can
+    be common at some level of nesting but it may not be common at higher
+    levels of nesting. Thus this flag may change depending on at which level
+    we are looking at some column.
+  */
+  bool is_common;
+  /*
+    A column is coalesced if it was common in some of several nested NATURAL/
+    USING joins. We have to know this, because according to ANSI, coalesced
+    columns cannot be qualified. 
+  */
+  bool is_coalesced;
+public:
+  Natural_join_column(Field_translator *field_param, st_table_list *tab);
+  Natural_join_column(Field *field_param, st_table_list *tab);
+  const char *name();
+  Item *create_item(THD *thd);
+  Field *field();
+  const char *table_name();
+  const char *db_name();
+  GRANT_INFO *grant();
+#ifndef NO_EMBEDDED_ACCESS_CHECKS
+  bool check_grants(THD *thd, const char *name, uint length);
+#endif
+};
+
+
+/*
+  Table reference in the FROM clause.
+
+  These table references can be of several types that correspond to
+  different SQL elements. Below we list all types of TABLE_LISTs with
+  the necessary conditions to determine when a TABLE_LIST instance
+  belongs to a certain type.
+
+  1) table (TABLE_LIST::view == NULL)
+     - base table
+       (TABLE_LIST::derived == NULL)
+     - subquery - TABLE_LIST::table is a temp table
+       (TABLE_LIST::derived != NULL)
+     - information schema table
+       (TABLE_LIST::schema_table != NULL)
+       NOTICE: for schema tables TABLE_LIST::field_translation may be != NULL
+  2) view (TABLE_LIST::view != NULL)
+     - merge    (TABLE_LIST::effective_algorithm == VIEW_ALGORITHM_MERGE)
+           also (TABLE_LIST::field_translation != NULL)
+     - tmptable (TABLE_LIST::effective_algorithm == VIEW_ALGORITHM_TMPTABLE)
+           also (TABLE_LIST::field_translation == NULL)
+  3) nested table reference (TABLE_LIST::nested_join != NULL)
+     - table sequence - e.g. (t1, t2, t3)
+       TODO: how to distinguish from a JOIN?
+     - general JOIN
+       TODO: how to distinguish from a table sequence?
+     - NATURAL JOIN
+       (TABLE_LIST::natural_join != NULL)
+       - JOIN ... USING
+         (TABLE_LIST::join_using_fields != NULL)
+*/
+
 typedef struct st_table_list
 {
-  /* link in a local table list (used by SQL_LIST) */
+  /*
+    List of tables local to a subquery (used by SQL_LIST). Considers
+    views as leaves (unlike 'next_leaf' below). Created at parse time
+    in st_select_lex::add_table_to_list() -> table_list.link_in_list().
+  */
   struct st_table_list *next_local;
   /* link in a global list of all queries tables */
   struct st_table_list *next_global, **prev_global;
@@ -360,7 +455,7 @@ typedef struct st_table_list
   char          *option;                /* Used by cache index  */
   Item		*on_expr;		/* Used with outer join */
   /*
-    The scturcture of ON expression presented in the member above
+    The structure of ON expression presented in the member above
     can be changed during certain optimizations. This member
     contains a snapshot of AND-OR structure of the ON expression
     made after permanent transformations of the parse tree, and is
@@ -369,10 +464,40 @@ typedef struct st_table_list
   */
   Item          *prep_on_expr;
   COND_EQUAL    *cond_equal;            /* Used with outer join */
-  struct st_table_list *natural_join;	/* natural join on this table*/
-  /* ... join ... USE INDEX ... IGNORE INDEX */
-  List<String>	*use_index, *ignore_index;
-  TABLE         *table;                 /* opened table */
+  /*
+    During parsing - left operand of NATURAL/USING join where 'this' is
+    the right operand. After parsing (this->natural_join == this) iff
+    'this' represents a NATURAL or USING join operation. Thus after
+    parsing 'this' is a NATURAL/USING join iff (natural_join != NULL).
+  */
+  struct st_table_list *natural_join;
+  /*
+    True if 'this' represents a nested join that is a NATURAL JOIN.
+    For one of the operands of 'this', the member 'natural_join' points
+    to the other operand of 'this'.
+  */
+  bool is_natural_join;
+  /* Field names in a USING clause for JOIN ... USING. */
+  List<String> *join_using_fields;
+  /*
+    Explicitly store the result columns of either a NATURAL/USING join or
+    an operand of such a join.
+  */
+  List<Natural_join_column> *join_columns;
+  /* TRUE if join_columns contains all columns of this table reference. */
+  bool is_join_columns_complete;
+
+  /*
+    List of nodes in a nested join tree, that should be considered as
+    leaves with respect to name resolution. The leaves are: views,
+    top-most nodes representing NATURAL/USING joins, subqueries, and
+    base tables. All of these TABLE_LIST instances contain a
+    materialized list of columns. The list is local to a subquery.
+  */
+  struct st_table_list *next_name_resolution_table;
+  /* Index names in a "... JOIN ... USE/IGNORE INDEX ..." clause. */
+  List<String> *use_index, *ignore_index;
+  TABLE        *table;                   /* opened table */
   /*
     select_result for derived table to pass it from table creation to table
     filling procedure
@@ -389,6 +514,10 @@ typedef struct st_table_list
   st_select_lex_unit *derived;		/* SELECT_LEX_UNIT of derived table */
   ST_SCHEMA_TABLE *schema_table;        /* Information_schema table */
   st_select_lex	*schema_select_lex;
+  /*
+    True when the view field translation table is used to convert
+    schema table fields for backwards compatibility with SHOW command.
+  */
   bool schema_table_reformed;
   TMP_TABLE_PARAM *schema_table_param;
   /* link to select_lex where this table was used */
@@ -401,7 +530,11 @@ typedef struct st_table_list
   st_table_list	*ancestor;
   /* most upper view this table belongs to */
   st_table_list	*belong_to_view;
-  /* list of join table tree leaves */
+  /*
+    List of all base tables local to a subquery including all view
+    tables. Unlike 'next_local', this in this list views are *not*
+    leaves. Created in setup_tables() -> make_leaves_list().
+  */
   st_table_list	*next_leaf;
   Item          *where;                 /* VIEW WHERE clause condition */
   Item          *check_option;          /* WITH CHECK OPTION condition */
@@ -471,6 +604,9 @@ typedef struct st_table_list
   bool set_insert_values(MEM_ROOT *mem_root);
   void hide_view_error(THD *thd);
   st_table_list *find_underlying_table(TABLE *table);
+  st_table_list *first_leaf_for_name_resolution();
+  st_table_list *last_leaf_for_name_resolution();
+  bool is_leaf_for_name_resolution();
   inline bool prepare_check_option(THD *thd)
   {
     bool res= FALSE;
@@ -492,6 +628,10 @@ private:
 
 class Item;
 
+/*
+  Iterator over the fields of a generic table reference.
+*/
+
 class Field_iterator: public Sql_alloc
 {
 public:
@@ -505,6 +645,11 @@ public:
 };
 
 
+/* 
+  Iterator over the fields of a base table, view with temporary
+  table, or subquery.
+*/
+
 class Field_iterator_table: public Field_iterator
 {
   Field **ptr;
@@ -520,6 +665,8 @@ public:
 };
 
 
+/* Iterator over the fields of a merge view. */
+
 class Field_iterator_view: public Field_iterator
 {
   Field_translator *ptr, *array_end;
@@ -533,8 +680,71 @@ public:
   Item *create_item(THD *thd);
   Item **item_ptr() {return &ptr->item; }
   Field *field() { return 0; }
-
   inline Item *item() { return ptr->item; }
+  Field_translator *field_translator() { return ptr; }
+};
+
+
+/*
+  Field_iterator interface to the list of materialized fields of a
+  NATURAL/USING join.
+*/
+
+class Field_iterator_natural_join: public Field_iterator
+{
+  List_iterator_fast<Natural_join_column> *column_ref_it;
+  Natural_join_column *cur_column_ref;
+public:
+  Field_iterator_natural_join() :column_ref_it(NULL), cur_column_ref(NULL) {}
+  ~Field_iterator_natural_join() { delete column_ref_it; }
+  void set(TABLE_LIST *table);
+  void next() { cur_column_ref= (*column_ref_it)++; }
+  bool end_of_fields() { return !cur_column_ref; }
+  const char *name() { return cur_column_ref->name(); }
+  Item *create_item(THD *thd) { return cur_column_ref->create_item(thd); }
+  Field *field() { return cur_column_ref->field(); }
+  Natural_join_column *column_ref() { return cur_column_ref; }
+};
+
+
+/*
+  Generic iterator over the fields of an arbitrary table reference.
+
+  DESCRIPTION
+    This class unifies the various ways of iterating over the columns
+    of a table reference depending on the type of SQL entity it
+    represents. If such an entity represents a nested table reference,
+    this iterator encapsulates the iteration over the columns of the
+    members of the table reference.
+
+  IMPLEMENTATION
+    The implementation assumes that all underlying NATURAL/USING table
+    references already contain their result columns and are linked into
+    the list TABLE_LIST::next_name_resolution_table.
+*/
+
+class Field_iterator_table_ref: public Field_iterator
+{
+  TABLE_LIST *table_ref, *first_leaf, *last_leaf;
+  Field_iterator_table        table_field_it;
+  Field_iterator_view         view_field_it;
+  Field_iterator_natural_join natural_join_it;
+  Field_iterator *field_it;
+  void set_field_iterator();
+public:
+  Field_iterator_table_ref() :field_it(NULL) {}
+  void set(TABLE_LIST *table);
+  void next();
+  bool end_of_fields()
+  { return (table_ref == last_leaf && field_it->end_of_fields()); }
+  const char *name() { return field_it->name(); }
+  const char *table_name();
+  const char *db_name();
+  GRANT_INFO *grant();
+  bool is_coalesced();
+  Item *create_item(THD *thd) { return field_it->create_item(thd); }
+  Field *field() { return field_it->field(); }
+  Natural_join_column *get_or_create_column_ref(THD *thd, bool *is_created);
 };
 
 
diff --git a/sql/time.cc b/sql/time.cc
index a3ec228386058ff285349d7f74168339b7c9c8d4..5069031081d4d60d9193242479659f50a63b82f9 100644
--- a/sql/time.cc
+++ b/sql/time.cc
@@ -223,7 +223,7 @@ str_to_datetime_with_warn(const char *str, uint length, TIME *l_time,
      0 - t contains datetime value which is out of TIMESTAMP range.
      
 */
-my_time_t TIME_to_timestamp(THD *thd, const TIME *t, bool *in_dst_time_gap)
+my_time_t TIME_to_timestamp(THD *thd, const TIME *t, my_bool *in_dst_time_gap)
 {
   my_time_t timestamp;
 
diff --git a/sql/tztime.cc b/sql/tztime.cc
index f5111459da279c931aadb0788672b6a769fb69eb..5a907f0d170d966f74062858658528b1f4c1ee2e 100644
--- a/sql/tztime.cc
+++ b/sql/tztime.cc
@@ -880,12 +880,12 @@ sec_since_epoch(int year, int mon, int mday, int hour, int min ,int sec)
     0 in case of error.
 */
 static my_time_t
-TIME_to_gmt_sec(const TIME *t, const TIME_ZONE_INFO *sp, bool *in_dst_time_gap)
+TIME_to_gmt_sec(const TIME *t, const TIME_ZONE_INFO *sp,
+                my_bool *in_dst_time_gap)
 {
   my_time_t local_t;
   uint saved_seconds;
   uint i;
-
   DBUG_ENTER("TIME_to_gmt_sec");
 
   /* We need this for correct leap seconds handling */
@@ -962,7 +962,7 @@ class Time_zone_system : public Time_zone
 {
 public:
   virtual my_time_t TIME_to_gmt_sec(const TIME *t,
-                                    bool *in_dst_time_gap) const;
+                                    my_bool *in_dst_time_gap) const;
   virtual void gmt_sec_to_TIME(TIME *tmp, my_time_t t) const;
   virtual const String * get_name() const;
 };
@@ -994,7 +994,7 @@ public:
     Corresponding my_time_t value or 0 in case of error
 */
 my_time_t
-Time_zone_system::TIME_to_gmt_sec(const TIME *t, bool *in_dst_time_gap) const
+Time_zone_system::TIME_to_gmt_sec(const TIME *t, my_bool *in_dst_time_gap) const
 {
   long not_used;
   return my_system_gmt_sec(t, &not_used, in_dst_time_gap);
@@ -1055,7 +1055,7 @@ class Time_zone_utc : public Time_zone
 {
 public:
   virtual my_time_t TIME_to_gmt_sec(const TIME *t,
-                                    bool *in_dst_time_gap) const;
+                                    my_bool *in_dst_time_gap) const;
   virtual void gmt_sec_to_TIME(TIME *tmp, my_time_t t) const;
   virtual const String * get_name() const;
 };
@@ -1081,7 +1081,7 @@ public:
     0
 */
 my_time_t
-Time_zone_utc::TIME_to_gmt_sec(const TIME *t, bool *in_dst_time_gap) const
+Time_zone_utc::TIME_to_gmt_sec(const TIME *t, my_bool *in_dst_time_gap) const
 {
   /* Should be never called */
   DBUG_ASSERT(0);
@@ -1144,7 +1144,7 @@ class Time_zone_db : public Time_zone
 public:
   Time_zone_db(TIME_ZONE_INFO *tz_info_arg, const String * tz_name_arg);
   virtual my_time_t TIME_to_gmt_sec(const TIME *t,
-                                    bool *in_dst_time_gap) const;
+                                    my_bool *in_dst_time_gap) const;
   virtual void gmt_sec_to_TIME(TIME *tmp, my_time_t t) const;
   virtual const String * get_name() const;
 private:
@@ -1193,7 +1193,7 @@ Time_zone_db::Time_zone_db(TIME_ZONE_INFO *tz_info_arg,
     Corresponding my_time_t value or 0 in case of error
 */
 my_time_t
-Time_zone_db::TIME_to_gmt_sec(const TIME *t, bool *in_dst_time_gap) const
+Time_zone_db::TIME_to_gmt_sec(const TIME *t, my_bool *in_dst_time_gap) const
 {
   return ::TIME_to_gmt_sec(t, tz_info, in_dst_time_gap);
 }
@@ -1240,7 +1240,7 @@ class Time_zone_offset : public Time_zone
 public:
   Time_zone_offset(long tz_offset_arg);
   virtual my_time_t TIME_to_gmt_sec(const TIME *t,
-                                    bool *in_dst_time_gap) const;
+                                    my_bool *in_dst_time_gap) const;
   virtual void   gmt_sec_to_TIME(TIME *tmp, my_time_t t) const;
   virtual const String * get_name() const;
   /*
@@ -1292,7 +1292,7 @@ Time_zone_offset::Time_zone_offset(long tz_offset_arg):
     Corresponding my_time_t value or 0 in case of error
 */
 my_time_t
-Time_zone_offset::TIME_to_gmt_sec(const TIME *t, bool *in_dst_time_gap) const
+Time_zone_offset::TIME_to_gmt_sec(const TIME *t, my_bool *in_dst_time_gap) const
 {
   return sec_since_epoch(t->year, t->month, t->day,
                          t->hour, t->minute, t->second) -
@@ -2549,8 +2549,6 @@ main(int argc, char **argv)
   time_t t, t1, t2;
   char fullname[FN_REFLEN+1];
   char *str_end;
-  long not_used;
-  bool not_used_2;
   MEM_ROOT tz_storage;
 
   MY_INIT(argv[0]);
@@ -2660,14 +2658,21 @@ main(int argc, char **argv)
     dates.
   */
   for (time_tmp.year= 1980; time_tmp.year < 2010; time_tmp.year++)
+  {
     for (time_tmp.month= 1; time_tmp.month < 13; time_tmp.month++)
+    {
       for (time_tmp.day= 1;
            time_tmp.day < mon_lengths[isleap(time_tmp.year)][time_tmp.month-1];
            time_tmp.day++)
+      {
         for (time_tmp.hour= 0; time_tmp.hour < 24; time_tmp.hour++)
+        {
           for (time_tmp.minute= 0; time_tmp.minute < 60; time_tmp.minute+= 5)
+          {
             for (time_tmp.second=0; time_tmp.second<60; time_tmp.second+=25)
             {
+              long not_used;
+              my_bool not_used_2;
               t= (time_t)my_system_gmt_sec(&time_tmp, &not_used, &not_used_2);
               t1= (time_t)TIME_to_gmt_sec(&time_tmp, &tz_info, &not_used_2);
               if (t != t1)
@@ -2699,6 +2704,11 @@ main(int argc, char **argv)
                 return 1;
               }
             }
+          }
+        }
+      }
+    }
+  }
 
   printf("TIME_to_gmt_sec = my_system_gmt_sec for test range\n");
 
diff --git a/sql/tztime.h b/sql/tztime.h
index cbf359e8961feeaf1b083f74d74499a1b7bfcc83..a168fe4fb73ec510b51ece593f9593a6b9fe3a1f 100644
--- a/sql/tztime.h
+++ b/sql/tztime.h
@@ -37,7 +37,7 @@ public:
     falls into spring time-gap (or lefts it untouched otherwise).
   */
   virtual my_time_t TIME_to_gmt_sec(const TIME *t, 
-                                    bool *in_dst_time_gap) const = 0;
+                                    my_bool *in_dst_time_gap) const = 0;
   /*
     Converts time in my_time_t representation to local time in
     broken down TIME representation.
diff --git a/sql/unireg.cc b/sql/unireg.cc
index 7f170b3ef878aa249f767c806d1ead7aaa899b9b..a89d89426a6284eb0189cd2d7196d5a18ecb517f 100644
--- a/sql/unireg.cc
+++ b/sql/unireg.cc
@@ -55,6 +55,8 @@ static bool make_empty_rec(THD *thd, int file, enum db_type table_type,
     mysql_create_frm()
     thd			Thread handler
     file_name		Name of file (including database and .frm)
+    db                  Name of database
+    table               Name of table
     create_info		create info parameters
     create_fields	Fields to create
     keys		number of keys to create
@@ -67,6 +69,7 @@ static bool make_empty_rec(THD *thd, int file, enum db_type table_type,
 */
 
 bool mysql_create_frm(THD *thd, my_string file_name,
+                      const char *db, const char *table,
 		      HA_CREATE_INFO *create_info,
 		      List<create_field> &create_fields,
 		      uint keys, KEY *key_info,
@@ -113,7 +116,7 @@ bool mysql_create_frm(THD *thd, my_string file_name,
   }
   reclength=uint2korr(forminfo+266);
 
-  if ((file=create_frm(thd, file_name, reclength, fileinfo,
+  if ((file=create_frm(thd, file_name, db, table, reclength, fileinfo,
 		       create_info, keys)) < 0)
   {
     my_free((gptr) screen_buff,MYF(0));
@@ -211,9 +214,11 @@ err3:
   Create a frm (table definition) file and the tables
 
   SYNOPSIS
-    mysql_create_frm()
+    rea_create_table()
     thd			Thread handler
     file_name		Name of file (including database and .frm)
+    db                  Name of database
+    table               Name of table
     create_info		create info parameters
     create_fields	Fields to create
     keys		number of keys to create
@@ -226,13 +231,14 @@ err3:
 */
 
 int rea_create_table(THD *thd, my_string file_name,
+                     const char *db, const char *table,
 		     HA_CREATE_INFO *create_info,
 		     List<create_field> &create_fields,
 		     uint keys, KEY *key_info)
 {
   DBUG_ENTER("rea_create_table");
 
-  if (mysql_create_frm(thd, file_name, create_info,
+  if (mysql_create_frm(thd, file_name, db, table, create_info,
                        create_fields, keys, key_info, NULL))
     DBUG_RETURN(1);
   if (!create_info->frm_only && ha_create_table(file_name,create_info,0))
diff --git a/strings/Makefile.am b/strings/Makefile.am
index 5e02c7c1a2bea532ccc0ecf483a0bb6d8b5de2c5..c43cf0f290af07908067802dab7e5d07811c09fa 100644
--- a/strings/Makefile.am
+++ b/strings/Makefile.am
@@ -22,19 +22,19 @@ pkglib_LIBRARIES =	libmystrings.a
 # Exact one of ASSEMBLER_X
 if ASSEMBLER_x86
 ASRCS		= strings-x86.s longlong2str-x86.s my_strtoll10-x86.s
-CSRCS		= bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c decimal.c ctype-extra.c
+CSRCS		= bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c decimal.c ctype-extra.c str_alloc.c longlong2str_asm.c
 else
 if ASSEMBLER_sparc32
 # These file MUST all be on the same line!! Otherwise automake
 # generats a very broken makefile
 ASRCS		= bmove_upp-sparc.s strappend-sparc.s strend-sparc.s strinstr-sparc.s strmake-sparc.s strmov-sparc.s strnmov-sparc.s strstr-sparc.s
-CSRCS		= strcont.c strfill.c strcend.c is_prefix.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c strxmov.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c decimal.c ctype-extra.c my_strtoll10.c
+CSRCS		= strcont.c strfill.c strcend.c is_prefix.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c strxmov.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c decimal.c ctype-extra.c my_strtoll10.c str_alloc.c
 else
 #no assembler
 ASRCS		=
 # These file MUST all be on the same line!! Otherwise automake
 # generats a very broken makefile
-CSRCS		= strxmov.c bmove_upp.c strappend.c strcont.c strend.c strfill.c strcend.c is_prefix.c strstr.c strinstr.c strmake.c strnmov.c strmov.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c decimal.c ctype-extra.c my_strtoll10.c
+CSRCS		= strxmov.c bmove_upp.c strappend.c strcont.c strend.c strfill.c strcend.c is_prefix.c strstr.c strinstr.c strmake.c strnmov.c strmov.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c decimal.c ctype-extra.c my_strtoll10.c str_alloc.c
 endif
 endif
 
@@ -45,7 +45,7 @@ EXTRA_DIST =		ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc
 			ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-utf8.c \
 			ctype-ucs2.c ctype-uca.c ctype-tis620.c ctype-ujis.c \
 			xml.c decimal.c strto.c strings-x86.s \
-			longlong2str.c longlong2str-x86.s \
+			longlong2str.c longlong2str-x86.s longlong2str_asm.c \
 			my_strtoll10.c my_strtoll10-x86.s \
 			strxmov.c bmove_upp.c strappend.c strcont.c strend.c \
 			strfill.c strcend.c is_prefix.c strstr.c strinstr.c \
diff --git a/strings/conf_to_src.c b/strings/conf_to_src.c
index d5ffa15ee0c9090f9ae40603bb1cd09e75865815..5a6adb398da34637c619f741b1ff6425baf17aac 100644
--- a/strings/conf_to_src.c
+++ b/strings/conf_to_src.c
@@ -75,6 +75,8 @@ static int get_charset_number(const char *charset_name)
 char *mdup(const char *src, uint len)
 {
   char *dst=(char*)malloc(len);
+  if (!dst)
+    exit(1);
   memcpy(dst,src,len);
   return dst;
 }
diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c
index d311859907ffe4171022eb06c21c07f830f7f244..9ccbb149523f1e7fea8ac1f323dd86bec3c81bf6 100644
--- a/strings/ctype-big5.c
+++ b/strings/ctype-big5.c
@@ -61,12 +61,12 @@ static uchar NEAR ctype_big5[257] =
   2,2,2,2,2,2,2,2,2,2,2,16,16,16,16,32,
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+  0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
+  3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,
 };
 
 static uchar NEAR to_lower_big5[]=
diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c
index f941aabaf69fd964810559f0c1d74a01e1e0ba8a..7caef07202dda34d5fda35bfae5bba08966c08b3 100644
--- a/strings/ctype-gbk.c
+++ b/strings/ctype-gbk.c
@@ -9938,6 +9938,43 @@ my_mb_wc_gbk(CHARSET_INFO *cs __attribute__((unused)),
 }
 
 
+/*
+  Returns well formed length of a GBK string.
+*/
+static
+uint my_well_formed_len_gbk(CHARSET_INFO *cs __attribute__((unused)),
+                            const char *b, const char *e,
+                            uint pos, int *error)
+{
+  const char *b0= b;
+  const char *emb= e - 1; /* Last possible end of an MB character */
+
+  *error= 0;
+  while (pos-- && b < e)
+  {
+    if ((uchar) b[0] < 128)
+    {
+      /* Single byte ascii character */
+      b++;
+    }
+    else  if ((b < emb) && isgbkcode((uchar)*b, (uchar)b[1]))
+    {
+      /* Double byte character */
+      b+= 2;
+    }
+    else
+    {
+      /* Wrong byte sequence */
+      *error= 1;
+      break;
+    }
+  }
+  return (uint) (b - b0);
+}
+
+
+                             
+
 static MY_COLLATION_HANDLER my_collation_ci_handler =
 {
   NULL,			/* init */
@@ -9960,7 +9997,7 @@ static MY_CHARSET_HANDLER my_charset_handler=
   mbcharlen_gbk,
   my_numchars_mb,
   my_charpos_mb,
-  my_well_formed_len_mb,
+  my_well_formed_len_gbk,
   my_lengthsp_8bit,
   my_numcells_8bit,
   my_mb_wc_gbk,
diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c
index 85f792b560715b67cf11d966e75099f74bef10b5..208c38edd303758b43e3716f77207edb752cf07e 100644
--- a/strings/ctype-simple.c
+++ b/strings/ctype-simple.c
@@ -1090,7 +1090,7 @@ ulong my_scan_8bit(CHARSET_INFO *cs, const char *str, const char *end, int sq)
     if (*str == '.')
     {
       for(str++ ; str != end && *str == '0' ; str++);
-      return (ulong) (str-str0);
+      return (ulong) (str - str0);
     }
     return 0;
 
@@ -1100,7 +1100,7 @@ ulong my_scan_8bit(CHARSET_INFO *cs, const char *str, const char *end, int sq)
       if (!my_isspace(cs,*str))
         break;
     }
-    return (ulong) (str-str0);
+    return (ulong) (str - str0);
   default:
     return 0;
   }
@@ -1117,14 +1117,14 @@ void my_fill_8bit(CHARSET_INFO *cs __attribute__((unused)),
 uint my_numchars_8bit(CHARSET_INFO *cs __attribute__((unused)),
 		      const char *b, const char *e)
 {
-  return (uint) (e-b);
+  return (uint) (e - b);
 }
 
 
 uint my_numcells_8bit(CHARSET_INFO *cs __attribute__((unused)),
 		      const char *b, const char *e)
 {
-  return (uint) (e-b);
+  return (uint) (e - b);
 }
 
 
diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c
index 76e91b89c251a9cd5c2857934dd04934dcece28b..1c12df08b32d7b5d45cf5d3c04e5b7a2f2a0cd04 100644
--- a/strings/ctype-sjis.c
+++ b/strings/ctype-sjis.c
@@ -213,7 +213,7 @@ static int my_strnncoll_sjis_internal(CHARSET_INFO *cs,
       uint a_char= sjiscode(*a, *(a+1));
       uint b_char= sjiscode(*b, *(b+1));
       if (a_char != b_char)
-	return a_char - b_char;
+	return (int) a_char - (int) b_char;
       a += 2;
       b += 2;
     } else
diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c
index 4fe8bb4e349a6cf3fb41b3c242040401bf08a0bb..e445fa90bd3110e17fcdf3dd6e1db1d2a9a9c3e6 100644
--- a/strings/ctype-tis620.c
+++ b/strings/ctype-tis620.c
@@ -541,7 +541,7 @@ int my_strnncoll_tis620(CHARSET_INFO *cs __attribute__((unused)),
 
   tc1= buf;
   if ((len1 + len2 +2) > (int) sizeof(buf))
-    tc1= (uchar*) malloc(len1+len2+2);
+    tc1= (uchar*) my_str_malloc(len1+len2+2);
   tc2= tc1 + len1+1;
   memcpy((char*) tc1, (char*) s1, len1);
   tc1[len1]= 0;		/* if length(s1)> len1, need to put 'end of string' */
@@ -551,7 +551,7 @@ int my_strnncoll_tis620(CHARSET_INFO *cs __attribute__((unused)),
   thai2sortable(tc2, len2);
   i= strcmp((char*)tc1, (char*)tc2);
   if (tc1 != buf)
-    free(tc1);
+    my_str_free(tc1);
   return i;
 }
 
@@ -572,7 +572,7 @@ int my_strnncollsp_tis620(CHARSET_INFO * cs __attribute__((unused)),
   
   a= buf;
   if ((a_length + b_length +2) > (int) sizeof(buf))
-    alloced= a= (uchar*) malloc(a_length+b_length+2);
+    alloced= a= (uchar*) my_str_malloc(a_length+b_length+2);
   
   b= a + a_length+1;
   memcpy((char*) a, (char*) a0, a_length);
@@ -621,7 +621,7 @@ int my_strnncollsp_tis620(CHARSET_INFO * cs __attribute__((unused)),
 ret:
   
   if (alloced)
-    free(alloced);
+    my_str_free(alloced);
   return res;
 }
 
diff --git a/strings/decimal.c b/strings/decimal.c
index 1d75502f0da08e8727d8cd8b8dd8375e1ee14514..4dc5fa91e0a02aa5ff0cc716a3f1f54d02858a41 100644
--- a/strings/decimal.c
+++ b/strings/decimal.c
@@ -351,7 +351,8 @@ int decimal2string(decimal_t *from, char *to, int *to_len,
     buf0=&tmp;
   }
 
-  intg_len= fixed_precision ? fixed_intg : (intg ? intg : 1);
+  if (!(intg_len= fixed_precision ? fixed_intg : intg))
+    intg_len= 1;
   frac_len= fixed_precision ? fixed_decimals : frac;
   len= from->sign + intg_len + test(frac) + frac_len;
   if (fixed_precision)
@@ -745,14 +746,17 @@ int decimal_shift(decimal_t *dec, int shift)
     new_point= ROUND_UP(new_point) - 1;
 
   if (new_point > end)
+  {
     do
     {
       dec->buf[new_point]=0;
-    }while (--new_point > end);
+    } while (--new_point > end);
+  }
   else
+  {
     for (; new_point < beg; new_point++)
       dec->buf[new_point]= 0;
-
+  }
   dec->intg= digits_int;
   dec->frac= digits_frac;
   return err;
diff --git a/strings/longlong2str-x86.s b/strings/longlong2str-x86.s
index fcc57810224984826e6a130154c9164c670c0de5..1840bab3f474283896dc5d37cc115f100ccaac31 100644
--- a/strings/longlong2str-x86.s
+++ b/strings/longlong2str-x86.s
@@ -16,26 +16,26 @@
 # Optimized longlong2str function for Intel 80x86  (gcc/gas syntax) 
 # Some set sequences are optimized for pentuimpro II 
 
-	.file	"longlong2str.s"
-	.version "1.01"
+	.file	"longlong2str-x86.s"
+	.version "1.02"
 
 .text
 	.align 4
 
-.globl	longlong2str
-	.type	 longlong2str,@function
+.globl	longlong2str_with_dig_vector
+	.type	 longlong2str_with_dig_vector,@function
 	
-longlong2str:
+longlong2str_with_dig_vector:
 	subl $80,%esp
 	pushl %ebp
 	pushl %esi
 	pushl %edi
 	pushl %ebx
 	movl 100(%esp),%esi	# Lower part of val 
-	movl 104(%esp),%ebp	# Higher part of val 
-	movl 108(%esp),%edi	# get dst 
 	movl 112(%esp),%ebx	# Radix 
+	movl 104(%esp),%ebp	# Higher part of val 
 	movl %ebx,%eax
+	movl 108(%esp),%edi	# get dst 
 	testl %eax,%eax
 	jge .L144
 
@@ -69,6 +69,8 @@ longlong2str:
 
 .L150:
 	leal 92(%esp),%ecx	# End of buffer 
+	movl %edi, 108(%esp)    # Store possible modified dest
+	movl 116(%esp), %edi    # dig_vec_upper
 	jmp  .L155
 	.align 4
 
@@ -83,7 +85,7 @@ longlong2str:
 	divl %ebx
 	decl %ecx
 	movl %eax,%esi		# quotent in ebp:esi 
-	movb _dig_vec_upper(%edx),%al   # al is faster than dl 
+	movb (%edx,%edi),%al    # al is faster than dl 
 	movb %al,(%ecx)		# store value in buff 
 	.align 4
 .L155:
@@ -91,20 +93,22 @@ longlong2str:
 	ja .L153
 	testl %esi,%esi		# rest value 
 	jl .L153
-	je .L10_mov		# Ready 
+	je .L160		# Ready 
 	movl %esi,%eax
-	movl $_dig_vec_upper,%ebp
 	.align 4
 
 .L154:				# Do rest with integer precision 
 	cltd
 	divl %ebx
 	decl %ecx
-	movb (%edx,%ebp),%dl	# bh is always zero as ebx=radix < 36 
+	movb (%edx,%edi),%dl	# bh is always zero as ebx=radix < 36 
 	testl %eax,%eax
 	movb %dl,(%ecx)
 	jne .L154
 
+.L160:
+	movl 108(%esp),%edi	# get dst 
+	
 .L10_mov:
 	movl %ecx,%esi
 	leal 92(%esp),%ecx	# End of buffer 
@@ -129,7 +133,7 @@ longlong2str:
 	jmp .L165
 
 .Lfe3:
-	.size	 longlong2str,.Lfe3-longlong2str
+	.size	 longlong2str_with_dig_vector,.Lfe3-longlong2str_with_dig_vector
 
 #
 # This is almost equal to the above, except that we can do the final
@@ -137,9 +141,6 @@ longlong2str:
 #	
 
 	.align 4
-.Ltmp:
-        .long 0xcccccccd
-	.align 4
 	
 .globl	longlong10_to_str
 	.type	 longlong10_to_str,@function
@@ -202,8 +203,8 @@ longlong10_to_str:
 
 	# The following code uses some tricks to change division by 10 to
 	# multiplication and shifts
-	movl .Ltmp,%esi		# set %esi to 0xcccccccd
-	
+	movl $0xcccccccd,%esi
+		
 .L10_40:
         movl %ebx,%eax
         mull %esi
diff --git a/strings/longlong2str_asm.c b/strings/longlong2str_asm.c
new file mode 100644
index 0000000000000000000000000000000000000000..e38a8328b917a5979a01f2128bef4ef65e6d1218
--- /dev/null
+++ b/strings/longlong2str_asm.c
@@ -0,0 +1,33 @@
+/* Copyright (C) 2000 MySQL 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 */
+
+/*
+  Wrapper for longlong2str.s
+
+  We need this because the assembler code can't access the local variable
+  _dig_vector in a portable manner.
+*/
+
+#include <my_global.h>
+#include "m_string.h"
+
+extern char *longlong2str_with_dig_vector(longlong val,char *dst,int radix,
+                                          const char *dig_vector);
+
+char *longlong2str(longlong val,char *dst,int radix)
+{
+  return longlong2str_with_dig_vector(val, dst, radix, _dig_vec_upper);
+}
diff --git a/strings/my_strtoll10-x86.s b/strings/my_strtoll10-x86.s
index c04384667a7896f173ce9bdb9b23204ab515d55f..1d8b8f2bbce0392877eb99afd31cefc743cbb8cd 100644
--- a/strings/my_strtoll10-x86.s
+++ b/strings/my_strtoll10-x86.s
@@ -17,21 +17,8 @@
 # For documentation, check my_strtoll.c
 	
 	.file	"my_strtoll10-x86.s"
-	.version "01.01"
-.data
-	.align 32
-	.type	 lfactor,@object
-	.size	 lfactor,36
-lfactor:
-	.long 1
-	.long 10
-	.long 100
-	.long 1000
-	.long 10000
-	.long 100000
-	.long 1000000
-	.long 10000000
-	.long 100000000
+	.version "01.02"
+	
 .text
 	.align 4
 	
@@ -209,14 +196,16 @@ my_strtoll10:
 	jne .L500
 	cmpl -36(%ebp),%esi	# Test if string is less than 18 digits
 	jne .Lend_i_and_j
-	jmp .Lend3		# 18 digit string
+.L499:	
+	movl $1000000000,%eax	
+	jmp .Lgot_factor	# 18 digit string
 
 	# Handle the possible next to last digit and store in ecx
 .L500:
 	movb (%esi),%al
 	addb $-48,%al
 	cmpb $9,%al
-	ja .Lend3
+	ja .L499		# 18 digit string
 
 	incl %esi
 	movzbl %al,%ecx
@@ -315,14 +304,41 @@ my_strtoll10:
 .Lend_i_and_j:
 	movl %esi,%ecx
 	subl -12(%ebp),%ecx	# ecx= number of digits in second part
-	movl lfactor(,%ecx,4),%eax
-	jmp .L523
 
-	# Return -8(%ebp) * $1000000000 + edi
+	# Calculate %eax= 10 ** %cl, where %cl <= 8
+	# With an array one could do this with:
+	# movl 10_factor_table(,%ecx,4),%eax
+	# We calculate the table here to avoid problems in
+	# position independent code (gcc -pic)
+
+	cmpb  $3,%cl
+	ja    .L4_to_8
+	movl  $1000, %eax
+	je    .Lgot_factor	# %cl=3, eax= 1000
+	movl  $10, %eax
+	cmpb  $1,%cl		# %cl is here 0 - 2
+	je    .Lgot_factor	# %cl=1, eax= 10
+	movl  $100, %eax	
+	ja    .Lgot_factor	# %cl=2, eax=100
+	movl  $1, %eax		
+	jmp   .Lgot_factor	# %cl=0, eax=1
+
+.L4_to_8:			# %cl is here 4-8
+	cmpb  $5,%cl
+	movl  $100000, %eax
+	je   .Lgot_factor	# %cl=5, eax=100000
+	movl  $10000, %eax
+	jbe  .Lgot_factor	# %cl=4, eax=10000
+	movl  $10000000, %eax
+	cmpb  $7,%cl
+	je   .Lgot_factor	# %cl=7, eax=10000000
+	movl  $100000000, %eax	
+	ja   .Lgot_factor	# %cl=8, eax=100000000
+	movl  $1000000, %eax	# %cl=6, eax=1000000
+
+	# Return -8(%ebp) * %eax + edi
 	.p2align 4,,7
-.Lend3:
-	movl $1000000000,%eax
-.L523:
+.Lgot_factor:
 	mull -8(%ebp)
 	addl %edi,%eax
 	adcl $0,%edx
diff --git a/strings/str_alloc.c b/strings/str_alloc.c
new file mode 100644
index 0000000000000000000000000000000000000000..158fa7e75bb239c586c76fcca9c5303f8cbc914d
--- /dev/null
+++ b/strings/str_alloc.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 2000 MySQL 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 */
+
+#include <my_global.h>
+#include <m_string.h>
+
+static void *my_str_malloc_default(size_t size)
+{
+  void *ret= malloc(size);
+  if (!ret)
+    exit(1);
+  return ret;
+}
+
+static void my_str_free_default(void *ptr)
+{
+  free(ptr);
+}
+
+void *(*my_str_malloc)(size_t)= &my_str_malloc_default;
+void (*my_str_free)(void *)= &my_str_free_default;
diff --git a/support-files/MacOSX/Info.plist.sh b/support-files/MacOSX/Info.plist.sh
index f14902ff3790c4fad075b214cd31e97d4348fd30..fdfb0c7a17c7a941c308cb2397d4143305305116 100644
--- a/support-files/MacOSX/Info.plist.sh
+++ b/support-files/MacOSX/Info.plist.sh
@@ -9,11 +9,7 @@
 	<key>CFBundleName</key>
 	<string>MySQL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>@VERSION@</string>
-	<key>IFMajorVersion</key>
-	<integer>4</integer>
-	<key>IFMinorVersion</key>
-	<integer>0</integer>
+	<string>@MYSQL_NO_DASH_VERSION@</string>
 	<key>IFPkgFlagAllowBackRev</key>
 	<false/>
 	<key>IFPkgFlagAuthorizationAction</key>
diff --git a/support-files/MacOSX/Makefile.am b/support-files/MacOSX/Makefile.am
index 86773f123397ad27b5f50ebe237393ecf474b7ea..ea99c46389d740f93f54228389030aa2020c939d 100644
--- a/support-files/MacOSX/Makefile.am
+++ b/support-files/MacOSX/Makefile.am
@@ -20,19 +20,25 @@
 EXTRA_DIST =	Info.plist.sh \
 		Description.plist.sh \
 		StartupParameters.plist.sh \
-		postinstall.sh \
-		preinstall.sh \
+		postflight.sh \
+		preflight.sh \
 		ReadMe.txt \
 		MySQLCOM \
 		StartupItem.Description.plist \
 		StartupItem.Info.plist \
 		StartupItem.postinstall
 
+noinst_DATA = Info.plist \
+		Description.plist \
+		StartupParameters.plist \
+		postflight \
+		preflight
+
 CLEANFILES =	Info.plist \
 		Description.plist \
 		StartupParameters.plist \
-		postinstall \
-		preinstall
+		postflight \
+		preflight
 
 SUFFIXES = .sh
 
@@ -41,6 +47,7 @@ SUFFIXES = .sh
 	@SED@ \
 		-e 's!@''prefix''@!$(prefix)!g' \
 	  -e 's!@''VERSION''@!@VERSION@!' \
+	  -e 's!@''MYSQL_NO_DASH_VERSION''@!@MYSQL_NO_DASH_VERSION@!' \
 	  -e 's!@''MYSQL_SERVER_SUFFIX''@!@MYSQL_SERVER_SUFFIX@!' \
 		-e 's!@''MYSQLD_USER''@!@MYSQLD_USER@!' \
 	$< > $@-t
diff --git a/support-files/MacOSX/postinstall.sh b/support-files/MacOSX/postflight.sh
similarity index 85%
rename from support-files/MacOSX/postinstall.sh
rename to support-files/MacOSX/postflight.sh
index ff921d3fee97c822ece16cfeee5e9444a7342dd1..451eb65e0d7a51ffd6a834e36ac76ec6a3b81fbc 100644
--- a/support-files/MacOSX/postinstall.sh
+++ b/support-files/MacOSX/postflight.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# postinstall - this script will be executed after the MySQL PKG
+# postflight - this script will be executed after the MySQL PKG
 # installation has been performed.
 #
 # This script will install the MySQL privilege tables using the
diff --git a/support-files/MacOSX/preinstall.sh b/support-files/MacOSX/preflight.sh
similarity index 77%
rename from support-files/MacOSX/preinstall.sh
rename to support-files/MacOSX/preflight.sh
index 62772573c4656e3345bb8feed719cec78a180084..700d0640a9e84bdcc338cc0f40a59f5e890e0b87 100644
--- a/support-files/MacOSX/preinstall.sh
+++ b/support-files/MacOSX/preflight.sh
@@ -1,10 +1,10 @@
 #!/bin/sh
 #
-# preinstall - this script will be executed before the MySQL PKG
+# preflight - this script will be executed before the MySQL PKG
 # installation will be performed.
 #
 # If this package has been compiled with a prefix ending with "mysql" (e.g.
-# /usr/local/mysql or /opt/mysql), it will rename any previosuly existing
+# /usr/local/mysql or /opt/mysql), it will rename any previously existing
 # directory with this name before installing the new package (which includes
 # a symlink named "mysql", pointing to the newly installed directory, which
 # is named mysql-<version>)
diff --git a/support-files/Makefile.am b/support-files/Makefile.am
index d83dd8ee74d6d9ef275c71b4d77c44345f34eca1..972d1dc703820dc67303b8418956dafbf18af816 100644
--- a/support-files/Makefile.am
+++ b/support-files/Makefile.am
@@ -43,6 +43,9 @@ pkgdata_DATA =		my-small.cnf \
 
 pkgdata_SCRIPTS =	mysql.server
 
+noinst_DATA = mysql-@VERSION@.spec \
+			MySQL-shared-compat.spec
+
 CLEANFILES =		my-small.cnf \
 			my-medium.cnf \
 			my-large.cnf \
diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh
index 213530a25811fc8cb0d9be361b5ee9f9931a3e64..61847392a2982921be65437f10af3a09cb5e8ccd 100644
--- a/support-files/mysql.spec.sh
+++ b/support-files/mysql.spec.sh
@@ -29,7 +29,6 @@ Source:		http://www.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/mysql-%{mysql
 URL:		http://www.mysql.com/
 Packager:	Lenz Grimmer <build@mysql.com>
 Vendor:		MySQL AB
-Requires: fileutils sh-utils
 Provides:	msqlormysql MySQL-server mysql
 BuildRequires: ncurses-devel
 Obsoletes:	mysql
@@ -60,7 +59,7 @@ documentation and the manual for more information.
 %package server
 Summary:	MySQL: a very fast and reliable SQL database server
 Group:		Applications/Databases
-Requires: fileutils sh-utils
+Requires: coreutils grep procps /usr/sbin/useradd /usr/sbin/groupadd /sbin/chkconfig
 Provides:	msqlormysql mysql-server mysql MySQL
 Obsoletes:	MySQL mysql mysql-server
 
@@ -300,7 +299,7 @@ BuildMySQL "--enable-shared \
 		--with-berkeley-db \
 		--with-innodb \
 		--with-ndbcluster \
-		--with-archive \
+		--with-archive-storage-engine \
 		--with-csv-storage-engine \
 		--with-example-storage-engine \
 		--with-blackhole-storage-engine \
@@ -349,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)\" \
@@ -442,7 +442,7 @@ fi
 
 # Create a MySQL user and group. Do not report any problems if it already
 # exists.
-groupadd -r -c "MySQL server" %{mysqld_user} 2> /dev/null || true
+groupadd -r %{mysqld_user} 2> /dev/null || true
 useradd -M -r -d $mysql_datadir -s /bin/bash -c "MySQL server" -g %{mysqld_user} %{mysqld_user} 2> /dev/null || true 
 
 # Change permissions so that the user that will run the MySQL daemon
@@ -668,6 +668,16 @@ fi
 # itself - note that they must be ordered by date (important when
 # merging BK trees)
 %changelog 
+* Thu Aug 04 2005 Lenz Grimmer <lenz@mysql.com>
+
+- Fixed the creation of the mysql user group account in the postinstall
+  section (BUG 12348)
+- Fixed enabling the Archive storage engine in the Max binary
+
+* Tue Aug 02 2005 Lenz Grimmer <lenz@mysql.com>
+
+- Fixed the Requires: tag for the server RPM (BUG 12233)
+
 * Fri Jul 15 2005 Lenz Grimmer <lenz@mysql.com>
 
 - create a "mysql" user group and assign the mysql user account to that group
diff --git a/tests/fork_big2.pl b/tests/fork_big2.pl
index a1c55ac4c11279aef3fc17b6dbd7234363d1a9d4..567cfafa176bd98977e09f0a822c3081c2ca2d74 100644
--- a/tests/fork_big2.pl
+++ b/tests/fork_big2.pl
@@ -300,7 +300,7 @@ sub test_select
 
 #
 # Do big select count(distinct..) over the table
-# 
+#
 
 sub test_select_count
 {
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 53708a7a741746faab58e1b2c0599f1dbe312ae4..5558028bb0691393b815a4f24906e71f8a70fbe8 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -7195,7 +7195,7 @@ static void test_prepare_grant()
 
   }
 }
-#endif
+#endif /* EMBEDDED_LIBRARY */
 
 /*
   Test a crash when invalid/corrupted .frm is used in the
@@ -11801,8 +11801,8 @@ static void test_bug6046()
 
   stmt= mysql_stmt_init(mysql);
 
-  stmt_text= "SELECT t1.a FROM t1 NATURAL JOIN t1 as X1 "
-             "WHERE t1.b > ? ORDER BY t1.a";
+  stmt_text= "SELECT a FROM t1 NATURAL JOIN t1 as X1 "
+             "WHERE b > ? ORDER BY a";
 
   rc= mysql_stmt_prepare(stmt, stmt_text, strlen(stmt_text));
   check_execute(stmt, rc);
@@ -13893,10 +13893,10 @@ static void test_bug12001()
   MYSQL *mysql_local;
   MYSQL_RES *result;
   const char *query= "DROP TABLE IF EXISTS test_table;"
-                     "CREATE TABLE test_table(id INT);" 
-                     "INSERT INTO test_table VALUES(10);" 
-                     "UPDATE test_table SET id=20 WHERE id=10;" 
-                     "SELECT * FROM test_table;" 
+                     "CREATE TABLE test_table(id INT);"
+                     "INSERT INTO test_table VALUES(10);"
+                     "UPDATE test_table SET id=20 WHERE id=10;"
+                     "SELECT * FROM test_table;"
                      "INSERT INTO non_existent_table VALUES(11);";
   int rc, res;
 
@@ -13911,7 +13911,9 @@ static void test_bug12001()
   /* Create connection that supports multi statements */
   if (!mysql_real_connect(mysql_local, opt_host, opt_user,
                            opt_password, current_db, opt_port,
-                           opt_unix_socket, CLIENT_MULTI_STATEMENTS | CLIENT_MULTI_RESULTS)) {
+                           opt_unix_socket, CLIENT_MULTI_STATEMENTS |
+                           CLIENT_MULTI_RESULTS))
+  {
     fprintf(stdout, "\n mysql_real_connect() failed");
     exit(1);
   }
@@ -13919,12 +13921,16 @@ static void test_bug12001()
   rc= mysql_query(mysql_local, query);
   myquery(rc);
 
-  do {
-    if (mysql_field_count(mysql_local) && (result= mysql_use_result(mysql_local)))  {
-      mysql_free_result(result);	
+  do
+  {
+    if (mysql_field_count(mysql_local) &&
+        (result= mysql_use_result(mysql_local)))
+    {
+      mysql_free_result(result);
     }
-  } while (!(res= mysql_next_result(mysql_local))); 
-  
+  }
+  while (!(res= mysql_next_result(mysql_local)));
+
   rc= mysql_query(mysql_local, "DROP TABLE IF EXISTS test_table");
   myquery(rc);
 
@@ -13932,6 +13938,307 @@ static void test_bug12001()
   DIE_UNLESS(res==1);
 }
 
+
+/* Bug#11909: wrong metadata if fetching from two cursors */
+
+static void test_bug11909()
+{
+  MYSQL_STMT *stmt1, *stmt2;
+  MYSQL_BIND bind[7];
+  int rc;
+  char firstname[20], midinit[20], lastname[20], workdept[20];
+  ulong firstname_len, midinit_len, lastname_len, workdept_len;
+  uint32 empno;
+  double salary;
+  float bonus;
+  const char *stmt_text;
+
+  myheader("test_bug11909");
+
+  stmt_text= "drop table if exists t1";
+  rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text));
+  myquery(rc);
+
+  stmt_text= "create table t1 ("
+    "  empno int(11) not null, firstname varchar(20) not null,"
+    "  midinit varchar(20) not null, lastname varchar(20) not null,"
+    "  workdept varchar(6) not null, salary double not null,"
+    "  bonus float not null, primary key (empno)"
+    ") default charset=latin1 collate=latin1_bin";
+  rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text));
+  myquery(rc);
+
+  stmt_text= "insert into t1 values "
+    "(10, 'CHRISTINE', 'I', 'HAAS',     'A00', 52750, 1000), "
+    "(20, 'MICHAEL',   'L', 'THOMPSON', 'B01', 41250, 800),"
+    "(30, 'SALLY',     'A', 'KWAN',     'C01', 38250, 800),"
+    "(50, 'JOHN',      'B', 'GEYER',    'E01', 40175, 800), "
+    "(60, 'IRVING',    'F', 'STERN',    'D11', 32250, 500)";
+  rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text));
+  myquery(rc);
+
+  /* ****** Begin of trace ****** */
+
+  stmt1= open_cursor("SELECT empno, firstname, midinit, lastname,"
+                     "workdept, salary, bonus FROM t1");
+
+  bzero(bind, sizeof(bind));
+  bind[0].buffer_type= MYSQL_TYPE_LONG;
+  bind[0].buffer= (void*) &empno;
+
+  bind[1].buffer_type= MYSQL_TYPE_VAR_STRING;
+  bind[1].buffer= (void*) firstname;
+  bind[1].buffer_length= sizeof(firstname);
+  bind[1].length= &firstname_len;
+
+  bind[2].buffer_type= MYSQL_TYPE_VAR_STRING;
+  bind[2].buffer= (void*) midinit;
+  bind[2].buffer_length= sizeof(midinit);
+  bind[2].length= &midinit_len;
+
+  bind[3].buffer_type= MYSQL_TYPE_VAR_STRING;
+  bind[3].buffer= (void*) lastname;
+  bind[3].buffer_length= sizeof(lastname);
+  bind[3].length= &lastname_len;
+
+  bind[4].buffer_type= MYSQL_TYPE_VAR_STRING;
+  bind[4].buffer= (void*) workdept;
+  bind[4].buffer_length= sizeof(workdept);
+  bind[4].length= &workdept_len;
+
+  bind[5].buffer_type= MYSQL_TYPE_DOUBLE;
+  bind[5].buffer= (void*) &salary;
+
+  bind[6].buffer_type= MYSQL_TYPE_FLOAT;
+  bind[6].buffer= (void*) &bonus;
+  rc= mysql_stmt_bind_result(stmt1, bind);
+  check_execute(stmt1, rc);
+
+  rc= mysql_stmt_execute(stmt1);
+  check_execute(stmt1, rc);
+
+  rc= mysql_stmt_fetch(stmt1);
+  DIE_UNLESS(rc == 0);
+  DIE_UNLESS(empno == 10);
+  DIE_UNLESS(strcmp(firstname, "CHRISTINE") == 0);
+  DIE_UNLESS(strcmp(midinit, "I") == 0);
+  DIE_UNLESS(strcmp(lastname, "HAAS") == 0);
+  DIE_UNLESS(strcmp(workdept, "A00") == 0);
+  DIE_UNLESS(salary == (double) 52750.0);
+  DIE_UNLESS(bonus == (float) 1000.0);
+
+  stmt2= open_cursor("SELECT empno, firstname FROM t1");
+  rc= mysql_stmt_bind_result(stmt2, bind);
+  check_execute(stmt2, rc);
+
+  rc= mysql_stmt_execute(stmt2);
+  check_execute(stmt2, rc);
+
+  rc= mysql_stmt_fetch(stmt2);
+  DIE_UNLESS(rc == 0);
+
+  DIE_UNLESS(empno == 10);
+  DIE_UNLESS(strcmp(firstname, "CHRISTINE") == 0);
+
+  rc= mysql_stmt_reset(stmt2);
+  check_execute(stmt2, rc);
+
+  /* ERROR: next statement should return 0 */
+
+  rc= mysql_stmt_fetch(stmt1);
+  DIE_UNLESS(rc == 0);
+
+  mysql_stmt_close(stmt1);
+  mysql_stmt_close(stmt2);
+  rc= mysql_rollback(mysql);
+  myquery(rc);
+
+  rc= mysql_query(mysql, "drop table t1");
+  myquery(rc);
+}
+
+/* Cursors: opening a cursor to a compilicated query with ORDER BY */
+
+static void test_bug11901()
+{
+  MYSQL_STMT *stmt;
+  MYSQL_BIND bind[2];
+  int rc;
+  char workdept[20];
+  ulong workdept_len;
+  uint32 empno;
+  const char *stmt_text;
+
+  myheader("test_bug11901");
+
+  stmt_text= "drop table if exists t1, t2";
+  rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text));
+  myquery(rc);
+
+  stmt_text= "create table t1 ("
+    "  empno int(11) not null, firstname varchar(20) not null,"
+    "  midinit varchar(20) not null, lastname varchar(20) not null,"
+    "  workdept varchar(6) not null, salary double not null,"
+    "  bonus float not null, primary key (empno), "
+    " unique key (workdept, empno) "
+    ") default charset=latin1 collate=latin1_bin";
+  rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text));
+  myquery(rc);
+
+  stmt_text= "insert into t1 values "
+     "(10,  'CHRISTINE', 'I', 'HAAS',      'A00', 52750, 1000),"
+     "(20,  'MICHAEL',   'L', 'THOMPSON',  'B01', 41250, 800), "
+     "(30,  'SALLY',     'A', 'KWAN',      'C01', 38250, 800), "
+     "(50,  'JOHN',      'B', 'GEYER',     'E01', 40175, 800), "
+     "(60,  'IRVING',    'F', 'STERN',     'D11', 32250, 500), "
+     "(70,  'EVA',       'D', 'PULASKI',   'D21', 36170, 700), "
+     "(90,  'EILEEN',    'W', 'HENDERSON', 'E11', 29750, 600), "
+     "(100, 'THEODORE',  'Q', 'SPENSER',   'E21', 26150, 500), "
+     "(110, 'VINCENZO',  'G', 'LUCCHESSI', 'A00', 46500, 900), "
+     "(120, 'SEAN',      '',  'O\\'CONNELL', 'A00', 29250, 600), "
+     "(130, 'DOLORES',   'M', 'QUINTANA',  'C01', 23800, 500), "
+     "(140, 'HEATHER',   'A', 'NICHOLLS',  'C01', 28420, 600), "
+     "(150, 'BRUCE',     '',  'ADAMSON',   'D11', 25280, 500), "
+     "(160, 'ELIZABETH', 'R', 'PIANKA',    'D11', 22250, 400), "
+     "(170, 'MASATOSHI', 'J', 'YOSHIMURA', 'D11', 24680, 500), "
+     "(180, 'MARILYN',   'S', 'SCOUTTEN',  'D11', 21340, 500), "
+     "(190, 'JAMES',     'H', 'WALKER',    'D11', 20450, 400), "
+     "(200, 'DAVID',     '',  'BROWN',     'D11', 27740, 600), "
+     "(210, 'WILLIAM',   'T', 'JONES',     'D11', 18270, 400), "
+     "(220, 'JENNIFER',  'K', 'LUTZ',      'D11', 29840, 600), "
+     "(230, 'JAMES',     'J', 'JEFFERSON', 'D21', 22180, 400), "
+     "(240, 'SALVATORE', 'M', 'MARINO',    'D21', 28760, 600), "
+     "(250, 'DANIEL',    'S', 'SMITH',     'D21', 19180, 400), "
+     "(260, 'SYBIL',     'P', 'JOHNSON',   'D21', 17250, 300), "
+     "(270, 'MARIA',     'L', 'PEREZ',     'D21', 27380, 500), "
+     "(280, 'ETHEL',     'R', 'SCHNEIDER', 'E11', 26250, 500), "
+     "(290, 'JOHN',      'R', 'PARKER',    'E11', 15340, 300), "
+     "(300, 'PHILIP',    'X', 'SMITH',     'E11', 17750, 400), "
+     "(310, 'MAUDE',     'F', 'SETRIGHT',  'E11', 15900, 300), "
+     "(320, 'RAMLAL',    'V', 'MEHTA',     'E21', 19950, 400), "
+     "(330, 'WING',      '',  'LEE',       'E21', 25370, 500), "
+     "(340, 'JASON',     'R', 'GOUNOT',    'E21', 23840, 500)";
+
+  rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text));
+  myquery(rc);
+
+  stmt_text= "create table t2 ("
+    " deptno varchar(6) not null, deptname varchar(20) not null,"
+    " mgrno int(11) not null, location varchar(20) not null,"
+    " admrdept varchar(6) not null, refcntd int(11) not null,"
+    " refcntu int(11) not null, primary key (deptno)"
+    ") default charset=latin1 collate=latin1_bin";
+  rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text));
+  myquery(rc);
+
+  stmt_text= "insert into t2 values "
+    "('A00', 'SPIFFY COMPUTER SERV', 10, '', 'A00', 0, 0), "
+    "('B01', 'PLANNING',             20, '', 'A00', 0, 0), "
+    "('C01', 'INFORMATION CENTER',   30, '', 'A00', 0, 0), "
+    "('D01', 'DEVELOPMENT CENTER',   0,  '', 'A00', 0, 0),"
+    "('D11', 'MANUFACTURING SYSTEM', 60, '', 'D01', 0, 0), "
+    "('D21', 'ADMINISTRATION SYSTE', 70, '', 'D01', 0, 0), "
+    "('E01', 'SUPPORT SERVICES',     50, '', 'A00', 0, 0), "
+    "('E11', 'OPERATIONS',           90, '', 'E01', 0, 0), "
+    "('E21', 'SOFTWARE SUPPORT',     100,'', 'E01', 0, 0)";
+  rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text));
+  myquery(rc);
+
+  /* ****** Begin of trace ****** */
+
+  stmt= open_cursor("select t1.empno, t1.workdept "
+                    "from (t1 left join t2 on t2.deptno = t1.workdept) "
+                    "where t2.deptno in "
+                    "   (select t2.deptno "
+                    "    from (t1 left join t2 on t2.deptno = t1.workdept) "
+                    "    where t1.empno = ?) "
+                    "order by 1");
+  bzero(bind, sizeof(bind));
+
+  bind[0].buffer_type= MYSQL_TYPE_LONG;
+  bind[0].buffer= &empno;
+  rc= mysql_stmt_bind_param(stmt, bind);
+  check_execute(stmt, rc);
+
+  bind[1].buffer_type= MYSQL_TYPE_VAR_STRING;
+  bind[1].buffer= (void*) workdept;
+  bind[1].buffer_length= sizeof(workdept);
+  bind[1].length= &workdept_len;
+
+  rc= mysql_stmt_bind_result(stmt, bind);
+  check_execute(stmt, rc);
+
+  empno= 10;
+  /* ERROR: next statement causes a server crash */
+  rc= mysql_stmt_execute(stmt);
+  check_execute(stmt, rc);
+
+  mysql_stmt_close(stmt);
+
+  rc= mysql_query(mysql, "drop table t1, t2");
+  myquery(rc);
+}
+
+/* Bug#12243: multiple cursors, crash in a fetch after commit. */
+
+static void test_bug12243()
+{
+  MYSQL_STMT *stmt1, *stmt2;
+  int rc;
+  const char *stmt_text;
+  ulong type;
+
+  myheader("test_bug12243");
+
+  if (! have_innodb)
+  {
+    if (!opt_silent)
+      printf("This test requires InnoDB.\n");
+    return;
+  }
+
+  /* create tables */
+  mysql_query(mysql, "drop table if exists t1");
+  mysql_query(mysql, "create table t1 (a int) engine=InnoDB");
+  rc= mysql_query(mysql, "insert into t1 (a) values (1), (2)");
+  myquery(rc);
+  mysql_autocommit(mysql, FALSE);
+  /* create statement */
+  stmt1= mysql_stmt_init(mysql);
+  stmt2= mysql_stmt_init(mysql);
+  type= (ulong) CURSOR_TYPE_READ_ONLY;
+  mysql_stmt_attr_set(stmt1, STMT_ATTR_CURSOR_TYPE, (const void*) &type);
+  mysql_stmt_attr_set(stmt2, STMT_ATTR_CURSOR_TYPE, (const void*) &type);
+
+  stmt_text= "select a from t1";
+
+  rc= mysql_stmt_prepare(stmt1, stmt_text, strlen(stmt_text));
+  check_execute(stmt1, rc);
+  rc= mysql_stmt_execute(stmt1);
+  check_execute(stmt1, rc);
+  rc= mysql_stmt_fetch(stmt1);
+  check_execute(stmt1, rc);
+
+  rc= mysql_stmt_prepare(stmt2, stmt_text, strlen(stmt_text));
+  check_execute(stmt2, rc);
+  rc= mysql_stmt_execute(stmt2);
+  check_execute(stmt2, rc);
+  rc= mysql_stmt_fetch(stmt2);
+  check_execute(stmt2, rc);
+
+  rc= mysql_stmt_close(stmt1);
+  check_execute(stmt1, rc);
+  rc= mysql_commit(mysql);
+  myquery(rc);
+  rc= mysql_stmt_fetch(stmt2);
+  check_execute(stmt2, rc);
+
+  mysql_stmt_close(stmt2);
+  rc= mysql_query(mysql, "drop table t1");
+  myquery(rc);
+  mysql_autocommit(mysql, TRUE);                /* restore default */
+}
+
 /*
   Read and parse arguments and MySQL options from my.cnf
 */
@@ -14178,6 +14485,9 @@ static struct my_tests_st my_tests[]= {
   { "test_bug11037", test_bug11037 },
   { "test_bug10760", test_bug10760 },
   { "test_bug12001", test_bug12001 },
+  { "test_bug11909", test_bug11909 },
+  { "test_bug11901", test_bug11901 },
+  { "test_bug12243", test_bug12243 },
   { 0, 0 }
 };
 
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 {