Commit 3da45653 authored by unknown's avatar unknown

Merge mysqldev@production.mysql.com:my/mysql-5.0-release

into  mysql.com:/users/lthalmann/bkroot/mysql-5.0-release

parents ce5ed66f 82f5656a
...@@ -1110,8 +1110,8 @@ Global ...@@ -1110,8 +1110,8 @@ Global
{DB28DE80-837F-4497-9AA9-CC0A20584C98}.Release.Build.0 = 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.ActiveCfg = TLS|Win32
{44D9C7DC-6636-4B82-BD01-6876C64017DF}.classic.Build.0 = 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.ActiveCfg = nt|Win32
{44D9C7DC-6636-4B82-BD01-6876C64017DF}.classic nt.Build.0 = Release|Win32 {44D9C7DC-6636-4B82-BD01-6876C64017DF}.classic nt.Build.0 = nt|Win32
{44D9C7DC-6636-4B82-BD01-6876C64017DF}.Debug.ActiveCfg = Debug|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}.Debug.Build.0 = Debug|Win32
{44D9C7DC-6636-4B82-BD01-6876C64017DF}.Embedded_Classic.ActiveCfg = TLS|Win32 {44D9C7DC-6636-4B82-BD01-6876C64017DF}.Embedded_Classic.ActiveCfg = TLS|Win32
...@@ -1126,18 +1126,18 @@ Global ...@@ -1126,18 +1126,18 @@ Global
{44D9C7DC-6636-4B82-BD01-6876C64017DF}.Embedded_Release.Build.0 = 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.ActiveCfg = Max|Win32
{44D9C7DC-6636-4B82-BD01-6876C64017DF}.Max.Build.0 = 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.ActiveCfg = Max nt|Win32
{44D9C7DC-6636-4B82-BD01-6876C64017DF}.Max nt.Build.0 = Max|Win32 {44D9C7DC-6636-4B82-BD01-6876C64017DF}.Max nt.Build.0 = Max nt|Win32
{44D9C7DC-6636-4B82-BD01-6876C64017DF}.nt.ActiveCfg = Release|Win32 {44D9C7DC-6636-4B82-BD01-6876C64017DF}.nt.ActiveCfg = nt|Win32
{44D9C7DC-6636-4B82-BD01-6876C64017DF}.nt.Build.0 = Release|Win32 {44D9C7DC-6636-4B82-BD01-6876C64017DF}.nt.Build.0 = nt|Win32
{44D9C7DC-6636-4B82-BD01-6876C64017DF}.pro.ActiveCfg = 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.Build.0 = Release|Win32
{44D9C7DC-6636-4B82-BD01-6876C64017DF}.pro gpl.ActiveCfg = Release|Win32 {44D9C7DC-6636-4B82-BD01-6876C64017DF}.pro gpl.ActiveCfg = Release|Win32
{44D9C7DC-6636-4B82-BD01-6876C64017DF}.pro gpl.Build.0 = Release|Win32 {44D9C7DC-6636-4B82-BD01-6876C64017DF}.pro gpl.Build.0 = Release|Win32
{44D9C7DC-6636-4B82-BD01-6876C64017DF}.pro gpl nt.ActiveCfg = Release|Win32 {44D9C7DC-6636-4B82-BD01-6876C64017DF}.pro gpl nt.ActiveCfg = nt|Win32
{44D9C7DC-6636-4B82-BD01-6876C64017DF}.pro gpl nt.Build.0 = Release|Win32 {44D9C7DC-6636-4B82-BD01-6876C64017DF}.pro gpl nt.Build.0 = nt|Win32
{44D9C7DC-6636-4B82-BD01-6876C64017DF}.pro nt.ActiveCfg = Release|Win32 {44D9C7DC-6636-4B82-BD01-6876C64017DF}.pro nt.ActiveCfg = nt|Win32
{44D9C7DC-6636-4B82-BD01-6876C64017DF}.pro nt.Build.0 = Release|Win32 {44D9C7DC-6636-4B82-BD01-6876C64017DF}.pro nt.Build.0 = nt|Win32
{44D9C7DC-6636-4B82-BD01-6876C64017DF}.Release.ActiveCfg = Release|Win32 {44D9C7DC-6636-4B82-BD01-6876C64017DF}.Release.ActiveCfg = Release|Win32
{44D9C7DC-6636-4B82-BD01-6876C64017DF}.Release.Build.0 = 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.ActiveCfg = classic|Win32
...@@ -1427,6 +1427,7 @@ Global ...@@ -1427,6 +1427,7 @@ Global
{DA224DAB-5006-42BE-BB77-16E8BE5326D5}.Max.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.Build.0 = Release|Win32
{DA224DAB-5006-42BE-BB77-16E8BE5326D5}.Max nt.ActiveCfg = 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.ActiveCfg = Release|Win32
{DA224DAB-5006-42BE-BB77-16E8BE5326D5}.nt.Build.0 = 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.ActiveCfg = Release|Win32
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
Optimization="0" Optimization="0"
OptimizeForProcessor="2" OptimizeForProcessor="2"
AdditionalIncludeDirectories="../include,../zlib" AdditionalIncludeDirectories="../include,../zlib"
PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_WINDOWS;USE_SYMDIR" PreprocessorDefinitions="__NT__;_DEBUG;SAFEMALLOC;SAFE_MUTEX;_WINDOWS;USE_SYMDIR"
RuntimeLibrary="1" RuntimeLibrary="1"
PrecompiledHeaderFile=".\debug/mysys.pch" PrecompiledHeaderFile=".\debug/mysys.pch"
AssemblerListingLocation=".\debug/" AssemblerListingLocation=".\debug/"
...@@ -108,6 +108,56 @@ ...@@ -108,6 +108,56 @@
<Tool <Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/> Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration> </Configuration>
<Configuration
Name="Max nt|Win32"
OutputDirectory=".\max_nt"
IntermediateDirectory=".\max_nt"
ConfigurationType="4"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../include,../zlib"
PreprocessorDefinitions="__NT__;USE_SYMDIR;NDEBUG;DBUG_OFF;_WINDOWS"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
PrecompiledHeaderFile=".\max_nt/mysys.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\mysys-max-nt.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 <Configuration
Name="Release|Win32" Name="Release|Win32"
OutputDirectory=".\release" OutputDirectory=".\release"
...@@ -158,6 +208,56 @@ ...@@ -158,6 +208,56 @@
<Tool <Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/> Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration> </Configuration>
<Configuration
Name="nt|Win32"
OutputDirectory=".\nt"
IntermediateDirectory=".\nt"
ConfigurationType="4"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../include,../zlib"
PreprocessorDefinitions="__NT__;DBUG_OFF;_WINDOWS;NDEBUG"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
PrecompiledHeaderFile=".\nt/mysys.pch"
AssemblerListingLocation=".\nt/"
ObjectFile=".\nt/"
ProgramDataBaseFileName=".\nt/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="..\lib_release\mysys-nt.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 <Configuration
Name="TLS_DEBUG|Win32" Name="TLS_DEBUG|Win32"
OutputDirectory=".\mysys___Win32_TLS_DEBUG" OutputDirectory=".\mysys___Win32_TLS_DEBUG"
......
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
InlineFunctionExpansion="1" InlineFunctionExpansion="1"
OptimizeForProcessor="2" OptimizeForProcessor="2"
AdditionalIncludeDirectories="../bdb/build_win32,../include,../regex,../extra/yassl/include,../zlib" 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_EXAMPLE_DB;HAVE_FEDERATED_DB;MYSQL_SERVER;_WINDOWS;_CONSOLE;HAVE_DLOPEN" PreprocessorDefinitions="__NT__;NDEBUG;DBUG_OFF;USE_SYMDIR;HAVE_INNOBASE_DB;HAVE_BERKELEY_DB;HAVE_ARCHIVE_DB;HAVE_BLACKHOLE_DB;HAVE_EXAMPLE_DB;HAVE_FEDERATED_DB;MYSQL_SERVER;_WINDOWS;_CONSOLE;HAVE_DLOPEN"
StringPooling="TRUE" StringPooling="TRUE"
RuntimeLibrary="0" RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE" EnableFunctionLevelLinking="TRUE"
......
...@@ -541,6 +541,7 @@ typedef int (*Process_option_func)(void *ctx, const char *group_name, ...@@ -541,6 +541,7 @@ typedef int (*Process_option_func)(void *ctx, const char *group_name,
#include <my_alloc.h> #include <my_alloc.h>
/* Prototypes for mysys and my_func functions */ /* Prototypes for mysys and my_func functions */
extern int my_copy(const char *from,const char *to,myf MyFlags); extern int my_copy(const char *from,const char *to,myf MyFlags);
...@@ -613,6 +614,13 @@ extern File my_sopen(const char *path, int oflag, int shflag, int pmode); ...@@ -613,6 +614,13 @@ extern File my_sopen(const char *path, int oflag, int shflag, int pmode);
#endif #endif
extern int check_if_legal_filename(const char *path); extern int check_if_legal_filename(const char *path);
#if defined(__WIN__) && defined(__NT__)
extern int nt_share_delete(const char *name,myf MyFlags);
#define my_delete_allow_opened(fname,flags) nt_share_delete((fname),(flags))
#else
#define my_delete_allow_opened(fname,flags) my_delete((fname),(flags))
#endif
#ifndef TERMINATE #ifndef TERMINATE
extern void TERMINATE(FILE *file); extern void TERMINATE(FILE *file);
#endif #endif
......
...@@ -1033,7 +1033,8 @@ sub executable_setup () { ...@@ -1033,7 +1033,8 @@ sub executable_setup () {
$path_client_bindir= mtr_path_exists("$glob_basedir/client_release", $path_client_bindir= mtr_path_exists("$glob_basedir/client_release",
"$glob_basedir/client_debug", "$glob_basedir/client_debug",
"$glob_basedir/bin",); "$glob_basedir/bin",);
$exe_mysqld= mtr_exe_exists ("$path_client_bindir/mysqld-max", $exe_mysqld= mtr_exe_exists ("$path_client_bindir/mysqld-max-nt",
"$path_client_bindir/mysqld-max",
"$path_client_bindir/mysqld-nt", "$path_client_bindir/mysqld-nt",
"$path_client_bindir/mysqld", "$path_client_bindir/mysqld",
"$path_client_bindir/mysqld-debug", "$path_client_bindir/mysqld-debug",
......
# TODO: THIS TEST DOES NOT WORK ON WINDOWS
# This should be fixed.
--source include/not_windows.inc
source include/have_openssl.inc; source include/have_openssl.inc;
source include/master-slave.inc; source include/master-slave.inc;
......
...@@ -32,3 +32,54 @@ int my_delete(const char *name, myf MyFlags) ...@@ -32,3 +32,54 @@ int my_delete(const char *name, myf MyFlags)
} }
DBUG_RETURN(err); DBUG_RETURN(err);
} /* my_delete */ } /* my_delete */
#if defined(__WIN__) && defined(__NT__)
/*
Delete file which is possibly not closed.
This function is intended to be used exclusively as a temporal solution
for Win NT in case when it is needed to delete a not closed file (note
that the file must be opened everywhere with FILE_SHARE_DELETE mode).
Deleting not-closed files can not be supported on Win 98|ME (and because
of that is considered harmful).
The function deletes the file with its preliminary renaming. This is
because when not-closed share-delete file is deleted it still lives on
a disk until it will not be closed everwhere. This may conflict with an
attempt to create a new file with the same name. The deleted file is
renamed to <name>.<num>.deleted where <name> - the initial name of the
file, <num> - a hexadecimal number chosen to make the temporal name to
be unique.
*/
int nt_share_delete(const char *name, myf MyFlags)
{
char buf[MAX_PATH + 20];
ulong cnt;
DBUG_ENTER("nt_share_delete");
DBUG_PRINT("my",("name %s MyFlags %d", name, MyFlags));
for (cnt= GetTickCount(); cnt; cnt--)
{
sprintf(buf, "%s.%08X.deleted", name, cnt);
if (MoveFile(name, buf))
break;
if ((errno= GetLastError()) == ERROR_ALREADY_EXISTS)
continue;
DBUG_PRINT("warning", ("Failed to rename %s to %s, errno: %d",
name, buf, errno));
break;
}
if (DeleteFile(buf))
DBUG_RETURN(0);
my_errno= GetLastError();
if (MyFlags & (MY_FAE+MY_WME))
my_error(EE_DELETE, MYF(ME_BELL + ME_WAITTANG + (MyFlags & ME_NOINPUT)),
name, my_errno);
DBUG_RETURN(-1);
}
#endif
...@@ -968,14 +968,14 @@ bool MYSQL_LOG::reset_logs(THD* thd) ...@@ -968,14 +968,14 @@ bool MYSQL_LOG::reset_logs(THD* thd)
for (;;) for (;;)
{ {
my_delete(linfo.log_file_name, MYF(MY_WME)); my_delete_allow_opened(linfo.log_file_name, MYF(MY_WME));
if (find_next_log(&linfo, 0)) if (find_next_log(&linfo, 0))
break; break;
} }
/* Start logging with a new file */ /* Start logging with a new file */
close(LOG_CLOSE_INDEX); close(LOG_CLOSE_INDEX);
my_delete(index_file_name, MYF(MY_WME)); // Reset (open will update) my_delete_allow_opened(index_file_name, MYF(MY_WME)); // Reset (open will update)
if (!thd->slave_thread) if (!thd->slave_thread)
need_start_event=1; need_start_event=1;
if (!open_index_file(index_file_name, 0)) if (!open_index_file(index_file_name, 0))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment