mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 10:14:19 +01:00
gen_lex_hash.cc:
If inserting a GPL header, include a complete one Makefile.am, mysql.dsw, mysql.sln: Removed C version of mysql-test-run mysql.spec.sh: Specify GPL license only in GPL sources .del-my_manage.h: Delete: mysql-test/my_manage.h mysql.spec.sh: Added GPL header .del-mysql_test_run_new.c: Delete: mysql-test/mysql_test_run_new.c .del-mysql_test_run_new.dsp: Delete: VC++Files/mysql-test/mysql_test_run_new.dsp .del-my_create_tables.c: Delete: mysql-test/my_create_tables.c .del-mysql_test_run_new_ia64.dsp: Delete: VC++Files/mysql-test/mysql_test_run_new_ia64.dsp msql2mysql.sh: Use up-to-date GPL header .del-mysql_test_run_new.vcproj: Delete: VC++Files/mysql-test/mysql_test_run_new.vcproj .del-my_manage.c: Delete: mysql-test/my_manage.c
This commit is contained in:
parent
95275e28f2
commit
e580bd6c6f
13 changed files with 53 additions and 4190 deletions
|
@ -1,106 +0,0 @@
|
|||
# Microsoft Developer Studio Project File - Name="mysql_test_run_new" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=mysql_test_run_new - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "mysql_test_run_new.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "mysql_test_run_new.mak" CFG="mysql_test_run_new - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "mysql_test_run_new - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "mysql_test_run_new - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "mysql_test_run_new - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir ".\Debug"
|
||||
# PROP BASE Intermediate_Dir ".\Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir ".\Debug"
|
||||
# PROP Intermediate_Dir ".\Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /I "../include" /I "../" /Z7 /W3 /Od /G6 /D "_DEBUG" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /Fp".\Debug/mysql_test_run_new.pch" /Fo".\Debug/" /Fd".\Debug/" /GZ /FD /c /GX
|
||||
# ADD CPP /nologo /MTd /I "../include" /I "../" /Z7 /W3 /Od /G6 /D "_DEBUG" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /Fp".\Debug/mysql_test_run_new.pch" /Fo".\Debug/" /Fd".\Debug/" /GZ /FD /c /GX
|
||||
# ADD BASE MTL /nologo /tlb".\Debug\mysql_test_run_new.tlb" /win32
|
||||
# ADD MTL /nologo /tlb".\Debug\mysql_test_run_new.tlb" /win32
|
||||
# ADD BASE RSC /l 1033
|
||||
# ADD RSC /l 1033
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\mysql-test\mysql_test_run_new.exe" /incremental:yes /debug /pdb:".\Debug\mysql_test_run_new.pdb" /pdbtype:sept /map:".\Debug\mysql_test_run_new.map" /subsystem:console
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib zlib.lib /nologo /out:"..\mysql-test\mysql_test_run_new.exe" /incremental:yes /libpath:"..\lib_debug\" /debug /pdb:".\Debug\mysql_test_run_new.pdb" /pdbtype:sept /map:".\Debug\mysql_test_run_new.map" /subsystem:console
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysql_test_run_new - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir ".\Release"
|
||||
# PROP BASE Intermediate_Dir ".\Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir ".\Release"
|
||||
# PROP Intermediate_Dir ".\Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /I "../include" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /GF /Gy /Fp".\Release/mysql_test_run_new.pch" /Fo".\Release/" /Fd".\Release/" /FD /c /GX
|
||||
# ADD CPP /nologo /MTd /I "../include" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /GF /Gy /Fp".\Release/mysql_test_run_new.pch" /Fo".\Release/" /Fd".\Release/" /FD /c /GX
|
||||
# ADD BASE MTL /nologo /tlb".\Release\mysql_test_run_new.tlb" /win32
|
||||
# ADD MTL /nologo /tlb".\Release\mysql_test_run_new.tlb" /win32
|
||||
# ADD BASE RSC /l 1033
|
||||
# ADD RSC /l 1033
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\mysql-test\mysql_test_run_new.exe" /incremental:no /pdb:".\Release\mysql_test_run_new.pdb" /pdbtype:sept /subsystem:console
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib zlib.lib /nologo /out:"..\mysql-test\mysql_test_run_new.exe" /incremental:no /libpath:"..\lib_release\" /pdb:".\Release\mysql_test_run_new.pdb" /pdbtype:sept /subsystem:console
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "mysql_test_run_new - Win32 Debug"
|
||||
# Name "mysql_test_run_new - Win32 Release"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\my_create_tables.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\my_manage.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\my_manage.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mysql_test_run_new.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
|
|
@ -1,204 +0,0 @@
|
|||
<?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>
|
|
@ -1,142 +0,0 @@
|
|||
# Microsoft Developer Studio Project File - Name="mysql_test_run_new" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=mysql_test_run_new - WinIA64 Release
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "mysql_test_run_new_ia64.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "mysql_test_run_new_ia64.mak" CFG="mysql_test_run_new - WinIA64 Release"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "mysql_test_run_new - WinIA64 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "mysql_test_run_new - WinIA64 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "mysql_test_run_new - WinIA64 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir ".\Debug"
|
||||
# PROP BASE Intermediate_Dir ".\Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir ".\Debug"
|
||||
# PROP Intermediate_Dir ".\Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
MTL=midl.exe
|
||||
# ADD BASE MTL /nologo /tlb".\Debug\mysql_test_run_new.tlb" /WinIA64
|
||||
# ADD MTL /nologo /tlb".\Debug\mysql_test_run_new.tlb" /WinIA64
|
||||
# ADD BASE CPP /nologo /G6 /MTd /W3 /GX /Z7 /Od /I "../include" /I "../" /D "_DEBUG" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN64" /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Zi /Od /I "../include" /I "../" /D "_DEBUG" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN64" /D "_IA64_" /D "WIN64" /D "WIN32" /D "_AFX_NO_DAO_SUPPORT" /GZ /G2 /EHsc /Wp64 /Zm600 /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /subsystem:console /map /debug /out:"..\mysql-test\mysql_test_run_new.exe" /machine:IA64
|
||||
# SUBTRACT BASE LINK32 /pdb:none
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Ws2_32.lib bufferoverflowU.lib zlib.lib /nologo /subsystem:console /incremental:no /libpath:"..\lib_debug\" /map /debug /out:"..\mysql-test\mysql_test_run_new.exe" /machine:IA64
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysql_test_run_new - WinIA64 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir ".\Release"
|
||||
# PROP BASE Intermediate_Dir ".\Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir ".\Release"
|
||||
# PROP Intermediate_Dir ".\Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
MTL=midl.exe
|
||||
# ADD BASE MTL /nologo /tlb".\Release\mysql_test_run_new.tlb" /WinIA64
|
||||
# ADD MTL /nologo /tlb".\Release\mysql_test_run_new.tlb" /WinIA64
|
||||
# ADD BASE CPP /nologo /G6 /MTd /W3 /GX /Ob1 /Gy /I "../include" /I "../" /D "DBUG_OFF" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN64" /GF /c
|
||||
# ADD CPP /nologo /MTd /W3 /Zi /O2 /I "../include" /I "../" /D "DBUG_OFF" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN64" /D "_IA64_" /D "WIN64" /D "WIN32" /D "_AFX_NO_DAO_SUPPORT" /GF /G2 /EHsc /Wp64 /Zm600 /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /subsystem:console /out:"..\mysql-test\mysql_test_run_new.exe" /machine:IA64
|
||||
# SUBTRACT BASE LINK32 /pdb:none
|
||||
# ADD LINK32 t kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Ws2_32.lib bufferoverflowU.lib zlib.lib /nologo /subsystem:console /libpath:"..\lib_release\" /out:"..\mysql-test\mysql_test_run_new.exe" /machine:IA64
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "mysql_test_run_new - WinIA64 Debug"
|
||||
# Name "mysql_test_run_new - WinIA64 Release"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\my_create_tables.c
|
||||
DEP_CPP_MY_CR=\
|
||||
"..\include\config-netware.h"\
|
||||
"..\include\config-os2.h"\
|
||||
"..\include\config-win.h"\
|
||||
"..\include\m_string.h"\
|
||||
"..\include\my_config.h"\
|
||||
"..\include\my_dbug.h"\
|
||||
"..\include\my_global.h"\
|
||||
".\my_manage.h"\
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\my_manage.c
|
||||
DEP_CPP_MY_MA=\
|
||||
"..\include\config-netware.h"\
|
||||
"..\include\config-os2.h"\
|
||||
"..\include\config-win.h"\
|
||||
"..\include\m_string.h"\
|
||||
"..\include\my_config.h"\
|
||||
"..\include\my_dbug.h"\
|
||||
"..\include\my_global.h"\
|
||||
".\my_manage.h"\
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\my_manage.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mysql_test_run_new.c
|
||||
DEP_CPP_MYSQL=\
|
||||
"..\include\config-netware.h"\
|
||||
"..\include\config-os2.h"\
|
||||
"..\include\config-win.h"\
|
||||
"..\include\m_string.h"\
|
||||
"..\include\my_config.h"\
|
||||
"..\include\my_dbug.h"\
|
||||
"..\include\my_global.h"\
|
||||
".\my_manage.h"\
|
||||
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
|
@ -808,28 +808,6 @@ Project: "mysql_client_test"=.\tests\mysql_client_test.dsp - Package Owner=<4>
|
|||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
|
||||
Project: "mysql_test_run_new"=".\mysql-test\mysql_test_run_new.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
Begin Project Dependency
|
||||
Project_Dep_Name mysqltest
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name mysqladmin
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name mysql_client_test
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
|
|
@ -281,13 +281,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mysql_client_test", "tests\
|
|||
{44D9C7DC-6636-4B82-BD01-6876C64017DF} = {44D9C7DC-6636-4B82-BD01-6876C64017DF}
|
||||
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
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mysqlmanager", "server-tools\instance-manager\mysqlmanager.vcproj", "{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{EEC1300B-85A5-497C-B3E1-F708021DF859} = {EEC1300B-85A5-497C-B3E1-F708021DF859}
|
||||
|
@ -1467,33 +1460,6 @@ Global
|
|||
{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_ProGPL.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 gpl.ActiveCfg = Release|Win32
|
||||
{6189F838-21C6-42A1-B2D0-9146316573F7}.pro gpl.Build.0 = Release|Win32
|
||||
{6189F838-21C6-42A1-B2D0-9146316573F7}.pro gpl nt.ActiveCfg = Release|Win32
|
||||
{6189F838-21C6-42A1-B2D0-9146316573F7}.pro gpl nt.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
|
||||
{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}.classic.ActiveCfg = Release|Win32
|
||||
{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}.classic.Build.0 = Release|Win32
|
||||
{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}.classic nt.ActiveCfg = Release|Win32
|
||||
|
|
|
@ -46,8 +46,6 @@ CLEANFILES = $(GENSCRIPTS) $(test_DATA)
|
|||
|
||||
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I..
|
||||
|
||||
noinst_HEADERS = my_manage.h
|
||||
|
||||
dist-hook:
|
||||
mkdir -p $(distdir)/t $(distdir)/r $(distdir)/include \
|
||||
$(distdir)/std_data $(distdir)/lib
|
||||
|
|
|
@ -1,688 +0,0 @@
|
|||
/* Copyright (C) 2004-2005 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; version 2 of the License.
|
||||
|
||||
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#ifndef __WIN__
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#ifdef __NETWARE__
|
||||
#include <screen.h>
|
||||
#include <proc.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#ifndef __WIN__
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <direct.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <assert.h>
|
||||
#include "my_manage.h"
|
||||
|
||||
/*
|
||||
Synopsis:
|
||||
This function testes a exist file
|
||||
|
||||
Arguments:
|
||||
mdata: path to data
|
||||
file_name: name of file
|
||||
Output:
|
||||
A zero value indicates that file is exist.
|
||||
*/
|
||||
bool test_sys_file(const char *mdata,const char *file_name)
|
||||
{
|
||||
struct stat file;
|
||||
char path_file_name[PATH_MAX];
|
||||
snprintf(path_file_name, PATH_MAX, "%s/%s", mdata, file_name);
|
||||
return(stat(path_file_name,&file));
|
||||
}
|
||||
|
||||
/*
|
||||
Synopsis:
|
||||
This function creates a file with sql requstes for creating
|
||||
system data files.
|
||||
|
||||
Arguments:
|
||||
mdata: path to data
|
||||
output_file: file name for output file
|
||||
test: to create system files with test data
|
||||
Output:
|
||||
A zero value indicates a success.
|
||||
*/
|
||||
bool create_system_files(const char *mdata,const char *output_file, bool test)
|
||||
{
|
||||
FILE *out;
|
||||
|
||||
out = fopen(output_file, "w+");
|
||||
|
||||
if (!out)
|
||||
return 1;
|
||||
|
||||
if (test_sys_file(mdata,"mysql"))
|
||||
{
|
||||
fprintf(out,"CREATE DATABASE mysql;\n");
|
||||
}
|
||||
|
||||
if (test && test_sys_file(mdata,"test"))
|
||||
{
|
||||
fprintf(out,"CREATE DATABASE test;\n");
|
||||
}
|
||||
|
||||
fprintf(out,"USE mysql;\n");
|
||||
|
||||
if (test_sys_file(mdata,"mysql/db.frm"))
|
||||
{
|
||||
fprintf(out,
|
||||
"CREATE TABLE db ("
|
||||
"Host char(60) binary DEFAULT '' NOT NULL,"
|
||||
"Db char(64) binary DEFAULT '' NOT NULL,"
|
||||
"User char(16) binary DEFAULT '' NOT NULL,"
|
||||
"Select_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Update_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Create_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Grant_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"References_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Index_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Alter_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"PRIMARY KEY Host (Host,Db,User),"
|
||||
"KEY User (User))"
|
||||
"engine=MyISAM "
|
||||
"CHARACTER SET utf8 COLLATE utf8_bin "
|
||||
"comment='Database privileges';\n");
|
||||
|
||||
if (test)
|
||||
{
|
||||
fprintf(out,"INSERT INTO db VALUES ('%%','test','','Y','Y','Y','Y'"
|
||||
",'Y','Y','N','Y','Y','Y','Y','Y');\n");
|
||||
fprintf(out,"INSERT INTO db VALUES ('%%','test\\_%%','','Y','Y','Y'"
|
||||
",'Y','Y','Y','N','Y','Y','Y','Y','Y');\n");
|
||||
}
|
||||
}
|
||||
|
||||
if (test_sys_file(mdata,"mysql/host.frm"))
|
||||
{
|
||||
fprintf(out,
|
||||
"CREATE TABLE host ("
|
||||
"Host char(60) binary DEFAULT '' NOT NULL,"
|
||||
"Db char(64) binary DEFAULT '' NOT NULL,"
|
||||
"Select_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Update_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Create_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Grant_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"References_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Index_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Alter_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"PRIMARY KEY Host (Host,Db))"
|
||||
"engine=MyISAM "
|
||||
"CHARACTER SET utf8 COLLATE utf8_bin "
|
||||
"comment='Host privileges; Merged with database privileges';\n");
|
||||
}
|
||||
|
||||
|
||||
if (test_sys_file(mdata,"mysql/user.frm"))
|
||||
{
|
||||
#ifdef __WIN__
|
||||
WSADATA wsa_data;
|
||||
#endif
|
||||
char hostname[FN_REFLEN];
|
||||
|
||||
#ifdef __WIN__
|
||||
if (WSAStartup(MAKEWORD( 2, 2 ),&wsa_data))
|
||||
return 1;
|
||||
#endif
|
||||
if (gethostname(hostname, FN_REFLEN))
|
||||
return 1;
|
||||
#ifdef __WIN__
|
||||
WSACleanup( );
|
||||
#endif
|
||||
|
||||
if (strchr(hostname, '.') == NULL)
|
||||
strcat(hostname, "%");
|
||||
|
||||
fprintf(out,
|
||||
"CREATE TABLE user ("
|
||||
"Host char(60) binary DEFAULT '' NOT NULL,"
|
||||
"User char(16) binary DEFAULT '' NOT NULL,"
|
||||
"Password char(41) binary DEFAULT '' NOT NULL,"
|
||||
"Select_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Update_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Create_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Reload_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Shutdown_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Process_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"File_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Grant_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"References_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Index_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Alter_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Show_db_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Super_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Execute_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Repl_slave_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"Repl_client_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
|
||||
"ssl_type enum('','ANY','X509', 'SPECIFIED') DEFAULT '' NOT NULL,"
|
||||
"ssl_cipher BLOB NOT NULL,"
|
||||
"x509_issuer BLOB NOT NULL,"
|
||||
"x509_subject BLOB NOT NULL,"
|
||||
"max_questions int(11) unsigned DEFAULT 0 NOT NULL,"
|
||||
"max_updates int(11) unsigned DEFAULT 0 NOT NULL,"
|
||||
"max_connections int(11) unsigned DEFAULT 0 NOT NULL,"
|
||||
"PRIMARY KEY Host (Host,User)"
|
||||
") engine=MyISAM "
|
||||
"CHARACTER SET utf8 COLLATE utf8_bin "
|
||||
"comment='Users and global privileges';\n");
|
||||
|
||||
|
||||
if (test)
|
||||
{
|
||||
fprintf(out,
|
||||
"INSERT INTO user VALUES ('localhost','root',''"
|
||||
",'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'"
|
||||
",'Y','Y','Y','Y','Y','','','','',0,0,0);\n");
|
||||
fprintf(out,
|
||||
"INSERT INTO user VALUES ('%s','root','','Y','Y',"
|
||||
"'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y',"
|
||||
"'Y','Y','Y','Y','','','','',0,0,0);\n",hostname);
|
||||
fprintf(out,
|
||||
"REPLACE INTO user VALUES ('127.0.0.1','root','',"
|
||||
"'Y','Y','Y','Y','Y','Y',"
|
||||
"'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'"
|
||||
",'Y','','','','',0,0,0);\n");
|
||||
fprintf(out,"INSERT INTO user (host,user) values ('localhost','');\n");
|
||||
fprintf(out,"INSERT INTO user (host,user) values ('%s','');\n",hostname);
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(out,
|
||||
"INSERT INTO user VALUES ('localhost','root','',"
|
||||
"'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y',"
|
||||
"'Y','Y','Y','Y','','','','',0,0,0);\n");
|
||||
#ifndef __WIN__
|
||||
fprintf(out,
|
||||
"INSERT INTO user VALUES ('%s','root','','Y','Y',"
|
||||
"'Y','Y','Y','Y','Y','Y'"
|
||||
"'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','',''"
|
||||
",'','',0,0,0);\n",hostname);
|
||||
fprintf(out,"INSERT INTO user (host,user) values ('%s','');\n",hostname);
|
||||
fprintf(out,"INSERT INTO user (host,user) values ('localhost','');\n");
|
||||
#else
|
||||
fprintf(out,
|
||||
"INSERT INTO user VALUES ('localhost','','','Y','Y','Y'"
|
||||
",'Y','Y','Y','Y','Y','Y'"
|
||||
",'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','',"
|
||||
"'','',0,0,0);\n");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (test_sys_file(mdata,"mysql/func.frm"))
|
||||
{
|
||||
fprintf(out,
|
||||
"CREATE TABLE func ("
|
||||
"name char(64) binary DEFAULT '' NOT NULL,"
|
||||
"ret tinyint(1) DEFAULT '0' NOT NULL,"
|
||||
"dl char(128) DEFAULT '' NOT NULL,"
|
||||
"type enum ('function','aggregate') NOT NULL,"
|
||||
"PRIMARY KEY (name)"
|
||||
") engine=MyISAM "
|
||||
"CHARACTER SET utf8 COLLATE utf8_bin "
|
||||
"comment='User defined functions';\n");
|
||||
}
|
||||
|
||||
if (test_sys_file(mdata,"mysql/tables_priv.frm"))
|
||||
{
|
||||
fprintf(out,
|
||||
"CREATE TABLE tables_priv ("
|
||||
"Host char(60) binary DEFAULT '' NOT NULL,"
|
||||
"Db char(64) binary DEFAULT '' NOT NULL,"
|
||||
"User char(16) binary DEFAULT '' NOT NULL,"
|
||||
"Table_name char(64) binary DEFAULT '' NOT NULL,"
|
||||
"Grantor char(77) DEFAULT '' NOT NULL,"
|
||||
"Timestamp timestamp(14),"
|
||||
"Table_priv set('Select','Insert','Update','Delete',"
|
||||
"'Create','Drop','Grant','References','Index','Alter')"
|
||||
" DEFAULT '' NOT NULL,"
|
||||
"Column_priv set('Select','Insert','Update','References')"
|
||||
" DEFAULT '' NOT NULL,"
|
||||
"PRIMARY KEY (Host,Db,User,Table_name),"
|
||||
"KEY Grantor (Grantor)"
|
||||
") engine=MyISAM "
|
||||
"CHARACTER SET utf8 COLLATE utf8_bin "
|
||||
"comment='Table privileges';\n");
|
||||
}
|
||||
|
||||
if (test_sys_file(mdata,"mysql/columns_priv.frm"))
|
||||
{
|
||||
fprintf(out,
|
||||
"CREATE TABLE columns_priv ("
|
||||
"Host char(60) binary DEFAULT '' NOT NULL,"
|
||||
"Db char(64) binary DEFAULT '' NOT NULL,"
|
||||
"User char(16) binary DEFAULT '' NOT NULL,"
|
||||
"Table_name char(64) binary DEFAULT '' NOT NULL,"
|
||||
"Column_name char(64) binary DEFAULT '' NOT NULL,"
|
||||
"Timestamp timestamp(14),"
|
||||
"Column_priv set('Select','Insert','Update','References')"
|
||||
" DEFAULT '' NOT NULL,"
|
||||
"PRIMARY KEY (Host,Db,User,Table_name,Column_name)"
|
||||
") engine=MyISAM "
|
||||
"CHARACTER SET utf8 COLLATE utf8_bin "
|
||||
"comment='Column privileges';\n");
|
||||
}
|
||||
|
||||
if (test_sys_file(mdata,"mysql/help_topic.frm"))
|
||||
{
|
||||
fprintf(out,
|
||||
"CREATE TABLE help_topic ("
|
||||
"help_topic_id int unsigned not null,"
|
||||
"name varchar(64) not null,"
|
||||
"help_category_id smallint unsigned not null,"
|
||||
"description text not null,"
|
||||
"example text not null,"
|
||||
"url varchar(128) not null,"
|
||||
"primary key (help_topic_id),"
|
||||
"unique index (name)"
|
||||
") engine=MyISAM "
|
||||
"CHARACTER SET utf8 "
|
||||
"comment='help topics';\n");
|
||||
}
|
||||
|
||||
if (test_sys_file(mdata,"mysql/help_category.frm"))
|
||||
{
|
||||
fprintf(out,
|
||||
"CREATE TABLE help_category ("
|
||||
"help_category_id smallint unsigned not null,"
|
||||
"name varchar(64) not null,"
|
||||
"parent_category_id smallint unsigned null,"
|
||||
"url varchar(128) not null,"
|
||||
"primary key (help_category_id),"
|
||||
"unique index (name)"
|
||||
") engine=MyISAM "
|
||||
"CHARACTER SET utf8 "
|
||||
"comment='help categories';\n");
|
||||
}
|
||||
|
||||
if (test_sys_file(mdata,"mysql/help_keyword.frm"))
|
||||
{
|
||||
fprintf(out,
|
||||
"CREATE TABLE help_keyword ("
|
||||
"help_keyword_id int unsigned not null,"
|
||||
"name varchar(64) not null,"
|
||||
"primary key (help_keyword_id),"
|
||||
"unique index (name)"
|
||||
") engine=MyISAM "
|
||||
"CHARACTER SET utf8 "
|
||||
"comment='help keywords';\n");
|
||||
}
|
||||
|
||||
if (test_sys_file(mdata,"mysql/help_relation.frm"))
|
||||
{
|
||||
fprintf(out,
|
||||
"CREATE TABLE help_relation ("
|
||||
"help_topic_id int unsigned not null references help_topic,"
|
||||
"help_keyword_id int unsigned not null references help_keyword,"
|
||||
"primary key (help_keyword_id, help_topic_id)"
|
||||
") engine=MyISAM "
|
||||
"CHARACTER SET utf8 "
|
||||
"comment='keyword-topic relation';\n");
|
||||
}
|
||||
|
||||
if (test_sys_file(mdata,"mysql/time_zone_name.frm"))
|
||||
{
|
||||
fprintf(out,
|
||||
"CREATE TABLE time_zone_name ("
|
||||
"Name char(64) NOT NULL,"
|
||||
"Time_zone_id int unsigned NOT NULL,"
|
||||
"PRIMARY KEY Name (Name)"
|
||||
") engine=MyISAM CHARACTER SET utf8 "
|
||||
"comment='Time zone names';\n");
|
||||
|
||||
if (test)
|
||||
{
|
||||
fprintf(out,
|
||||
"INSERT INTO time_zone_name (Name, Time_Zone_id) VALUES"
|
||||
"('MET', 1), ('UTC', 2), ('Universal', 2), "
|
||||
"('Europe/Moscow',3), ('leap/Europe/Moscow',4),"
|
||||
"('Japan', 5);\n");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (test_sys_file(mdata,"mysql/time_zone.frm"))
|
||||
{
|
||||
fprintf(out,
|
||||
"CREATE TABLE time_zone ("
|
||||
"Time_zone_id int unsigned NOT NULL auto_increment,"
|
||||
"Use_leap_seconds enum('Y','N') DEFAULT 'N' NOT NULL,"
|
||||
"PRIMARY KEY TzId (Time_zone_id)"
|
||||
") engine=MyISAM CHARACTER SET utf8 "
|
||||
"comment='Time zones';\n");
|
||||
|
||||
if (test)
|
||||
{
|
||||
fprintf(out,"INSERT INTO time_zone (Time_zone_id, Use_leap_seconds)"
|
||||
"VALUES (1,'N'), (2,'N'), (3,'N'), (4,'Y'), (5,'N');\n");
|
||||
}
|
||||
}
|
||||
|
||||
if (test_sys_file(mdata,"mysql/time_zone_transition.frm"))
|
||||
{
|
||||
fprintf(out,
|
||||
"CREATE TABLE time_zone_transition ("
|
||||
"Time_zone_id int unsigned NOT NULL,"
|
||||
"Transition_time bigint signed NOT NULL,"
|
||||
"Transition_type_id int unsigned NOT NULL,"
|
||||
"PRIMARY KEY TzIdTranTime (Time_zone_id, Transition_time)"
|
||||
") engine=MyISAM CHARACTER SET utf8 "
|
||||
"comment='Time zone transitions';\n");
|
||||
|
||||
if (test)
|
||||
{
|
||||
fprintf(out,
|
||||
"INSERT INTO time_zone_transition"
|
||||
"(Time_zone_id, Transition_time, Transition_type_id)"
|
||||
"VALUES"
|
||||
" (1, -1693706400, 0) ,(1, -1680483600, 1)"
|
||||
",(1, -1663455600, 2) ,(1, -1650150000, 3)"
|
||||
",(1, -1632006000, 2) ,(1, -1618700400, 3)"
|
||||
",(1, -938905200, 2) ,(1, -857257200, 3)"
|
||||
",(1, -844556400, 2) ,(1, -828226800, 3)"
|
||||
",(1, -812502000, 2) ,(1, -796777200, 3)"
|
||||
",(1, 228877200, 2) ,(1, 243997200, 3)"
|
||||
",(1, 260326800, 2) ,(1, 276051600, 3)"
|
||||
",(1, 291776400, 2) ,(1, 307501200, 3)"
|
||||
",(1, 323830800, 2) ,(1, 338950800, 3)"
|
||||
",(1, 354675600, 2) ,(1, 370400400, 3)"
|
||||
",(1, 386125200, 2) ,(1, 401850000, 3)"
|
||||
",(1, 417574800, 2) ,(1, 433299600, 3)"
|
||||
",(1, 449024400, 2) ,(1, 465354000, 3)"
|
||||
",(1, 481078800, 2) ,(1, 496803600, 3)"
|
||||
",(1, 512528400, 2) ,(1, 528253200, 3)"
|
||||
",(1, 543978000, 2) ,(1, 559702800, 3)"
|
||||
",(1, 575427600, 2) ,(1, 591152400, 3)"
|
||||
",(1, 606877200, 2) ,(1, 622602000, 3)"
|
||||
",(1, 638326800, 2) ,(1, 654656400, 3)"
|
||||
",(1, 670381200, 2) ,(1, 686106000, 3)"
|
||||
",(1, 701830800, 2) ,(1, 717555600, 3)"
|
||||
",(1, 733280400, 2) ,(1, 749005200, 3)"
|
||||
",(1, 764730000, 2) ,(1, 780454800, 3)"
|
||||
",(1, 796179600, 2) ,(1, 811904400, 3)"
|
||||
",(1, 828234000, 2) ,(1, 846378000, 3)"
|
||||
",(1, 859683600, 2) ,(1, 877827600, 3)"
|
||||
",(1, 891133200, 2) ,(1, 909277200, 3)"
|
||||
",(1, 922582800, 2) ,(1, 941331600, 3)"
|
||||
",(1, 954032400, 2) ,(1, 972781200, 3)"
|
||||
",(1, 985482000, 2) ,(1, 1004230800, 3)"
|
||||
",(1, 1017536400, 2) ,(1, 1035680400, 3)"
|
||||
",(1, 1048986000, 2) ,(1, 1067130000, 3)"
|
||||
",(1, 1080435600, 2) ,(1, 1099184400, 3)"
|
||||
",(1, 1111885200, 2) ,(1, 1130634000, 3)"
|
||||
",(1, 1143334800, 2) ,(1, 1162083600, 3)"
|
||||
",(1, 1174784400, 2) ,(1, 1193533200, 3)"
|
||||
",(1, 1206838800, 2) ,(1, 1224982800, 3)"
|
||||
",(1, 1238288400, 2) ,(1, 1256432400, 3)"
|
||||
",(1, 1269738000, 2) ,(1, 1288486800, 3)"
|
||||
",(1, 1301187600, 2) ,(1, 1319936400, 3)"
|
||||
",(1, 1332637200, 2) ,(1, 1351386000, 3)"
|
||||
",(1, 1364691600, 2) ,(1, 1382835600, 3)"
|
||||
",(1, 1396141200, 2) ,(1, 1414285200, 3)"
|
||||
",(1, 1427590800, 2) ,(1, 1445734800, 3)"
|
||||
",(1, 1459040400, 2) ,(1, 1477789200, 3)"
|
||||
",(1, 1490490000, 2) ,(1, 1509238800, 3)"
|
||||
",(1, 1521939600, 2) ,(1, 1540688400, 3)"
|
||||
",(1, 1553994000, 2) ,(1, 1572138000, 3)"
|
||||
",(1, 1585443600, 2) ,(1, 1603587600, 3)"
|
||||
",(1, 1616893200, 2) ,(1, 1635642000, 3)"
|
||||
",(1, 1648342800, 2) ,(1, 1667091600, 3)"
|
||||
",(1, 1679792400, 2) ,(1, 1698541200, 3)"
|
||||
",(1, 1711846800, 2) ,(1, 1729990800, 3)"
|
||||
",(1, 1743296400, 2) ,(1, 1761440400, 3)"
|
||||
",(1, 1774746000, 2) ,(1, 1792890000, 3)"
|
||||
",(1, 1806195600, 2) ,(1, 1824944400, 3)"
|
||||
",(1, 1837645200, 2) ,(1, 1856394000, 3)"
|
||||
",(1, 1869094800, 2) ,(1, 1887843600, 3)"
|
||||
",(1, 1901149200, 2) ,(1, 1919293200, 3)"
|
||||
",(1, 1932598800, 2) ,(1, 1950742800, 3)"
|
||||
",(1, 1964048400, 2) ,(1, 1982797200, 3)"
|
||||
",(1, 1995498000, 2) ,(1, 2014246800, 3)"
|
||||
",(1, 2026947600, 2) ,(1, 2045696400, 3)"
|
||||
",(1, 2058397200, 2) ,(1, 2077146000, 3)"
|
||||
",(1, 2090451600, 2) ,(1, 2108595600, 3)"
|
||||
",(1, 2121901200, 2) ,(1, 2140045200, 3)"
|
||||
",(3, -1688265000, 2) ,(3, -1656819048, 1)"
|
||||
",(3, -1641353448, 2) ,(3, -1627965048, 3)"
|
||||
",(3, -1618716648, 1) ,(3, -1596429048, 3)"
|
||||
",(3, -1593829848, 5) ,(3, -1589860800, 4)"
|
||||
",(3, -1542427200, 5) ,(3, -1539493200, 6)"
|
||||
",(3, -1525323600, 5) ,(3, -1522728000, 4)"
|
||||
",(3, -1491188400, 7) ,(3, -1247536800, 4)"
|
||||
",(3, 354920400, 5) ,(3, 370728000, 4)"
|
||||
",(3, 386456400, 5) ,(3, 402264000, 4)"
|
||||
",(3, 417992400, 5) ,(3, 433800000, 4)"
|
||||
",(3, 449614800, 5) ,(3, 465346800, 8)"
|
||||
",(3, 481071600, 9) ,(3, 496796400, 8)"
|
||||
",(3, 512521200, 9) ,(3, 528246000, 8)"
|
||||
",(3, 543970800, 9) ,(3, 559695600, 8)"
|
||||
",(3, 575420400, 9) ,(3, 591145200, 8)"
|
||||
",(3, 606870000, 9) ,(3, 622594800, 8)"
|
||||
",(3, 638319600, 9) ,(3, 654649200, 8)"
|
||||
",(3, 670374000, 10) ,(3, 686102400, 11)"
|
||||
",(3, 695779200, 8) ,(3, 701812800, 5)"
|
||||
",(3, 717534000, 4) ,(3, 733273200, 9)"
|
||||
",(3, 748998000, 8) ,(3, 764722800, 9)"
|
||||
",(3, 780447600, 8) ,(3, 796172400, 9)"
|
||||
",(3, 811897200, 8) ,(3, 828226800, 9)"
|
||||
",(3, 846370800, 8) ,(3, 859676400, 9)"
|
||||
",(3, 877820400, 8) ,(3, 891126000, 9)"
|
||||
",(3, 909270000, 8) ,(3, 922575600, 9)"
|
||||
",(3, 941324400, 8) ,(3, 954025200, 9)"
|
||||
",(3, 972774000, 8) ,(3, 985474800, 9)"
|
||||
",(3, 1004223600, 8) ,(3, 1017529200, 9)"
|
||||
",(3, 1035673200, 8) ,(3, 1048978800, 9)"
|
||||
",(3, 1067122800, 8) ,(3, 1080428400, 9)"
|
||||
",(3, 1099177200, 8) ,(3, 1111878000, 9)"
|
||||
",(3, 1130626800, 8) ,(3, 1143327600, 9)"
|
||||
",(3, 1162076400, 8) ,(3, 1174777200, 9)"
|
||||
",(3, 1193526000, 8) ,(3, 1206831600, 9)"
|
||||
",(3, 1224975600, 8) ,(3, 1238281200, 9)"
|
||||
",(3, 1256425200, 8) ,(3, 1269730800, 9)"
|
||||
",(3, 1288479600, 8) ,(3, 1301180400, 9)"
|
||||
",(3, 1319929200, 8) ,(3, 1332630000, 9)"
|
||||
",(3, 1351378800, 8) ,(3, 1364684400, 9)"
|
||||
",(3, 1382828400, 8) ,(3, 1396134000, 9)"
|
||||
",(3, 1414278000, 8) ,(3, 1427583600, 9)"
|
||||
",(3, 1445727600, 8) ,(3, 1459033200, 9)"
|
||||
",(3, 1477782000, 8) ,(3, 1490482800, 9)"
|
||||
",(3, 1509231600, 8) ,(3, 1521932400, 9)"
|
||||
",(3, 1540681200, 8) ,(3, 1553986800, 9)"
|
||||
",(3, 1572130800, 8) ,(3, 1585436400, 9)"
|
||||
",(3, 1603580400, 8) ,(3, 1616886000, 9)"
|
||||
",(3, 1635634800, 8) ,(3, 1648335600, 9)"
|
||||
",(3, 1667084400, 8) ,(3, 1679785200, 9)"
|
||||
",(3, 1698534000, 8) ,(3, 1711839600, 9)"
|
||||
",(3, 1729983600, 8) ,(3, 1743289200, 9)"
|
||||
",(3, 1761433200, 8) ,(3, 1774738800, 9)"
|
||||
",(3, 1792882800, 8) ,(3, 1806188400, 9)"
|
||||
",(3, 1824937200, 8) ,(3, 1837638000, 9)"
|
||||
",(3, 1856386800, 8) ,(3, 1869087600, 9)"
|
||||
",(3, 1887836400, 8) ,(3, 1901142000, 9)"
|
||||
",(3, 1919286000, 8) ,(3, 1932591600, 9)"
|
||||
",(3, 1950735600, 8) ,(3, 1964041200, 9)"
|
||||
",(3, 1982790000, 8) ,(3, 1995490800, 9)"
|
||||
",(3, 2014239600, 8) ,(3, 2026940400, 9)"
|
||||
",(3, 2045689200, 8) ,(3, 2058390000, 9)"
|
||||
",(3, 2077138800, 8) ,(3, 2090444400, 9)"
|
||||
",(3, 2108588400, 8) ,(3, 2121894000, 9)"
|
||||
",(3, 2140038000, 8)"
|
||||
",(4, -1688265000, 2) ,(4, -1656819048, 1)"
|
||||
",(4, -1641353448, 2) ,(4, -1627965048, 3)"
|
||||
",(4, -1618716648, 1) ,(4, -1596429048, 3)"
|
||||
",(4, -1593829848, 5) ,(4, -1589860800, 4)"
|
||||
",(4, -1542427200, 5) ,(4, -1539493200, 6)"
|
||||
",(4, -1525323600, 5) ,(4, -1522728000, 4)"
|
||||
",(4, -1491188400, 7) ,(4, -1247536800, 4)"
|
||||
",(4, 354920409, 5) ,(4, 370728010, 4)"
|
||||
",(4, 386456410, 5) ,(4, 402264011, 4)"
|
||||
",(4, 417992411, 5) ,(4, 433800012, 4)"
|
||||
",(4, 449614812, 5) ,(4, 465346812, 8)"
|
||||
",(4, 481071612, 9) ,(4, 496796413, 8)"
|
||||
",(4, 512521213, 9) ,(4, 528246013, 8)"
|
||||
",(4, 543970813, 9) ,(4, 559695613, 8)"
|
||||
",(4, 575420414, 9) ,(4, 591145214, 8)"
|
||||
",(4, 606870014, 9) ,(4, 622594814, 8)"
|
||||
",(4, 638319615, 9) ,(4, 654649215, 8)"
|
||||
",(4, 670374016, 10) ,(4, 686102416, 11)"
|
||||
",(4, 695779216, 8) ,(4, 701812816, 5)"
|
||||
",(4, 717534017, 4) ,(4, 733273217, 9)"
|
||||
",(4, 748998018, 8) ,(4, 764722818, 9)"
|
||||
",(4, 780447619, 8) ,(4, 796172419, 9)"
|
||||
",(4, 811897219, 8) ,(4, 828226820, 9)"
|
||||
",(4, 846370820, 8) ,(4, 859676420, 9)"
|
||||
",(4, 877820421, 8) ,(4, 891126021, 9)"
|
||||
",(4, 909270021, 8) ,(4, 922575622, 9)"
|
||||
",(4, 941324422, 8) ,(4, 954025222, 9)"
|
||||
",(4, 972774022, 8) ,(4, 985474822, 9)"
|
||||
",(4, 1004223622, 8) ,(4, 1017529222, 9)"
|
||||
",(4, 1035673222, 8) ,(4, 1048978822, 9)"
|
||||
",(4, 1067122822, 8) ,(4, 1080428422, 9)"
|
||||
",(4, 1099177222, 8) ,(4, 1111878022, 9)"
|
||||
",(4, 1130626822, 8) ,(4, 1143327622, 9)"
|
||||
",(4, 1162076422, 8) ,(4, 1174777222, 9)"
|
||||
",(4, 1193526022, 8) ,(4, 1206831622, 9)"
|
||||
",(4, 1224975622, 8) ,(4, 1238281222, 9)"
|
||||
",(4, 1256425222, 8) ,(4, 1269730822, 9)"
|
||||
",(4, 1288479622, 8) ,(4, 1301180422, 9)"
|
||||
",(4, 1319929222, 8) ,(4, 1332630022, 9)"
|
||||
",(4, 1351378822, 8) ,(4, 1364684422, 9)"
|
||||
",(4, 1382828422, 8) ,(4, 1396134022, 9)"
|
||||
",(4, 1414278022, 8) ,(4, 1427583622, 9)"
|
||||
",(4, 1445727622, 8) ,(4, 1459033222, 9)"
|
||||
",(4, 1477782022, 8) ,(4, 1490482822, 9)"
|
||||
",(4, 1509231622, 8) ,(4, 1521932422, 9)"
|
||||
",(4, 1540681222, 8) ,(4, 1553986822, 9)"
|
||||
",(4, 1572130822, 8) ,(4, 1585436422, 9)"
|
||||
",(4, 1603580422, 8) ,(4, 1616886022, 9)"
|
||||
",(4, 1635634822, 8) ,(4, 1648335622, 9)"
|
||||
",(4, 1667084422, 8) ,(4, 1679785222, 9)"
|
||||
",(4, 1698534022, 8) ,(4, 1711839622, 9)"
|
||||
",(4, 1729983622, 8) ,(4, 1743289222, 9)"
|
||||
",(4, 1761433222, 8) ,(4, 1774738822, 9)"
|
||||
",(4, 1792882822, 8) ,(4, 1806188422, 9)"
|
||||
",(4, 1824937222, 8) ,(4, 1837638022, 9)"
|
||||
",(4, 1856386822, 8) ,(4, 1869087622, 9)"
|
||||
",(4, 1887836422, 8) ,(4, 1901142022, 9)"
|
||||
",(4, 1919286022, 8) ,(4, 1932591622, 9)"
|
||||
",(4, 1950735622, 8) ,(4, 1964041222, 9)"
|
||||
",(4, 1982790022, 8) ,(4, 1995490822, 9)"
|
||||
",(4, 2014239622, 8) ,(4, 2026940422, 9)"
|
||||
",(4, 2045689222, 8) ,(4, 2058390022, 9)"
|
||||
",(4, 2077138822, 8) ,(4, 2090444422, 9)"
|
||||
",(4, 2108588422, 8) ,(4, 2121894022, 9)"
|
||||
",(4, 2140038022, 8), (5, -1009875600, 1);\n");
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (test_sys_file(mdata,"mysql/time_zone_transition_type.frm"))
|
||||
{
|
||||
fprintf(out,
|
||||
"CREATE TABLE time_zone_transition_type ("
|
||||
"Time_zone_id int unsigned NOT NULL,"
|
||||
"Transition_type_id int unsigned NOT NULL,"
|
||||
"Offset int signed DEFAULT 0 NOT NULL,"
|
||||
"Is_DST tinyint unsigned DEFAULT 0 NOT NULL,"
|
||||
"Abbreviation char(8) DEFAULT '' NOT NULL,"
|
||||
"PRIMARY KEY TzIdTrTId (Time_zone_id, Transition_type_id)"
|
||||
") engine=MyISAM CHARACTER SET utf8 "
|
||||
"comment='Time zone transition types';\n");
|
||||
|
||||
if (test)
|
||||
{
|
||||
fprintf(out,
|
||||
"INSERT INTO time_zone_transition_type (Time_zone_id,"
|
||||
"Transition_type_id, Offset, Is_DST, Abbreviation) VALUES"
|
||||
"(1, 0, 7200, 1, 'MEST') ,(1, 1, 3600, 0, 'MET')"
|
||||
",(1, 2, 7200, 1, 'MEST') ,(1, 3, 3600, 0, 'MET')"
|
||||
",(2, 0, 0, 0, 'UTC')"
|
||||
",(3, 0, 9000, 0, 'MMT') ,(3, 1, 12648, 1, 'MST')"
|
||||
",(3, 2, 9048, 0, 'MMT') ,(3, 3, 16248, 1, 'MDST')"
|
||||
",(3, 4, 10800, 0, 'MSK') ,(3, 5, 14400, 1, 'MSD')"
|
||||
",(3, 6, 18000, 1, 'MSD') ,(3, 7, 7200, 0, 'EET')"
|
||||
",(3, 8, 10800, 0, 'MSK') ,(3, 9, 14400, 1, 'MSD')"
|
||||
",(3, 10, 10800, 1, 'EEST') ,(3, 11, 7200, 0, 'EET')"
|
||||
",(4, 0, 9000, 0, 'MMT') ,(4, 1, 12648, 1, 'MST')"
|
||||
",(4, 2, 9048, 0, 'MMT') ,(4, 3, 16248, 1, 'MDST')"
|
||||
",(4, 4, 10800, 0, 'MSK') ,(4, 5, 14400, 1, 'MSD')"
|
||||
",(4, 6, 18000, 1, 'MSD') ,(4, 7, 7200, 0, 'EET')"
|
||||
",(4, 8, 10800, 0, 'MSK') ,(4, 9, 14400, 1, 'MSD')"
|
||||
",(4, 10, 10800, 1, 'EEST') ,(4, 11, 7200, 0, 'EET')"
|
||||
",(5, 0, 32400, 0, 'CJT') ,(5, 1, 32400, 0, 'JST');\n");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (test_sys_file(mdata,"mysql/time_zone_leap_second.frm"))
|
||||
{
|
||||
fprintf(out,
|
||||
"CREATE TABLE time_zone_leap_second ("
|
||||
"Transition_time bigint signed NOT NULL,"
|
||||
"Correction int signed NOT NULL,"
|
||||
"PRIMARY KEY TranTime (Transition_time)"
|
||||
") engine=MyISAM CHARACTER SET utf8 "
|
||||
"comment='Leap seconds information for time zones';\n");
|
||||
|
||||
if (test)
|
||||
{
|
||||
fprintf(out,
|
||||
"INSERT INTO time_zone_leap_second "
|
||||
"(Transition_time, Correction) VALUES "
|
||||
"(78796800, 1) ,(94694401, 2) ,(126230402, 3)"
|
||||
",(157766403, 4) ,(189302404, 5) ,(220924805, 6)"
|
||||
",(252460806, 7) ,(283996807, 8) ,(315532808, 9)"
|
||||
",(362793609, 10) ,(394329610, 11) ,(425865611, 12)"
|
||||
",(489024012, 13) ,(567993613, 14) ,(631152014, 15)"
|
||||
",(662688015, 16) ,(709948816, 17) ,(741484817, 18)"
|
||||
",(773020818, 19) ,(820454419, 20) ,(867715220, 21)"
|
||||
",(915148821, 22);\n");
|
||||
}
|
||||
}
|
||||
|
||||
return fclose(out);
|
||||
}
|
|
@ -1,887 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003 Novell, Inc. All Rights Reserved.
|
||||
|
||||
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 <stdio.h>
|
||||
#include <errno.h>
|
||||
#ifndef __WIN__
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#ifdef __NETWARE__
|
||||
#include <screen.h>
|
||||
#include <proc.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#ifndef __WIN__
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
#include <fnmatch.h> /* FIXME HAVE_FNMATCH_H or something */
|
||||
#else
|
||||
#include <direct.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "my_manage.h"
|
||||
|
||||
#ifndef __NETWARE__
|
||||
#define ASSERT assert
|
||||
extern char **environ;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
macros
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
global variables
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
functions
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
init_args()
|
||||
|
||||
Init an argument list.
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
void init_args(arg_list_t *al)
|
||||
{
|
||||
ASSERT(al != NULL);
|
||||
|
||||
al->argc= 0;
|
||||
al->size= ARG_BUF;
|
||||
al->argv= malloc(al->size * sizeof(char *));
|
||||
ASSERT(al->argv != NULL);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
add_arg()
|
||||
|
||||
Add an argument to a list.
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
void add_arg(arg_list_t *al, const char *format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char temp[FN_REFLEN];
|
||||
|
||||
ASSERT(al != NULL);
|
||||
|
||||
/* increase size */
|
||||
if (al->argc >= (int)al->size)
|
||||
{
|
||||
al->size+= ARG_BUF;
|
||||
al->argv= realloc(al->argv, al->size * sizeof(char *));
|
||||
ASSERT(al->argv != NULL);
|
||||
}
|
||||
|
||||
if (format)
|
||||
{
|
||||
va_start(ap, format);
|
||||
vsprintf(temp, format, ap);
|
||||
va_end(ap);
|
||||
|
||||
al->argv[al->argc]= malloc(strlen(temp)+1);
|
||||
ASSERT(al->argv[al->argc] != NULL);
|
||||
strcpy(al->argv[al->argc], temp);
|
||||
|
||||
++(al->argc);
|
||||
}
|
||||
else
|
||||
{
|
||||
al->argv[al->argc]= NULL;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
free_args()
|
||||
|
||||
Free an argument list.
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
void free_args(arg_list_t *al)
|
||||
{
|
||||
int i;
|
||||
|
||||
ASSERT(al != NULL);
|
||||
|
||||
for (i= 0; i < al->argc; i++)
|
||||
{
|
||||
ASSERT(al->argv[i] != NULL);
|
||||
free(al->argv[i]);
|
||||
al->argv[i]= NULL;
|
||||
}
|
||||
|
||||
free(al->argv);
|
||||
al->argc= 0;
|
||||
al->argv= NULL;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
sleep_until_file_deleted()
|
||||
|
||||
Sleep until the given file is no longer found.
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef __WIN__
|
||||
int sleep_until_file_deleted(char *pid_file)
|
||||
#else
|
||||
int sleep_until_file_deleted(HANDLE pid_file)
|
||||
#endif
|
||||
{
|
||||
int err= 0; /* Initiate to supress warning */
|
||||
#ifndef __WIN__
|
||||
struct stat buf;
|
||||
int i;
|
||||
|
||||
for (i= 0; (i < TRY_MAX) && (err= !stat(pid_file, &buf)); i++) sleep(1);
|
||||
|
||||
if (err != 0) err= errno;
|
||||
#else
|
||||
err= (WaitForSingleObject(pid_file, TRY_MAX*1000) == WAIT_TIMEOUT);
|
||||
#endif
|
||||
return err;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
sleep_until_file_exists()
|
||||
|
||||
Sleep until the given file exists.
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef __WIN__
|
||||
int sleep_until_file_exists(char *pid_file)
|
||||
#else
|
||||
int sleep_until_file_exists(HANDLE pid_file)
|
||||
#endif
|
||||
{
|
||||
int err= 0; /* Initiate to supress warning */
|
||||
#ifndef __WIN__
|
||||
struct stat buf;
|
||||
int i;
|
||||
|
||||
for (i= 0; (i < TRY_MAX) && (err= stat(pid_file, &buf)); i++) sleep(1);
|
||||
|
||||
if (err != 0) err= errno;
|
||||
#else
|
||||
err= (WaitForSingleObject(pid_file, TRY_MAX*1000) == WAIT_TIMEOUT);
|
||||
#endif
|
||||
return err;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
wait_for_server_start()
|
||||
|
||||
Wait for the server on the given port to start.
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
int wait_for_server_start(char *bin_dir __attribute__((unused)),
|
||||
char *mysqladmin_file,
|
||||
char *user, char *password, int port,char *tmp_dir)
|
||||
{
|
||||
arg_list_t al;
|
||||
int err= 0;
|
||||
char trash[FN_REFLEN];
|
||||
|
||||
/* mysqladmin file */
|
||||
snprintf(trash, FN_REFLEN, "%s/trash.out",tmp_dir);
|
||||
|
||||
/* args */
|
||||
init_args(&al);
|
||||
add_arg(&al, "%s", mysqladmin_file);
|
||||
add_arg(&al, "--no-defaults");
|
||||
add_arg(&al, "--port=%u", port);
|
||||
add_arg(&al, "--user=%s", user);
|
||||
add_arg(&al, "--password=%s", password);
|
||||
add_arg(&al, "--silent");
|
||||
add_arg(&al, "--host=localhost");
|
||||
|
||||
#ifndef __NETWARE__
|
||||
add_arg(&al, "--connect_timeout=10");
|
||||
add_arg(&al, "-w");
|
||||
add_arg(&al, "--protocol=tcp");
|
||||
#endif
|
||||
add_arg(&al, "ping");
|
||||
|
||||
/*
|
||||
NetWare does not support the connect timeout in the TCP/IP stack
|
||||
-- we will try the ping multiple times
|
||||
*/
|
||||
#ifndef __WIN__
|
||||
{
|
||||
int i;
|
||||
for (i= 0;
|
||||
(i < TRY_MAX) && (err= spawn(mysqladmin_file, &al, TRUE, NULL,
|
||||
trash, NULL, NULL));
|
||||
i++)
|
||||
sleep(1);
|
||||
}
|
||||
#else
|
||||
err= spawn(mysqladmin_file, &al, TRUE, NULL,trash, NULL, NULL);
|
||||
#endif
|
||||
|
||||
/* free args */
|
||||
free_args(&al);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
spawn()
|
||||
|
||||
Spawn the given path with the given arguments.
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
#ifdef __NETWARE__
|
||||
int spawn(char *path, arg_list_t *al, int join, char *input,
|
||||
char *output, char *error, char *pid_file)
|
||||
{
|
||||
pid_t pid;
|
||||
int result= 0;
|
||||
wiring_t wiring= { FD_UNUSED, FD_UNUSED, FD_UNUSED };
|
||||
unsigned long flags= PROC_CURRENT_SPACE | PROC_INHERIT_CWD;
|
||||
|
||||
/* open wiring */
|
||||
if (input)
|
||||
wiring.infd= open(input, O_RDONLY);
|
||||
|
||||
if (output)
|
||||
wiring.outfd= open(output, O_WRONLY | O_CREAT | O_TRUNC);
|
||||
|
||||
if (error)
|
||||
wiring.errfd= open(error, O_WRONLY | O_CREAT | O_TRUNC);
|
||||
|
||||
/* procve requires a NULL */
|
||||
add_arg(al, NULL);
|
||||
|
||||
/* go */
|
||||
pid= procve(path, flags, NULL, &wiring, NULL, NULL, 0,
|
||||
NULL, (const char **)al->argv);
|
||||
|
||||
/* close wiring */
|
||||
if (wiring.infd != -1)
|
||||
close(wiring.infd);
|
||||
|
||||
if (wiring.outfd != -1)
|
||||
close(wiring.outfd);
|
||||
|
||||
if (wiring.errfd != -1)
|
||||
close(wiring.errfd);
|
||||
|
||||
return result;
|
||||
}
|
||||
#elif __WIN__
|
||||
|
||||
int spawn(char *path, arg_list_t *al, int join, char *input,
|
||||
char *output, char *error, HANDLE *pid)
|
||||
{
|
||||
bool result;
|
||||
int i;
|
||||
STARTUPINFO startup_info;
|
||||
PROCESS_INFORMATION process_information;
|
||||
DWORD exit_code;
|
||||
char win_args[1024]= "";
|
||||
|
||||
/* Skip the first parameter */
|
||||
for (i= 1; i < al->argc; i++)
|
||||
{
|
||||
ASSERT(al->argv[i] != NULL);
|
||||
strcat(win_args,al->argv[i]);
|
||||
strcat(win_args," ");
|
||||
}
|
||||
|
||||
memset(&startup_info,0,sizeof(STARTUPINFO));
|
||||
startup_info.cb= sizeof(STARTUPINFO);
|
||||
|
||||
if (input)
|
||||
freopen(input, "rb", stdin);
|
||||
|
||||
if (output)
|
||||
freopen(output, "wb", stdout);
|
||||
|
||||
if (error)
|
||||
freopen(error, "wb", stderr);
|
||||
|
||||
result= CreateProcess(
|
||||
path,
|
||||
(LPSTR)&win_args,
|
||||
NULL,
|
||||
NULL,
|
||||
TRUE,
|
||||
0,
|
||||
NULL,
|
||||
NULL,
|
||||
&startup_info,
|
||||
&process_information
|
||||
);
|
||||
|
||||
if (result && process_information.hProcess)
|
||||
{
|
||||
if (join)
|
||||
{
|
||||
if (WaitForSingleObject(process_information.hProcess, mysqld_timeout)
|
||||
== WAIT_TIMEOUT)
|
||||
{
|
||||
exit_code= -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
GetExitCodeProcess(process_information.hProcess, &exit_code);
|
||||
}
|
||||
CloseHandle(process_information.hProcess);
|
||||
}
|
||||
else
|
||||
{
|
||||
exit_code= 0;
|
||||
}
|
||||
if (pid != NULL)
|
||||
*pid= process_information.hProcess;
|
||||
}
|
||||
else
|
||||
{
|
||||
exit_code= -1;
|
||||
}
|
||||
if (input)
|
||||
freopen("CONIN$","rb",stdin);
|
||||
if (output)
|
||||
freopen("CONOUT$","wb",stdout);
|
||||
if (error)
|
||||
freopen("CONOUT$","wb",stderr);
|
||||
|
||||
return exit_code;
|
||||
}
|
||||
#else
|
||||
int spawn(char *path, arg_list_t *al, int join, char *input,
|
||||
char *output, char *error, char *pid_file __attribute__((unused)))
|
||||
{
|
||||
pid_t pid;
|
||||
int res_exec= 0;
|
||||
int result= 0;
|
||||
|
||||
pid= fork();
|
||||
|
||||
if (pid == -1)
|
||||
{
|
||||
fprintf(stderr, "fork was't created\n");
|
||||
/* We can't create the fork...exit with error */
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (pid > 0)
|
||||
{
|
||||
/* The parent process is waiting for child process if join is not zero */
|
||||
if (join)
|
||||
{
|
||||
waitpid(pid, &result, 0);
|
||||
if (WIFEXITED(result) != 0)
|
||||
{
|
||||
result= WEXITSTATUS(result);
|
||||
}
|
||||
else
|
||||
{
|
||||
result= EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
/* Child process */
|
||||
add_arg(al, NULL);
|
||||
|
||||
/* Reassign streams */
|
||||
if (input)
|
||||
freopen(input, "r", stdin);
|
||||
|
||||
if (output)
|
||||
freopen(output, "w", stdout);
|
||||
|
||||
if (error)
|
||||
freopen(error, "w", stderr);
|
||||
|
||||
/* Spawn the process */
|
||||
if ((res_exec= execve(path, al->argv, environ)) < 0)
|
||||
exit(EXIT_FAILURE);
|
||||
|
||||
/* Restore streams */
|
||||
if (input)
|
||||
freopen("/dev/tty", "r", stdin);
|
||||
|
||||
if (output)
|
||||
freopen("/dev/tty", "w", stdout);
|
||||
|
||||
if (error)
|
||||
freopen("/dev/tty", "w", stderr);
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
/******************************************************************************
|
||||
|
||||
stop_server()
|
||||
|
||||
Stop the server with the given port and pid file.
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
int stop_server(char *bin_dir __attribute__((unused)), char *mysqladmin_file,
|
||||
char *user, char *password, int port,
|
||||
#ifndef __WIN__
|
||||
char *pid_file,
|
||||
#else
|
||||
HANDLE pid_file,
|
||||
#endif
|
||||
char *tmp_dir)
|
||||
{
|
||||
arg_list_t al;
|
||||
int err= 0;
|
||||
char trash[FN_REFLEN];
|
||||
|
||||
snprintf(trash, FN_REFLEN, "%s/trash.out",tmp_dir);
|
||||
|
||||
/* args */
|
||||
init_args(&al);
|
||||
add_arg(&al, "%s", mysqladmin_file);
|
||||
add_arg(&al, "--no-defaults");
|
||||
add_arg(&al, "--port=%u", port);
|
||||
add_arg(&al, "--user=%s", user);
|
||||
add_arg(&al, "--password=%s", password);
|
||||
add_arg(&al, "-O");
|
||||
add_arg(&al, "shutdown_timeout=20");
|
||||
#ifndef __NETWARE__
|
||||
add_arg(&al, "--protocol=tcp");
|
||||
#endif
|
||||
add_arg(&al, "shutdown");
|
||||
|
||||
/* spawn */
|
||||
if ((err= spawn(mysqladmin_file, &al, TRUE, NULL,
|
||||
trash, NULL, NULL)) == 0)
|
||||
{
|
||||
sleep_until_file_deleted(pid_file);
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifndef __WIN__
|
||||
pid_t pid= get_server_pid(pid_file);
|
||||
|
||||
/* shutdown failed - kill server */
|
||||
kill_server(pid);
|
||||
|
||||
sleep(TRY_MAX);
|
||||
|
||||
/* remove pid file if possible */
|
||||
err= remove(pid_file);
|
||||
#else
|
||||
TerminateProcess(pid_file,err);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* free args */
|
||||
free_args(&al);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
get_server_pid()
|
||||
|
||||
Get the VM id with the given pid file.
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef __WIN__
|
||||
pid_t get_server_pid(char *pid_file)
|
||||
{
|
||||
char buf[FN_REFLEN];
|
||||
int fd, err;
|
||||
char *p;
|
||||
pid_t id= 0;
|
||||
|
||||
/* discover id */
|
||||
fd= open(pid_file, O_RDONLY);
|
||||
|
||||
err= read(fd, buf, FN_REFLEN);
|
||||
|
||||
close(fd);
|
||||
|
||||
if (err > 0)
|
||||
{
|
||||
/* terminate string */
|
||||
if ((p= strchr(buf, '\n')) != NULL)
|
||||
{
|
||||
*p= '\0';
|
||||
|
||||
/* check for a '\r' */
|
||||
if ((p= strchr(buf, '\r')) != NULL)
|
||||
{
|
||||
*p= '\0';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
buf[err]= '\0';
|
||||
}
|
||||
|
||||
id= strtol(buf, NULL, 0);
|
||||
}
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
kill_server()
|
||||
|
||||
Force a kill of the server with the given pid.
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
void kill_server(pid_t pid)
|
||||
{
|
||||
if (pid > 0)
|
||||
{
|
||||
#if !defined(__NETWARE__)
|
||||
/* Send SIGTERM to pid */
|
||||
kill(pid, SIGTERM);
|
||||
#else /* __NETWARE__ */
|
||||
/* destroy vm */
|
||||
NXVmDestroy(pid);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/******************************************************************************
|
||||
|
||||
del_tree()
|
||||
|
||||
Delete the directory and subdirectories.
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
void del_tree(char *dir)
|
||||
{
|
||||
#ifndef __WIN__
|
||||
DIR *parent= opendir(dir);
|
||||
struct dirent *entry;
|
||||
char temp[FN_REFLEN];
|
||||
|
||||
if (parent == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
while ((entry= readdir(parent)) != NULL)
|
||||
{
|
||||
/* create long name */
|
||||
snprintf(temp, FN_REFLEN, "%s/%s", dir, entry->d_name);
|
||||
|
||||
if (entry->d_name[0] == '.')
|
||||
{
|
||||
/* Skip */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* FIXME missing test in acinclude.m4 */
|
||||
#ifndef STRUCT_DIRENT_HAS_D_TYPE
|
||||
struct stat st;
|
||||
|
||||
if (lstat(entry->d_name, &st) == -1)
|
||||
{
|
||||
/* FIXME error */
|
||||
return;
|
||||
}
|
||||
if (S_ISDIR(st.st_mode))
|
||||
#else
|
||||
if (S_ISDIR(entry->d_type))
|
||||
#endif
|
||||
{
|
||||
/* delete subdirectory */
|
||||
del_tree(temp);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* remove file */
|
||||
remove(temp);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* remove directory */
|
||||
rmdir(dir);
|
||||
#else
|
||||
struct _finddata_t parent;
|
||||
#if defined(_MSC_VER) && _MSC_VER > 1200
|
||||
intptr_t handle;
|
||||
#else
|
||||
long handle;
|
||||
#endif /* _MSC_VER && _MSC_VER > 1200 */
|
||||
char temp[FN_REFLEN];
|
||||
char mask[FN_REFLEN];
|
||||
|
||||
snprintf(mask,FN_REFLEN,"%s/*.*",dir);
|
||||
|
||||
if ((handle=_findfirst(mask,&parent)) == -1L)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
/* create long name */
|
||||
snprintf(temp, FN_REFLEN, "%s/%s", dir, parent.name);
|
||||
if (parent.name[0] == '.')
|
||||
{
|
||||
/* Skip */
|
||||
}
|
||||
else
|
||||
if (parent.attrib & _A_SUBDIR)
|
||||
{
|
||||
/* delete subdirectory */
|
||||
del_tree(temp);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* remove file */
|
||||
remove(temp);
|
||||
}
|
||||
} while (_findnext(handle,&parent) == 0);
|
||||
|
||||
_findclose(handle);
|
||||
|
||||
/* remove directory */
|
||||
_rmdir(dir);
|
||||
#endif
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
removef()
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
int removef(const char *format, ...)
|
||||
{
|
||||
#ifdef __NETWARE__
|
||||
va_list ap;
|
||||
char path[FN_REFLEN];
|
||||
|
||||
va_start(ap, format);
|
||||
|
||||
vsnprintf(path, FN_REFLEN, format, ap);
|
||||
|
||||
va_end(ap);
|
||||
return remove(path);
|
||||
|
||||
#elif __WIN__
|
||||
{
|
||||
va_list ap;
|
||||
char path[FN_REFLEN];
|
||||
struct _finddata_t parent;
|
||||
#if defined(_MSC_VER) && _MSC_VER > 1200
|
||||
intptr_t handle;
|
||||
#else
|
||||
long handle;
|
||||
#endif /* _MSC_VER && _MSC_VER > 1200 */
|
||||
char temp[FN_REFLEN];
|
||||
char *p;
|
||||
|
||||
va_start(ap, format);
|
||||
|
||||
vsnprintf(path, FN_REFLEN, format, ap);
|
||||
|
||||
va_end(ap);
|
||||
|
||||
p= path + strlen(path);
|
||||
while (*p != '\\' && *p != '/' && p > path) p--;
|
||||
|
||||
if ((handle=_findfirst(path,&parent)) == -1L)
|
||||
{
|
||||
/* if there is not files....it's ok */
|
||||
return 0;
|
||||
}
|
||||
|
||||
*p= '\0';
|
||||
|
||||
do
|
||||
{
|
||||
if (! (parent.attrib & _A_SUBDIR))
|
||||
{
|
||||
snprintf(temp, FN_REFLEN, "%s/%s", path, parent.name);
|
||||
remove(temp);
|
||||
}
|
||||
}while (_findnext(handle,&parent) == 0);
|
||||
|
||||
_findclose(handle);
|
||||
}
|
||||
#else
|
||||
DIR *parent;
|
||||
struct dirent *entry;
|
||||
char temp[FN_REFLEN];
|
||||
va_list ap;
|
||||
char path[FN_REFLEN];
|
||||
char *p;
|
||||
/* Get path with mask */
|
||||
va_start(ap, format);
|
||||
|
||||
vsnprintf(path, FN_REFLEN, format, ap);
|
||||
|
||||
va_end(ap);
|
||||
|
||||
p= path + strlen(path);
|
||||
while (*p != '\\' && *p != '/' && p > path) p--;
|
||||
*p= '\0';
|
||||
p++;
|
||||
|
||||
parent= opendir(path);
|
||||
|
||||
if (parent == NULL)
|
||||
{
|
||||
return 1; /* Error, directory missing */
|
||||
}
|
||||
|
||||
while ((entry= readdir(parent)) != NULL)
|
||||
{
|
||||
/* entry is not directory and entry matches with mask */
|
||||
#ifndef STRUCT_DIRENT_HAS_D_TYPE
|
||||
struct stat st;
|
||||
|
||||
/* create long name */
|
||||
snprintf(temp, FN_REFLEN, "%s/%s", path, entry->d_name);
|
||||
|
||||
if (lstat(temp, &st) == -1)
|
||||
{
|
||||
return 1; /* Error couldn't lstat file */
|
||||
}
|
||||
|
||||
if (!S_ISDIR(st.st_mode) && !fnmatch(p, entry->d_name,0))
|
||||
#else
|
||||
if (!S_ISDIR(entry->d_type) && !fnmatch(p, entry->d_name,0))
|
||||
#endif
|
||||
{
|
||||
/* create long name */
|
||||
snprintf(temp, FN_REFLEN, "%s/%s", path, entry->d_name);
|
||||
/* Delete only files */
|
||||
remove(temp);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
get_basedir()
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
void get_basedir(char *argv0, char *basedir)
|
||||
{
|
||||
char temp[FN_REFLEN];
|
||||
char *p;
|
||||
int position;
|
||||
|
||||
ASSERT(argv0 != NULL);
|
||||
ASSERT(basedir != NULL);
|
||||
|
||||
strcpy(temp, strlwr(argv0));
|
||||
while ((p= strchr(temp, '\\')) != NULL) *p= '/';
|
||||
|
||||
if ((position= strinstr(temp, "/bin/")) != 0)
|
||||
{
|
||||
p= temp + position;
|
||||
*p= '\0';
|
||||
strcpy(basedir, temp);
|
||||
}
|
||||
}
|
||||
|
||||
uint strinstr(reg1 const char *str,reg4 const char *search)
|
||||
{
|
||||
reg2 my_string i,j;
|
||||
my_string start= (my_string) str;
|
||||
|
||||
skipp:
|
||||
while (*str != '\0')
|
||||
{
|
||||
if (*str++ == *search)
|
||||
{
|
||||
i=(my_string) str;
|
||||
j= (my_string) search+1;
|
||||
while (*j)
|
||||
if (*i++ != *j++) goto skipp;
|
||||
return ((uint) (str - start));
|
||||
}
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
remove_empty_file()
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
void remove_empty_file(const char *file_name)
|
||||
{
|
||||
struct stat file;
|
||||
|
||||
if (!stat(file_name,&file))
|
||||
{
|
||||
if (!file.st_size)
|
||||
remove(file_name);
|
||||
}
|
||||
}
|
|
@ -1,137 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2002 Novell, Inc. All Rights Reserved.
|
||||
|
||||
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
|
||||
*/
|
||||
|
||||
#ifndef _MY_MANAGE
|
||||
#define _MY_MANAGE
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
includes
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
#ifndef __WIN__
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifndef __NETWARE__
|
||||
#include <string.h>
|
||||
#include <my_global.h>
|
||||
#include <m_string.h>
|
||||
|
||||
#ifndef __WIN__
|
||||
#define strnicmp strncasecmp
|
||||
#define strlwr(STRARG) (STRARG)
|
||||
#else
|
||||
int my_vsnprintf_(char *to, size_t n, const char* value, ...);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
macros
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
#define ARG_BUF 10
|
||||
#define TRY_MAX 5
|
||||
|
||||
#ifdef __WIN__
|
||||
#define PATH_MAX _MAX_PATH
|
||||
#define NAME_MAX _MAX_FNAME
|
||||
#define kill(A,B) TerminateProcess((HANDLE)A,0)
|
||||
#define NOT_NEED_PID 0
|
||||
#define MASTER_PID 1
|
||||
#define SLAVE_PID 2
|
||||
#define mysqld_timeout 60000
|
||||
|
||||
int pid_mode;
|
||||
bool run_server;
|
||||
bool skip_first_param;
|
||||
|
||||
#define snprintf _snprintf
|
||||
#define vsnprintf _vsnprintf
|
||||
#endif
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
structures
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
||||
int argc;
|
||||
char **argv;
|
||||
|
||||
size_t size;
|
||||
|
||||
} arg_list_t;
|
||||
|
||||
#ifdef __WIN__
|
||||
typedef int pid_t;
|
||||
#endif
|
||||
/******************************************************************************
|
||||
|
||||
global variables
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
prototypes
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
void init_args(arg_list_t *);
|
||||
void add_arg(arg_list_t *, const char *, ...);
|
||||
void free_args(arg_list_t *);
|
||||
|
||||
#ifndef __WIN__
|
||||
int sleep_until_file_exists(char *);
|
||||
int sleep_until_file_deleted(char *);
|
||||
#else
|
||||
int sleep_until_file_exists(HANDLE);
|
||||
int sleep_until_file_deleted(HANDLE);
|
||||
#endif
|
||||
int wait_for_server_start(char *, char *, char *, char *, int,char *);
|
||||
|
||||
#ifndef __WIN__
|
||||
int spawn(char *, arg_list_t *, int, char *, char *, char *, char *);
|
||||
#else
|
||||
int spawn(char *, arg_list_t *, int , char *, char *, char *, HANDLE *);
|
||||
#endif
|
||||
|
||||
#ifndef __WIN__
|
||||
int stop_server(char *, char *, char *, char *, int, char *,char *);
|
||||
pid_t get_server_pid(char *);
|
||||
void kill_server(pid_t pid);
|
||||
#else
|
||||
int stop_server(char *, char *, char *, char *, int, HANDLE,char *);
|
||||
#endif
|
||||
void del_tree(char *);
|
||||
int removef(const char *, ...);
|
||||
|
||||
void get_basedir(char *, char *);
|
||||
void remove_empty_file(const char *file_name);
|
||||
|
||||
bool create_system_files(const char *mdata,const char *output_file, bool test);
|
||||
|
||||
#endif /* _MY_MANAGE */
|
File diff suppressed because it is too large
Load diff
|
@ -1,16 +1,18 @@
|
|||
#!/bin/sh
|
||||
# Copyright (C) 1979-1996 TcX AB & Monty Program KB & Detron HB
|
||||
# Copyright (C) 1979-2007 MySQL AB
|
||||
#
|
||||
# This software is distributed with NO WARRANTY OF ANY KIND. No author or
|
||||
# distributor accepts any responsibility for the consequences of using it, or
|
||||
# for whether it serves any particular purpose or works at all, unless he or
|
||||
# she says so in writing. Refer to the Free Public License (the "License")
|
||||
# for full details.
|
||||
# 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; version 2 of the License.
|
||||
#
|
||||
# Every copy of this file must include a copy of the License, normally in a
|
||||
# plain ASCII text file named PUBLIC. The License grants you the right to
|
||||
# copy, modify and redistribute this file, but only under certain conditions
|
||||
# described in the License. Among other things, the License requires that
|
||||
# the copyright notice and this notice be preserved on all copies.
|
||||
# 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; see the file COPYING. If not, write to the
|
||||
# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston
|
||||
# MA 02110-1301 USA.
|
||||
|
||||
@bindir@/replace msqlConnect mysql_connect msqlListDBs mysql_list_dbs msqlNumRows mysql_num_rows msqlFetchRow mysql_fetch_row msqlFetchField mysql_fetch_field msqlFreeResult mysql_free_result msqlListFields mysql_list_fields msqlListTables mysql_list_tables msqlErrMsg 'mysql_error(mysql)' msqlStoreResult mysql_store_result msqlQuery mysql_query msqlField mysql_field msqlSelect mysql_select msqlSelectDB mysql_select_db msqlNumFields mysql_num_fields msqlClose mysql_close msqlDataSeek mysql_data_seek m_field MYSQL_FIELD m_result MYSQL_RES m_row MYSQL_ROW msql mysql mSQL mySQL MSQL MYSQL msqlCreateDB mysql_create_db msqlDropDB mysql_drop_db msqlFieldSeek mysql_field_seek -- $*
|
||||
|
|
|
@ -445,10 +445,24 @@ int main(int argc,char **argv)
|
|||
/* Broken up to indicate that it's not advice to you, gentle reader. */
|
||||
printf("/*\n\n Do " "not " "edit " "this " "file " "directly!\n\n*/\n");
|
||||
|
||||
printf("/* Copyright (C) 2001-2004 MySQL AB\n\
|
||||
This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n\
|
||||
and you are welcome to modify and redistribute it under the GPL license\n\
|
||||
\n*/\n\n");
|
||||
printf("\
|
||||
/* Copyright (C) 2001-2004 MySQL AB\n\
|
||||
\n\
|
||||
This program is free software; you can redistribute it and/or modify\n\
|
||||
it under the terms of the GNU General Public License as published by\n\
|
||||
the Free Software Foundation; version 2 of the License.\n\
|
||||
\n\
|
||||
This program is distributed in the hope that it will be useful,\n\
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\
|
||||
GNU General Public License for more details.\n\
|
||||
\n\
|
||||
You should have received a copy of the GNU General Public License\n\
|
||||
along with this program; see the file COPYING. If not, write to the\n\
|
||||
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston\n\
|
||||
MA 02110-1301 USA. */\n\
|
||||
\n\
|
||||
");
|
||||
|
||||
/* Broken up to indicate that it's not advice to you, gentle reader. */
|
||||
printf("/* Do " "not " "edit " "this " "file! This is generated by "
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
# Copyright (C) 2000-2007 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; version 2 of the License.
|
||||
#
|
||||
# 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; see the file COPYING. If not, write to the
|
||||
# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston
|
||||
# MA 02110-1301 USA.
|
||||
|
||||
%define mysql_version @VERSION@
|
||||
|
||||
# use "rpmbuild --with static" or "rpm --define '_with_static 1'" (for RPM 3.x)
|
||||
|
@ -70,12 +86,9 @@ is intended for mission-critical, heavy-load production systems as well
|
|||
as for embedding into mass-deployed software. MySQL is a trademark of
|
||||
MySQL AB.
|
||||
|
||||
The MySQL software has Dual Licensing, which means you can use the MySQL
|
||||
software free of charge under the GNU General Public License
|
||||
(http://www.gnu.org/licenses/). You can also purchase commercial MySQL
|
||||
licenses from MySQL AB if you do not wish to be bound by the terms of
|
||||
the GPL. See the chapter "Licensing and Support" in the manual for
|
||||
further info.
|
||||
Copyright (C) 2000-2007 MySQL AB
|
||||
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
|
||||
and you are welcome to modify and redistribute it under the GPL license.
|
||||
|
||||
The MySQL web site (http://www.mysql.com/) provides the latest
|
||||
news and information about the MySQL software. Also please see the
|
||||
|
@ -95,12 +108,9 @@ is intended for mission-critical, heavy-load production systems as well
|
|||
as for embedding into mass-deployed software. MySQL is a trademark of
|
||||
MySQL AB.
|
||||
|
||||
The MySQL software has Dual Licensing, which means you can use the MySQL
|
||||
software free of charge under the GNU General Public License
|
||||
(http://www.gnu.org/licenses/). You can also purchase commercial MySQL
|
||||
licenses from MySQL AB if you do not wish to be bound by the terms of
|
||||
the GPL. See the chapter "Licensing and Support" in the manual for
|
||||
further info.
|
||||
Copyright (C) 2000-2007 MySQL AB
|
||||
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
|
||||
and you are welcome to modify and redistribute it under the GPL license.
|
||||
|
||||
The MySQL web site (http://www.mysql.com/) provides the latest
|
||||
news and information about the MySQL software. Also please see the
|
||||
|
|
Loading…
Add table
Reference in a new issue