From da1623ddbb4dba3c4b2c56bcad52fd6bd5fb8836 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 25 May 2004 02:28:44 +0300 Subject: [PATCH 01/38] New MYSQL_SERVER_SUFFIX usage (for easier compilation) Update of VC++ project files. VC++Files/mysqlmanager/childfrm.cpp: Rename: VC++Files/mysqlmanager/CHILDFRM.CPP -> VC++Files/mysqlmanager/childfrm.cpp VC++Files/mysqlmanager/childfrm.h: Rename: VC++Files/mysqlmanager/CHILDFRM.H -> VC++Files/mysqlmanager/childfrm.h VC++Files/mysqlmanager/mainfrm.cpp: Rename: VC++Files/mysqlmanager/MAINFRM.CPP -> VC++Files/mysqlmanager/mainfrm.cpp VC++Files/mysqlmanager/mainfrm.h: Rename: VC++Files/mysqlmanager/MAINFRM.H -> VC++Files/mysqlmanager/mainfrm.h VC++Files/mysqlmanager/mysqlmanager.dsp: Rename: VC++Files/mysqlmanager/MySqlManager.dsp -> VC++Files/mysqlmanager/mysqlmanager.dsp VC++Files/mysqlmanager/mysqlmanager.mak: Rename: VC++Files/mysqlmanager/MySqlManager.mak -> VC++Files/mysqlmanager/mysqlmanager.mak VC++Files/mysqlmanager/resource.h: Rename: VC++Files/mysqlmanager/RESOURCE.H -> VC++Files/mysqlmanager/resource.h VC++Files/mysqlmanager/stdafx.cpp: Rename: VC++Files/mysqlmanager/STDAFX.CPP -> VC++Files/mysqlmanager/stdafx.cpp VC++Files/mysqlmanager/stdafx.h: Rename: VC++Files/mysqlmanager/STDAFX.H -> VC++Files/mysqlmanager/stdafx.h VC++Files/mysqlmanager/toolsql.cpp: Rename: VC++Files/mysqlmanager/TOOLSQL.CPP -> VC++Files/mysqlmanager/toolsql.cpp VC++Files/mysqlmanager/toolsql.h: Rename: VC++Files/mysqlmanager/TOOLSQL.H -> VC++Files/mysqlmanager/toolsql.h VC++Files/mysqlmanager/RES/bitmap1.bmp: Rename: VC++Files/mysqlmanager/RES/BITMAP1.BMP -> VC++Files/mysqlmanager/RES/bitmap1.bmp VC++Files/mysqlmanager/RES/bitmap3.bmp: Rename: VC++Files/mysqlmanager/RES/BITMAP3.BMP -> VC++Files/mysqlmanager/RES/bitmap3.bmp VC++Files/mysqlmanager/RES/bmp00001.bmp: Rename: VC++Files/mysqlmanager/RES/BMP00001.BMP -> VC++Files/mysqlmanager/RES/bmp00001.bmp VC++Files/mysqlmanager/RES/bmp00002.bmp: Rename: VC++Files/mysqlmanager/RES/BMP00002.BMP -> VC++Files/mysqlmanager/RES/bmp00002.bmp VC++Files/mysqlmanager/RES/database.bmp: Rename: VC++Files/mysqlmanager/RES/DATABASE.BMP -> VC++Files/mysqlmanager/RES/database.bmp VC++Files/mysqlmanager/RES/fontd.bmp: Rename: VC++Files/mysqlmanager/RES/FONTD.BMP -> VC++Files/mysqlmanager/RES/fontd.bmp VC++Files/mysqlmanager/RES/fontu.bmp: Rename: VC++Files/mysqlmanager/RES/FONTU.BMP -> VC++Files/mysqlmanager/RES/fontu.bmp VC++Files/mysqlmanager/RES/query_ex.bmp: Rename: VC++Files/mysqlmanager/RES/QUERY_EX.BMP -> VC++Files/mysqlmanager/RES/query_ex.bmp VC++Files/mysqlmanager/RES/toolbar.bmp: Rename: VC++Files/mysqlmanager/RES/TOOLBAR.BMP -> VC++Files/mysqlmanager/RES/toolbar.bmp BUILD/compile-pentium-valgrind-max: Use MYSQL_SERVER_SUFFIX VC++Files/bdb/bdb.dsp: Use new version of MYSQL_SERVER_SUFFIX VC++Files/client/mysql.dsp: Use new version of MYSQL_SERVER_SUFFIX VC++Files/client/mysqladmin.dsp: Use new version of MYSQL_SERVER_SUFFIX VC++Files/client/mysqldump.dsp: Use new version of MYSQL_SERVER_SUFFIX VC++Files/client/mysqlimport.dsp: Use new version of MYSQL_SERVER_SUFFIX VC++Files/client/mysqlshow.dsp: Use new version of MYSQL_SERVER_SUFFIX VC++Files/copy_mysql_files.bat: Assume we are in correct directory VC++Files/innobase/innobase.dsp: Use new version of MYSQL_SERVER_SUFFIX Remove old files VC++Files/isamchk/isamchk.dsp: Use new version of MYSQL_SERVER_SUFFIX VC++Files/libmysqld/libmysqld.dsp: Use new version of MYSQL_SERVER_SUFFIX VC++Files/my_print_defaults/my_print_defaults.dsp: Use new version of MYSQL_SERVER_SUFFIX VC++Files/myisamchk/myisamchk.dsp: Use new version of MYSQL_SERVER_SUFFIX VC++Files/myisamlog/myisamlog.dsp: Use new version of MYSQL_SERVER_SUFFIX VC++Files/myisampack/myisampack.dsp: Use new version of MYSQL_SERVER_SUFFIX VC++Files/mysql.dsw: Use new version of MYSQL_SERVER_SUFFIX VC++Files/mysqlbinlog/mysqlbinlog.dsp: Use new version of MYSQL_SERVER_SUFFIX VC++Files/mysqlcheck/mysqlcheck.dsp: Use new version of MYSQL_SERVER_SUFFIX VC++Files/mysys/mysys.dsp: Use new version of MYSQL_SERVER_SUFFIX VC++Files/pack_isam/pack_isam.dsp: Use new version of MYSQL_SERVER_SUFFIX VC++Files/perror/perror.dsp: Use new version of MYSQL_SERVER_SUFFIX VC++Files/replace/replace.dsp: Use new version of MYSQL_SERVER_SUFFIX VC++Files/sql/mysqld.dsp: Use new version of MYSQL_SERVER_SUFFIX include/my_global.h: Added QUOTE and STRINGIFY include/mysql_version.h.in: New MYSQL_SERVER_SUFFIX handling innobase/eval/eval0eval.c: Fixed compiler warning libmysql/libmysql.c: Use STRINGIFY() sql/mysqld.cc: New MYSQL_SERVER_SUFFIX handling sql/mysqld_suffix.h: New MYSQL_SERVER_SUFFIX handling sql/set_var.cc: Use STRINGIFY() zlib/contrib/asm386/zlibvc.dsp: Updated for 4.0 --- BUILD/compile-pentium-valgrind-max | 2 +- VC++Files/bdb/bdb.dsp | 2 +- VC++Files/client/mysql.dsp | 2 +- VC++Files/client/mysqladmin.dsp | 2 +- VC++Files/client/mysqldump.dsp | 2 +- VC++Files/client/mysqlimport.dsp | 2 +- VC++Files/client/mysqlshow.dsp | 2 +- VC++Files/copy_mysql_files.bat | 8 +- VC++Files/innobase/innobase.dsp | 12 +-- VC++Files/isamchk/isamchk.dsp | 2 +- VC++Files/libmysqld/libmysqld.dsp | 16 ++-- .../my_print_defaults/my_print_defaults.dsp | 2 +- VC++Files/myisamchk/myisamchk.dsp | 2 +- VC++Files/myisamlog/myisamlog.dsp | 2 +- VC++Files/myisampack/myisampack.dsp | 2 +- VC++Files/mysql.dsw | 3 + VC++Files/mysqlbinlog/mysqlbinlog.dsp | 2 +- VC++Files/mysqlcheck/mysqlcheck.dsp | 2 +- .../RES/{BITMAP1.BMP => bitmap1.bmp} | Bin .../RES/{BITMAP3.BMP => bitmap3.bmp} | Bin .../RES/{BMP00001.BMP => bmp00001.bmp} | Bin .../RES/{BMP00002.BMP => bmp00002.bmp} | Bin .../RES/{DATABASE.BMP => database.bmp} | Bin .../mysqlmanager/RES/{FONTD.BMP => fontd.bmp} | Bin .../mysqlmanager/RES/{FONTU.BMP => fontu.bmp} | Bin .../RES/{QUERY_EX.BMP => query_ex.bmp} | Bin .../RES/{TOOLBAR.BMP => toolbar.bmp} | Bin .../{CHILDFRM.CPP => childfrm.cpp} | 0 .../mysqlmanager/{CHILDFRM.H => childfrm.h} | 0 .../mysqlmanager/{MAINFRM.CPP => mainfrm.cpp} | 0 .../mysqlmanager/{MAINFRM.H => mainfrm.h} | 0 .../{MySqlManager.dsp => mysqlmanager.dsp} | 0 .../{MySqlManager.mak => mysqlmanager.mak} | 0 .../mysqlmanager/{RESOURCE.H => resource.h} | 0 .../mysqlmanager/{STDAFX.CPP => stdafx.cpp} | 0 VC++Files/mysqlmanager/{STDAFX.H => stdafx.h} | 0 .../mysqlmanager/{TOOLSQL.CPP => toolsql.cpp} | 0 .../mysqlmanager/{TOOLSQL.H => toolsql.h} | 0 VC++Files/mysys/mysys.dsp | 2 +- VC++Files/pack_isam/pack_isam.dsp | 2 +- VC++Files/perror/perror.dsp | 2 +- VC++Files/replace/replace.dsp | 2 +- VC++Files/sql/mysqld.dsp | 14 ++-- include/my_global.h | 3 + include/mysql_version.h.in | 10 +-- innobase/eval/eval0eval.c | 2 +- libmysql/libmysql.c | 2 +- sql/mysqld.cc | 4 +- sql/mysqld_suffix.h | 23 ++---- sql/set_var.cc | 2 +- zlib/contrib/asm386/zlibvc.dsp | 76 +++++++++--------- 51 files changed, 94 insertions(+), 117 deletions(-) rename VC++Files/mysqlmanager/RES/{BITMAP1.BMP => bitmap1.bmp} (100%) rename VC++Files/mysqlmanager/RES/{BITMAP3.BMP => bitmap3.bmp} (100%) rename VC++Files/mysqlmanager/RES/{BMP00001.BMP => bmp00001.bmp} (100%) rename VC++Files/mysqlmanager/RES/{BMP00002.BMP => bmp00002.bmp} (100%) rename VC++Files/mysqlmanager/RES/{DATABASE.BMP => database.bmp} (100%) rename VC++Files/mysqlmanager/RES/{FONTD.BMP => fontd.bmp} (100%) rename VC++Files/mysqlmanager/RES/{FONTU.BMP => fontu.bmp} (100%) rename VC++Files/mysqlmanager/RES/{QUERY_EX.BMP => query_ex.bmp} (100%) rename VC++Files/mysqlmanager/RES/{TOOLBAR.BMP => toolbar.bmp} (100%) rename VC++Files/mysqlmanager/{CHILDFRM.CPP => childfrm.cpp} (100%) rename VC++Files/mysqlmanager/{CHILDFRM.H => childfrm.h} (100%) rename VC++Files/mysqlmanager/{MAINFRM.CPP => mainfrm.cpp} (100%) rename VC++Files/mysqlmanager/{MAINFRM.H => mainfrm.h} (100%) rename VC++Files/mysqlmanager/{MySqlManager.dsp => mysqlmanager.dsp} (100%) rename VC++Files/mysqlmanager/{MySqlManager.mak => mysqlmanager.mak} (100%) rename VC++Files/mysqlmanager/{RESOURCE.H => resource.h} (100%) rename VC++Files/mysqlmanager/{STDAFX.CPP => stdafx.cpp} (100%) rename VC++Files/mysqlmanager/{STDAFX.H => stdafx.h} (100%) rename VC++Files/mysqlmanager/{TOOLSQL.CPP => toolsql.cpp} (100%) rename VC++Files/mysqlmanager/{TOOLSQL.H => toolsql.h} (100%) diff --git a/BUILD/compile-pentium-valgrind-max b/BUILD/compile-pentium-valgrind-max index 0201001c959..c5359585046 100755 --- a/BUILD/compile-pentium-valgrind-max +++ b/BUILD/compile-pentium-valgrind-max @@ -15,7 +15,7 @@ argument. path=`dirname $0` . "$path/SETUP.sh" -extra_flags="$pentium_cflags $debug_cflags -USAFEMALLOC -DHAVE_purify" +extra_flags="$pentium_cflags $debug_cflags -USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_purify -DMYSQL_SERVER_SUFFIX=-valgrind-max" c_warnings="$c_warnings $debug_extra_warnings" cxx_warnings="$cxx_warnings $debug_extra_warnings" extra_configs="$pentium_configs $debug_configs" diff --git a/VC++Files/bdb/bdb.dsp b/VC++Files/bdb/bdb.dsp index d7ab8391b09..7e140f6466c 100644 --- a/VC++Files/bdb/bdb.dsp +++ b/VC++Files/bdb/bdb.dsp @@ -66,7 +66,7 @@ LIB32=xilink6.exe -lib # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MTd /W3 /Z7 /Od /Gf /I "../bdb/build_win32" /I "../bdb/include" /D "__WIN32__" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /FD /c # SUBTRACT BASE CPP /Fr -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../bdb/build_win32" /I "../bdb/include" /D "NDEBUG" /D "DBUG_OFF" /D "_WINDOWS" /D MYSQL_SERVER_SUFFIX_MAX /Fo"max/" /Fd"max/" /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../bdb/build_win32" /I "../bdb/include" /D "NDEBUG" /D "DBUG_OFF" /D "_WINDOWS" /D MYSQL_SERVER_SUFFIX=-max /Fo"max/" /Fd"max/" /FD /c # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe diff --git a/VC++Files/client/mysql.dsp b/VC++Files/client/mysql.dsp index 1c3f6aab6d1..16f2bbd3499 100644 --- a/VC++Files/client/mysql.dsp +++ b/VC++Files/client/mysql.dsp @@ -96,7 +96,7 @@ LINK32=xilink6.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /WX /O2 /I "../include" /I "../" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "NDEBUG" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /WX /O2 /I "../include" /I "../" /D "_CONSOLE" /D "_WINDOWS" /D "MYSQL_COMMERCIAL_LICENSE" /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c +# ADD CPP /nologo /G6 /MT /W3 /WX /O2 /I "../include" /I "../" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" diff --git a/VC++Files/client/mysqladmin.dsp b/VC++Files/client/mysqladmin.dsp index 3f753794883..a5466a98bf8 100644 --- a/VC++Files/client/mysqladmin.dsp +++ b/VC++Files/client/mysqladmin.dsp @@ -95,7 +95,7 @@ LINK32=xilink6.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "NDEBUG" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "_CONSOLE" /D "_WINDOWS" /D MYSQL_COMMERCIAL_LICENSE /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" diff --git a/VC++Files/client/mysqldump.dsp b/VC++Files/client/mysqldump.dsp index b60ab44f4b2..35c8d3a149c 100644 --- a/VC++Files/client/mysqldump.dsp +++ b/VC++Files/client/mysqldump.dsp @@ -95,7 +95,7 @@ LINK32=xilink6.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "NDEBUG" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "_CONSOLE" /D "_WINDOWS" /D MYSQL_COMMERCIAL_LICENSE /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" diff --git a/VC++Files/client/mysqlimport.dsp b/VC++Files/client/mysqlimport.dsp index 7cfc96d5774..77bf90123bf 100644 --- a/VC++Files/client/mysqlimport.dsp +++ b/VC++Files/client/mysqlimport.dsp @@ -96,7 +96,7 @@ LINK32=xilink6.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "NDEBUG" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "_CONSOLE" /D "_WINDOWS" /D MYSQL_COMMERCIAL_LICENSE /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" diff --git a/VC++Files/client/mysqlshow.dsp b/VC++Files/client/mysqlshow.dsp index 4434d1a57ef..1c6d210ca71 100644 --- a/VC++Files/client/mysqlshow.dsp +++ b/VC++Files/client/mysqlshow.dsp @@ -95,7 +95,7 @@ LINK32=xilink6.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "NDEBUG" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "_CONSOLE" /D "_WINDOWS" /D MYSQL_COMMERCIAL_LICENSE /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" diff --git a/VC++Files/copy_mysql_files.bat b/VC++Files/copy_mysql_files.bat index 0570275a7b6..8f5789b9dfd 100644 --- a/VC++Files/copy_mysql_files.bat +++ b/VC++Files/copy_mysql_files.bat @@ -2,12 +2,8 @@ REM stop any conflicting service net stop mysql -REM Our build system uses M:\mysql-version for the build root dir - -M: -cd \mysql-4.0 - -REM Copy binaries +REM Copy binaries to c:\mysql +REM (We assume we are in build root when executing this script) copy lib_debug\libmysql.* c:\mysql\lib\debug copy lib_debug\zlib.* c:\mysql\lib\debug diff --git a/VC++Files/innobase/innobase.dsp b/VC++Files/innobase/innobase.dsp index 27673e7e162..25e9d5d75b8 100644 --- a/VC++Files/innobase/innobase.dsp +++ b/VC++Files/innobase/innobase.dsp @@ -91,7 +91,7 @@ LIB32=xilink6.exe -lib # PROP Intermediate_Dir "nt" # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /GX /O2 /I "../innobase/include" /I "../include" /D "NDEBUG" /D "_LIB" /D "_WIN32" /D "WIN32" /D "_MBCS" /D "MYSQL_SERVER" /YX /FD /c -# ADD CPP /nologo /G6 /MT /W3 /GX /O2 /I "../innobase/include" /I "../include" /D "_LIB" /D "_WIN32" /D "WIN32" /D "NDEBUG" /D "MYSQL_SERVER" /D "_MBCS" /D MYSQL_SERVER_SUFFIX_NT /FD /c +# ADD CPP /nologo /G6 /MT /W3 /GX /O2 /I "../innobase/include" /I "../include" /D "_LIB" /D "_WIN32" /D "WIN32" /D "NDEBUG" /D "MYSQL_SERVER" /D "_MBCS" /D MYSQL_SERVER_SUFFIX=-nt /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x416 /d "NDEBUG" # ADD RSC /l 0x416 /d "NDEBUG" @@ -115,7 +115,7 @@ LIB32=xilink6.exe -lib # PROP Intermediate_Dir "max_nt" # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /GX /O2 /I "../innobase/include" /I "../include" /D "NDEBUG" /D "_LIB" /D "_WIN32" /D "WIN32" /D "_MBCS" /D "MYSQL_SERVER" /YX /FD /c -# ADD CPP /nologo /G6 /MT /W3 /GX /O2 /I "../innobase/include" /I "../include" /D "_LIB" /D "_WIN32" /D "WIN32" /D "NDEBUG" /D "MYSQL_SERVER" /D "_MBCS" /D MYSQL_SERVER_SUFFIX_NT_MAX /FD /c +# ADD CPP /nologo /G6 /MT /W3 /GX /O2 /I "../innobase/include" /I "../include" /D "_LIB" /D "_WIN32" /D "WIN32" /D "NDEBUG" /D "MYSQL_SERVER" /D "_MBCS" /D MYSQL_SERVER_SUFFIX=-nt-max /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x416 /d "NDEBUG" # ADD RSC /l 0x416 /d "NDEBUG" @@ -280,10 +280,6 @@ SOURCE=.\os\os0proc.c # End Source File # Begin Source File -SOURCE=.\os\os0shm.c -# End Source File -# Begin Source File - SOURCE=.\os\os0sync.c # End Source File # Begin Source File @@ -388,10 +384,6 @@ SOURCE=.\sync\sync0arr.c # End Source File # Begin Source File -SOURCE=.\sync\sync0ipm.c -# End Source File -# Begin Source File - SOURCE=.\sync\sync0rw.c # End Source File # Begin Source File diff --git a/VC++Files/isamchk/isamchk.dsp b/VC++Files/isamchk/isamchk.dsp index cf8ba2de08d..71a49bb3d27 100644 --- a/VC++Files/isamchk/isamchk.dsp +++ b/VC++Files/isamchk/isamchk.dsp @@ -97,7 +97,7 @@ LINK32=xilink6.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../isam" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "NDEBUG" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../isam" /D "_CONSOLE" /D "_WINDOWS" /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /D MYSQL_COMMERCIAL_LICENSE /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../isam" /D "_CONSOLE" /D "_WINDOWS" /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /D LICENSE=Commerical /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x41d /d "NDEBUG" # ADD RSC /l 0x41d /d "NDEBUG" diff --git a/VC++Files/libmysqld/libmysqld.dsp b/VC++Files/libmysqld/libmysqld.dsp index 3f7c7708938..37a4518f258 100644 --- a/VC++Files/libmysqld/libmysqld.dsp +++ b/VC++Files/libmysqld/libmysqld.dsp @@ -99,8 +99,8 @@ LINK32=xilink6.exe # PROP Intermediate_Dir "classic" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "HAVE_INNOBASE_DB" /D "DBUG_OFF" /D "USE_TLS" /D "__WIN__" /D "NDEBUG" /FR /FD /c -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /D "WIN32" /D "_WINDOWS" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "HAVE_INNOBASE_DB" /D "USE_TLS" /D "__WIN__" /D MYSQL_COMMERCIAL_LICENSE /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FR /FD /c +# ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "DBUG_OFF" /D "USE_TLS" /D "__WIN__" /D "NDEBUG" /FR /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /D "WIN32" /D "_WINDOWS" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "USE_TLS" /D "__WIN__" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FR /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x416 /d "NDEBUG" @@ -109,9 +109,9 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=xilink6.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 Wsock32.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\innodb.lib ..\lib_release\bdb.lib ..\lib_release\zlib.lib /nologo /dll /machine:I386 /out:"../lib_release/libmysqld.dll" /implib:"../lib_release/libmysqld.lib" +# 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 Wsock32.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\zlib.lib /nologo /dll /machine:I386 /out:"../lib_release/libmysqld.dll" /implib:"../lib_release/libmysqld.lib" # 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 Wsock32.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\innodb.lib ..\lib_release\bdb.lib ..\lib_release\zlib.lib /nologo /dll /machine:I386 /out:"../lib_classic/libmysqld.dll" /implib:"../lib_release/libmysqld.lib" +# 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 Wsock32.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\zlib.lib /nologo /dll /machine:I386 /out:"../lib_classic/libmysqld.dll" /implib:"../lib_release/libmysqld.lib" # SUBTRACT LINK32 /pdb:none !ELSEIF "$(CFG)" == "libmysqld - Win32 pro" @@ -128,8 +128,8 @@ LINK32=xilink6.exe # PROP Intermediate_Dir "pro" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "HAVE_INNOBASE_DB" /D "DBUG_OFF" /D "USE_TLS" /D "__WIN__" /D "NDEBUG" /FR /FD /c -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /D "WIN32" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "EMBEDDED_LIBRARY" /D "USE_TLS" /D "__WIN__" /D "MYSQL_SERVER" /D LICENCE=Commercial /D "_MBCS" /D "HAVE_DLOPEN" /D "HAVE_INNOBASE_DB" /D "DBUG_OFF" /D "NDEBUG" /D "_WINDOWS" /D "_CONSOLE" /FR /FD /D MYSQL_SEVER_SUFFIX=-pro /c +# ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "HAVE_INNOBASE_DB" /D "DBUG_OFF" /D "USE_TLS" /D "__WIN__" /D "NDEBUG" /FR /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /D "WIN32" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "EMBEDDED_LIBRARY" /D "USE_TLS" /D "__WIN__" /D "MYSQL_SERVER" /D LICENCE=Commercial /D "_MBCS" /D "HAVE_DLOPEN" /D "HAVE_INNOBASE_DB" /D "DBUG_OFF" /D "NDEBUG" /D "_WINDOWS" /D "_CONSOLE" /FR /FD /D MYSQL_SEVER_SUFFIX=-pro /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x416 /d "NDEBUG" @@ -138,9 +138,9 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=xilink6.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 Wsock32.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\innodb.lib ..\lib_release\bdb.lib ..\lib_release\zlib.lib /nologo /dll /machine:I386 /out:"../lib_classic/libmysqld.dll" /implib:"../lib_release/libmysqld.lib" +# 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 Wsock32.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\innodb.lib ..\lib_release\zlib.lib /nologo /dll /machine:I386 /out:"../lib_classic/libmysqld.dll" /implib:"../lib_release/libmysqld.lib" # 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 Wsock32.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\innodb.lib ..\lib_release\bdb.lib ..\lib_release\zlib.lib /nologo /dll /machine:I386 /out:"../lib_pro/libmysqld.dll" /implib:"../lib_release/libmysqld.lib" +# 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 Wsock32.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\innodb.lib ..\lib_release\zlib.lib /nologo /dll /machine:I386 /out:"../lib_pro/libmysqld.dll" /implib:"../lib_release/libmysqld.lib" # SUBTRACT LINK32 /pdb:none !ENDIF diff --git a/VC++Files/my_print_defaults/my_print_defaults.dsp b/VC++Files/my_print_defaults/my_print_defaults.dsp index 6c90b2e1976..cc557deed2e 100644 --- a/VC++Files/my_print_defaults/my_print_defaults.dsp +++ b/VC++Files/my_print_defaults/my_print_defaults.dsp @@ -92,7 +92,7 @@ LINK32=xilink6.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../include" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "NDEBUG" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "../include" /D "WIN32" /D "_CONSOLE" /D MYSQL_COMMERCIAL_LICENSE /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "../include" /D "WIN32" /D "_CONSOLE" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /YX /FD /c # ADD BASE RSC /l 0x416 /d "NDEBUG" # ADD RSC /l 0x416 /d "NDEBUG" BSC32=bscmake.exe diff --git a/VC++Files/myisamchk/myisamchk.dsp b/VC++Files/myisamchk/myisamchk.dsp index f83b10969d1..0dc435b52e5 100644 --- a/VC++Files/myisamchk/myisamchk.dsp +++ b/VC++Files/myisamchk/myisamchk.dsp @@ -95,7 +95,7 @@ LINK32=xilink6.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../myisam" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "NDEBUG" /FR /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../myisam" /D "_CONSOLE" /D "_WINDOWS" /D MYSQL_COMMERCIAL_LICENSE /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FR /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../myisam" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FR /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" diff --git a/VC++Files/myisamlog/myisamlog.dsp b/VC++Files/myisamlog/myisamlog.dsp index c3a7283d26d..99c480ce750 100644 --- a/VC++Files/myisamlog/myisamlog.dsp +++ b/VC++Files/myisamlog/myisamlog.dsp @@ -95,7 +95,7 @@ LINK32=xilink6.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../myisam" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "NDEBUG" /FR /FD /c -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../myisam" /D "_CONSOLE" /D "_WINDOWS" /D MYSQL_COMMERCIAL_LICENSE /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FR /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../myisam" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FR /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe diff --git a/VC++Files/myisampack/myisampack.dsp b/VC++Files/myisampack/myisampack.dsp index 88955a645e1..c0c9c17fbf2 100644 --- a/VC++Files/myisampack/myisampack.dsp +++ b/VC++Files/myisampack/myisampack.dsp @@ -93,7 +93,7 @@ LINK32=xilink6.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../myisam" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "NDEBUG" /FR /FD /c -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../myisam" /D "_CONSOLE" /D "_WINDOWS" /D MYSQL_COMMERCIAL_LICENSE /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FR /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../myisam" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FR /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe diff --git a/VC++Files/mysql.dsw b/VC++Files/mysql.dsw index 20c59d784cc..6bc9f2e8cb8 100644 --- a/VC++Files/mysql.dsw +++ b/VC++Files/mysql.dsw @@ -41,6 +41,9 @@ Package=<4> Begin Project Dependency Project_Dep_Name mysys End Project Dependency + Begin Project Dependency + Project_Dep_Name strings + End Project Dependency }}} ############################################################################### diff --git a/VC++Files/mysqlbinlog/mysqlbinlog.dsp b/VC++Files/mysqlbinlog/mysqlbinlog.dsp index c453dd430dd..331382ab133 100644 --- a/VC++Files/mysqlbinlog/mysqlbinlog.dsp +++ b/VC++Files/mysqlbinlog/mysqlbinlog.dsp @@ -93,7 +93,7 @@ LINK32=xilink6.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /I "../sql" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "MYSQL_SERVER" /D "NDEBUG" /FD /c -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /I "../sql" /D "MYSQL_SERVER" /D "_CONSOLE" /D "_WINDOWS" /D MYSQL_COMMERCIAL_LICENSE /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /I "../sql" /D "MYSQL_SERVER" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe diff --git a/VC++Files/mysqlcheck/mysqlcheck.dsp b/VC++Files/mysqlcheck/mysqlcheck.dsp index 5ef885cb305..121da0bd468 100644 --- a/VC++Files/mysqlcheck/mysqlcheck.dsp +++ b/VC++Files/mysqlcheck/mysqlcheck.dsp @@ -92,7 +92,7 @@ LINK32=xilink6.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "MYSQL_SERVER" /D "NDEBUG" /FD /c -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "MYSQL_SERVER" /D "_CONSOLE" /D "_WINDOWS" /D MYSQL_COMMERCIAL_LICENSE /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "MYSQL_SERVER" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe diff --git a/VC++Files/mysqlmanager/RES/BITMAP1.BMP b/VC++Files/mysqlmanager/RES/bitmap1.bmp similarity index 100% rename from VC++Files/mysqlmanager/RES/BITMAP1.BMP rename to VC++Files/mysqlmanager/RES/bitmap1.bmp diff --git a/VC++Files/mysqlmanager/RES/BITMAP3.BMP b/VC++Files/mysqlmanager/RES/bitmap3.bmp similarity index 100% rename from VC++Files/mysqlmanager/RES/BITMAP3.BMP rename to VC++Files/mysqlmanager/RES/bitmap3.bmp diff --git a/VC++Files/mysqlmanager/RES/BMP00001.BMP b/VC++Files/mysqlmanager/RES/bmp00001.bmp similarity index 100% rename from VC++Files/mysqlmanager/RES/BMP00001.BMP rename to VC++Files/mysqlmanager/RES/bmp00001.bmp diff --git a/VC++Files/mysqlmanager/RES/BMP00002.BMP b/VC++Files/mysqlmanager/RES/bmp00002.bmp similarity index 100% rename from VC++Files/mysqlmanager/RES/BMP00002.BMP rename to VC++Files/mysqlmanager/RES/bmp00002.bmp diff --git a/VC++Files/mysqlmanager/RES/DATABASE.BMP b/VC++Files/mysqlmanager/RES/database.bmp similarity index 100% rename from VC++Files/mysqlmanager/RES/DATABASE.BMP rename to VC++Files/mysqlmanager/RES/database.bmp diff --git a/VC++Files/mysqlmanager/RES/FONTD.BMP b/VC++Files/mysqlmanager/RES/fontd.bmp similarity index 100% rename from VC++Files/mysqlmanager/RES/FONTD.BMP rename to VC++Files/mysqlmanager/RES/fontd.bmp diff --git a/VC++Files/mysqlmanager/RES/FONTU.BMP b/VC++Files/mysqlmanager/RES/fontu.bmp similarity index 100% rename from VC++Files/mysqlmanager/RES/FONTU.BMP rename to VC++Files/mysqlmanager/RES/fontu.bmp diff --git a/VC++Files/mysqlmanager/RES/QUERY_EX.BMP b/VC++Files/mysqlmanager/RES/query_ex.bmp similarity index 100% rename from VC++Files/mysqlmanager/RES/QUERY_EX.BMP rename to VC++Files/mysqlmanager/RES/query_ex.bmp diff --git a/VC++Files/mysqlmanager/RES/TOOLBAR.BMP b/VC++Files/mysqlmanager/RES/toolbar.bmp similarity index 100% rename from VC++Files/mysqlmanager/RES/TOOLBAR.BMP rename to VC++Files/mysqlmanager/RES/toolbar.bmp diff --git a/VC++Files/mysqlmanager/CHILDFRM.CPP b/VC++Files/mysqlmanager/childfrm.cpp similarity index 100% rename from VC++Files/mysqlmanager/CHILDFRM.CPP rename to VC++Files/mysqlmanager/childfrm.cpp diff --git a/VC++Files/mysqlmanager/CHILDFRM.H b/VC++Files/mysqlmanager/childfrm.h similarity index 100% rename from VC++Files/mysqlmanager/CHILDFRM.H rename to VC++Files/mysqlmanager/childfrm.h diff --git a/VC++Files/mysqlmanager/MAINFRM.CPP b/VC++Files/mysqlmanager/mainfrm.cpp similarity index 100% rename from VC++Files/mysqlmanager/MAINFRM.CPP rename to VC++Files/mysqlmanager/mainfrm.cpp diff --git a/VC++Files/mysqlmanager/MAINFRM.H b/VC++Files/mysqlmanager/mainfrm.h similarity index 100% rename from VC++Files/mysqlmanager/MAINFRM.H rename to VC++Files/mysqlmanager/mainfrm.h diff --git a/VC++Files/mysqlmanager/MySqlManager.dsp b/VC++Files/mysqlmanager/mysqlmanager.dsp similarity index 100% rename from VC++Files/mysqlmanager/MySqlManager.dsp rename to VC++Files/mysqlmanager/mysqlmanager.dsp diff --git a/VC++Files/mysqlmanager/MySqlManager.mak b/VC++Files/mysqlmanager/mysqlmanager.mak similarity index 100% rename from VC++Files/mysqlmanager/MySqlManager.mak rename to VC++Files/mysqlmanager/mysqlmanager.mak diff --git a/VC++Files/mysqlmanager/RESOURCE.H b/VC++Files/mysqlmanager/resource.h similarity index 100% rename from VC++Files/mysqlmanager/RESOURCE.H rename to VC++Files/mysqlmanager/resource.h diff --git a/VC++Files/mysqlmanager/STDAFX.CPP b/VC++Files/mysqlmanager/stdafx.cpp similarity index 100% rename from VC++Files/mysqlmanager/STDAFX.CPP rename to VC++Files/mysqlmanager/stdafx.cpp diff --git a/VC++Files/mysqlmanager/STDAFX.H b/VC++Files/mysqlmanager/stdafx.h similarity index 100% rename from VC++Files/mysqlmanager/STDAFX.H rename to VC++Files/mysqlmanager/stdafx.h diff --git a/VC++Files/mysqlmanager/TOOLSQL.CPP b/VC++Files/mysqlmanager/toolsql.cpp similarity index 100% rename from VC++Files/mysqlmanager/TOOLSQL.CPP rename to VC++Files/mysqlmanager/toolsql.cpp diff --git a/VC++Files/mysqlmanager/TOOLSQL.H b/VC++Files/mysqlmanager/toolsql.h similarity index 100% rename from VC++Files/mysqlmanager/TOOLSQL.H rename to VC++Files/mysqlmanager/toolsql.h diff --git a/VC++Files/mysys/mysys.dsp b/VC++Files/mysys/mysys.dsp index d847ce55abd..27efafd8f12 100644 --- a/VC++Files/mysys/mysys.dsp +++ b/VC++Files/mysys/mysys.dsp @@ -91,7 +91,7 @@ LIB32=xilink6.exe -lib # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /D "NDEBUG" /D "DBUG_OFF" /D "_WINDOWS" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../zlib" /D "USE_SYMDIR" /D "NDEBUG" /D "DBUG_OFF" /D "_WINDOWS" /D MYSQL_SERVER_SUFFIX_MAX /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../zlib" /D "USE_SYMDIR" /D "NDEBUG" /D "DBUG_OFF" /D "_WINDOWS" /D MYSQL_SERVER_SUFFIX=-max /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 diff --git a/VC++Files/pack_isam/pack_isam.dsp b/VC++Files/pack_isam/pack_isam.dsp index 86fb851b478..149ceb3d675 100644 --- a/VC++Files/pack_isam/pack_isam.dsp +++ b/VC++Files/pack_isam/pack_isam.dsp @@ -93,7 +93,7 @@ LINK32=xilink6.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../isam" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "NDEBUG" /FD /c -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../isam" /D "_CONSOLE" /D "_WINDOWS" /D MYSQL_COMMERCIAL_LICENSE /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../isam" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe diff --git a/VC++Files/perror/perror.dsp b/VC++Files/perror/perror.dsp index 6549fff9bfc..c1c7ac06267 100644 --- a/VC++Files/perror/perror.dsp +++ b/VC++Files/perror/perror.dsp @@ -102,7 +102,7 @@ LINK32=xilink6.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "NDEBUG" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /D "WIN32" /D "_WINDOWS" /D MYSQL_COMMERCIAL_LICENSE /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /D "WIN32" /D "_WINDOWS" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c # SUBTRACT CPP /YX # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 diff --git a/VC++Files/replace/replace.dsp b/VC++Files/replace/replace.dsp index dacd6130be7..bc19e074fd0 100644 --- a/VC++Files/replace/replace.dsp +++ b/VC++Files/replace/replace.dsp @@ -96,7 +96,7 @@ LINK32=xilink6.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "NDEBUG" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /D "_CONSOLE" /D "_WINDOWS" /D MYSQL_COMMERCIAL_LICENSE /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x40b /d "NDEBUG" # ADD RSC /l 0x40b /d "NDEBUG" diff --git a/VC++Files/sql/mysqld.dsp b/VC++Files/sql/mysqld.dsp index d7bb281a215..4f437ada611 100644 --- a/VC++Files/sql/mysqld.dsp +++ b/VC++Files/sql/mysqld.dsp @@ -102,7 +102,7 @@ LINK32=xilink6.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /G5 /MT /W3 /O2 /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "__WIN32__" /D "DBUG_OFF" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /D "__NT__" /D "DBUG_OFF" /D "HAVE_INNOBASE_DB" /D "NDEBUG" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "HAVE_DLOPEN" /FD /D MYSQL_SERVER_SUFFIX_NT /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /D "__NT__" /D "DBUG_OFF" /D "HAVE_INNOBASE_DB" /D "NDEBUG" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "HAVE_DLOPEN" /FD /D MYSQL_SERVER_SUFFIX=-nt /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x410 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" @@ -130,7 +130,7 @@ LINK32=xilink6.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /D "NDEBUG" /D "__NT__" /D "DBUG_OFF" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../bdb/build_win32" /D "__NT__" /D "DBUG_OFF" /D "HAVE_INNOBASE_DB" /D "HAVE_BERKELEY_DB" /D "_WINDOWS" /D "_CONSOLE" /D "HAVE_DLOPEN" /D "NDEBUG" /D "MYSQL_SERVER" /D "_MBCS" /FD /D MYSQL_SERVER_SUFFIX_NT_MAX /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../bdb/build_win32" /D "__NT__" /D "DBUG_OFF" /D "HAVE_INNOBASE_DB" /D "HAVE_BERKELEY_DB" /D "_WINDOWS" /D "_CONSOLE" /D "HAVE_DLOPEN" /D "NDEBUG" /D "MYSQL_SERVER" /D "_MBCS" /FD /D MYSQL_SERVER_SUFFIX=-nt-max /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" @@ -159,7 +159,7 @@ LINK32=xilink6.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /D "NDEBUG" /D "DBUG_OFF" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../bdb/build_win32" /D "HAVE_INNOBASE_DB" /D "HAVE_BERKELEY_DB" /D "NDEBUG" /D "DBUG_OFF" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "HAVE_DLOPEN" /FD /D MYSQL_SERVER_SUFFIX_MAX /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../bdb/build_win32" /D "HAVE_INNOBASE_DB" /D "HAVE_BERKELEY_DB" /D "NDEBUG" /D "DBUG_OFF" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "HAVE_DLOPEN" /FD /D MYSQL_SERVER_SUFFIX=-max /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" @@ -187,7 +187,7 @@ LINK32=xilink6.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../zlib" /D "DBUG_OFF" /D "HAVE_INNOBASE_DB" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "USE_SYMDIR" /D "HAVE_DLOPEN" /D "NDEBUG" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../zlib" /D MYSQL_COMMERCIAL_LICENSE /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "HAVE_DLOPEN" /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../zlib" /D LICENSE=Commerical /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "HAVE_DLOPEN" /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe @@ -215,7 +215,7 @@ LINK32=xilink6.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../zlib" /D "DBUG_OFF" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "USE_SYMDIR" /D "HAVE_DLOPEN" /D "NDEBUG" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../zlib" /D "MYSQL_SERVER" /D LICENCE=Commercial /D "_MBCS" /D "HAVE_DLOPEN" /D "HAVE_INNOBASE_DB" /D "DBUG_OFF" /D "NDEBUG" /D "_WINDOWS" /D "_CONSOLE" /FD /D MYSQL_SERVER_SUFFIX_PRO /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../zlib" /D "MYSQL_SERVER" /D LICENCE=Commercial /D "_MBCS" /D "HAVE_DLOPEN" /D "HAVE_INNOBASE_DB" /D "DBUG_OFF" /D "NDEBUG" /D "_WINDOWS" /D "_CONSOLE" /FD /D MYSQL_SERVER_SUFFIX=-pro /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe @@ -243,7 +243,7 @@ LINK32=xilink6.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../zlib" /D "DBUG_OFF" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "USE_SYMDIR" /D "HAVE_DLOPEN" /D "NDEBUG" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../zlib" /D "__NT__" /D "DBUG_OFF" /D "NDEBUG" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "HAVE_DLOPEN" /FD /D MYSQL_SERVER_SUFFIX_NT /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../zlib" /D "__NT__" /D "DBUG_OFF" /D "NDEBUG" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "HAVE_DLOPEN" /FD /D MYSQL_SERVER_SUFFIX=-nt /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" @@ -272,7 +272,7 @@ LINK32=xilink6.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../zlib" /D "DBUG_OFF" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "USE_SYMDIR" /D "HAVE_DLOPEN" /D "NDEBUG" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../zlib" /D "__NT__" /D "DBUG_OFF" /D "HAVE_INNOBASE_DB" /D LICENCE=Commercial /D "NDEBUG" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "HAVE_DLOPEN" /FD /D MYSQL_SERVER_SUFFIX_PRO_NT +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../zlib" /D "__NT__" /D "DBUG_OFF" /D "HAVE_INNOBASE_DB" /D LICENCE=Commercial /D "NDEBUG" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "HAVE_DLOPEN" /FD /D MYSQL_SERVER_SUFFIX=-pro-nt # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe diff --git a/include/my_global.h b/include/my_global.h index e4c0fb44337..58e97020ccb 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -318,6 +318,9 @@ C_MODE_END #define USE_BMOVE512 1 /* Use this unless system bmove is faster */ #endif +#define QUOTE_ARG(x) #x /* Quote argument (before cpp) */ +#define STRINGIFY_ARG(x) QUOTE_ARG(x) /* Quote argument, after cpp */ + /* Paranoid settings. Define I_AM_PARANOID if you are paranoid */ #ifdef I_AM_PARANOID #define DONT_ALLOW_USER_CHANGE 1 diff --git a/include/mysql_version.h.in b/include/mysql_version.h.in index 4ccc4ee1e45..c15318424b1 100644 --- a/include/mysql_version.h.in +++ b/include/mysql_version.h.in @@ -11,9 +11,7 @@ #define PROTOCOL_VERSION @PROTOCOL_VERSION@ #define MYSQL_SERVER_VERSION "@VERSION@" #define MYSQL_BASE_VERSION "mysqld-@MYSQL_BASE_VERSION@" -#ifndef MYSQL_SERVER_SUFFIX -#define MYSQL_SERVER_SUFFIX "@MYSQL_SERVER_SUFFIX@" -#endif +#define MYSQL_SERVER_SUFFIX_DEF "@MYSQL_SERVER_SUFFIX@" #define FRM_VER @DOT_FRM_VERSION@ #define MYSQL_VERSION_ID @MYSQL_VERSION_ID@ #define MYSQL_PORT @MYSQL_TCP_PORT@ @@ -28,11 +26,7 @@ #endif /* _CUSTOMCONFIG_ */ #ifndef LICENSE -#ifdef MYSQL_COMMERICAL_LICENSE -#define LICENSE "Commerical" -#else -#define LICENSE "GPL" -#endif +#define LICENSE GPL #endif /* LICENSE */ #endif /* _mysql_version_h */ diff --git a/innobase/eval/eval0eval.c b/innobase/eval/eval0eval.c index a3cd60b86ae..ebb6cb1b7d9 100644 --- a/innobase/eval/eval0eval.c +++ b/innobase/eval/eval0eval.c @@ -725,7 +725,7 @@ eval_predefined( uint_val = (ulint) int_val; } for (tmp = int_len; uint_val > 0; uint_val /= 10) { - data[--tmp] = '0' + (byte)(uint_val % 10); + data[--tmp] = (byte) ('0' + (byte)(uint_val % 10)); } } diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 6a4189b6b18..dba9c83b339 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -1631,7 +1631,7 @@ static int check_license(MYSQL *mysql) MYSQL_RES *res; NET *net= &mysql->net; static const char query[]= "SELECT @@license"; - static const char required_license[]= LICENSE; + static const char required_license[]= STRINGIFY_ARG(LICENSE); if (mysql_real_query(mysql, query, sizeof(query)-1)) { diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 35a665cb54a..6b4e0aba455 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -4937,12 +4937,12 @@ static void get_options(int argc,char **argv) static void set_server_version(void) { char *end= strxmov(server_version, MYSQL_SERVER_VERSION, - MYSQL_SERVER_SUFFIX, NullS); + MYSQL_SERVER_SUFFIX_STR, NullS); #ifdef EMBEDDED_LIBRARY end= strmov(end, "-embedded"); #endif #ifndef DBUG_OFF - if (!strstr(MYSQL_SERVER_SUFFIX, "-debug")) + if (!strstr(MYSQL_SERVER_SUFFIX_STR, "-debug")) end= strmov(end, "-debug"); #endif if (opt_log || opt_update_log || opt_slow_log || opt_bin_log) diff --git a/sql/mysqld_suffix.h b/sql/mysqld_suffix.h index 502cdeed75f..405c5d855b7 100644 --- a/sql/mysqld_suffix.h +++ b/sql/mysqld_suffix.h @@ -15,24 +15,13 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* - Set MYSQL_SERVER_SUFFIX - The following code is quite ugly as there is no portable way to set a + Set MYSQL_SERVER_SUFFIX_STR + The following code is quite ugly as there is no portable way to easily set a string to the value of a macro */ -#if defined(MYSQL_SERVER_SUFFIX_NT) -#undef MYSQL_SERVER_SUFFIX -#define MYSQL_SERVER_SUFFIX "-nt" -#elif defined(MYSQL_SERVER_SUFFIX_MAX) -#undef MYSQL_SERVER_SUFFIX -#define MYSQL_SERVER_SUFFIX "-max" -#elif defined(MYSQL_SERVER_SUFFIX_NT_MAX) -#undef MYSQL_SERVER_SUFFIX -#define MYSQL_SERVER_SUFFIX "-nt-max" -#elif defined(MYSQL_SERVER_SUFFIX_PRO) -#undef MYSQL_SERVER_SUFFIX -#define MYSQL_SERVER_SUFFIX "-pro" -#elif defined(MYSQL_SERVER_SUFFIX_PRO_NT) -#undef MYSQL_SERVER_SUFFIX -#define MYSQL_SERVER_SUFFIX "-pro-nt" +#ifdef MYSQL_SERVER_SUFFIX +#define MYSQL_SERVER_SUFFIX_STR STRINGIFY_ARG(MYSQL_SERVER_SUFFIX) +#else +#define MYSQL_SERVER_SUFFIX_STR MYSQL_SERVER_SUFFIX_DEF #endif diff --git a/sql/set_var.cc b/sql/set_var.cc index fb3645183ca..525da26a5ac 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -340,7 +340,7 @@ static sys_var_thd_ulong sys_default_week_format("default_week_format", sys_var_const_str sys_os("version_compile_os", SYSTEM_TYPE); /* Global read-only variable describing server license */ -sys_var_const_str sys_license("license", LICENSE); +sys_var_const_str sys_license("license", STRINGIFY_ARG(LICENSE)); /* diff --git a/zlib/contrib/asm386/zlibvc.dsp b/zlib/contrib/asm386/zlibvc.dsp index a70d4d4a6b0..63d8fee6511 100644 --- a/zlib/contrib/asm386/zlibvc.dsp +++ b/zlib/contrib/asm386/zlibvc.dsp @@ -8,16 +8,16 @@ CFG=zlibvc - Win32 Release !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run -!MESSAGE +!MESSAGE !MESSAGE NMAKE /f "zlibvc.mak". -!MESSAGE +!MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE +!MESSAGE !MESSAGE NMAKE /f "zlibvc.mak" CFG="zlibvc - Win32 Release" -!MESSAGE +!MESSAGE !MESSAGE Possible choices for configuration are: -!MESSAGE +!MESSAGE !MESSAGE "zlibvc - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "zlibvc - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "zlibvc - Win32 ReleaseAxp" (based on\ @@ -26,7 +26,7 @@ CFG=zlibvc - Win32 Release "Win32 (x86) Dynamic-Link Library") !MESSAGE "zlibvc - Win32 ReleaseWithoutCrtdll" (based on\ "Win32 (x86) Dynamic-Link Library") -!MESSAGE +!MESSAGE # Begin Project # PROP Scc_ProjName "" @@ -191,7 +191,7 @@ LINK32=link.exe # ADD LINK32 gvmat32.obj kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib crtdll.lib /nologo /subsystem:windows /dll /map /machine:I386 /nodefaultlib /out:".\zlibvc_1\zlib.dll" # SUBTRACT LINK32 /pdb:none -!ENDIF +!ENDIF # Begin Target @@ -216,13 +216,13 @@ SOURCE=.\adler32.c DEP_CPP_ADLER=\ ".\zconf.h"\ ".\zlib.h"\ - + !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutAsm" !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutCrtdll" -!ENDIF +!ENDIF # End Source File # Begin Source File @@ -238,13 +238,13 @@ SOURCE=.\compress.c DEP_CPP_COMPR=\ ".\zconf.h"\ ".\zlib.h"\ - + !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutAsm" !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutCrtdll" -!ENDIF +!ENDIF # End Source File # Begin Source File @@ -260,13 +260,13 @@ SOURCE=.\crc32.c DEP_CPP_CRC32=\ ".\zconf.h"\ ".\zlib.h"\ - + !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutAsm" !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutCrtdll" -!ENDIF +!ENDIF # End Source File # Begin Source File @@ -284,13 +284,13 @@ DEP_CPP_DEFLA=\ ".\zconf.h"\ ".\zlib.h"\ ".\zutil.h"\ - + !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutAsm" !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutCrtdll" -!ENDIF +!ENDIF # End Source File # Begin Source File @@ -307,7 +307,7 @@ SOURCE=.\gvmat32c.c !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutCrtdll" -!ENDIF +!ENDIF # End Source File # Begin Source File @@ -324,13 +324,13 @@ DEP_CPP_GZIO_=\ ".\zconf.h"\ ".\zlib.h"\ ".\zutil.h"\ - + !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutAsm" !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutCrtdll" -!ENDIF +!ENDIF # End Source File # Begin Source File @@ -351,13 +351,13 @@ DEP_CPP_INFBL=\ ".\zconf.h"\ ".\zlib.h"\ ".\zutil.h"\ - + !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutAsm" !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutCrtdll" -!ENDIF +!ENDIF # End Source File # Begin Source File @@ -379,13 +379,13 @@ DEP_CPP_INFCO=\ ".\zconf.h"\ ".\zlib.h"\ ".\zutil.h"\ - + !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutAsm" !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutCrtdll" -!ENDIF +!ENDIF # End Source File # Begin Source File @@ -407,13 +407,13 @@ DEP_CPP_INFFA=\ ".\zconf.h"\ ".\zlib.h"\ ".\zutil.h"\ - + !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutAsm" !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutCrtdll" -!ENDIF +!ENDIF # End Source File # Begin Source File @@ -431,13 +431,13 @@ DEP_CPP_INFLA=\ ".\zconf.h"\ ".\zlib.h"\ ".\zutil.h"\ - + !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutAsm" !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutCrtdll" -!ENDIF +!ENDIF # End Source File # Begin Source File @@ -455,13 +455,13 @@ DEP_CPP_INFTR=\ ".\zconf.h"\ ".\zlib.h"\ ".\zutil.h"\ - + !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutAsm" !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutCrtdll" -!ENDIF +!ENDIF # End Source File # Begin Source File @@ -482,13 +482,13 @@ DEP_CPP_INFUT=\ ".\zconf.h"\ ".\zlib.h"\ ".\zutil.h"\ - + !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutAsm" !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutCrtdll" -!ENDIF +!ENDIF # End Source File # Begin Source File @@ -506,13 +506,13 @@ DEP_CPP_TREES=\ ".\zconf.h"\ ".\zlib.h"\ ".\zutil.h"\ - + !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutAsm" !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutCrtdll" -!ENDIF +!ENDIF # End Source File # Begin Source File @@ -528,13 +528,13 @@ SOURCE=.\uncompr.c DEP_CPP_UNCOM=\ ".\zconf.h"\ ".\zlib.h"\ - + !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutAsm" !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutCrtdll" -!ENDIF +!ENDIF # End Source File # Begin Source File @@ -551,7 +551,7 @@ SOURCE=.\unzip.c !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutCrtdll" -!ENDIF +!ENDIF # End Source File # Begin Source File @@ -568,7 +568,7 @@ SOURCE=.\zip.c !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutCrtdll" -!ENDIF +!ENDIF # End Source File # Begin Source File @@ -593,13 +593,13 @@ DEP_CPP_ZUTIL=\ ".\zconf.h"\ ".\zlib.h"\ ".\zutil.h"\ - + !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutAsm" !ELSEIF "$(CFG)" == "zlibvc - Win32 ReleaseWithoutCrtdll" -!ENDIF +!ENDIF # End Source File # End Group From 8a1a99301fdc649b9b497966332c072d17c816f2 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 25 May 2004 02:49:43 +0300 Subject: [PATCH 02/38] Fixed typo --- VC++Files/client/mysql.dsp | 2 +- VC++Files/client/mysqladmin.dsp | 2 +- VC++Files/client/mysqldump.dsp | 2 +- VC++Files/client/mysqlimport.dsp | 2 +- VC++Files/client/mysqlshow.dsp | 2 +- VC++Files/isamchk/isamchk.dsp | 2 +- VC++Files/libmysqld/libmysqld.dsp | 2 +- VC++Files/my_print_defaults/my_print_defaults.dsp | 2 +- VC++Files/myisamchk/myisamchk.dsp | 2 +- VC++Files/myisamlog/myisamlog.dsp | 2 +- VC++Files/myisampack/myisampack.dsp | 2 +- VC++Files/mysqlbinlog/mysqlbinlog.dsp | 2 +- VC++Files/mysqlcheck/mysqlcheck.dsp | 2 +- VC++Files/pack_isam/pack_isam.dsp | 2 +- VC++Files/perror/perror.dsp | 2 +- VC++Files/replace/replace.dsp | 2 +- VC++Files/sql/mysqld.dsp | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/VC++Files/client/mysql.dsp b/VC++Files/client/mysql.dsp index 16f2bbd3499..8c1cc396fe7 100644 --- a/VC++Files/client/mysql.dsp +++ b/VC++Files/client/mysql.dsp @@ -96,7 +96,7 @@ LINK32=xilink6.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /WX /O2 /I "../include" /I "../" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "NDEBUG" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /WX /O2 /I "../include" /I "../" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c +# ADD CPP /nologo /G6 /MT /W3 /WX /O2 /I "../include" /I "../" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commercial /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" diff --git a/VC++Files/client/mysqladmin.dsp b/VC++Files/client/mysqladmin.dsp index a5466a98bf8..a7e4404e253 100644 --- a/VC++Files/client/mysqladmin.dsp +++ b/VC++Files/client/mysqladmin.dsp @@ -95,7 +95,7 @@ LINK32=xilink6.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "NDEBUG" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commercial /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" diff --git a/VC++Files/client/mysqldump.dsp b/VC++Files/client/mysqldump.dsp index 35c8d3a149c..a1ebdfe11a6 100644 --- a/VC++Files/client/mysqldump.dsp +++ b/VC++Files/client/mysqldump.dsp @@ -95,7 +95,7 @@ LINK32=xilink6.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "NDEBUG" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commercial /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" diff --git a/VC++Files/client/mysqlimport.dsp b/VC++Files/client/mysqlimport.dsp index 77bf90123bf..d5fd8557397 100644 --- a/VC++Files/client/mysqlimport.dsp +++ b/VC++Files/client/mysqlimport.dsp @@ -96,7 +96,7 @@ LINK32=xilink6.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "NDEBUG" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commercial /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" diff --git a/VC++Files/client/mysqlshow.dsp b/VC++Files/client/mysqlshow.dsp index 1c6d210ca71..b9fd0d27e46 100644 --- a/VC++Files/client/mysqlshow.dsp +++ b/VC++Files/client/mysqlshow.dsp @@ -95,7 +95,7 @@ LINK32=xilink6.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "NDEBUG" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commercial /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" diff --git a/VC++Files/isamchk/isamchk.dsp b/VC++Files/isamchk/isamchk.dsp index 71a49bb3d27..2026be94ea0 100644 --- a/VC++Files/isamchk/isamchk.dsp +++ b/VC++Files/isamchk/isamchk.dsp @@ -97,7 +97,7 @@ LINK32=xilink6.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../isam" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "NDEBUG" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../isam" /D "_CONSOLE" /D "_WINDOWS" /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /D LICENSE=Commerical /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../isam" /D "_CONSOLE" /D "_WINDOWS" /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /D LICENSE=Commercial /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x41d /d "NDEBUG" # ADD RSC /l 0x41d /d "NDEBUG" diff --git a/VC++Files/libmysqld/libmysqld.dsp b/VC++Files/libmysqld/libmysqld.dsp index 37a4518f258..5f8f810c3f6 100644 --- a/VC++Files/libmysqld/libmysqld.dsp +++ b/VC++Files/libmysqld/libmysqld.dsp @@ -100,7 +100,7 @@ LINK32=xilink6.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "DBUG_OFF" /D "USE_TLS" /D "__WIN__" /D "NDEBUG" /FR /FD /c -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /D "WIN32" /D "_WINDOWS" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "USE_TLS" /D "__WIN__" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FR /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /D "WIN32" /D "_WINDOWS" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "USE_TLS" /D "__WIN__" /D LICENSE=Commercial /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FR /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x416 /d "NDEBUG" diff --git a/VC++Files/my_print_defaults/my_print_defaults.dsp b/VC++Files/my_print_defaults/my_print_defaults.dsp index cc557deed2e..48a75ef7267 100644 --- a/VC++Files/my_print_defaults/my_print_defaults.dsp +++ b/VC++Files/my_print_defaults/my_print_defaults.dsp @@ -92,7 +92,7 @@ LINK32=xilink6.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../include" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "NDEBUG" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "../include" /D "WIN32" /D "_CONSOLE" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "../include" /D "WIN32" /D "_CONSOLE" /D LICENSE=Commercial /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /YX /FD /c # ADD BASE RSC /l 0x416 /d "NDEBUG" # ADD RSC /l 0x416 /d "NDEBUG" BSC32=bscmake.exe diff --git a/VC++Files/myisamchk/myisamchk.dsp b/VC++Files/myisamchk/myisamchk.dsp index 0dc435b52e5..9152cf43ad1 100644 --- a/VC++Files/myisamchk/myisamchk.dsp +++ b/VC++Files/myisamchk/myisamchk.dsp @@ -95,7 +95,7 @@ LINK32=xilink6.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../myisam" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "NDEBUG" /FR /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../myisam" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FR /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../myisam" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commercial /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FR /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" diff --git a/VC++Files/myisamlog/myisamlog.dsp b/VC++Files/myisamlog/myisamlog.dsp index 99c480ce750..679720b3f8e 100644 --- a/VC++Files/myisamlog/myisamlog.dsp +++ b/VC++Files/myisamlog/myisamlog.dsp @@ -95,7 +95,7 @@ LINK32=xilink6.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../myisam" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "NDEBUG" /FR /FD /c -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../myisam" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FR /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../myisam" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commercial /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FR /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe diff --git a/VC++Files/myisampack/myisampack.dsp b/VC++Files/myisampack/myisampack.dsp index c0c9c17fbf2..094aafa264a 100644 --- a/VC++Files/myisampack/myisampack.dsp +++ b/VC++Files/myisampack/myisampack.dsp @@ -93,7 +93,7 @@ LINK32=xilink6.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../myisam" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "NDEBUG" /FR /FD /c -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../myisam" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FR /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../myisam" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commercial /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FR /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe diff --git a/VC++Files/mysqlbinlog/mysqlbinlog.dsp b/VC++Files/mysqlbinlog/mysqlbinlog.dsp index 331382ab133..324b762a2f2 100644 --- a/VC++Files/mysqlbinlog/mysqlbinlog.dsp +++ b/VC++Files/mysqlbinlog/mysqlbinlog.dsp @@ -93,7 +93,7 @@ LINK32=xilink6.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /I "../sql" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "MYSQL_SERVER" /D "NDEBUG" /FD /c -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /I "../sql" /D "MYSQL_SERVER" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /I "../sql" /D "MYSQL_SERVER" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commercial /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe diff --git a/VC++Files/mysqlcheck/mysqlcheck.dsp b/VC++Files/mysqlcheck/mysqlcheck.dsp index 121da0bd468..bd24a14128d 100644 --- a/VC++Files/mysqlcheck/mysqlcheck.dsp +++ b/VC++Files/mysqlcheck/mysqlcheck.dsp @@ -92,7 +92,7 @@ LINK32=xilink6.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "MYSQL_SERVER" /D "NDEBUG" /FD /c -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "MYSQL_SERVER" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "MYSQL_SERVER" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commercial /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe diff --git a/VC++Files/pack_isam/pack_isam.dsp b/VC++Files/pack_isam/pack_isam.dsp index 149ceb3d675..f5f8f0bcd7a 100644 --- a/VC++Files/pack_isam/pack_isam.dsp +++ b/VC++Files/pack_isam/pack_isam.dsp @@ -93,7 +93,7 @@ LINK32=xilink6.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../isam" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "NDEBUG" /FD /c -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../isam" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../isam" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commercial /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe diff --git a/VC++Files/perror/perror.dsp b/VC++Files/perror/perror.dsp index c1c7ac06267..daa6a4dc4ce 100644 --- a/VC++Files/perror/perror.dsp +++ b/VC++Files/perror/perror.dsp @@ -102,7 +102,7 @@ LINK32=xilink6.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "NDEBUG" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /D "WIN32" /D "_WINDOWS" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /D "WIN32" /D "_WINDOWS" /D LICENSE=Commercial /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c # SUBTRACT CPP /YX # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 diff --git a/VC++Files/replace/replace.dsp b/VC++Files/replace/replace.dsp index bc19e074fd0..6df0f793d92 100644 --- a/VC++Files/replace/replace.dsp +++ b/VC++Files/replace/replace.dsp @@ -96,7 +96,7 @@ LINK32=xilink6.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "NDEBUG" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commerical /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /D "_CONSOLE" /D "_WINDOWS" /D LICENSE=Commercial /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x40b /d "NDEBUG" # ADD RSC /l 0x40b /d "NDEBUG" diff --git a/VC++Files/sql/mysqld.dsp b/VC++Files/sql/mysqld.dsp index 4f437ada611..c1e87f6932e 100644 --- a/VC++Files/sql/mysqld.dsp +++ b/VC++Files/sql/mysqld.dsp @@ -187,7 +187,7 @@ LINK32=xilink6.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../zlib" /D "DBUG_OFF" /D "HAVE_INNOBASE_DB" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "USE_SYMDIR" /D "HAVE_DLOPEN" /D "NDEBUG" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../zlib" /D LICENSE=Commerical /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "HAVE_DLOPEN" /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../zlib" /D LICENSE=Commercial /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "HAVE_DLOPEN" /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe From 48e39bf299da671a4c0b951790a2e0f1afe24022 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 25 May 2004 13:17:33 +0300 Subject: [PATCH 03/38] fixed typos --- VC++Files/libmysqld/libmysqld.dsp | 2 +- VC++Files/mysqldemb/mysqldemb.dsp | 4 ++-- VC++Files/sql/mysqld.dsp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/VC++Files/libmysqld/libmysqld.dsp b/VC++Files/libmysqld/libmysqld.dsp index 5f8f810c3f6..47445fc05bf 100644 --- a/VC++Files/libmysqld/libmysqld.dsp +++ b/VC++Files/libmysqld/libmysqld.dsp @@ -129,7 +129,7 @@ LINK32=xilink6.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "HAVE_INNOBASE_DB" /D "DBUG_OFF" /D "USE_TLS" /D "__WIN__" /D "NDEBUG" /FR /FD /c -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /D "WIN32" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "EMBEDDED_LIBRARY" /D "USE_TLS" /D "__WIN__" /D "MYSQL_SERVER" /D LICENCE=Commercial /D "_MBCS" /D "HAVE_DLOPEN" /D "HAVE_INNOBASE_DB" /D "DBUG_OFF" /D "NDEBUG" /D "_WINDOWS" /D "_CONSOLE" /FR /FD /D MYSQL_SEVER_SUFFIX=-pro /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /D "WIN32" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "EMBEDDED_LIBRARY" /D "USE_TLS" /D "__WIN__" /D "MYSQL_SERVER" /D LICENSE=Commercial /D "_MBCS" /D "HAVE_DLOPEN" /D "HAVE_INNOBASE_DB" /D "DBUG_OFF" /D "NDEBUG" /D "_WINDOWS" /D "_CONSOLE" /FR /FD /D MYSQL_SERVER_SUFFIX=-pro /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x416 /d "NDEBUG" diff --git a/VC++Files/mysqldemb/mysqldemb.dsp b/VC++Files/mysqldemb/mysqldemb.dsp index 506aabdab3a..063aa18f6fb 100644 --- a/VC++Files/mysqldemb/mysqldemb.dsp +++ b/VC++Files/mysqldemb/mysqldemb.dsp @@ -92,7 +92,7 @@ LIB32=xilink6.exe -lib # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /D "WIN32" /D "_MBCS" /D "_LIB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "MYSQL_SERVER" /D "HAVE_INNOBASE_DB" /D "DBUG_OFF" /D "USE_TLS" /D "__WIN__" /D "NDEBUG" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /D "WIN32" /D "_LIB" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "MYSQL_SERVER" /D "HAVE_INNOBASE_DB" /D "USE_TLS" /D "__WIN__" /D LICENCE=Commercial /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c +# ADD CPP /nologo /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /D "WIN32" /D "_LIB" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "MYSQL_SERVER" /D "HAVE_INNOBASE_DB" /D "USE_TLS" /D "__WIN__" /D LICENSE=Commercial /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x416 /d "NDEBUG" # ADD RSC /l 0x416 /d "NDEBUG" @@ -117,7 +117,7 @@ LIB32=xilink6.exe -lib # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /D "WIN32" /D "_MBCS" /D "_LIB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "MYSQL_SERVER" /D "HAVE_INNOBASE_DB" /D "DBUG_OFF" /D "USE_TLS" /D "__WIN__" /D "NDEBUG" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /D "WIN32" /D "_LIB" /D "SIGNAL_WITH_VIO_CLOSE" /D "EMBEDDED_LIBRARY" /D "USE_TLS" /D "__WIN__" /D "USE_SYMDIR" /D "MYSQL_SERVER" /D LICENCE=Commercial /D "_MBCS" /D "HAVE_DLOPEN" /D "HAVE_INNOBASE_DB" /D "DBUG_OFF" /D "NDEBUG" /D "_WINDOWS" /D "_CONSOLE" /FD /D MYSQL_SEVER_SUFFIX=-pro /c +# ADD CPP /nologo /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /D "WIN32" /D "_LIB" /D "SIGNAL_WITH_VIO_CLOSE" /D "EMBEDDED_LIBRARY" /D "USE_TLS" /D "__WIN__" /D "USE_SYMDIR" /D "MYSQL_SERVER" /D LICENSE=Commercial /D "_MBCS" /D "HAVE_DLOPEN" /D "HAVE_INNOBASE_DB" /D "DBUG_OFF" /D "NDEBUG" /D "_WINDOWS" /D "_CONSOLE" /FD /D MYSQL_SERVER_SUFFIX=-pro /c # ADD BASE RSC /l 0x416 /d "NDEBUG" # ADD RSC /l 0x416 /d "NDEBUG" BSC32=bscmake.exe diff --git a/VC++Files/sql/mysqld.dsp b/VC++Files/sql/mysqld.dsp index c1e87f6932e..00676acc3a9 100644 --- a/VC++Files/sql/mysqld.dsp +++ b/VC++Files/sql/mysqld.dsp @@ -215,7 +215,7 @@ LINK32=xilink6.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../zlib" /D "DBUG_OFF" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "USE_SYMDIR" /D "HAVE_DLOPEN" /D "NDEBUG" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../zlib" /D "MYSQL_SERVER" /D LICENCE=Commercial /D "_MBCS" /D "HAVE_DLOPEN" /D "HAVE_INNOBASE_DB" /D "DBUG_OFF" /D "NDEBUG" /D "_WINDOWS" /D "_CONSOLE" /FD /D MYSQL_SERVER_SUFFIX=-pro /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../zlib" /D "MYSQL_SERVER" /D LICENSE=Commercial /D "_MBCS" /D "HAVE_DLOPEN" /D "HAVE_INNOBASE_DB" /D "DBUG_OFF" /D "NDEBUG" /D "_WINDOWS" /D "_CONSOLE" /FD /D MYSQL_SERVER_SUFFIX=-pro /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe @@ -272,7 +272,7 @@ LINK32=xilink6.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../zlib" /D "DBUG_OFF" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "USE_SYMDIR" /D "HAVE_DLOPEN" /D "NDEBUG" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../zlib" /D "__NT__" /D "DBUG_OFF" /D "HAVE_INNOBASE_DB" /D LICENCE=Commercial /D "NDEBUG" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "HAVE_DLOPEN" /FD /D MYSQL_SERVER_SUFFIX=-pro-nt +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../zlib" /D "__NT__" /D "DBUG_OFF" /D "HAVE_INNOBASE_DB" /D LICENSE=Commercial /D "NDEBUG" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "HAVE_DLOPEN" /FD /D MYSQL_SERVER_SUFFIX=-pro-nt # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe From b7e8f418c25d087db79a925d41718abfd1073b45 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 25 May 2004 13:26:24 +0300 Subject: [PATCH 04/38] Removed references to BDB and InnoDB from 'classic' release VC++Files/mysqldemb/mysqldemb.dsp: Removed references to BDB and InnoDB from 'classic' VC++Files/sql/mysqld.dsp: Removed references to BDB and InnoDB from 'classic' --- VC++Files/mysqldemb/mysqldemb.dsp | 4 ++-- VC++Files/sql/mysqld.dsp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/VC++Files/mysqldemb/mysqldemb.dsp b/VC++Files/mysqldemb/mysqldemb.dsp index 063aa18f6fb..85b9c6ad116 100644 --- a/VC++Files/mysqldemb/mysqldemb.dsp +++ b/VC++Files/mysqldemb/mysqldemb.dsp @@ -90,9 +90,9 @@ LIB32=xilink6.exe -lib # PROP Output_Dir "classic" # PROP Intermediate_Dir "classic" # PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /D "WIN32" /D "_MBCS" /D "_LIB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "MYSQL_SERVER" /D "HAVE_INNOBASE_DB" /D "DBUG_OFF" /D "USE_TLS" /D "__WIN__" /D "NDEBUG" /FD /c +# ADD BASE CPP /nologo /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /D "WIN32" /D "_MBCS" /D "_LIB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "MYSQL_SERVER" /D "DBUG_OFF" /D "USE_TLS" /D "__WIN__" /D "NDEBUG" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /D "WIN32" /D "_LIB" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "MYSQL_SERVER" /D "HAVE_INNOBASE_DB" /D "USE_TLS" /D "__WIN__" /D LICENSE=Commercial /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c +# ADD CPP /nologo /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /D "WIN32" /D "_LIB" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "MYSQL_SERVER" /D "USE_TLS" /D "__WIN__" /D LICENSE=Commercial /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x416 /d "NDEBUG" # ADD RSC /l 0x416 /d "NDEBUG" diff --git a/VC++Files/sql/mysqld.dsp b/VC++Files/sql/mysqld.dsp index 00676acc3a9..767276a91fd 100644 --- a/VC++Files/sql/mysqld.dsp +++ b/VC++Files/sql/mysqld.dsp @@ -185,7 +185,7 @@ LINK32=xilink6.exe # PROP Intermediate_Dir "classic" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../zlib" /D "DBUG_OFF" /D "HAVE_INNOBASE_DB" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "USE_SYMDIR" /D "HAVE_DLOPEN" /D "NDEBUG" /FD /c +# ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../zlib" /D "DBUG_OFF" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "USE_SYMDIR" /D "HAVE_DLOPEN" /D "NDEBUG" /FD /c # SUBTRACT BASE CPP /YX # ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../zlib" /D LICENSE=Commercial /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "HAVE_DLOPEN" /D "DBUG_OFF" /D "_MBCS" /D "NDEBUG" /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" @@ -196,7 +196,7 @@ BSC32=bscmake.exe LINK32=xilink6.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 Wsock32.lib ..\lib_release\vio.lib ..\lib_release\isam.lib ..\lib_release\merge.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"../client_release/mysqld-opt.exe" # SUBTRACT BASE LINK32 /debug -# 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 Wsock32.lib ..\lib_release\vio.lib ..\lib_release\isam.lib ..\lib_release\merge.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\innodb.lib ..\lib_release\zlib.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"../client_classic/mysqld.exe" /libpath:"..\lib_release" +# 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 Wsock32.lib ..\lib_release\vio.lib ..\lib_release\isam.lib ..\lib_release\merge.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\zlib.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"../client_classic/mysqld.exe" /libpath:"..\lib_release" # SUBTRACT LINK32 /debug !ELSEIF "$(CFG)" == "mysqld - Win32 pro" @@ -253,7 +253,7 @@ BSC32=bscmake.exe LINK32=xilink6.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 Wsock32.lib ..\lib_release\vio.lib ..\lib_release\isam.lib ..\lib_release\merge.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"../client_classic/mysqld-opt.exe" # SUBTRACT BASE LINK32 /debug -# 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 Wsock32.lib ..\lib_release\vio.lib ..\lib_release\isam.lib ..\lib_release\merge.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\innodb.lib ..\lib_release\zlib.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"../client_classic/mysqld-nt.exe" /libpath:"..\lib_release" +# 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 Wsock32.lib ..\lib_release\vio.lib ..\lib_release\isam.lib ..\lib_release\merge.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\zlib.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"../client_classic/mysqld-nt.exe" /libpath:"..\lib_release" # SUBTRACT LINK32 /debug !ELSEIF "$(CFG)" == "mysqld - Win32 pro nt" From 137af9003dc23bfdab76d64d114ad81dda7682ae Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 25 May 2004 15:53:29 +0300 Subject: [PATCH 05/38] Fixed VC++ project files VC++Files/copy_mysql_files.bat: Added /Y to avoid questions Fixed wrong path for copying data files VC++Files/sql/mysqld.dsp: Added missing compiler option --- VC++Files/copy_mysql_files.bat | 12 ++++++------ VC++Files/sql/mysqld.dsp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/VC++Files/copy_mysql_files.bat b/VC++Files/copy_mysql_files.bat index 8f5789b9dfd..2857fabc312 100644 --- a/VC++Files/copy_mysql_files.bat +++ b/VC++Files/copy_mysql_files.bat @@ -68,13 +68,13 @@ copy libmysqltest\release\myTest.exe c:\mysql\examples\libmysqltest REM Copy share, docs etc -xcopy share\*.* c:\mysql\share /E -xcopy scripts\*.* c:\mysql\scripts /E -xcopy docs\*.* c:\mysql\docs /E -xcopy docs\readme c:\mysql\ -xcopy sql-bench\*.* c:\mysql\bench /E +xcopy share\*.* c:\mysql\share /E /Y +xcopy scripts\*.* c:\mysql\scripts /E /Y +xcopy docs\*.* c:\mysql\docs /E /Y +xcopy sql-bench\*.* c:\mysql\bench /E /Y +copy docs\readme c:\mysql\ REM Copy privilege tables (Delete old ones as they may be from a newer version) del c:\mysql\data\mysql\*.* /Q -copy data\*.* c:\mysql\data +xcopy data\mysql\*.* c:\mysql\data\mysql /E /Y diff --git a/VC++Files/sql/mysqld.dsp b/VC++Files/sql/mysqld.dsp index 767276a91fd..6045188b29a 100644 --- a/VC++Files/sql/mysqld.dsp +++ b/VC++Files/sql/mysqld.dsp @@ -243,7 +243,7 @@ LINK32=xilink6.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../zlib" /D "DBUG_OFF" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "USE_SYMDIR" /D "HAVE_DLOPEN" /D "NDEBUG" /FD /c # SUBTRACT BASE CPP /YX -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../zlib" /D "__NT__" /D "DBUG_OFF" /D "NDEBUG" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "HAVE_DLOPEN" /FD /D MYSQL_SERVER_SUFFIX=-nt /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../regex" /I "../zlib" /D "__NT__" /D "DBUG_OFF" /D "NDEBUG" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "HAVE_DLOPEN" /FD /D LICENSE=Commercial /D MYSQL_SERVER_SUFFIX=-nt /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" From b2882fd4f5401fdc9a1aab57de758848e9831f2e Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 25 May 2004 20:12:09 +0300 Subject: [PATCH 06/38] InnoDB cleanup and possible bug-fix: Remove srv0que BitKeeper/deleted/.del-srv0que.c~d1feebb77b5a9b96: Delete: innobase/srv/srv0que.c innobase/srv/Makefile.am: Remove srv0que.c BitKeeper/deleted/.del-srv0que.h~f12ecb4b5afe203e: Delete: innobase/include/srv0que.h innobase/include/Makefile.am: Remove srv0que.c innobase/include/que0que.h: Remove unnecessary function que_fork_error_handle() que_thr_end_wait(): Remove output parameter next_thr; return it innobase/include/trx0roll.h: trx_rollback(), trx_finish_rollback_off_kernel(): Remove output parameter next_thr; return it instead innobase/include/trx0trx.h: trx_sig_send(), trx_sig_reply(), trx_sig_start_handle(): Remove output parameter next_thr; return it instead innobase/include/usr0sess.h: Remove sess->state and its literals SESS_ACTIVE and SESS_ERROR innobase/que/que0que.c: Remove unnecessary function que_fork_error_handle() que_thr_end_wait(): Remove output parameter next_thr; return it Remove references to srv0que.c innobase/srv/srv0srv.c: Remove unnecessary #include "srv0que.h" innobase/trx/trx0purge.c: Remove unneeded references to srv0que.c innobase/trx/trx0roll.c: Many functions: Remove output parameter next_thr; return it instead Remove references to srv0que.c innobase/trx/trx0trx.c: Many functions: Remove output parameter next_thr; return it instead Remove references to srv0que.c Remove references to SESS_ERROR innobase/usr/usr0sess.c: Remove sess->state --- innobase/include/Makefile.am | 2 +- innobase/include/que0que.h | 22 +---- innobase/include/srv0que.h | 53 ----------- innobase/include/trx0roll.h | 21 ++--- innobase/include/trx0trx.h | 31 ++----- innobase/include/usr0sess.h | 6 -- innobase/que/que0que.c | 109 +++++------------------ innobase/srv/Makefile.am | 2 +- innobase/srv/srv0que.c | 111 ----------------------- innobase/srv/srv0srv.c | 1 - innobase/trx/trx0purge.c | 3 - innobase/trx/trx0roll.c | 77 +++++----------- innobase/trx/trx0trx.c | 165 ++++++++--------------------------- innobase/usr/usr0sess.c | 2 - 14 files changed, 103 insertions(+), 502 deletions(-) delete mode 100644 innobase/include/srv0que.h delete mode 100644 innobase/srv/srv0que.c diff --git a/innobase/include/Makefile.am b/innobase/include/Makefile.am index 102d25566da..5ec70da97a2 100644 --- a/innobase/include/Makefile.am +++ b/innobase/include/Makefile.am @@ -43,7 +43,7 @@ noinst_HEADERS = btr0btr.h btr0btr.ic btr0cur.h btr0cur.ic \ row0purge.ic row0row.h row0row.ic row0sel.h row0sel.ic \ row0types.h row0uins.h row0uins.ic row0umod.h row0umod.ic \ row0undo.h row0undo.ic row0upd.h row0upd.ic row0vers.h \ - row0vers.ic srv0que.h srv0srv.h srv0srv.ic srv0start.h \ + row0vers.ic srv0srv.h srv0srv.ic srv0start.h \ sync0arr.h sync0arr.ic sync0rw.h \ sync0rw.ic sync0sync.h sync0sync.ic sync0types.h \ thr0loc.h thr0loc.ic trx0purge.h trx0purge.ic trx0rec.h \ diff --git a/innobase/include/que0que.h b/innobase/include/que0que.h index bcd7aed7e88..a438116781f 100644 --- a/innobase/include/que0que.h +++ b/innobase/include/que0que.h @@ -152,17 +152,6 @@ que_run_threads( /*============*/ que_thr_t* thr); /* in: query thread which is run initially */ /************************************************************************** -After signal handling is finished, returns control to a query graph error -handling routine. (Currently, just returns the control to the root of the -graph so that the graph can communicate an error message to the client.) */ - -void -que_fork_error_handle( -/*==================*/ - trx_t* trx, /* in: trx */ - que_t* fork); /* in: query graph which was run before signal - handling started, NULL not allowed */ -/************************************************************************** Handles an SQL error noticed during query thread execution. At the moment, does nothing! */ @@ -181,18 +170,15 @@ a single worker thread to execute it. This function should be used to end the wait state of a query thread waiting for a lock or a stored procedure completion. */ -void +que_thr_t* que_thr_end_wait( /*=============*/ - que_thr_t* thr, /* in: query thread in the + /* out: next query thread to run; + NULL if none */ + que_thr_t* thr); /* in: query thread in the QUE_THR_LOCK_WAIT, or QUE_THR_PROCEDURE_WAIT, or QUE_THR_SIG_REPLY_WAIT state */ - que_thr_t** next_thr); /* in/out: next query thread to run; - if the value which is passed in is - a pointer to a NULL pointer, then the - calling function can start running - a new query thread */ /************************************************************************** Same as que_thr_end_wait, but no parameter next_thr available. */ diff --git a/innobase/include/srv0que.h b/innobase/include/srv0que.h deleted file mode 100644 index 05c339cdd32..00000000000 --- a/innobase/include/srv0que.h +++ /dev/null @@ -1,53 +0,0 @@ -/****************************************************** -Server query execution - -(c) 1996 Innobase Oy - -Created 6/5/1996 Heikki Tuuri -*******************************************************/ - - -#ifndef srv0que_h -#define srv0que_h - -#include "univ.i" -#include "que0types.h" - -/************************************************************************** -Checks if there is work to do in the server task queue. If there is, the -thread starts processing a task. Before leaving, it again checks the task -queue and picks a new task if any exists. This is called by a SRV_WORKER -thread. */ - -void -srv_que_task_queue_check(void); -/*==========================*/ -/************************************************************************** -Performs round-robin on the server tasks. This is called by a SRV_WORKER -thread every second or so. */ - -que_thr_t* -srv_que_round_robin( -/*================*/ - /* out: the new (may be == thr) query thread - to run */ - que_thr_t* thr); /* in: query thread */ -/************************************************************************** -Enqueues a task to server task queue and releases a worker thread, if -there exists one suspended. */ - -void -srv_que_task_enqueue( -/*=================*/ - que_thr_t* thr); /* in: query thread */ -/************************************************************************** -Enqueues a task to server task queue and releases a worker thread, if -there exists one suspended. */ - -void -srv_que_task_enqueue_low( -/*=====================*/ - que_thr_t* thr); /* in: query thread */ - -#endif - diff --git a/innobase/include/trx0roll.h b/innobase/include/trx0roll.h index 0d7126c9c57..e9c74dc6651 100644 --- a/innobase/include/trx0roll.h +++ b/innobase/include/trx0roll.h @@ -91,16 +91,12 @@ trx_undo_rec_release( /************************************************************************* Starts a rollback operation. */ -void +que_thr_t* trx_rollback( /*=========*/ + /* out: next query thread to run */ trx_t* trx, /* in: transaction */ - trx_sig_t* sig, /* in: signal starting the rollback */ - que_thr_t** next_thr);/* in/out: next query thread to run; - if the value which is passed in is - a pointer to a NULL pointer, then the - calling function can start running - a new query thread */ + trx_sig_t* sig); /* in: signal starting the rollback */ /*********************************************************************** Rollback or clean up transactions which have no user session. If the transaction already was committed, then we clean up a possible insert @@ -112,17 +108,12 @@ trx_rollback_or_clean_all_without_sess(void); /******************************************************************** Finishes a transaction rollback. */ -void +que_thr_t* trx_finish_rollback_off_kernel( /*===========================*/ + /* out: next query thread to run */ que_t* graph, /* in: undo graph which can now be freed */ - trx_t* trx, /* in: transaction */ - que_thr_t** next_thr);/* in/out: next query thread to run; - if the value which is passed in is - a pointer to a NULL pointer, then the - calling function can start running - a new query thread; if this parameter is - NULL, it is ignored */ + trx_t* trx); /* in: transaction */ /******************************************************************** Builds an undo 'query' graph for a transaction. The actual rollback is performed by executing this query graph like a query subprocedure call. diff --git a/innobase/include/trx0trx.h b/innobase/include/trx0trx.h index 07d5e5a8215..068333778f3 100644 --- a/innobase/include/trx0trx.h +++ b/innobase/include/trx0trx.h @@ -194,9 +194,10 @@ trx_end_lock_wait( /******************************************************************** Sends a signal to a trx object. */ -ibool +que_thr_t* trx_sig_send( /*=========*/ + /* out: next query thread to run */ /* out: TRUE if the signal was successfully delivered */ trx_t* trx, /* in: trx handle */ @@ -206,27 +207,17 @@ trx_sig_send( que_thr_t* receiver_thr, /* in: query thread which wants the reply, or NULL; if type is TRX_SIG_END_WAIT, this must be NULL */ - trx_savept_t* savept, /* in: possible rollback savepoint, or + trx_savept_t* savept); /* in: possible rollback savepoint, or NULL */ - que_thr_t** next_thr); /* in/out: next query thread to run; - if the value which is passed in is - a pointer to a NULL pointer, then the - calling function can start running - a new query thread; if the parameter - is NULL, it is ignored */ /******************************************************************** Send the reply message when a signal in the queue of the trx has been handled. */ -void +que_thr_t* trx_sig_reply( /*==========*/ - trx_sig_t* sig, /* in: signal */ - que_thr_t** next_thr); /* in/out: next query thread to run; - if the value which is passed in is - a pointer to a NULL pointer, then the - calling function can start running - a new query thread */ + /* out: next query thread to run */ + trx_sig_t* sig); /* in: signal */ /******************************************************************** Removes the signal object from a trx signal queue. */ @@ -238,15 +229,11 @@ trx_sig_remove( /******************************************************************** Starts handling of a trx signal. */ -void +que_thr_t* trx_sig_start_handle( /*=================*/ - trx_t* trx, /* in: trx handle */ - que_thr_t** next_thr); /* in/out: next query thread to run; - if the value which is passed in is - a pointer to a NULL pointer, then the - calling function can start running - a new query thread */ + /* out: next query thread to run, or NULL */ + trx_t* trx); /* in: trx handle */ /******************************************************************** Ends signal handling. If the session is in the error state, and trx->graph_before_signal_handling != NULL, returns control to the error diff --git a/innobase/include/usr0sess.h b/innobase/include/usr0sess.h index c7bcfb20fed..aeff7191e68 100644 --- a/innobase/include/usr0sess.h +++ b/innobase/include/usr0sess.h @@ -38,7 +38,6 @@ sess_try_close( /* The session handle. All fields are protected by the kernel mutex */ struct sess_struct{ - ulint state; /* state of the session */ trx_t* trx; /* transaction object permanently assigned for the session: the transaction instance designated by the @@ -49,11 +48,6 @@ struct sess_struct{ session */ }; -/* Session states */ -#define SESS_ACTIVE 1 -#define SESS_ERROR 2 /* session contains an error message - which has not yet been communicated - to the client */ #ifndef UNIV_NONINL #include "usr0sess.ic" #endif diff --git a/innobase/que/que0que.c b/innobase/que/que0que.c index b90a5eb3a61..c53a31adc6f 100644 --- a/innobase/que/que0que.c +++ b/innobase/que/que0que.c @@ -12,7 +12,6 @@ Created 5/27/1996 Heikki Tuuri #include "que0que.ic" #endif -#include "srv0que.h" #include "usr0sess.h" #include "trx0trx.h" #include "trx0roll.h" @@ -175,19 +174,15 @@ a single worker thread to execute it. This function should be used to end the wait state of a query thread waiting for a lock or a stored procedure completion. */ -void +que_thr_t* que_thr_end_wait( /*=============*/ - que_thr_t* thr, /* in: query thread in the + /* out: next query thread to run; + NULL if none */ + que_thr_t* thr) /* in: query thread in the QUE_THR_LOCK_WAIT, or QUE_THR_PROCEDURE_WAIT, or QUE_THR_SIG_REPLY_WAIT state */ - que_thr_t** next_thr) /* in/out: next query thread to run; - if the value which is passed in is - a pointer to a NULL pointer, then the - calling function can start running - a new query thread; if NULL is passed - as the parameter, it is ignored */ { ibool was_active; @@ -195,6 +190,8 @@ que_thr_end_wait( ut_ad(mutex_own(&kernel_mutex)); #endif /* UNIV_SYNC_DEBUG */ ut_ad(thr); + ut_ad(next_thr); + ut_ad(*next_thr == NULL); ut_ad((thr->state == QUE_THR_LOCK_WAIT) || (thr->state == QUE_THR_PROCEDURE_WAIT) || (thr->state == QUE_THR_SIG_REPLY_WAIT)); @@ -206,17 +203,8 @@ que_thr_end_wait( que_thr_move_to_run_state(thr); - if (was_active) { - - return; - } - - if (next_thr && *next_thr == NULL) { - *next_thr = thr; - } else { - srv_que_task_enqueue_low(thr); - } -} + return(was_active ? NULL : thr); +} /************************************************************************** Same as que_thr_end_wait, but no parameter next_thr available. */ @@ -253,8 +241,6 @@ que_thr_end_wait_no_next_thr( for the lock to be released: */ srv_release_mysql_thread_if_suspended(thr); - - /* srv_que_task_enqueue_low(thr); */ } /************************************************************************** @@ -355,48 +341,6 @@ que_fork_start_command( return(NULL); } -/************************************************************************** -After signal handling is finished, returns control to a query graph error -handling routine. (Currently, just returns the control to the root of the -graph so that the graph can communicate an error message to the client.) */ - -void -que_fork_error_handle( -/*==================*/ - trx_t* trx __attribute__((unused)), /* in: trx */ - que_t* fork) /* in: query graph which was run before signal - handling started, NULL not allowed */ -{ - que_thr_t* thr; - -#ifdef UNIV_SYNC_DEBUG - ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ - ut_ad(trx->sess->state == SESS_ERROR); - ut_ad(UT_LIST_GET_LEN(trx->reply_signals) == 0); - ut_ad(UT_LIST_GET_LEN(trx->wait_thrs) == 0); - - thr = UT_LIST_GET_FIRST(fork->thrs); - - while (thr != NULL) { - ut_ad(!thr->is_active); - ut_ad(thr->state != QUE_THR_SIG_REPLY_WAIT); - ut_ad(thr->state != QUE_THR_LOCK_WAIT); - - thr->run_node = thr; - thr->prev_node = thr->child; - thr->state = QUE_THR_COMPLETED; - - thr = UT_LIST_GET_NEXT(thrs, thr); - } - - thr = UT_LIST_GET_FIRST(fork->thrs); - - que_thr_move_to_run_state(thr); - - srv_que_task_enqueue_low(thr); -} - /******************************************************************** Tests if all the query threads in the same fork have a given state. */ UNIV_INLINE @@ -765,22 +709,18 @@ this function may only be called from inside que_run_threads or que_thr_check_if_switch! These restrictions exist to make the rollback code easier to maintain. */ static -void +que_thr_t* que_thr_dec_refer_count( /*====================*/ - que_thr_t* thr, /* in: query thread */ - que_thr_t** next_thr) /* in/out: next query thread to run; - if the value which is passed in is - a pointer to a NULL pointer, then the - calling function can start running - a new query thread */ + /* out: next query thread to run */ + que_thr_t* thr) /* in: query thread */ { que_fork_t* fork; trx_t* trx; sess_t* sess; ulint fork_type; - ibool stopped; - + que_thr_t* next_thr = NULL; + fork = thr->common.parent; trx = thr->graph->trx; sess = trx->sess; @@ -791,9 +731,7 @@ que_thr_dec_refer_count( if (thr->state == QUE_THR_RUNNING) { - stopped = que_thr_stop(thr); - - if (!stopped) { + if (!que_thr_stop(thr)) { /* The reason for the thr suspension or wait was already canceled before we came here: continue running the thread */ @@ -801,15 +739,9 @@ que_thr_dec_refer_count( /* fputs("!!!!!!!! Wait already ended: continue thr\n", stderr); */ - if (next_thr && *next_thr == NULL) { - *next_thr = thr; - } else { - srv_que_task_enqueue_low(thr); - } - mutex_exit(&kernel_mutex); - return; + return(thr); } } @@ -825,7 +757,7 @@ que_thr_dec_refer_count( mutex_exit(&kernel_mutex); - return; + return(next_thr); } fork_type = fork->fork_type; @@ -841,7 +773,7 @@ que_thr_dec_refer_count( ut_ad(UT_LIST_GET_LEN(trx->signals) > 0); ut_ad(trx->handling_signals == TRUE); - trx_finish_rollback_off_kernel(fork, trx, next_thr); + next_thr = trx_finish_rollback_off_kernel(fork, trx); } else if (fork_type == QUE_FORK_PURGE) { @@ -863,7 +795,7 @@ que_thr_dec_refer_count( zero, then we start processing a signal; from it we may get a new query thread to run */ - trx_sig_start_handle(trx, next_thr); + next_thr = trx_sig_start_handle(trx); } if (trx->handling_signals && UT_LIST_GET_LEN(trx->signals) == 0) { @@ -872,6 +804,8 @@ que_thr_dec_refer_count( } mutex_exit(&kernel_mutex); + + return(next_thr); } /************************************************************************** @@ -1243,6 +1177,7 @@ loop: /*-------------------------*/ next_thr = que_thr_step(thr); /*-------------------------*/ + ut_a(next_thr == thr || next_thr == NULL); /* Test the effect on performance of adding extra mutex reservations */ @@ -1259,7 +1194,7 @@ loop: loop_count++; if (next_thr != thr) { - que_thr_dec_refer_count(thr, &next_thr); + next_thr = que_thr_dec_refer_count(thr); if (next_thr == NULL) { diff --git a/innobase/srv/Makefile.am b/innobase/srv/Makefile.am index 752683b82b8..37fd73a4bf0 100644 --- a/innobase/srv/Makefile.am +++ b/innobase/srv/Makefile.am @@ -19,6 +19,6 @@ include ../include/Makefile.i noinst_LIBRARIES = libsrv.a -libsrv_a_SOURCES = srv0srv.c srv0que.c srv0start.c +libsrv_a_SOURCES = srv0srv.c srv0start.c EXTRA_PROGRAMS = diff --git a/innobase/srv/srv0que.c b/innobase/srv/srv0que.c deleted file mode 100644 index ac8bd7d0e65..00000000000 --- a/innobase/srv/srv0que.c +++ /dev/null @@ -1,111 +0,0 @@ -/****************************************************** -Server query execution - -(c) 1996 Innobase Oy - -Created 6/5/1996 Heikki Tuuri -*******************************************************/ - -#include "srv0que.h" - -#include "srv0srv.h" -#include "sync0sync.h" -#include "os0thread.h" -#include "usr0sess.h" -#include "que0que.h" - -/************************************************************************** -Checks if there is work to do in the server task queue. If there is, the -thread starts processing a task. Before leaving, it again checks the task -queue and picks a new task if any exists. This is called by a SRV_WORKER -thread. */ - -void -srv_que_task_queue_check(void) -/*==========================*/ -{ - que_thr_t* thr; - - for (;;) { - mutex_enter(&kernel_mutex); - - thr = UT_LIST_GET_FIRST(srv_sys->tasks); - - if (thr == NULL) { - mutex_exit(&kernel_mutex); - - return; - } - - UT_LIST_REMOVE(queue, srv_sys->tasks, thr); - - mutex_exit(&kernel_mutex); - - que_run_threads(thr); - } -} - -/************************************************************************** -Performs round-robin on the server tasks. This is called by a SRV_WORKER -thread every second or so. */ - -que_thr_t* -srv_que_round_robin( -/*================*/ - /* out: the new (may be == thr) query thread - to run */ - que_thr_t* thr) /* in: query thread */ -{ - que_thr_t* new_thr; - - ut_ad(thr); - ut_ad(thr->state == QUE_THR_RUNNING); - - mutex_enter(&kernel_mutex); - - UT_LIST_ADD_LAST(queue, srv_sys->tasks, thr); - - new_thr = UT_LIST_GET_FIRST(srv_sys->tasks); - - mutex_exit(&kernel_mutex); - - return(new_thr); -} - -/************************************************************************** -Enqueues a task to server task queue and releases a worker thread, if there -is a suspended one. */ - -void -srv_que_task_enqueue_low( -/*=====================*/ - que_thr_t* thr) /* in: query thread */ -{ - ut_ad(thr); - -#ifdef UNIV_SYNC_DEBUG - ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ - - UT_LIST_ADD_LAST(queue, srv_sys->tasks, thr); - - srv_release_threads(SRV_WORKER, 1); -} - -/************************************************************************** -Enqueues a task to server task queue and releases a worker thread, if there -is a suspended one. */ - -void -srv_que_task_enqueue( -/*=================*/ - que_thr_t* thr) /* in: query thread */ -{ - ut_ad(thr); - - mutex_enter(&kernel_mutex); - - srv_que_task_enqueue_low(thr); - - mutex_exit(&kernel_mutex); -} diff --git a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c index a78bd0d864c..afc6b996b89 100644 --- a/innobase/srv/srv0srv.c +++ b/innobase/srv/srv0srv.c @@ -34,7 +34,6 @@ Created 10/8/1995 Heikki Tuuri #include "sync0sync.h" #include "thr0loc.h" #include "que0que.h" -#include "srv0que.h" #include "log0recv.h" #include "pars0pars.h" #include "usr0sess.h" diff --git a/innobase/trx/trx0purge.c b/innobase/trx/trx0purge.c index a8b6b9fcc21..9eae5c37335 100644 --- a/innobase/trx/trx0purge.c +++ b/innobase/trx/trx0purge.c @@ -23,7 +23,6 @@ Created 3/26/1996 Heikki Tuuri #include "row0purge.h" #include "row0upd.h" #include "trx0rec.h" -#include "srv0que.h" #include "os0thread.h" /* The global data structure coordinating a purge */ @@ -1060,8 +1059,6 @@ trx_purge(void) mutex_exit(&kernel_mutex); -/* srv_que_task_enqueue(thr2); */ - if (srv_print_thread_releases) { fputs("Starting purge\n", stderr); diff --git a/innobase/trx/trx0roll.c b/innobase/trx/trx0roll.c index 92a5373aabd..b53028180ef 100644 --- a/innobase/trx/trx0roll.c +++ b/innobase/trx/trx0roll.c @@ -20,7 +20,6 @@ Created 3/26/1996 Heikki Tuuri #include "trx0rec.h" #include "que0que.h" #include "usr0sess.h" -#include "srv0que.h" #include "srv0start.h" #include "row0undo.h" #include "row0mysql.h" @@ -932,21 +931,15 @@ trx_undo_rec_release( /************************************************************************* Starts a rollback operation. */ -void +que_thr_t* trx_rollback( /*=========*/ + /* out: next query thread to run */ trx_t* trx, /* in: transaction */ - trx_sig_t* sig, /* in: signal starting the rollback */ - que_thr_t** next_thr)/* in/out: next query thread to run; - if the value which is passed in is - a pointer to a NULL pointer, then the - calling function can start running - a new query thread; if the passed value is - NULL, the parameter is ignored */ + trx_sig_t* sig) /* in: signal starting the rollback */ { que_t* roll_graph; que_thr_t* thr; -/* que_thr_t* thr2; */ #ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); @@ -988,18 +981,7 @@ trx_rollback( thr = que_fork_start_command(roll_graph); ut_ad(thr); - -/* thr2 = que_fork_start_command(roll_graph); - - ut_ad(thr2); */ - - if (next_thr && (*next_thr == NULL)) { - *next_thr = thr; -/* srv_que_task_enqueue_low(thr2); */ - } else { - srv_que_task_enqueue_low(thr); -/* srv_que_task_enqueue_low(thr2); */ - } + return(thr); } /******************************************************************** @@ -1071,17 +1053,14 @@ trx_finish_error_processing( /************************************************************************* Finishes a partial rollback operation. */ static -void +que_thr_t* trx_finish_partial_rollback_off_kernel( /*===================================*/ - trx_t* trx, /* in: transaction */ - que_thr_t** next_thr)/* in/out: next query thread to run; - if the value which is passed in is a pointer - to a NULL pointer, then the calling function - can start running a new query thread; if this - parameter is NULL, it is ignored */ + /* out: next query thread to run */ + trx_t* trx) /* in: transaction */ { trx_sig_t* sig; + que_thr_t* next_thr; #ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); @@ -1092,29 +1071,26 @@ trx_finish_partial_rollback_off_kernel( /* Remove the signal from the signal queue and send reply message to it */ - trx_sig_reply(sig, next_thr); + next_thr = trx_sig_reply(sig); trx_sig_remove(trx, sig); trx->que_state = TRX_QUE_RUNNING; + return(next_thr); } /******************************************************************** Finishes a transaction rollback. */ -void +que_thr_t* trx_finish_rollback_off_kernel( /*===========================*/ + /* out: next query thread to run */ que_t* graph, /* in: undo graph which can now be freed */ - trx_t* trx, /* in: transaction */ - que_thr_t** next_thr)/* in/out: next query thread to run; - if the value which is passed in is - a pointer to a NULL pointer, then the - calling function can start running - a new query thread; if this parameter is - NULL, it is ignored */ + trx_t* trx) /* in: transaction */ { trx_sig_t* sig; trx_sig_t* next_sig; + que_thr_t* next_thr; #ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); @@ -1129,15 +1105,13 @@ trx_finish_rollback_off_kernel( if (sig->type == TRX_SIG_ROLLBACK_TO_SAVEPT) { - trx_finish_partial_rollback_off_kernel(trx, next_thr); - - return; + return(trx_finish_partial_rollback_off_kernel(trx)); } else if (sig->type == TRX_SIG_ERROR_OCCURRED) { trx_finish_error_processing(trx); - return; + return(NULL); } #ifdef UNIV_DEBUG @@ -1153,19 +1127,23 @@ trx_finish_rollback_off_kernel( send reply messages to them */ trx->que_state = TRX_QUE_RUNNING; - + + next_thr = NULL; while (sig != NULL) { next_sig = UT_LIST_GET_NEXT(signals, sig); if (sig->type == TRX_SIG_TOTAL_ROLLBACK) { - trx_sig_reply(sig, next_thr); + ut_a(next_thr == NULL); + next_thr = trx_sig_reply(sig); trx_sig_remove(trx, sig); } sig = next_sig; } + + return(next_thr); } /************************************************************************* @@ -1198,7 +1176,6 @@ trx_rollback_step( que_thr_t* thr) /* in: query thread */ { roll_node_t* node; - ibool success; ulint sig_no; trx_savept_t* savept; @@ -1225,19 +1202,13 @@ trx_rollback_step( /* Send a rollback signal to the transaction */ - success = trx_sig_send(thr_get_trx(thr), - sig_no, TRX_SIG_SELF, - thr, savept, NULL); + trx_sig_send(thr_get_trx(thr), sig_no, TRX_SIG_SELF, + thr, savept); thr->state = QUE_THR_SIG_REPLY_WAIT; mutex_exit(&kernel_mutex); - if (!success) { - /* Error in delivering the rollback signal */ - que_thr_handle_error(thr, DB_ERROR, NULL, 0); - } - return(NULL); } diff --git a/innobase/trx/trx0trx.c b/innobase/trx/trx0trx.c index 335e1f69228..54993465f26 100644 --- a/innobase/trx/trx0trx.c +++ b/innobase/trx/trx0trx.c @@ -895,18 +895,15 @@ trx_assign_read_view( /******************************************************************** Commits a transaction. NOTE that the kernel mutex is temporarily released. */ static -void +que_thr_t* trx_handle_commit_sig_off_kernel( /*=============================*/ - trx_t* trx, /* in: transaction */ - que_thr_t** next_thr) /* in/out: next query thread to run; - if the value which is passed in is - a pointer to a NULL pointer, then the - calling function can start running - a new query thread */ + /* out: next query thread to run */ + trx_t* trx) /* in: transaction */ { trx_sig_t* sig; trx_sig_t* next_sig; + que_thr_t* next_thr = NULL; #ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); @@ -928,7 +925,8 @@ trx_handle_commit_sig_off_kernel( if (sig->type == TRX_SIG_COMMIT) { - trx_sig_reply(sig, next_thr); + ut_a(next_thr == NULL); + next_thr = trx_sig_reply(sig); trx_sig_remove(trx, sig); } @@ -936,6 +934,8 @@ trx_handle_commit_sig_off_kernel( } trx->que_state = TRX_QUE_RUNNING; + + return(next_thr); } /*************************************************************** @@ -997,39 +997,6 @@ trx_lock_wait_to_suspended( trx->que_state = TRX_QUE_RUNNING; } -/*************************************************************** -Moves the query threads in the sig reply wait list of trx to the SUSPENDED -state. */ -static -void -trx_sig_reply_wait_to_suspended( -/*============================*/ - trx_t* trx) /* in: transaction */ -{ - trx_sig_t* sig; - que_thr_t* thr; - -#ifdef UNIV_SYNC_DEBUG - ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ - - sig = UT_LIST_GET_FIRST(trx->reply_signals); - - while (sig != NULL) { - thr = sig->receiver; - - ut_ad(thr->state == QUE_THR_SIG_REPLY_WAIT); - - thr->state = QUE_THR_SUSPENDED; - - sig->receiver = NULL; - - UT_LIST_REMOVE(reply_signals, trx->reply_signals, sig); - - sig = UT_LIST_GET_FIRST(trx->reply_signals); - } -} - /********************************************************************* Checks the compatibility of a new signal with the other signals in the queue. */ @@ -1109,11 +1076,10 @@ trx_sig_is_compatible( /******************************************************************** Sends a signal to a trx object. */ -ibool +que_thr_t* trx_sig_send( /*=========*/ - /* out: TRUE if the signal was - successfully delivered */ + /* out: next query thread to run */ trx_t* trx, /* in: trx handle */ ulint type, /* in: signal type */ ulint sender, /* in: TRX_SIG_SELF or @@ -1121,14 +1087,8 @@ trx_sig_send( que_thr_t* receiver_thr, /* in: query thread which wants the reply, or NULL; if type is TRX_SIG_END_WAIT, this must be NULL */ - trx_savept_t* savept, /* in: possible rollback savepoint, or + trx_savept_t* savept) /* in: possible rollback savepoint, or NULL */ - que_thr_t** next_thr) /* in/out: next query thread to run; - if the value which is passed in is - a pointer to a NULL pointer, then the - calling function can start running - a new query thread; if the parameter - is NULL, it is ignored */ { trx_sig_t* sig; trx_t* receiver_trx; @@ -1138,14 +1098,7 @@ trx_sig_send( ut_ad(mutex_own(&kernel_mutex)); #endif /* UNIV_SYNC_DEBUG */ - if (!trx_sig_is_compatible(trx, type, sender)) { - /* The signal is not compatible with the other signals in - the queue: do nothing */ - - ut_error; - - return(FALSE); - } + ut_a(trx_sig_is_compatible(trx, type, sender)); /* Queue the signal object */ @@ -1179,11 +1132,6 @@ trx_sig_send( sig); } - if (trx->sess->state == SESS_ERROR) { - - trx_sig_reply_wait_to_suspended(trx); - } - if ((sender != TRX_SIG_SELF) || (type == TRX_SIG_BREAK_EXECUTION)) { /* The following call will add a TRX_SIG_ERROR_OCCURRED @@ -1198,10 +1146,10 @@ trx_sig_send( if (UT_LIST_GET_FIRST(trx->signals) == sig) { - trx_sig_start_handle(trx, next_thr); + return(trx_sig_start_handle(trx)); } - return(TRUE); + return(NULL); } /******************************************************************** @@ -1223,27 +1171,18 @@ trx_end_signal_handling( trx->handling_signals = FALSE; trx->graph = trx->graph_before_signal_handling; - - if (trx->graph && (trx->sess->state == SESS_ERROR)) { - - que_fork_error_handle(trx, trx->graph); - } } /******************************************************************** Starts handling of a trx signal. */ -void +que_thr_t* trx_sig_start_handle( /*=================*/ - trx_t* trx, /* in: trx handle */ - que_thr_t** next_thr) /* in/out: next query thread to run; - if the value which is passed in is - a pointer to a NULL pointer, then the - calling function can start running - a new query thread; if the parameter - is NULL, it is ignored */ + /* out: next query thread to run, or NULL */ + trx_t* trx) /* in: trx handle */ { + que_thr_t* next_thr = NULL; trx_sig_t* sig; ulint type; loop: @@ -1259,7 +1198,7 @@ loop: trx_end_signal_handling(trx); - return; + return(next_thr); } if (trx->conc_state == TRX_NOT_STARTED) { @@ -1275,23 +1214,13 @@ loop: trx_lock_wait_to_suspended(trx); } - /* If the session is in the error state and this trx has threads - waiting for reply from signals, moves these threads to the suspended - state, canceling wait reservations; note that if the transaction has - sent a commit or rollback signal to itself, and its session is not in - the error state, then nothing is done here. */ - - if (trx->sess->state == SESS_ERROR) { - trx_sig_reply_wait_to_suspended(trx); - } - /* If there are no running query threads, we can start processing of a signal, otherwise we have to wait until all query threads of this transaction are aware of the arrival of the signal. */ if (trx->n_active_thrs > 0) { - return; + return(NULL); } if (trx->handling_signals == FALSE) { @@ -1305,30 +1234,19 @@ loop: if (type == TRX_SIG_COMMIT) { - trx_handle_commit_sig_off_kernel(trx, next_thr); + next_thr = trx_handle_commit_sig_off_kernel(trx); } else if ((type == TRX_SIG_TOTAL_ROLLBACK) - || (type == TRX_SIG_ROLLBACK_TO_SAVEPT)) { - - trx_rollback(trx, sig, next_thr); - + || (type == TRX_SIG_ROLLBACK_TO_SAVEPT) + || (type == TRX_SIG_ERROR_OCCURRED)) { /* No further signals can be handled until the rollback completes, therefore we return */ - return; - - } else if (type == TRX_SIG_ERROR_OCCURRED) { - - trx_rollback(trx, sig, next_thr); - - /* No further signals can be handled until the rollback - completes, therefore we return */ - - return; + return(trx_rollback(trx, sig)); } else if (type == TRX_SIG_BREAK_EXECUTION) { - trx_sig_reply(sig, next_thr); + next_thr = trx_sig_reply(sig); trx_sig_remove(trx, sig); } else { ut_error; @@ -1341,17 +1259,14 @@ loop: Send the reply message when a signal in the queue of the trx has been handled. */ -void +que_thr_t* trx_sig_reply( /*==========*/ - trx_sig_t* sig, /* in: signal */ - que_thr_t** next_thr) /* in/out: next query thread to run; - if the value which is passed in is - a pointer to a NULL pointer, then the - calling function can start running - a new query thread */ + /* out: next query thread to run */ + trx_sig_t* sig) /* in: signal */ { - trx_t* receiver_trx; + trx_t* receiver_trx; + que_thr_t* next_thr = NULL; ut_ad(sig); #ifdef UNIV_SYNC_DEBUG @@ -1365,13 +1280,13 @@ trx_sig_reply( UT_LIST_REMOVE(reply_signals, receiver_trx->reply_signals, sig); - ut_ad(receiver_trx->sess->state != SESS_ERROR); - - que_thr_end_wait(sig->receiver, next_thr); + next_thr = que_thr_end_wait(sig->receiver); sig->receiver = NULL; } + + return(next_thr); } /******************************************************************** @@ -1427,7 +1342,6 @@ trx_commit_step( { commit_node_t* node; que_thr_t* next_thr; - ibool success; node = thr->run_node; @@ -1442,21 +1356,14 @@ trx_commit_step( node->state = COMMIT_NODE_WAIT; - next_thr = NULL; - thr->state = QUE_THR_SIG_REPLY_WAIT; /* Send the commit signal to the transaction */ - success = trx_sig_send(thr_get_trx(thr), TRX_SIG_COMMIT, - TRX_SIG_SELF, thr, NULL, &next_thr); - - mutex_exit(&kernel_mutex); + next_thr = trx_sig_send(thr_get_trx(thr), TRX_SIG_COMMIT, + TRX_SIG_SELF, thr, NULL); - if (!success) { - /* Error in delivering the commit signal */ - que_thr_handle_error(thr, DB_ERROR, NULL, 0); - } + mutex_exit(&kernel_mutex); return(next_thr); } diff --git a/innobase/usr/usr0sess.c b/innobase/usr/usr0sess.c index 359c1552421..cc016f2b823 100644 --- a/innobase/usr/usr0sess.c +++ b/innobase/usr/usr0sess.c @@ -37,8 +37,6 @@ sess_open(void) #endif /* UNIV_SYNC_DEBUG */ sess = mem_alloc(sizeof(sess_t)); - sess->state = SESS_ACTIVE; - sess->trx = trx_create(sess); UT_LIST_INIT(sess->graphs); From b3851363ba8df0b3f55ecb358849a212db4b12a8 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 25 May 2004 22:00:14 +0300 Subject: [PATCH 07/38] Added patches from Novell Build-tools/Do-compile: Fixed indentation configure.in: Added patches from Novell Added C_EXTRA_FLAGS as an easy way to pass flags to both CFLAGS and CXXFLAGS extra/perror.c: Fixed error number reporting to not report 'Unknown error' include/my_global.h: Defines to make NETWARE patches cleaner include/thr_alarm.h: Fixed wrong macro netware/mysql_install_db.c: Indentation fix --- Build-tools/Do-compile | 16 +- client/mysql.cc | 25 ++- client/mysqladmin.c | 4 + client/mysqlbinlog.cc | 5 + client/mysqlcheck.c | 4 + client/mysqldump.c | 8 +- client/mysqlimport.c | 5 +- client/mysqlshow.c | 6 + client/mysqltest.c | 112 ++++++++++++- configure.in | 13 +- extra/perror.c | 24 ++- include/config-netware.h | 36 ++++- include/help_end.h | 6 + include/help_start.h | 7 + include/my_global.h | 6 + include/thr_alarm.h | 2 +- isam/isamchk.c | 6 + libmysqld/Makefile.am | 44 ++--- myisam/myisam_ftdump.c | 3 + myisam/myisamchk.c | 4 + myisam/myisampack.c | 4 + mysys/default.c | 3 + mysys/my_getopt.c | 4 + mysys/my_init.c | 10 +- mysys/my_netware.c | 2 +- mysys/my_pthread.c | 22 +-- netware/BUILD/compile-netware-all | 4 +- netware/BUILD/compile-netware-standard | 1 + netware/BUILD/mwenv | 6 +- netware/Makefile.am | 3 +- netware/init_db.sql | 2 +- netware/my_manage.c | 8 +- netware/my_manage.h | 4 +- netware/myisam_ftdump.def | 12 ++ netware/mysql_install_db.c | 3 +- netware/mysql_test_run.c | 59 +++++-- netware/mysql_waitpid.def | 12 ++ netware/resolve_stack_dump.def | 12 ++ scripts/make_binary_distribution.sh | 83 ++++++---- scripts/mysqlhotcopy.sh | 20 ++- sql/mysqld.cc | 213 ++++++++++++++++++++++++- tools/mysqlmanager.c | 15 ++ vio/test-ssl.c | 2 +- vio/viossl.c | 25 +++ vio/viosslfactories.c | 41 ++++- 45 files changed, 780 insertions(+), 126 deletions(-) create mode 100644 include/help_end.h create mode 100644 include/help_start.h create mode 100644 netware/myisam_ftdump.def create mode 100644 netware/mysql_waitpid.def create mode 100644 netware/resolve_stack_dump.def diff --git a/Build-tools/Do-compile b/Build-tools/Do-compile index bd6c89d7ded..c4680d4b7e5 100755 --- a/Build-tools/Do-compile +++ b/Build-tools/Do-compile @@ -237,14 +237,14 @@ if ($opt_stage <= 1) # Only enable InnoDB when requested (required to be able to # build the "Classic" packages that do not include InnoDB) - if ($opt_innodb) - { - $opt_config_options.= " --with-innodb"; - } - else - { - $opt_config_options.= " --without-innodb"; - } + if ($opt_innodb) + { + $opt_config_options.= " --with-innodb"; + } + else + { + $opt_config_options.= " --without-innodb"; + } if ($opt_with_other_libc) { diff --git a/client/mysql.cc b/client/mysql.cc index 46ade3aef26..1fd909a397e 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -590,6 +590,10 @@ static struct my_option my_long_options[] = static void usage(int version) { + /* Divert all help information on NetWare to logger screen. */ +#ifdef __NETWARE__ +#define printf consoleprintf +#endif printf("%s Ver %s Distrib %s, for %s (%s)\n", my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE); if (version) @@ -602,8 +606,13 @@ and you are welcome to modify and redistribute it under the GPL license\n"); my_print_help(my_long_options); print_defaults("my", load_default_groups); my_print_variables(my_long_options); + NETWARE_SET_SCREEN_MODE(1); +#ifdef __NETWARE__ +#undef printf +#endif } + static my_bool get_one_option(int optid, const struct my_option *opt __attribute__((unused)), char *argument) @@ -812,6 +821,7 @@ static int read_lines(bool execute_commands) #ifdef __NETWARE__ line=fgets(linebuffer, sizeof(linebuffer)-1, stdin); /* Remove the '\n' */ + if (line) { char *p = strrchr(line, '\n'); if (p != NULL) @@ -827,7 +837,11 @@ static int read_lines(bool execute_commands) line= readline(prompt); #endif /* defined( __WIN__) || defined(OS2) || defined(__NETWARE__) */ - if (opt_outfile) + /* + When Ctrl+d or Ctrl+z is pressed, the line may be NULL on some OS + which may cause coredump. + */ + if (opt_outfile && line) fprintf(OUTFILE, "%s\n", line); } if (!line) // End of file @@ -2018,10 +2032,8 @@ static int com_quit(String *buffer __attribute__((unused)), char *line __attribute__((unused))) { -#ifdef __NETWARE__ - // let the screen auto close on a normal shutdown - setscreenmode(SCR_AUTOCLOSE_ON_EXIT); -#endif + /* let the screen auto close on a normal shutdown */ + NETWARE_SET_SCREEN_MODE(SCR_AUTOCLOSE_ON_EXIT); status.exit_status=0; return 1; } @@ -2489,6 +2501,7 @@ void tee_fprintf(FILE *file, const char *fmt, ...) { va_list args; + NETWARE_YIELD; va_start(args, fmt); (void) vfprintf(file, fmt, args); #ifdef OS2 @@ -2502,6 +2515,7 @@ void tee_fprintf(FILE *file, const char *fmt, ...) void tee_fputs(const char *s, FILE *file) { + NETWARE_YIELD; fputs(s, file); #ifdef OS2 fflush( file); @@ -2513,6 +2527,7 @@ void tee_fputs(const char *s, FILE *file) void tee_puts(const char *s, FILE *file) { + NETWARE_YIELD; fputs(s, file); fputs("\n", file); #ifdef OS2 diff --git a/client/mysqladmin.c b/client/mysqladmin.c index 9fbf7e2d64d..3bc11ec0fb0 100644 --- a/client/mysqladmin.c +++ b/client/mysqladmin.c @@ -815,11 +815,13 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv) return 0; } +#include static void print_version(void) { printf("%s Ver %s Distrib %s, for %s on %s\n",my_progname,ADMIN_VERSION, MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE); + NETWARE_SET_SCREEN_MODE(1); } @@ -861,6 +863,8 @@ static void usage(void) version Get version info from server"); } +#include + static int drop_db(MYSQL *mysql, const char *db) { char name_buff[FN_REFLEN+20], buf[10]; diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 6c6acb750d3..7bceedea4fe 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -479,9 +479,12 @@ static void die(const char* fmt, ...) exit(1); } +#include + static void print_version() { printf("%s Ver 2.6 for %s at %s\n", my_progname, SYSTEM_TYPE, MACHINE_TYPE); + NETWARE_SET_SCREEN_MODE(1); } @@ -500,6 +503,8 @@ the mysql command line client\n\n"); my_print_variables(my_long_options); } +#include + extern "C" my_bool get_one_option(int optid, const struct my_option *opt __attribute__((unused)), char *argument) diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index 3261ec1577d..1c5638f3c52 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -159,10 +159,13 @@ static void print_result(); static char *fix_table_name(char *dest, char *src); int what_to_do = 0; +#include + static void print_version(void) { printf("%s Ver %s Distrib %s, for %s (%s)\n", my_progname, CHECK_VERSION, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE); + NETWARE_SET_SCREEN_MODE(1); } /* print_version */ @@ -193,6 +196,7 @@ static void usage(void) my_print_variables(my_long_options); } /* usage */ +#include static my_bool get_one_option(int optid, const struct my_option *opt __attribute__((unused)), diff --git a/client/mysqldump.c b/client/mysqldump.c index f264b9b61c6..3f3746f2963 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -267,11 +267,13 @@ static char *quote_name(const char *name, char *buff, my_bool force); static void print_quoted_xml(FILE *output, char *fname, char *str, uint len); static const char *check_if_ignore_table(const char *table_name); +#include static void print_version(void) { printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname,DUMP_VERSION, - MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE); + MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE); + NETWARE_SET_SCREEN_MODE(1); } /* print_version */ @@ -281,8 +283,10 @@ static void short_usage_sub(void) printf("OR %s [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]\n", my_progname); printf("OR %s [OPTIONS] --all-databases [OPTIONS]\n", my_progname); + NETWARE_SET_SCREEN_MODE(1); } + static void usage(void) { print_version(); @@ -302,6 +306,8 @@ static void short_usage(void) printf("For more options, use %s --help\n", my_progname); } +#include + static void write_header(FILE *sql_file, char *db_name) { diff --git a/client/mysqlimport.c b/client/mysqlimport.c index c72e32dd2a7..ca53b74c119 100644 --- a/client/mysqlimport.c +++ b/client/mysqlimport.c @@ -134,14 +134,16 @@ static struct my_option my_long_options[] = static const char *load_default_groups[]= { "mysqlimport","client",0 }; +#include + static void print_version(void) { printf("%s Ver %s Distrib %s, for %s (%s)\n" ,my_progname, IMPORT_VERSION, MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE); + NETWARE_SET_SCREEN_MODE(1); } - static void usage(void) { print_version(); @@ -160,6 +162,7 @@ file. The SQL command 'LOAD DATA INFILE' is used to import the rows.\n"); my_print_variables(my_long_options); } +#include static my_bool get_one_option(int optid, const struct my_option *opt __attribute__((unused)), diff --git a/client/mysqlshow.c b/client/mysqlshow.c index ccae43e4e27..1a9aec02955 100644 --- a/client/mysqlshow.c +++ b/client/mysqlshow.c @@ -182,12 +182,16 @@ static struct my_option my_long_options[] = }; +#include + static void print_version(void) { printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname,SHOW_VERSION, MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE); + NETWARE_SET_SCREEN_MODE(1); } + static void usage(void) { print_version(); @@ -207,6 +211,8 @@ are shown"); my_print_variables(my_long_options); } +#include + static my_bool get_one_option(int optid, const struct my_option *opt __attribute__((unused)), char *argument) diff --git a/client/mysqltest.c b/client/mysqltest.c index 32fb44d178e..638d3ca1d89 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -178,6 +178,17 @@ typedef struct int alloced; } VAR; +#ifdef __NETWARE__ +/* + Netware doesn't proved environment variable substitution that is done + by the shell in unix environments. We do this in the following function: +*/ + +static char *subst_env_var(const char *cmd); +static int my_popen(const char *cmd, const char *mode); +#define popen(A,B) my_popen((A),(B)) +#endif /* __NETWARE__ */ + VAR var_reg[10]; /*Perl/shell-like variable registers */ HASH var_hash; @@ -890,7 +901,7 @@ int do_exec(struct st_query* q) while (fgets(buf, sizeof(buf), res_file)) replace_dynstr_append_mem(ds, buf, strlen(buf)); - + if (glob_replace) free_replace(); @@ -913,6 +924,7 @@ int do_exec(struct st_query* q) DBUG_RETURN(error); } + int var_query_set(VAR* v, const char* p, const char** p_end) { char* end = (char*)((p_end && *p_end) ? *p_end : p + strlen(p)); @@ -3458,3 +3470,101 @@ static void get_replace_column(struct st_query *q) } my_free(start, MYF(0)); } + +#ifdef __NETWARE__ + +/* + Substitute environment variables with text. + + SYNOPSIS + subst_env_var() + arg String that should be substitute + + DESCRIPTION + This function takes a string as an input and replaces the + environment variables, that starts with '$' character, with it value. + + NOTES + Return string must be freed with my_free() + + RETURN + String with environment variables replaced. +*/ + +static char *subst_env_var(const char *str) +{ + char *result; + + result= pos= my_malloc(MAX_QUERY, MYF(MY_FAE)); + while (*str) + { + /* + need this only when we want to provide the functionality of + escaping through \ 'backslash' + if ((result == pos && *str=='$') || + (result != pos && *str=='$' && str[-1] !='\\')) + */ + if (*str == '$') + { + char env_var[256], *env_pos= env_var, *subst; + + /* Search for end of environment variable */ + for (str++; + *str && !isspace(*str) && *str != '\\' && *str != '/' && + *str != '$'; + str++) + *env_pos++ *str; + *env_pos= 0; + + if (!(subst= getenv(env_var))) + { + my_free(result, MYF(0)); + die("MYSQLTEST.NLM: Environment variable %s is not defined\n", + env_var); + } + + /* get the string to be substitued for env_var */ + pos= strmov(pos, subst); + /* Process delimiter in *str again */ + } + else + *pos++= *str++; + } + *pos= 0; + return result; +} + + +/* + popen replacement for Netware + + SYNPOSIS + my_popen() + name Command to execute (with possible env variables) + mode Mode for popen. + + NOTES + Environment variable expansion does not take place for popen function + on NetWare, so we use this function to wrap around popen to do this. + + For the moment we ignore 'mode' and always use 'r0' + + RETURN + # >= 0 File handle + -1 Error +*/ + +#undef popen /* Remove wrapper */ + +int my_popen(const char *cmd, const char *mode __attribute__((unused)) t) +{ + char *subst_cmd; + int res_file; + + subst_cmd= subst_env_var(cmd); + res_file= popen(subst_cmd, "r0"); + my_free(subst_cmd, MYF(0)); + return res_file; +} + +#endif /* __NETWARE__ */ diff --git a/configure.in b/configure.in index a50d89c8655..7a1d2228961 100644 --- a/configure.in +++ b/configure.in @@ -4,7 +4,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(sql/mysqld.cc) AC_CANONICAL_SYSTEM # The Docs Makefile.am parses this line! -AM_INIT_AUTOMAKE(mysql, 4.0.19) +AM_INIT_AUTOMAKE(mysql, 4.0.20) AM_CONFIG_HEADER(config.h) PROTOCOL_VERSION=10 @@ -128,8 +128,10 @@ fi # The following hack should ensure that configure doesn't add optimizing # or debugging flags to CFLAGS or CXXFLAGS -CFLAGS="$CFLAGS " -CXXFLAGS="$CXXFLAGS " +# C_EXTRA_FLAGS are flags that are automaticly added to both +# CFLAGS and CXXFLAGS +CFLAGS="$CFLAGS $C_EXTRA_FLAGS " +CXXFLAGS="$CXXFLAGS $C_EXTRA_FLAGS " dnl Checks for programs. AC_PROG_AWK @@ -1119,8 +1121,8 @@ dnl Is this the right match for DEC OSF on alpha? # Add library dependencies to mysqld_DEPENDENCIES lib_DEPENDENCIES="\$(bdb_libs_with_path) \$(innodb_libs) \$(pstack_libs) \$(innodb_system_libs) \$(openssl_libs)" cat > $filesed << EOF -s,\(^.*\$(MAKE) gen_lex_hash\),#\1, -s,\(\./gen_lex_hash\),\1.linux, +s,\(^.*\$(MAKE) gen_lex_hash\)\$(EXEEXT),#\1, +s,\(\./gen_lex_hash\)\$(EXEEXT),\1.linux, s%\(mysqld_DEPENDENCIES = \) %\1$lib_DEPENDENCIES % EOF ;; @@ -2671,6 +2673,7 @@ AC_OUTPUT(Makefile extra/Makefile mysys/Makefile isam/Makefile dnl include/Makefile sql-bench/Makefile tools/Makefile dnl tests/Makefile Docs/Makefile support-files/Makefile dnl support-files/MacOSX/Makefile mysql-test/Makefile dnl + netware/Makefile dnl include/mysql_version.h dnl , , [ test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h diff --git a/extra/perror.c b/extra/perror.c index 6d9744a39da..b4405fdc5dd 100644 --- a/extra/perror.c +++ b/extra/perror.c @@ -16,7 +16,7 @@ /* Return error-text for system error messages and nisam messages */ -#define PERROR_VERSION "2.9" +#define PERROR_VERSION "2.10" #include #include @@ -195,16 +195,30 @@ int main(int argc,char *argv[]) else #endif { + /* + On some system, like NETWARE, strerror(unknown_error) returns a + string 'Unknown Error'. To avoid printing it we try to find the + error string by asking for an impossible big error message. + */ + const char *unknown_error= strerror(10000); + for ( ; argc-- > 0 ; argv++) { found=0; code=atoi(*argv); - msg = strerror(code); - if (msg) + msg= strerror(code); + + /* + Don't print message for not existing error messages or for + unknown errors. We test for 'Uknown Errors' just as an + extra safety for Netware + */ + if (msg && strcmp(msg, "Unknown Error") && + (!unknown_error || strcmp(msg, unknown_error))) { found=1; if (verbose) - printf("Error code %3d: %s\n",code,msg); + printf("System error: %3d = %s\n",code,msg); else puts(msg); } @@ -219,7 +233,7 @@ int main(int argc,char *argv[]) else { if (verbose) - printf("%3d = %s\n",code,msg); + printf("MySql error: %3d = %s\n",code,msg); else puts(msg); } diff --git a/include/config-netware.h b/include/config-netware.h index dab365a7127..c4e63056353 100644 --- a/include/config-netware.h +++ b/include/config-netware.h @@ -14,7 +14,10 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* Defines for netware compatible with MySQL */ +/* Header for NetWare compatible with MySQL */ + +#ifndef _config_netware_h +#define _config_netware_h /* required headers */ #include @@ -32,18 +35,28 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + /* required adjustments */ #undef HAVE_READDIR_R #undef HAVE_RWLOCK_INIT #undef HAVE_SCHED_H #undef HAVE_SYS_MMAN_H #undef HAVE_SYNCH_H -#undef HAVE_CRYPT #define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1 #define HAVE_PTHREAD_SIGMASK 1 #define HAVE_PTHREAD_YIELD_ZERO_ARG 1 #define HAVE_BROKEN_REALPATH 1 +/* no libc crypt() function */ +#ifdef HAVE_OPENSSL + #define HAVE_CRYPT 1 +#else + #undef HAVE_CRYPT +#endif /* HAVE_OPENSSL */ + /* include the old function apis */ #define USE_OLD_FUNCTIONS 1 @@ -59,6 +72,9 @@ /* signal by closing the sockets */ #define SIGNAL_WITH_VIO_CLOSE 1 +/* On NetWare, stack grows towards lower address*/ +#define STACK_DIRECTION -1 + /* default directory information */ #define DEFAULT_MYSQL_HOME "sys:/mysql" #define PACKAGE "mysql" @@ -80,6 +96,20 @@ /* do not use the extended time in LibC sys\stat.h */ #define _POSIX_SOURCE +/* Kernel call on NetWare that will only yield if our time slice is up */ +void kYieldIfTimeSliceUp(void); + /* Some macros for portability */ -#define set_timespec(ABSTIME,SEC) { (ABSTIME).tv_sec=(SEC); (ABSTIME).tv_nsec=0; } +#define set_timespec(ABSTIME,SEC) { (ABSTIME).tv_sec=time(NULL)+(SEC); (ABSTIME).tv_nsec=0; } + +/* extra protection against CPU Hogs on NetWare */ +#define NETWARE_YIELD kYieldIfTimeSliceUp() +/* Screen mode for help texts */ +#define NETWARE_SET_SCREEN_MODE(A) setscreenmode(A) + +#ifdef __cplusplus +} +#endif + +#endif /* _config_netware_h */ diff --git a/include/help_end.h b/include/help_end.h new file mode 100644 index 00000000000..a63d9e7ca9f --- /dev/null +++ b/include/help_end.h @@ -0,0 +1,6 @@ +#ifdef __NETWARE__ +#undef printf +#undef puts +#undef fputs +#undef putchar +#endif diff --git a/include/help_start.h b/include/help_start.h new file mode 100644 index 00000000000..38bb91f7655 --- /dev/null +++ b/include/help_start.h @@ -0,0 +1,7 @@ +/* Divert all help information on NetWare to logger screen. */ + +#ifdef __NETWARE__ +#define printf consoleprintf +#define puts(s) consoleprintf("%s\n",s) +#define fputs(s,f) puts(s) +#endif diff --git a/include/my_global.h b/include/my_global.h index e4c0fb44337..30cd1800884 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -73,6 +73,12 @@ #endif #endif /* _WIN32... */ +/* Some defines to avoid ifdefs in the code */ +#ifndef NETWARE_YIELD +#define NETWARE_YIELD +#define NETWARE_SET_SCREEN_MODE(A) +#endif + /* The macros below are borrowed from include/linux/compiler.h in the Linux kernel. Use them to indicate the likelyhood of the truthfulness diff --git a/include/thr_alarm.h b/include/thr_alarm.h index 0dbb700b4fc..7a10d6886ce 100644 --- a/include/thr_alarm.h +++ b/include/thr_alarm.h @@ -64,7 +64,7 @@ typedef my_bool ALARM; #define init_thr_alarm(A) #define thr_alarm_kill(A) #define resize_thr_alarm(N) -#define end_thr_alarm() +#define end_thr_alarm(A) #else #if defined(__WIN__) diff --git a/isam/isamchk.c b/isam/isamchk.c index 35b4e881962..daa9464eb4f 100644 --- a/isam/isamchk.c +++ b/isam/isamchk.c @@ -333,12 +333,16 @@ static struct my_option my_long_options[] = {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} }; +#include + static void print_version(void) { printf("%s Ver 6.01 for %s at %s\n", my_progname, SYSTEM_TYPE, MACHINE_TYPE); + NETWARE_SET_SCREEN_MODE(1); } + static void usage(void) { print_version(); @@ -352,6 +356,8 @@ static void usage(void) my_print_variables(my_long_options); } +#include + /* Check table */ static int nisamchk(my_string filename) diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am index 54bfd6503d4..0bfe1452451 100644 --- a/libmysqld/Makefile.am +++ b/libmysqld/Makefile.am @@ -71,29 +71,35 @@ INC_LIB= $(top_builddir)/regex/libregex.a \ @innodb_libs@ @bdb_libs_with_path@ \ $(top_builddir)/mysys/libmysys.a \ $(top_builddir)/strings/libmystrings.a \ - $(top_builddir)/dbug/libdbug.a \ - $(top_builddir)/regex/libregex.a + $(top_builddir)/dbug/libdbug.a # -# To make it easy for the end user to use the embedded library we -# generate a total libmysqld.a from all library files, +# To make it easy for the end user to use the embedded library we +# generate a total libmysqld.a from all library files, libmysqld.a: libmysqld_int.a $(INC_LIB) - if test ! -d tmp ; then mkdir tmp ; fi - rm -f $@ libmysqld_int2.a tmp/*.o tmp/*.a - cp $(INC_LIB) tmp - cp libmysqld_int.a libmysqld_int2.a ; \ - cd tmp ; \ - for file in *.a ; do \ - bfile=`basename $$file .a` ; \ - ar x $$file; \ - for obj in *.o ; do mv $$obj $${bfile}_$$obj ; done ; \ - ar q ../libmysqld_int2.a *.o ; \ - rm -f *.o ; \ - done - mv libmysqld_int2.a libmysqld.a - rm -f tmp/* - $(RANLIB) libmysqld.a + if test "$(host_os)" = "netware" ; \ + then \ + $(libmysqld_a_AR) libmysqld.a libmysqld_int.a $(INC_LIB) ; \ + else \ + if test ! -d tmp ; then mkdir tmp ; fi ; \ + rm -f $@ libmysqld_int2.a tmp/*.o tmp/*.a ; \ + cp $(INC_LIB) tmp ; \ + cp libmysqld_int.a libmysqld_int2.a ; \ + cd tmp ; \ + for file in *.a ; do \ + bfile=`basename $$file .a` ; \ + ar x $$file; \ + for obj in *.o ; do mv $$obj $${bfile}_$$obj ; done ; \ + ar q ../libmysqld_int2.a *.o ; \ + rm -f *.o ; \ + done ; \ + cd .. ; \ + mv libmysqld_int2.a libmysqld.a ; \ + rm -f tmp/* ; \ + $(RANLIB) libmysqld.a ; \ + fi + ## XXX: any time the client interface changes, we'll need to bump ## the version info for libmysqld; however, it's possible for the diff --git a/myisam/myisam_ftdump.c b/myisam/myisam_ftdump.c index d06cb46bdc1..98548de26a4 100644 --- a/myisam/myisam_ftdump.c +++ b/myisam/myisam_ftdump.c @@ -258,15 +258,18 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), return 0; } +#include static void usage() { printf("Use: myisam_ftdump \n"); my_print_help(my_long_options); my_print_variables(my_long_options); + NETWARE_SET_SCREEN_MODE(1); exit(1); } +#include static void complain(int val) /* Kinda assert :-) */ { diff --git a/myisam/myisamchk.c b/myisam/myisamchk.c index 3df42fb4da7..5377ecc18a5 100644 --- a/myisam/myisamchk.c +++ b/myisam/myisamchk.c @@ -323,10 +323,13 @@ static struct my_option my_long_options[] = }; +#include + static void print_version(void) { printf("%s Ver 2.6 for %s at %s\n", my_progname, SYSTEM_TYPE, MACHINE_TYPE); + NETWARE_SET_SCREEN_MODE(1); } @@ -433,6 +436,7 @@ static void usage(void) my_print_variables(my_long_options); } +#include /* Read options */ diff --git a/myisam/myisampack.c b/myisam/myisampack.c index 800203a30e2..872fcb49faf 100644 --- a/myisam/myisampack.c +++ b/myisam/myisampack.c @@ -266,12 +266,15 @@ static struct my_option my_long_options[] = { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} }; +#include static void print_version(void) { printf("%s Ver 1.22 for %s on %s\n", my_progname, SYSTEM_TYPE, MACHINE_TYPE); + NETWARE_SET_SCREEN_MODE(1); } + static void usage(void) { print_version(); @@ -290,6 +293,7 @@ static void usage(void) my_print_variables(my_long_options); } +#include static my_bool get_one_option(int optid, const struct my_option *opt __attribute__((unused)), diff --git a/mysys/default.c b/mysys/default.c index a913db2c487..81290322223 100644 --- a/mysys/default.c +++ b/mysys/default.c @@ -471,6 +471,7 @@ static char *remove_end_comment(char *ptr) return ptr; } +#include void print_defaults(const char *conf_file, const char **groups) { @@ -523,3 +524,5 @@ void print_defaults(const char *conf_file, const char **groups) --defaults-file=# Only read default options from the given file #\n\ --defaults-extra-file=# Read this file after the global files are read"); } + +#include diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c index da7c0ebd1d2..694c4685667 100644 --- a/mysys/my_getopt.c +++ b/mysys/my_getopt.c @@ -690,6 +690,8 @@ static void init_variables(const struct my_option *options) Print help for all options and variables. */ +#include + void my_print_help(const struct my_option *options) { uint col, name_space= 22, comment_space= 57; @@ -815,3 +817,5 @@ void my_print_variables(const struct my_option *options) } } } + +#include diff --git a/mysys/my_init.c b/mysys/my_init.c index 8d4ba2c97b6..dd06ae41dcb 100644 --- a/mysys/my_init.c +++ b/mysys/my_init.c @@ -354,14 +354,16 @@ static my_bool win32_init_tcp_ip() #ifdef __NETWARE__ -/**************************************************************************** - Do basic initialisation for netware needed by most programs -****************************************************************************/ +/* + Basic initialisation for netware +*/ static void netware_init() { char cwd[PATH_MAX], *name; + DBUG_ENTER("netware_init"); + /* init only if we are not a client library */ if (my_progname) { @@ -399,5 +401,7 @@ static void netware_init() } } } + + DBUG_VOID_RETURN; } #endif /* __NETWARE__ */ diff --git a/mysys/my_netware.c b/mysys/my_netware.c index e41dbd0a029..9c604778c2d 100644 --- a/mysys/my_netware.c +++ b/mysys/my_netware.c @@ -15,7 +15,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* - Function specific to netware + Functions specific to netware */ #include diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c index 5be38fad734..a8157cc2f91 100644 --- a/mysys/my_pthread.c +++ b/mysys/my_pthread.c @@ -102,16 +102,20 @@ void my_pthread_exit(void *status) NXContext_t ctx; char name[PATH_MAX] = ""; - NXThreadGetContext(tid, &ctx); - NXContextGetName(ctx, name, PATH_MAX); - - /* - "MYSQLD.NLM's LibC Reaper" or "MYSQLD.NLM's main thread" - with a debug build of LibC the reaper can have different names - */ - if (!strindex(name, "\'s")) + /* Do not call pthread_exit if it is not a LibC thread */ + if (tid != 0) { - pthread_exit(status); + NXThreadGetContext(tid, &ctx); + NXContextGetName(ctx, name, PATH_MAX); + + /* + "MYSQLD.NLM's LibC Reaper" or "MYSQLD.NLM's main thread" + with a debug build of LibC the reaper can have different names + */ + if (!strindex(name, "\'s")) + { + pthread_exit(status); + } } } #endif diff --git a/netware/BUILD/compile-netware-all b/netware/BUILD/compile-netware-all index 6baff699e94..dbe64e8f97e 100755 --- a/netware/BUILD/compile-netware-all +++ b/netware/BUILD/compile-netware-all @@ -11,5 +11,5 @@ path=`dirname $0` $path/compile-netware-src $path/compile-netware-standard $path/compile-netware-debug -#$path/compile-netware-max -#$path/compile-netware-max-debug +$path/compile-netware-max +$path/compile-netware-max-debug diff --git a/netware/BUILD/compile-netware-standard b/netware/BUILD/compile-netware-standard index 45f5021862c..a21ea16a445 100755 --- a/netware/BUILD/compile-netware-standard +++ b/netware/BUILD/compile-netware-standard @@ -14,6 +14,7 @@ suffix="standard" extra_configs=" \ --with-innodb \ + --enable-thread-safe-client \ " . $path/compile-netware-END diff --git a/netware/BUILD/mwenv b/netware/BUILD/mwenv index c16ada6552a..22f518bcc0d 100755 --- a/netware/BUILD/mwenv +++ b/netware/BUILD/mwenv @@ -6,9 +6,9 @@ # the default is "F:/mydev" export MYDEV="WINE_BUILD_DIR" -export MWCNWx86Includes="$MYDEV/libc/include;$MYDEV" -export MWNWx86Libraries="$MYDEV/libc/imports;$MYDEV/mw/lib;$MYDEV/mysql-VERSION/netware/BUILD" -export MWNWx86LibraryFiles="libcpre.o;libc.imp;netware.imp;mwcrtl.lib;mwcpp.lib;knetware.imp" +export MWCNWx86Includes="$MYDEV/libc/include;$MYDEV/fs64/headers;$MYDEV" +export MWNWx86Libraries="$MYDEV/libc/imports;$MYDEV/mw/lib;$MYDEV/fs64/imports;$MYDEV/mysql-VERSION/netware/BUILD" +export MWNWx86LibraryFiles="libcpre.o;libc.imp;netware.imp;mwcrtl.lib;mwcpp.lib;neb.imp;zPublics.imp;knetware.imp" export WINEPATH="$MYDEV/mw/bin" diff --git a/netware/Makefile.am b/netware/Makefile.am index 0f5e862c579..8d7efec8e3c 100644 --- a/netware/Makefile.am +++ b/netware/Makefile.am @@ -33,7 +33,8 @@ netware_build_files = client/mysql.def client/mysqladmin.def \ isam/isamlog.def isam/pack_isam.def \ libmysqld/libmysqld.def myisam/myisamchk.def \ myisam/myisamlog.def myisam/myisampack.def \ - sql/mysqld.def + sql/mysqld.def extra/mysql_waitpid.def \ + extra/resolve_stack_dump.def myisam/myisam_ftdump.def link_sources: set -x; \ diff --git a/netware/init_db.sql b/netware/init_db.sql index 1e8354e13a1..569c7bd5283 100644 --- a/netware/init_db.sql +++ b/netware/init_db.sql @@ -20,6 +20,6 @@ INSERT INTO user (host,user) values ('%',''); 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)) comment='User defined functions'; -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(60) 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)) comment='Table privileges'; +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)) comment='Table privileges'; 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)) comment='Column privileges'; diff --git a/netware/my_manage.c b/netware/my_manage.c index 1c1e75990b4..f5aa3163431 100644 --- a/netware/my_manage.c +++ b/netware/my_manage.c @@ -180,7 +180,7 @@ int sleep_until_file_exists(char *pid_file) Wait for the server on the given port to start. ******************************************************************************/ -int wait_for_server_start(char *bin_dir, char *user, char *password, int port) +int wait_for_server_start(char *bin_dir, char *user, char *password, int port,char *tmp_dir) { arg_list_t al; int err, i; @@ -189,7 +189,7 @@ int wait_for_server_start(char *bin_dir, char *user, char *password, int port) // mysqladmin file snprintf(mysqladmin_file, PATH_MAX, "%s/mysqladmin", bin_dir); - snprintf(trash, PATH_MAX, "/tmp/trash.out"); + snprintf(trash, PATH_MAX, "%s/trash.out",tmp_dir); // args init_args(&al); @@ -283,7 +283,7 @@ int spawn(char *path, arg_list_t *al, int join, char *input, ******************************************************************************/ int stop_server(char *bin_dir, char *user, char *password, int port, - char *pid_file) + char *pid_file,char *tmp_dir) { arg_list_t al; int err, i, argc = 0; @@ -292,7 +292,7 @@ int stop_server(char *bin_dir, char *user, char *password, int port, // mysqladmin file snprintf(mysqladmin_file, PATH_MAX, "%s/mysqladmin", bin_dir); - snprintf(trash, PATH_MAX, "/tmp/trash.out"); + snprintf(trash, PATH_MAX, "%s/trash.out",tmp_dir); // args init_args(&al); diff --git a/netware/my_manage.h b/netware/my_manage.h index b19662c4ee9..ada02378ee4 100644 --- a/netware/my_manage.h +++ b/netware/my_manage.h @@ -71,11 +71,11 @@ void free_args(arg_list_t *); int sleep_until_file_exists(char *); int sleep_until_file_deleted(char *); -int wait_for_server_start(char *, char *, char *, int); +int wait_for_server_start(char *, char *, char *, int,char *); int spawn(char *, arg_list_t *, int, char *, char *, char *); -int stop_server(char *, char *, char *, int, char *); +int stop_server(char *, char *, char *, int, char *,char *); pid_t get_server_pid(char *); void kill_server(pid_t pid); diff --git a/netware/myisam_ftdump.def b/netware/myisam_ftdump.def new file mode 100644 index 00000000000..259d6617445 --- /dev/null +++ b/netware/myisam_ftdump.def @@ -0,0 +1,12 @@ +#------------------------------------------------------------------------------ +# MySQL MyISAM Dump Tool +#------------------------------------------------------------------------------ +MODULE libc.nlm +SCREENNAME "MySQL MyISAM Table Dump Tool" +COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." +DESCRIPTION "MySQL MyISAM Table Dump Tool" +VERSION 4, 0 +STACKSIZE 65536 +XDCDATA ../netware/mysql.xdc +#DEBUG + diff --git a/netware/mysql_install_db.c b/netware/mysql_install_db.c index b4060bfdb7e..355e18b819a 100644 --- a/netware/mysql_install_db.c +++ b/netware/mysql_install_db.c @@ -386,7 +386,8 @@ int main(int argc, char **argv) if (!autoclose) setscreenmode(SCR_NO_MODE); // header - printf("MySQL Server %s, for %s (%s)\n\n", VERSION, SYSTEM_TYPE, MACHINE_TYPE); + printf("MySQL Server %s, for %s (%s)\n\n", VERSION, SYSTEM_TYPE, + MACHINE_TYPE); // create paths create_paths(); diff --git a/netware/mysql_test_run.c b/netware/mysql_test_run.c index e1a07baca6c..06d5e5985c1 100644 --- a/netware/mysql_test_run.c +++ b/netware/mysql_test_run.c @@ -53,6 +53,7 @@ #define TEST_SKIP "[ skip ]" #define TEST_FAIL "[ fail ]" #define TEST_BAD "[ bad ]" +#define TEST_IGNORE "[ignore]" /****************************************************************************** @@ -69,7 +70,8 @@ int master_port = 9306; int slave_port = 9307; // comma delimited list of tests to skip or empty string -char skip_test[PATH_MAX] = ""; +char skip_test[PATH_MAX] = " lowercase_table3 , system_mysql_db_fix "; +char ignore_test[PATH_MAX] = ""; char bin_dir[PATH_MAX]; char mysql_test_dir[PATH_MAX]; @@ -107,6 +109,7 @@ int total_pass = 0; int total_fail = 0; int total_test = 0; +int total_ignore = 0; double total_time = 0; int use_openssl = FALSE; @@ -393,7 +396,7 @@ void start_master() { sleep_until_file_exists(master_pid); - if ((err = wait_for_server_start(bin_dir, user, password, master_port)) == 0) + if ((err = wait_for_server_start(bin_dir, user, password, master_port,mysql_tmp_dir)) == 0) { master_running = TRUE; } @@ -582,7 +585,7 @@ void start_slave() { sleep_until_file_exists(slave_pid); - if ((err = wait_for_server_start(bin_dir, user, password, slave_port)) == 0) + if ((err = wait_for_server_start(bin_dir, user, password, slave_port,mysql_tmp_dir)) == 0) { slave_running = TRUE; } @@ -633,7 +636,7 @@ void stop_slave() if (!slave_running) return; // stop - if ((err = stop_server(bin_dir, user, password, slave_port, slave_pid)) == 0) + if ((err = stop_server(bin_dir, user, password, slave_port, slave_pid,mysql_tmp_dir)) == 0) { slave_running = FALSE; } @@ -657,7 +660,7 @@ void stop_master() // running? if (!master_running) return; - if ((err = stop_server(bin_dir, user, password, master_port, master_pid)) == 0) + if ((err = stop_server(bin_dir, user, password, master_port, master_pid,mysql_tmp_dir)) == 0) { master_running = FALSE; } @@ -778,21 +781,31 @@ void run_test(char *test) char temp[PATH_MAX]; char *rstr; double elapsed = 0; - int skip = FALSE; + int skip = FALSE, ignore=FALSE; int restart = FALSE; int flag = FALSE; struct stat info; // single test? - if (!single_test) +// if (!single_test) { // skip tests in the skip list snprintf(temp, PATH_MAX, " %s ", test); skip = (strindex(skip_test, temp) != NULL); + if( skip == FALSE ) + ignore = (strindex(ignore_test, temp) != NULL); } - // skip test? - if (!skip) + if(ignore) + { + // show test + log("%-46s ", test); + + // ignore + rstr = TEST_IGNORE; + ++total_ignore; + } + else if (!skip) // skip test? { char test_file[PATH_MAX]; char master_opt_file[PATH_MAX]; @@ -1148,9 +1161,33 @@ void setup(char *file) ******************************************************************************/ int main(int argc, char **argv) { + int is_ignore_list = 0; // setup setup(argv[0]); + /* The --ignore option is comma saperated list of test cases to skip and should + * be very first command line option to the test suite. + * The usage is now: + * mysql_test_run --ignore=test1,test2 test3 test4 + * where test1 and test2 are test cases to ignore + * and test3 and test4 are test cases to run. */ + if( argc >= 2 && !strnicmp(argv[1], "--ignore=", sizeof("--ignore=")-1) ) + { + char *temp, *token; + temp=strdup(strchr(argv[1],'=') + 1); + for(token=strtok(temp, ","); token != NULL; token=strtok(NULL, ",")) + { + if( strlen(ignore_test) + strlen(token) + 2 <= PATH_MAX-1 ) + sprintf( ignore_test+strlen(ignore_test), " %s ", token); + else + { + free(temp); + die("ignore list too long."); + } + } + free(temp); + is_ignore_list = 1; + } // header log("MySQL Server %s, for %s (%s)\n\n", VERSION, SYSTEM_TYPE, MACHINE_TYPE); @@ -1165,14 +1202,14 @@ int main(int argc, char **argv) log(HEADER); log(DASH); - if (argc > 1) + if ( argc > 1 + is_ignore_list ) { int i; // single test single_test = TRUE; - for (i = 1; i < argc; i++) + for (i = 1 + is_ignore_list; i < argc; i++) { // run given test run_test(argv[i]); diff --git a/netware/mysql_waitpid.def b/netware/mysql_waitpid.def new file mode 100644 index 00000000000..4d56d29c42f --- /dev/null +++ b/netware/mysql_waitpid.def @@ -0,0 +1,12 @@ +#------------------------------------------------------------------------------ +# Wait for a Program to Terminate +#------------------------------------------------------------------------------ +MODULE libc.nlm +#SCREENNAME "MySQL Tool - Wait for a Program to Terminate" +COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." +DESCRIPTION "MySQL Tool - Wait for a Program to Terminate" +VERSION 4, 0 +STACKSIZE 65536 +XDCDATA ../netware/mysql.xdc +#DEBUG + diff --git a/netware/resolve_stack_dump.def b/netware/resolve_stack_dump.def new file mode 100644 index 00000000000..21fd177fbc7 --- /dev/null +++ b/netware/resolve_stack_dump.def @@ -0,0 +1,12 @@ +#------------------------------------------------------------------------------ +# Resolve Stack Dump +#------------------------------------------------------------------------------ +MODULE libc.nlm +#SCREENNAME "MySQL Stack Dump Resolve Tool" +COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." +DESCRIPTION "MySQL Stack Dump Resolve Tool" +VERSION 4, 0 +STACKSIZE 65536 +XDCDATA ../netware/mysql.xdc +#DEBUG + diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh index c7945e31eda..240efbfad75 100644 --- a/scripts/make_binary_distribution.sh +++ b/scripts/make_binary_distribution.sh @@ -85,8 +85,8 @@ do fi done -for i in COPYING README Docs/INSTALL-BINARY \ - MySQLEULA.txt LICENSE.doc README.NW +for i in COPYING COPYING.LIB README Docs/INSTALL-BINARY \ + MySQLEULA.txt LICENSE.doc README.NW do if [ -f $i ] then @@ -151,6 +151,7 @@ done if [ $BASE_SYSTEM = "netware" ] ; then $CP -r netware/*.pl $BASE/scripts + $CP scripts/mysqlhotcopy $BASE/scripts/mysqlhotcopy.pl fi for i in \ @@ -167,7 +168,7 @@ do fi done -# convert the libs to .lib for NetWare +# convert the .a to .lib for NetWare if [ $BASE_SYSTEM = "netware" ] ; then for i in $BASE/lib/*.a do @@ -233,6 +234,16 @@ fi rm -f $BASE/bin/Makefile* $BASE/bin/*.in $BASE/bin/*.sh $BASE/bin/mysql_install_db $BASE/bin/make_binary_distribution $BASE/bin/setsomevars $BASE/support-files/Makefile* $BASE/support-files/*.sh + +# +# Remove system dependent files +# +if [ $BASE_SYSTEM = "netware" ] ; then + rm -f $BASE/MySQLEULA.txt +else + rm -f $BASE/README.NW +fi + # Make safe_mysqld a symlink to mysqld_safe for backwards portability # To be removed in MySQL 4.1 (cd $BASE/bin ; ln -s mysqld_safe safe_mysqld ) @@ -294,29 +305,47 @@ which_1 () exit 1 } -# -# Create the result tar file -# +if [ $BASE_SYSTEM != "netware" ] ; then + + # + # Create the result tar file + # + + tar=`which_1 gnutar gtar` + if test "$?" = "1" -o "$tar" = "" + then + tar=tar + fi + + echo "Using $tar to create archive" + cd $TMP + + OPT=cvf + if [ x$SILENT = x1 ] ; then + OPT=cf + fi + + $tar $OPT $SOURCE/$NEW_NAME.tar $NEW_NAME + cd $SOURCE + echo "Compressing archive" + rm -f $NEW_NAME.tar.gz + gzip -9 $NEW_NAME.tar + echo "Removing temporary directory" + rm -r -f $BASE + + echo "$NEW_NAME.tar.gz created" +else + + # + # Create a zip file for NetWare users + # + + cd $TMP + if test -e "$SOURCE/$NEW_NAME.zip"; then rm $SOURCE/$NEW_NAME.zip; fi + zip -r $SOURCE/$NEW_NAME.zip $NEW_NAME + echo "Removing temporary directory" + rm -r -f $BASE + + echo "$NEW_NAME.zip created" -tar=`which_1 gnutar gtar` -if test "$?" = "1" -o "$tar" = "" -then - tar=tar fi - -echo "Using $tar to create archive" -cd $TMP - -OPT=cvf -if [ x$SILENT = x1 ] ; then - OPT=cf -fi - -$tar $OPT $SOURCE/$NEW_NAME.tar $NEW_NAME -cd $SOURCE -echo "Compressing archive" -gzip -9 $NEW_NAME.tar -echo "Removing temporary directory" -rm -r -f $BASE - -echo "$NEW_NAME.tar.gz created" diff --git a/scripts/mysqlhotcopy.sh b/scripts/mysqlhotcopy.sh index ab06215c3ac..6388855eaa6 100644 --- a/scripts/mysqlhotcopy.sh +++ b/scripts/mysqlhotcopy.sh @@ -7,6 +7,7 @@ use File::Basename; use File::Path; use DBI; use Sys::Hostname; +use File::Copy; =head1 NAME @@ -230,6 +231,10 @@ elsif (defined($tgt_name) && ($tgt_name =~ m:/: || $tgt_name eq '.')) { elsif ( $opt{suffix} ) { print "Using copy suffix '$opt{suffix}'\n" unless $opt{quiet}; } +elsif ( ($^O =~ m/^(NetWare)$/) && defined($tgt_name) && ($tgt_name =~ m:\\: || $tgt_name eq '.')) +{ + $tgt_dirname = $tgt_name; +} else { $tgt_name="" if (!defined($tgt_name)); @@ -421,8 +426,11 @@ foreach my $rdb ( @db_desc ) { else { mkdir($tgt_dirpath, 0750) or die "Can't create '$tgt_dirpath': $!\n" unless -d $tgt_dirpath; + if ($^O !~ m/^(NetWare)$/) + { my @f_info= stat "$datadir/$rdb->{src}"; chown $f_info[4], $f_info[5], $tgt_dirpath; + } } } } @@ -578,7 +586,15 @@ sub copy_files { my @cmd; print "Copying ".@$files." files...\n" unless $opt{quiet}; - if ($method =~ /^s?cp\b/) { # cp or scp with optional flags + if ($^O =~ m/^(NetWare)$/) # on NetWare call PERL copy (slower) + { + foreach my $file ( @$files ) + { + copy($file, $target."/".basename($file)); + } + } + elsif ($method =~ /^s?cp\b/) # cp or scp with optional flags + { my $cp = $method; # add option to preserve mod time etc of copied files # not critical, but nice to have @@ -717,7 +733,7 @@ sub retire_directory { if ( -d $tgt_oldpath ) { print "Deleting previous 'old' hotcopy directory ('$tgt_oldpath')\n" unless $opt{quiet}; - rmtree([$tgt_oldpath]) + rmtree([$tgt_oldpath],0,1); } rename($dir, $tgt_oldpath) or die "Can't rename $dir=>$tgt_oldpath: $!\n"; diff --git a/sql/mysqld.cc b/sql/mysqld.cc index c1ea29caa88..23af9f8d23e 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -125,11 +125,28 @@ int deny_severity = LOG_WARNING; #include #include #include +#include //For NEB +#include //For NEB +#include //For NEB +#include //For NSS event structures +#include +void *neb_consumer_id=NULL; //For storing NEB consumer id +char datavolname[256]={0}; +VolumeID_t datavolid; event_handle_t eh; Report_t ref; +void *refneb=NULL; +int volumeid=-1; + + /* NEB event callback */ +unsigned long neb_event_callback(struct EventBlock *eblock); +void registerwithneb(); +void getvolumename(); +void getvolumeID(BYTE *volumeName); #endif /* __NETWARE__ */ + #ifdef _AIX41 int initgroups(const char *,unsigned int); #endif @@ -1424,6 +1441,7 @@ static void start_signal_handler(void) static void check_data_home(const char *path) {} + #elif defined(__NETWARE__) // down server event callback @@ -1432,27 +1450,196 @@ void mysql_down_server_cb(void *, void *) kill_server(0); } + // destroy callback resources void mysql_cb_destroy(void *) { UnRegisterEventNotification(eh); // cleanup down event notification NX_UNWRAP_INTERFACE(ref); + + /* Deregister NSS volume deactivation event */ + NX_UNWRAP_INTERFACE(refneb); + if (neb_consumer_id) + UnRegisterConsumer(neb_consumer_id, NULL); } + // initialize callbacks void mysql_cb_init() { // register for down server event void *handle = getnlmhandle(); - rtag_t rt = AllocateResourceTag(handle, "MySQL Down Server Callback", - EventSignature); + rtag_t rt= AllocateResourceTag(handle, "MySQL Down Server Callback", + EventSignature); NX_WRAP_INTERFACE((void *)mysql_down_server_cb, 2, (void **)&ref); - eh = RegisterForEventNotification(rt, EVENT_DOWN_SERVER, - EVENT_PRIORITY_APPLICATION, - NULL, ref, NULL); + eh= RegisterForEventNotification(rt, EVENT_PRE_DOWN_SERVER, + EVENT_PRIORITY_APPLICATION, + NULL, ref, NULL); + + /* + Register for volume deactivation event + Wrap the callback function, as it is called by non-LibC thread + */ + (void)NX_WRAP_INTERFACE(neb_event_callback, 1, &refneb); + registerwithneb(); + NXVmRegisterExitHandler(mysql_cb_destroy, NULL); // clean-up } + +/ *To get the name of the NetWare volume having MySQL data folder */ + +void getvolumename() +{ + char *p; + /* + We assume that data path is already set. + If not it won't come here. Terminate after volume name + */ + if ((p= strchr(mysql_real_data_home, ':'))) + strmake(datavolname, mysql_real_data_home, + (uint) (p - mysql_real_data_home)); +} + + +/* + Registering with NEB for NSS Volume Deactivation event +*/ + +void registerwithneb() +{ + + ConsumerRegistrationInfo reg_info; + + /* Clear NEB registration structure */ + bzero((char*) ®_info, sizeof(struct ConsumerRegistrationInfo)); + + /* Fill the NEB consumer information structure */ + reg_info.CRIVersion= 1; // NEB version + /* NEB Consumer name */ + reg_info.CRIConsumerName= (BYTE *) "MySQL Database Server"; + /* Event of interest */ + reg_info.CRIEventName= (BYTE *) "NSS.ChangeVolState.Enter"; + reg_info.CRIUserParameter= NULL; // Consumer Info + reg_info.CRIEventFlags= 0; // Event flags + /* Consumer NLM handle */ + reg_info.CRIOwnerID= (LoadDefinitionStructure *)getnlmhandle(); + reg_info.CRIConsumerESR= NULL; // No consumer ESR required + reg_info.CRISecurityToken= 0; // No security token for the event + reg_info.CRIConsumerFlags= 0; // SMP_ENABLED_BIT; + reg_info.CRIFilterName= 0; // No event filtering + reg_info.CRIFilterDataLength= 0; // No filtering data + reg_info.CRIFilterData= 0; // No filtering data + /* Callback function for the event */ + (void *)reg_info.CRIConsumerCallback= (void *) refneb; + reg_info.CRIOrder= 0; // Event callback order + reg_info.CRIConsumerType= CHECK_CONSUMER; // Consumer type + + /* Register for the event with NEB */ + if (RegisterConsumer(®_info)) + { + consoleprintf("Failed to register for NSS Volume Deactivation event \n"); + return; + } + /* This ID is required for deregistration */ + neb_consumer_id= reg_info.CRIConsumerID; + + /* Get MySQL data volume name, stored in global variable datavolname */ + getvolumename(); + + /* + Get the NSS volume ID of the MySQL Data volume. + Volume ID is stored in a global variable + */ + getvolumeID((BYTE*) datavolname); +} + + +/* + Callback for NSS Volume Deactivation event +*/ +ulong neb_event_callback(struct EventBlock *eblock) +{ + EventChangeVolStateEnter_s *voldata; + voldata= (EventChangeVolStateEnter_s *)eblock->EBEventData; + + /* Deactivation of a volume */ + if ((voldata->oldState == 6 && voldata->newState == 2)) + { + /* + Ensure that we bring down MySQL server only for MySQL data + volume deactivation + */ + if (!memcmp(&voldata->volID, &datavolid, sizeof(VolumeID_t))) + { + consoleprintf("MySQL data volume is deactivated, shutting down MySQL Server \n"); + kill_server(0); + } + } + return 0; +} + + +/* + Function to get NSS volume ID of the MySQL data +*/ + +#define ADMIN_VOL_PATH "_ADMIN:/Volumes/" + +void getvolumeID(BYTE *volumeName) +{ + char path[zMAX_FULL_NAME]; + Key_t rootKey= 0, fileKey= 0; + QUAD getInfoMask; + zInfo_s info; + STATUS status; + + /* Get the root key */ + if ((status= zRootKey(0, &rootKey)) != zOK) + { + consoleprintf("\nGetNSSVolumeProperties - Failed to get root key, status: %d\n.", (int) status); + goto exit; + } + + /* + Get the file key. This is the key to the volume object in the + NSS admin volumes directory. + */ + + strxmov(path, (const char *) ADMIN_VOL_PATH, (const char *) volumeName, + NullS); + if ((status= zOpen(rootKey, zNSS_TASK, zNSPACE_LONG|zMODE_UTF8, + (BYTE *) path, zRR_READ_ACCESS, &fileKey)) != zOK) + { + consoleprintf("\nGetNSSVolumeProperties - Failed to get file, status: %d\n.", (int) status); + goto exit; + } + + getInfoMask= zGET_IDS | zGET_VOLUME_INFO ; + if ((status= zGetInfo(fileKey, getInfoMask, sizeof(info), + zINFO_VERSION_A, &info)) != zOK) + { + consoleprintf("\nGetNSSVolumeProperties - Failed in zGetInfo, status: %d\n.", (int) status); + goto exit; + } + + /* Copy the data to global variable */ + datavolid.timeLow= info.vol.volumeID.timeLow; + datavolid.timeMid= info.vol.volumeID.timeMid; + datavolid.timeHighAndVersion= info.vol.volumeID.timeHighAndVersion; + datavolid.clockSeqHighAndReserved= info.vol.volumeID.clockSeqHighAndReserved; + datavolid.clockSeqLow= info.vol.volumeID.clockSeqLow; + /* This is guranteed to be 6-byte length (but sizeof() would be better) */ + memcpy(datavolid.node, info.vol.volumeID.node, (unsigned int) 6); + +exit: + if (rootKey) + zClose(rootKey); + if (fileKey) + zClose(fileKey); +} + + static void init_signals(void) { int signals[] = {SIGINT,SIGILL,SIGFPE,SIGSEGV,SIGTERM,SIGABRT}; @@ -1462,6 +1649,7 @@ static void init_signals(void) mysql_cb_init(); // initialize callbacks } + static void start_signal_handler(void) { // Save vm id of this process @@ -1471,7 +1659,12 @@ static void start_signal_handler(void) } -/* Warn if the data is on a Traditional volume */ +/* + Warn if the data is on a Traditional volume + + NOTE + Already done by mysqld_safe +*/ static void check_data_home(const char *path) { @@ -1819,7 +2012,7 @@ extern "C" void *signal_hand(void *arg __attribute__((unused))) (REFRESH_LOG | REFRESH_TABLES | REFRESH_FAST | REFRESH_STATUS | REFRESH_GRANT | REFRESH_THREADS | REFRESH_HOSTS), - (TABLE_LIST*) 0); // Flush logs + (TABLE_LIST*) 0); // Flush logs mysql_print_status((THD*) 0); // Send debug some info } break; @@ -1910,6 +2103,7 @@ extern "C" pthread_handler_decl(handle_shutdown,arg) return 0; } + int STDCALL handle_kill(ulong ctrl_type) { if (ctrl_type == CTRL_CLOSE_EVENT || @@ -1922,6 +2116,7 @@ int STDCALL handle_kill(ulong ctrl_type) } #endif + #ifdef OS2 extern "C" pthread_handler_decl(handle_shutdown,arg) { @@ -4662,6 +4857,10 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), opt_specialflag|=SPECIAL_LONG_LOG_FORMAT; break; case (int) OPT_SKIP_NETWORKING: +#if defined(__NETWARE__) + sql_perror("Can't start server: skip-networking option is currently not supported on NetWare"); + exit(1); +#endif opt_disable_networking=1; mysql_port=0; break; diff --git a/tools/mysqlmanager.c b/tools/mysqlmanager.c index 790a5d56b5a..27dfa18e421 100644 --- a/tools/mysqlmanager.c +++ b/tools/mysqlmanager.c @@ -21,6 +21,8 @@ Sasha Pachev */ +#ifndef __NETWARE__ + #include #include #include @@ -1846,3 +1848,16 @@ int main(int argc, char** argv) else return daemonize(); } + +#else + +#include + +int main(void) +{ + fprintf(stderr,"This tool has not been ported to NetWare\n"); + return 0; +} + +#endif /* __NETWARE__ */ + diff --git a/vio/test-ssl.c b/vio/test-ssl.c index 84bae5fa0c7..88df6936a1f 100644 --- a/vio/test-ssl.c +++ b/vio/test-ssl.c @@ -15,7 +15,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include -#ifdef HAVE_OPENSSL +#if defined(HAVE_OPENSSL) && !defined(__NETWARE__) #include #include #include diff --git a/vio/viossl.c b/vio/viossl.c index fafe48b7a84..a489cb98f98 100644 --- a/vio/viossl.c +++ b/vio/viossl.c @@ -25,6 +25,31 @@ #ifdef HAVE_OPENSSL +#ifdef __NETWARE__ +/* + The default OpenSSL implementation on NetWare uses WinSock. + This code allows us to use the BSD sockets. +*/ + +static int SSL_set_fd_bsd(SSL *s, int fd) +{ + int result= -1; + BIO_METHOD *BIO_s_bsdsocket(); + BIO *bio; + + if ((bio= BIO_new(BIO_s_bsdsocket()))) + { + result= BIO_set_fd(bio, fd, BIO_NOCLOSE); + SSL_set_bio(s, bio, bio); + } + return result; +} + +#define SSL_set_fd(A, B) SSL_set_fd_bsd((A), (B)) + +#endif /* __NETWARE__ */ + + static void report_errors() { diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c index 0997e3909db..498d10da0ee 100644 --- a/vio/viosslfactories.c +++ b/vio/viosslfactories.c @@ -172,6 +172,35 @@ vio_verify_callback(int ok, X509_STORE_CTX *ctx) } +#ifdef __NETWARE__ + +/* NetWare SSL cleanup */ +void netware_ssl_cleanup() +{ + /* free memory from SSL_library_init() */ + EVP_cleanup(); + + /* free global X509 method */ + X509_STORE_method_cleanup(); + + /* free the thread_hash error table */ + ERR_free_state_table(); +} + + +/* NetWare SSL initialization */ +static void netware_ssl_init() +{ + /* initialize OpenSSL library */ + SSL_library_init(); + + /* cleanup OpenSSL library */ + NXVmRegisterExitHandler(netware_ssl_cleanup, NULL); +} + +#endif /* __NETWARE__ */ + + /************************ VioSSLConnectorFd **********************************/ /* TODO: @@ -188,7 +217,7 @@ new_VioSSLConnectorFd(const char* key_file, int verify = SSL_VERIFY_NONE; struct st_VioSSLConnectorFd* ptr; int result; - DH *dh=NULL; + DH *dh; DBUG_ENTER("new_VioSSLConnectorFd"); DBUG_PRINT("enter", ("key_file=%s, cert_file=%s, ca_path=%s, ca_file=%s, cipher=%s", @@ -202,6 +231,10 @@ new_VioSSLConnectorFd(const char* key_file, ptr->ssl_method= 0; /* FIXME: constants! */ +#ifdef __NETWARE__ + netware_ssl_init(); +#endif + if (!ssl_algorithms_added) { DBUG_PRINT("info", ("todo: OpenSSL_add_all_algorithms()")); @@ -279,7 +312,7 @@ new_VioSSLAcceptorFd(const char *key_file, SSL_VERIFY_CLIENT_ONCE); struct st_VioSSLAcceptorFd* ptr; int result; - DH *dh=NULL; + DH *dh; DBUG_ENTER("new_VioSSLAcceptorFd"); DBUG_PRINT("enter", ("key_file=%s, cert_file=%s, ca_path=%s, ca_file=%s, cipher=%s", @@ -292,6 +325,10 @@ new_VioSSLAcceptorFd(const char *key_file, /* FIXME: constants! */ ptr->session_id_context= ptr; +#ifdef __NETWARE__ + netware_ssl_init(); +#endif + if (!ssl_algorithms_added) { DBUG_PRINT("info", ("todo: OpenSSL_add_all_algorithms()")); From 19a78ceac8e0d70db3178930f67f0a0f8b7cb46d Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 26 May 2004 00:27:00 +0500 Subject: [PATCH 08/38] Proposed fix for bug #3818 (libmysqld.dll leads to program's crash) configurations added to build the libraries with USE_TLS flag to be used for libmysqld VC++Files/dbug/dbug.dsp: TLS_DEBUG configuration added VC++Files/heap/heap.dsp: TLS and TLS_DEBUG configurations added VC++Files/isam/isam.dsp: TLS and TLS_DEBUG configurations added VC++Files/libmysql/libmysql.dsp: MYSQL_CLIENT define enabled VC++Files/libmysqld/libmysqld.dsp: using of _tls libraries added VC++Files/myisam/myisam.dsp: TLS and TLS_DEBUG configurations added VC++Files/myisammrg/myisammrg.dsp: TLS and TLS_DEBUG configurations added VC++Files/mysys/mysys.dsp: TLS and TLS_DEBUG configurations added include/mysql_com.h: __declspec(dllimport) seems to be necessary when one uses .dll on Windows --- VC++Files/dbug/dbug.dsp | 27 ++++++++++++ VC++Files/heap/heap.dsp | 61 +++++++++++++++++++++++++++ VC++Files/isam/isam.dsp | 54 ++++++++++++++++++++++++ VC++Files/libmysql/libmysql.dsp | 4 +- VC++Files/libmysqld/libmysqld.dsp | 12 +++--- VC++Files/myisam/myisam.dsp | 50 ++++++++++++++++++++++ VC++Files/myisammrg/myisammrg.dsp | 52 +++++++++++++++++++++++ VC++Files/mysys/mysys.dsp | 69 +++++++++++++++++++++++++++++++ include/mysql_com.h | 10 ++++- 9 files changed, 329 insertions(+), 10 deletions(-) diff --git a/VC++Files/dbug/dbug.dsp b/VC++Files/dbug/dbug.dsp index 8d0ebf2878b..f2962848939 100644 --- a/VC++Files/dbug/dbug.dsp +++ b/VC++Files/dbug/dbug.dsp @@ -19,6 +19,7 @@ CFG=dbug - Win32 Debug !MESSAGE !MESSAGE "dbug - Win32 Release" (based on "Win32 (x86) Static Library") !MESSAGE "dbug - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "dbug - Win32 TLS_DEBUG" (based on "Win32 (x86) Static Library") !MESSAGE # Begin Project @@ -76,12 +77,38 @@ LIB32=xilink6.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo /out:"..\lib_debug\dbug.lib" +!ELSEIF "$(CFG)" == "dbug - Win32 TLS_DEBUG" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "dbug___Win32_TLS_DEBUG" +# PROP BASE Intermediate_Dir "dbug___Win32_TLS_DEBUG" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "dbug___Win32_TLS_DEBUG" +# PROP Intermediate_Dir "dbug___Win32_TLS_DEBUG" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G6 /MTd /W3 /Z7 /Od /Gf /I "../include" /D "__WIN32__" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /Gf /I "../include" /D "__WIN32__" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /D "USE_TLS" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 +# ADD RSC /l 0x409 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib_debug\dbug_tls.lib" +# ADD LIB32 /nologo /out:"..\lib_debug\dbug_tls.lib" + !ENDIF # Begin Target # Name "dbug - Win32 Release" # Name "dbug - Win32 Debug" +# Name "dbug - Win32 TLS_DEBUG" # Begin Source File SOURCE=.\dbug.c diff --git a/VC++Files/heap/heap.dsp b/VC++Files/heap/heap.dsp index 447777b17ef..8b72560a8b6 100644 --- a/VC++Files/heap/heap.dsp +++ b/VC++Files/heap/heap.dsp @@ -19,6 +19,8 @@ CFG=heap - Win32 Debug !MESSAGE !MESSAGE "heap - Win32 Release" (based on "Win32 (x86) Static Library") !MESSAGE "heap - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "heap - Win32 TLS_DEBUG" (based on "Win32 (x86) Static Library") +!MESSAGE "heap - Win32 TLS" (based on "Win32 (x86) Static Library") !MESSAGE # Begin Project @@ -76,12 +78,64 @@ LIB32=xilink6.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo /out:"..\lib_debug\heap.lib" +!ELSEIF "$(CFG)" == "heap - Win32 TLS_DEBUG" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "heap___Win32_TLS_DEBUG" +# PROP BASE Intermediate_Dir "heap___Win32_TLS_DEBUG" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "heap___Win32_TLS_DEBUG" +# PROP Intermediate_Dir "heap___Win32_TLS_DEBUG" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G6 /MTd /W3 /Z7 /Od /Gf /I "../include" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /Gf /I "../include" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /D "USE_TLS" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 +# ADD RSC /l 0x409 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib_debug\heap_tls.lib" +# ADD LIB32 /nologo /out:"..\lib_debug\heap_tls.lib" + +!ELSEIF "$(CFG)" == "heap - Win32 TLS" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "heap___Win32_TLS" +# PROP BASE Intermediate_Dir "heap___Win32_TLS" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "heap___Win32_TLS" +# PROP Intermediate_Dir "heap___Win32_TLS" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /D "DBUG_OFF" /D "_WINDOWS" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /D "DBUG_OFF" /D "_WINDOWS" /D "NDEBUG" /D "USE_TLS" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 +# ADD RSC /l 0x409 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib_release\heap_tls.lib" +# ADD LIB32 /nologo /out:"..\lib_release\heap_tls.lib" + !ENDIF # Begin Target # Name "heap - Win32 Release" # Name "heap - Win32 Debug" +# Name "heap - Win32 TLS_DEBUG" +# Name "heap - Win32 TLS" # Begin Source File SOURCE=.\_check.c @@ -128,6 +182,13 @@ SOURCE=.\hp_hash.c # SUBTRACT CPP /YX +!ELSEIF "$(CFG)" == "heap - Win32 TLS_DEBUG" + +# SUBTRACT BASE CPP /YX +# SUBTRACT CPP /YX + +!ELSEIF "$(CFG)" == "heap - Win32 TLS" + !ENDIF # End Source File diff --git a/VC++Files/isam/isam.dsp b/VC++Files/isam/isam.dsp index 3e1dcf9dc35..759a1b6ee03 100644 --- a/VC++Files/isam/isam.dsp +++ b/VC++Files/isam/isam.dsp @@ -19,6 +19,8 @@ CFG=isam - Win32 Debug !MESSAGE !MESSAGE "isam - Win32 Release" (based on "Win32 (x86) Static Library") !MESSAGE "isam - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "isam - Win32 TLS_DEBUG" (based on "Win32 (x86) Static Library") +!MESSAGE "isam - Win32 TLS" (based on "Win32 (x86) Static Library") !MESSAGE # Begin Project @@ -76,12 +78,64 @@ LIB32=xilink6.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo /out:"..\lib_Debug\isam.lib" +!ELSEIF "$(CFG)" == "isam - Win32 TLS_DEBUG" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "isam___Win32_TLS_DEBUG" +# PROP BASE Intermediate_Dir "isam___Win32_TLS_DEBUG" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "isam___Win32_TLS_DEBUG" +# PROP Intermediate_Dir "isam___Win32_TLS_DEBUG" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G6 /MTd /W3 /Z7 /Od /Gf /I "../include" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /Gf /I "../include" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /D "USE_TLS" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 +# ADD RSC /l 0x409 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib_Debug\isam_tls.lib" +# ADD LIB32 /nologo /out:"..\lib_Debug\isam_tls.lib" + +!ELSEIF "$(CFG)" == "isam - Win32 TLS" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "isam___Win32_TLS" +# PROP BASE Intermediate_Dir "isam___Win32_TLS" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "isam___Win32_TLS" +# PROP Intermediate_Dir "isam___Win32_TLS" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /D "DBUG_OFF" /D "_WINDOWS" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /D "DBUG_OFF" /D "_WINDOWS" /D "NDEBUG" /D "USE_TLS" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 +# ADD RSC /l 0x409 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib_release\isam_tls.lib" +# ADD LIB32 /nologo /out:"..\lib_release\isam_tls.lib" + !ENDIF # Begin Target # Name "isam - Win32 Release" # Name "isam - Win32 Debug" +# Name "isam - Win32 TLS_DEBUG" +# Name "isam - Win32 TLS" # Begin Source File SOURCE=.\_cache.c diff --git a/VC++Files/libmysql/libmysql.dsp b/VC++Files/libmysql/libmysql.dsp index 9e760e52a74..42723ea7402 100644 --- a/VC++Files/libmysql/libmysql.dsp +++ b/VC++Files/libmysql/libmysql.dsp @@ -43,7 +43,7 @@ RSC=rc.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "." /I "..\include" /I "../zlib" /D "DBUG_OFF" /D "_WINDOWS" /D "USE_TLS" /D "NDEBUG" /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "." /I "..\include" /I "../zlib" /D "DBUG_OFF" /D "_WINDOWS" /D "USE_TLS" /D "NDEBUG" /D "MYSQL_CLIENT" /FD /c # SUBTRACT CPP /YX # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 @@ -76,7 +76,7 @@ PostBuild_Cmds=xcopy release\libmysql.lib ..\lib_release /y # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "." /I "..\include" /I "../zlib" /D "_DEBUG" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /FD /c +# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "." /I "..\include" /I "../zlib" /D "_DEBUG" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /FD /c # SUBTRACT CPP /YX # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 diff --git a/VC++Files/libmysqld/libmysqld.dsp b/VC++Files/libmysqld/libmysqld.dsp index 47445fc05bf..7d393d5fb63 100644 --- a/VC++Files/libmysqld/libmysqld.dsp +++ b/VC++Files/libmysqld/libmysqld.dsp @@ -55,7 +55,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=xilink6.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 /nologo /dll /machine:I386 -# 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 Wsock32.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\innodb.lib ..\lib_release\bdb.lib ..\lib_release\zlib.lib /nologo /dll /machine:I386 /out:"../lib_release/libmysqld.dll" /implib:"../lib_release/libmysqld.lib" +# 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 Wsock32.lib ..\lib_release\myisam_tls.lib ..\lib_release\myisammrg_tls.lib ..\lib_release\mysys_tls.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap_tls.lib ..\lib_release\innodb.lib ..\lib_release\bdb.lib ..\lib_release\zlib.lib /nologo /dll /machine:I386 /out:"../lib_release/libmysqld.dll" /implib:"../lib_release/libmysqld.lib" # SUBTRACT LINK32 /pdb:none !ELSEIF "$(CFG)" == "libmysqld - Win32 Debug" @@ -82,7 +82,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=xilink6.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 /nologo /dll /debug /machine:I386 /pdbtype:sept -# 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 Wsock32.lib ..\lib_debug\dbug.lib ..\lib_debug\mysys.lib ..\lib_debug\strings.lib ..\lib_debug\regex.lib ..\lib_debug\heap.lib ..\lib_debug\innodb.lib /nologo /dll /incremental:no /debug /machine:I386 /nodefaultlib:"LIBCMTD" /out:"../lib_debug/libmysqld.dll" /implib:"../lib_debug/libmysqld.lib" /pdbtype:sept +# 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 Wsock32.lib ..\lib_debug\dbug_tls.lib ..\lib_debug\mysys_tls.lib ..\lib_debug\strings.lib ..\lib_debug\regex.lib ..\lib_debug\heap_tls.lib ..\lib_debug\innodb.lib /nologo /dll /incremental:no /debug /machine:I386 /nodefaultlib:"LIBCMTD" /out:"../lib_debug/libmysqld.dll" /implib:"../lib_debug/libmysqld.lib" /pdbtype:sept # SUBTRACT LINK32 /pdb:none !ELSEIF "$(CFG)" == "libmysqld - Win32 classic" @@ -109,9 +109,9 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=xilink6.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 Wsock32.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\zlib.lib /nologo /dll /machine:I386 /out:"../lib_release/libmysqld.dll" /implib:"../lib_release/libmysqld.lib" +# 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 Wsock32.lib ..\lib_release\myisam_tls.lib ..\lib_release\myisammrg_tls.lib ..\lib_release\mysys_tls.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap_tls.lib ..\lib_release\zlib.lib /nologo /dll /machine:I386 /out:"../lib_release/libmysqld.dll" /implib:"../lib_release/libmysqld.lib" # 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 Wsock32.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\zlib.lib /nologo /dll /machine:I386 /out:"../lib_classic/libmysqld.dll" /implib:"../lib_release/libmysqld.lib" +# 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 Wsock32.lib ..\lib_release\myisam_tls.lib ..\lib_release\myisammrg_tls.lib ..\lib_release\mysys_tls.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap_tls.lib ..\lib_release\zlib.lib /nologo /dll /machine:I386 /out:"../lib_classic/libmysqld.dll" /implib:"../lib_release/libmysqld.lib" # SUBTRACT LINK32 /pdb:none !ELSEIF "$(CFG)" == "libmysqld - Win32 pro" @@ -138,9 +138,9 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=xilink6.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 Wsock32.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\innodb.lib ..\lib_release\zlib.lib /nologo /dll /machine:I386 /out:"../lib_classic/libmysqld.dll" /implib:"../lib_release/libmysqld.lib" +# 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 Wsock32.lib ..\lib_release\myisam_tls.lib ..\lib_release\myisammrg_tls.lib ..\lib_release\mysys_tls.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap_tls.lib ..\lib_release\innodb.lib ..\lib_release\zlib.lib /nologo /dll /machine:I386 /out:"../lib_classic/libmysqld.dll" /implib:"../lib_release/libmysqld.lib" # 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 Wsock32.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\innodb.lib ..\lib_release\zlib.lib /nologo /dll /machine:I386 /out:"../lib_pro/libmysqld.dll" /implib:"../lib_release/libmysqld.lib" +# 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 Wsock32.lib ..\lib_release\myisam_tls.lib ..\lib_release\myisammrg_tls.lib ..\lib_release\mysys_tls.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap_tls.lib ..\lib_release\innodb.lib ..\lib_release\zlib.lib /nologo /dll /machine:I386 /out:"../lib_pro/libmysqld.dll" /implib:"../lib_release/libmysqld.lib" # SUBTRACT LINK32 /pdb:none !ENDIF diff --git a/VC++Files/myisam/myisam.dsp b/VC++Files/myisam/myisam.dsp index e3c1f8cee7b..8e5900e6493 100644 --- a/VC++Files/myisam/myisam.dsp +++ b/VC++Files/myisam/myisam.dsp @@ -19,6 +19,8 @@ CFG=myisam - Win32 Debug !MESSAGE !MESSAGE "myisam - Win32 Release" (based on "Win32 (x86) Static Library") !MESSAGE "myisam - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "myisam - Win32 TLS_DEBUG" (based on "Win32 (x86) Static Library") +!MESSAGE "myisam - Win32 TLS" (based on "Win32 (x86) Static Library") !MESSAGE # Begin Project @@ -74,12 +76,60 @@ LIB32=xilink6.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo /out:"..\lib_Debug\myisam.lib" +!ELSEIF "$(CFG)" == "myisam - Win32 TLS_DEBUG" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "myisam___Win32_TLS_DEBUG" +# PROP BASE Intermediate_Dir "myisam___Win32_TLS_DEBUG" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "myisam___Win32_TLS_DEBUG" +# PROP Intermediate_Dir "myisam___Win32_TLS_DEBUG" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G6 /MTd /W3 /Z7 /Od /Gf /I "../include" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /Fo".\Debug/" /Fd".\Debug/" /FD /c +# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /Gf /I "../include" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /D "USE_TLS" /Fo".\Debug/" /Fd".\Debug/" /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib_Debug\myisam_tls.lib" +# ADD LIB32 /nologo /out:"..\lib_Debug\myisam_tls.lib" + +!ELSEIF "$(CFG)" == "myisam - Win32 TLS" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "myisam___Win32_TLS" +# PROP BASE Intermediate_Dir "myisam___Win32_TLS" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "myisam___Win32_TLS" +# PROP Intermediate_Dir "myisam___Win32_TLS" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /D "DBUG_OFF" /D "_WINDOWS" /D "NDEBUG" /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /D "DBUG_OFF" /D "_WINDOWS" /D "NDEBUG" /D "USE_TLS" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib_release\myisam_tls.lib" +# ADD LIB32 /nologo /out:"..\lib_release\myisam_tls.lib" + !ENDIF # Begin Target # Name "myisam - Win32 Release" # Name "myisam - Win32 Debug" +# Name "myisam - Win32 TLS_DEBUG" +# Name "myisam - Win32 TLS" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" diff --git a/VC++Files/myisammrg/myisammrg.dsp b/VC++Files/myisammrg/myisammrg.dsp index 95befedb670..fa55177b5ea 100644 --- a/VC++Files/myisammrg/myisammrg.dsp +++ b/VC++Files/myisammrg/myisammrg.dsp @@ -19,6 +19,8 @@ CFG=myisammrg - Win32 Debug !MESSAGE !MESSAGE "myisammrg - Win32 Release" (based on "Win32 (x86) Static Library") !MESSAGE "myisammrg - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "myisammrg - Win32 TLS_DEBUG" (based on "Win32 (x86) Static Library") +!MESSAGE "myisammrg - Win32 TLS" (based on "Win32 (x86) Static Library") !MESSAGE # Begin Project @@ -75,12 +77,62 @@ LIB32=xilink6.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo /out:"..\lib_Debug\myisammrg.lib" +!ELSEIF "$(CFG)" == "myisammrg - Win32 TLS_DEBUG" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "myisammrg___Win32_TLS_DEBUG" +# PROP BASE Intermediate_Dir "myisammrg___Win32_TLS_DEBUG" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "myisammrg___Win32_TLS_DEBUG" +# PROP Intermediate_Dir "myisammrg___Win32_TLS_DEBUG" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G6 /MTd /W3 /Z7 /Od /Gf /I "../include" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /Fo".\Debug/" /Fd".\Debug/" /FD /c +# SUBTRACT BASE CPP /Fr +# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /Gf /I "../include" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /D "USE_TLS" /Fo".\Debug/" /Fd".\Debug/" /FD /c +# SUBTRACT CPP /Fr +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib_Debug\myisammrg_tls.lib" +# ADD LIB32 /nologo /out:"..\lib_Debug\myisammrg_tls.lib" + +!ELSEIF "$(CFG)" == "myisammrg - Win32 TLS" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "myisammrg___Win32_TLS" +# PROP BASE Intermediate_Dir "myisammrg___Win32_TLS" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "myisammrg___Win32_TLS" +# PROP Intermediate_Dir "myisammrg___Win32_TLS" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /D "DBUG_OFF" /D "_WINDOWS" /D "NDEBUG" /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /D "DBUG_OFF" /D "_WINDOWS" /D "NDEBUG" /D "USE_TLS" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib_release\myisammrg_tls.lib" +# ADD LIB32 /nologo /out:"..\lib_release\myisammrg_tls.lib" + !ENDIF # Begin Target # Name "myisammrg - Win32 Release" # Name "myisammrg - Win32 Debug" +# Name "myisammrg - Win32 TLS_DEBUG" +# Name "myisammrg - Win32 TLS" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" diff --git a/VC++Files/mysys/mysys.dsp b/VC++Files/mysys/mysys.dsp index 27efafd8f12..c021adb8d9c 100644 --- a/VC++Files/mysys/mysys.dsp +++ b/VC++Files/mysys/mysys.dsp @@ -20,6 +20,8 @@ CFG=mysys - Win32 Debug !MESSAGE "mysys - Win32 Release" (based on "Win32 (x86) Static Library") !MESSAGE "mysys - Win32 Debug" (based on "Win32 (x86) Static Library") !MESSAGE "mysys - Win32 Max" (based on "Win32 (x86) Static Library") +!MESSAGE "mysys - Win32 TLS_DEBUG" (based on "Win32 (x86) Static Library") +!MESSAGE "mysys - Win32 TLS" (based on "Win32 (x86) Static Library") !MESSAGE # Begin Project @@ -102,6 +104,56 @@ LIB32=xilink6.exe -lib # ADD BASE LIB32 /nologo /out:"..\lib_release\mysys.lib" # ADD LIB32 /nologo /out:"..\lib_release\mysys-max.lib" +!ELSEIF "$(CFG)" == "mysys - Win32 TLS_DEBUG" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "mysys___Win32_TLS_DEBUG" +# PROP BASE Intermediate_Dir "mysys___Win32_TLS_DEBUG" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "mysys___Win32_TLS_DEBUG" +# PROP Intermediate_Dir "mysys___Win32_TLS_DEBUG" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "../include" /I "../zlib" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /D "USE_SYMDIR" /FD /c +# SUBTRACT BASE CPP /Fr +# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "../include" /I "../zlib" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /D "USE_SYMDIR" /D "USE_TLS" /FD /c +# SUBTRACT CPP /Fr +# ADD BASE RSC /l 0x409 +# ADD RSC /l 0x409 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib_debug\mysys_tls.lib" +# ADD LIB32 /nologo /out:"..\lib_debug\mysys_tls.lib" + +!ELSEIF "$(CFG)" == "mysys - Win32 TLS" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "mysys___Win32_TLS" +# PROP BASE Intermediate_Dir "mysys___Win32_TLS" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "mysys___Win32_TLS" +# PROP Intermediate_Dir "mysys___Win32_TLS" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../zlib" /D "DBUG_OFF" /D "_WINDOWS" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../zlib" /D "DBUG_OFF" /D "_WINDOWS" /D "NDEBUG" /D "USE_TLS" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 +# ADD RSC /l 0x409 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib_release\mysys_tls.lib" +# ADD LIB32 /nologo /out:"..\lib_release\mysys_tls.lib" + !ENDIF # Begin Target @@ -109,6 +161,8 @@ LIB32=xilink6.exe -lib # Name "mysys - Win32 Release" # Name "mysys - Win32 Debug" # Name "mysys - Win32 Max" +# Name "mysys - Win32 TLS_DEBUG" +# Name "mysys - Win32 TLS" # Begin Source File SOURCE=.\array.c @@ -121,6 +175,14 @@ SOURCE=.\array.c !ELSEIF "$(CFG)" == "mysys - Win32 Max" + +!ELSEIF "$(CFG)" == "mysys - Win32 TLS_DEBUG" + +# ADD BASE CPP /FR +# ADD CPP /FR + +!ELSEIF "$(CFG)" == "mysys - Win32 TLS" + !ENDIF # End Source File @@ -504,6 +566,13 @@ SOURCE=.\thr_lock.c !ELSEIF "$(CFG)" == "mysys - Win32 Max" +!ELSEIF "$(CFG)" == "mysys - Win32 TLS_DEBUG" + +# ADD BASE CPP /D "EXTRA_DEBUG" +# ADD CPP /D "EXTRA_DEBUG" + +!ELSEIF "$(CFG)" == "mysys - Win32 TLS" + !ENDIF # End Source File diff --git a/include/mysql_com.h b/include/mysql_com.h index e183a0ed423..c81c90dec22 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -34,6 +34,12 @@ #define MYSQL_SERVICENAME "MySQL" #endif /* __WIN__ */ +#if defined(__WIN__) && !defined(MYSQL_SERVER) && !defined(MYSQL_CLIENT) && !defined(EMBEDDED_LIBRARY) +#define dll_import_spec __declspec( dllimport ) +#else +#define dll_import_spec +#endif + enum enum_server_command { COM_SLEEP, COM_QUIT, COM_INIT_DB, COM_QUERY, COM_FIELD_LIST, COM_CREATE_DB, COM_DROP_DB, COM_REFRESH, COM_SHUTDOWN, COM_STATISTICS, @@ -223,8 +229,8 @@ typedef struct st_udf_init extern "C" { #endif -extern unsigned long max_allowed_packet; -extern unsigned long net_buffer_length; +dll_import_spec extern unsigned long max_allowed_packet; +dll_import_spec extern unsigned long net_buffer_length; void randominit(struct rand_struct *,unsigned long seed1, unsigned long seed2); From fd079fdaa15ce2ed1b2d59cc6ff7dcba2bbc4112 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 26 May 2004 00:01:23 +0300 Subject: [PATCH 09/38] Added new header files --- include/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/Makefile.am b/include/Makefile.am index 4b881d0e7ed..bd1492766b1 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -25,7 +25,7 @@ pkginclude_HEADERS = my_dbug.h m_string.h my_sys.h my_list.h \ noinst_HEADERS = config-win.h config-os2.h config-netware.h \ nisam.h heap.h merge.h my_bitmap.h\ myisam.h myisampack.h myisammrg.h ft_global.h\ - mysys_err.h my_base.h \ + mysys_err.h my_base.h help_start.h help_end.h \ my_nosys.h my_alarm.h queues.h rijndael.h sha1.h \ my_aes.h my_tree.h hash.h thr_alarm.h \ thr_lock.h t_ctype.h violite.h md5.h mysql_version.h.in From 3b1dd9af7b1ba6645bf8c5594ee456ca62d0f4c0 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 26 May 2004 10:45:37 +0300 Subject: [PATCH 10/38] InnoDB cleanup: Remove unused code for online backup innobase/include/log0log.h: Remove references to online backup innobase/include/log0log.ic: Remove references to online backup innobase/include/mtr0mtr.h: Remove references to MLOG_FULL_PAGE innobase/log/log0log.c: Remove references to online backup innobase/log/log0recv.c: Remove references to MLOG_FULL_PAGE innobase/mtr/mtr0mtr.c: Remove references to MLOG_FULL_PAGE Remove references to online backup --- innobase/include/log0log.h | 35 ------- innobase/include/log0log.ic | 36 +------ innobase/include/mtr0mtr.h | 12 +-- innobase/log/log0log.c | 64 ------------ innobase/log/log0recv.c | 13 +-- innobase/mtr/mtr0mtr.c | 199 +----------------------------------- 6 files changed, 8 insertions(+), 351 deletions(-) diff --git a/innobase/include/log0log.h b/innobase/include/log0log.h index 6eef8144c27..c17998032ce 100644 --- a/innobase/include/log0log.h +++ b/innobase/include/log0log.h @@ -114,20 +114,6 @@ dulint log_get_lsn(void); /*=============*/ /* out: current lsn */ -/**************************************************************************** -Gets the online backup lsn. */ -UNIV_INLINE -dulint -log_get_online_backup_lsn_low(void); -/*===============================*/ -/**************************************************************************** -Gets the online backup state. */ -UNIV_INLINE -ibool -log_get_online_backup_state_low(void); -/*=================================*/ - /* out: online backup state, the caller must - own the log_sys mutex */ /********************************************************** Initializes the log. */ @@ -326,20 +312,6 @@ log_archived_file_name_gen( char* buf, /* in: buffer where to write */ ulint id, /* in: group id */ ulint file_no);/* in: file number */ -/********************************************************** -Switches the database to the online backup state. */ - -ulint -log_switch_backup_state_on(void); -/*============================*/ - /* out: DB_SUCCESS or DB_ERROR */ -/********************************************************** -Switches the online backup state off. */ - -ulint -log_switch_backup_state_off(void); -/*=============================*/ - /* out: DB_SUCCESS or DB_ERROR */ /************************************************************************ Checks that there is enough free space in the log to start a new query step. Flushes the log buffer or makes a new checkpoint if necessary. NOTE: this @@ -871,13 +843,6 @@ struct log_struct{ os_event_t archiving_on; /* if archiving has been stopped, a thread can wait for this event to become signaled */ - /* Fields involved in online backups */ - ibool online_backup_state; - /* TRUE if the database is in the - online backup state */ - dulint online_backup_lsn; - /* lsn when the state was changed to - the online backup state */ }; #define LOG_ARCH_ON 71 diff --git a/innobase/include/log0log.ic b/innobase/include/log0log.ic index 6e32a45cdc5..c38e5fe2b9c 100644 --- a/innobase/include/log0log.ic +++ b/innobase/include/log0log.ic @@ -318,8 +318,7 @@ log_reserve_and_write_fast( data_len = len + log->buf_free % OS_FILE_LOG_BLOCK_SIZE; - if (log->online_backup_state - || (data_len >= OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_TRL_SIZE)) { + if (data_len >= OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_TRL_SIZE) { /* The string does not fit within the current log block or the log block would become full */ @@ -403,36 +402,3 @@ log_free_check(void) log_check_margins(); } } - -/**************************************************************************** -Gets the online backup lsn. */ -UNIV_INLINE -dulint -log_get_online_backup_lsn_low(void) -/*===============================*/ - /* out: online_backup_lsn, the caller must - own the log_sys mutex */ -{ -#ifdef UNIV_SYNC_DEBUG - ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ - ut_ad(log_sys->online_backup_state); - - return(log_sys->online_backup_lsn); -} - -/**************************************************************************** -Gets the online backup state. */ -UNIV_INLINE -ibool -log_get_online_backup_state_low(void) -/*=================================*/ - /* out: online backup state, the caller must - own the log_sys mutex */ -{ -#ifdef UNIV_SYNC_DEBUG - ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ - - return(log_sys->online_backup_state); -} diff --git a/innobase/include/mtr0mtr.h b/innobase/include/mtr0mtr.h index 6117927504f..e693b88680e 100644 --- a/innobase/include/mtr0mtr.h +++ b/innobase/include/mtr0mtr.h @@ -82,7 +82,7 @@ flag value must give the length also! */ predefined minimum record */ #define MLOG_IBUF_BITMAP_INIT ((byte)27) /* initialize an ibuf bitmap page */ -#define MLOG_FULL_PAGE ((byte)28) /* full contents of a page */ +/*#define MLOG_FULL_PAGE ((byte)28) full contents of a page */ #define MLOG_INIT_FILE_PAGE ((byte)29) /* this means that a file page is taken into use and the prior contents of the page should be @@ -230,16 +230,6 @@ mtr_memo_release( mtr_t* mtr, /* in: mtr */ void* object, /* in: object */ ulint type); /* in: object type: MTR_MEMO_S_LOCK, ... */ -/**************************************************************** -Parses a log record which contains the full contents of a page. */ - -byte* -mtr_log_parse_full_page( -/*====================*/ - /* out: end of log record or NULL */ - byte* ptr, /* in: buffer */ - byte* end_ptr,/* in: buffer end */ - page_t* page); /* in: page or NULL */ /************************************************************** Checks if memo contains the given item. */ UNIV_INLINE diff --git a/innobase/log/log0log.c b/innobase/log/log0log.c index b058a65ce6e..a6c4ed598a4 100644 --- a/innobase/log/log0log.c +++ b/innobase/log/log0log.c @@ -793,11 +793,7 @@ log_init(void) log_sys->archiving_on = os_event_create(NULL); /*----------------------------*/ - - log_sys->online_backup_state = FALSE; - /*----------------------------*/ - log_block_init(log_sys->buf, log_sys->lsn); log_block_set_first_rec_group(log_sys->buf, LOG_BLOCK_HDR_SIZE); @@ -2973,66 +2969,6 @@ loop: mutex_exit(&(log_sys->mutex)); } -/********************************************************** -Switches the database to the online backup state. */ - -ulint -log_switch_backup_state_on(void) -/*============================*/ - /* out: DB_SUCCESS or DB_ERROR */ -{ - dulint backup_lsn; - - mutex_enter(&(log_sys->mutex)); - - if (log_sys->online_backup_state) { - - /* The database is already in that state */ - - mutex_exit(&(log_sys->mutex)); - - return(DB_ERROR); - } - - log_sys->online_backup_state = TRUE; - - backup_lsn = log_sys->lsn; - - log_sys->online_backup_lsn = backup_lsn; - - mutex_exit(&(log_sys->mutex)); - - /* log_checkpoint_and_mark_file_spaces(); */ - - return(DB_SUCCESS); -} - -/********************************************************** -Switches the online backup state off. */ - -ulint -log_switch_backup_state_off(void) -/*=============================*/ - /* out: DB_SUCCESS or DB_ERROR */ -{ - mutex_enter(&(log_sys->mutex)); - - if (!log_sys->online_backup_state) { - - /* The database is already in that state */ - - mutex_exit(&(log_sys->mutex)); - - return(DB_ERROR); - } - - log_sys->online_backup_state = FALSE; - - mutex_exit(&(log_sys->mutex)); - - return(DB_SUCCESS); -} - /******************************************************************** Makes a checkpoint at the latest lsn and writes it to first page of each data file in the database, so that we know that the file spaces contain diff --git a/innobase/log/log0recv.c b/innobase/log/log0recv.c index 33321376929..ba2e2064ec6 100644 --- a/innobase/log/log0recv.c +++ b/innobase/log/log0recv.c @@ -790,9 +790,6 @@ recv_parse_or_apply_log_rec_body( } else if (type == MLOG_IBUF_BITMAP_INIT) { new_ptr = ibuf_parse_bitmap_init(ptr, end_ptr, page, mtr); - } else if (type == MLOG_FULL_PAGE) { - new_ptr = mtr_log_parse_full_page(ptr, end_ptr, page); - } else if (type == MLOG_INIT_FILE_PAGE) { new_ptr = fsp_parse_init_file_page(ptr, end_ptr, page); @@ -1093,15 +1090,7 @@ recv_recover_page( buf = ((byte*)(recv->data)) + sizeof(recv_data_t); } - if (recv->type == MLOG_INIT_FILE_PAGE - || recv->type == MLOG_FULL_PAGE) { - /* A new file page may have been taken into use, - or we have stored the full contents of the page: - in this case it may be that the original log record - type was MLOG_INIT_FILE_PAGE, and we replaced it - with MLOG_FULL_PAGE, thus we have to apply - any record of type MLOG_FULL_PAGE */ - + if (recv->type == MLOG_INIT_FILE_PAGE) { page_lsn = page_newest_lsn; mach_write_to_8(page + UNIV_PAGE_SIZE diff --git a/innobase/mtr/mtr0mtr.c b/innobase/mtr/mtr0mtr.c index 46473cb3ffe..5a5fab61827 100644 --- a/innobase/mtr/mtr0mtr.c +++ b/innobase/mtr/mtr0mtr.c @@ -105,179 +105,6 @@ mtr_memo_pop_all( } } -/**************************************************************** -Writes to the log the contents of a full page. This is called when the -database is in the online backup state. */ -static -void -mtr_log_write_full_page( -/*====================*/ - page_t* page, /* in: page to write */ - ulint i, /* in: i'th page for mtr */ - ulint n_pages,/* in: total number of pages for mtr */ - mtr_t* mtr) /* in: mtr */ -{ - byte* buf; - byte* ptr; - ulint len; - - buf = mem_alloc(UNIV_PAGE_SIZE + 50); - - ptr = mlog_write_initial_log_record_fast(page, MLOG_FULL_PAGE, buf, - mtr); - ut_memcpy(ptr, page, UNIV_PAGE_SIZE); - - len = (ptr - buf) + UNIV_PAGE_SIZE; - - if (i == n_pages - 1) { - if (n_pages > 1) { - *(buf + len) = MLOG_MULTI_REC_END; - len++; - } else { - *buf = (byte)((ulint)*buf | MLOG_SINGLE_REC_FLAG); - } - } - - ut_ad(len < UNIV_PAGE_SIZE + 50); - - log_write_low(buf, len); - - mem_free(buf); -} - -/**************************************************************** -Parses a log record which contains the full contents of a page. */ - -byte* -mtr_log_parse_full_page( -/*====================*/ - /* out: end of log record or NULL */ - byte* ptr, /* in: buffer */ - byte* end_ptr,/* in: buffer end */ - page_t* page) /* in: page or NULL */ -{ - if (end_ptr < ptr + UNIV_PAGE_SIZE) { - - return(NULL); - } - - if (page) { - ut_memcpy(page, ptr, UNIV_PAGE_SIZE); - } - - return(ptr + UNIV_PAGE_SIZE); -} - -/**************************************************************** -Writes to the database log the full contents of the pages that this mtr has -modified. */ -static -void -mtr_log_write_backup_full_pages( -/*============================*/ - mtr_t* mtr, /* in: mini-transaction */ - ulint n_pages)/* in: number of pages modified by mtr */ -{ - mtr_memo_slot_t* slot; - dyn_array_t* memo; - buf_block_t* block; - ulint offset; - ulint type; - ulint i; - - ut_ad(mtr); - ut_ad(mtr->magic_n == MTR_MAGIC_N); - ut_ad(mtr->state == MTR_COMMITTING); - - /* Open the database log for log_write_low */ - mtr->start_lsn = log_reserve_and_open(n_pages * (UNIV_PAGE_SIZE + 50)); - - memo = &(mtr->memo); - - offset = dyn_array_get_data_size(memo); - - i = 0; - - while (offset > 0) { - offset -= sizeof(mtr_memo_slot_t); - slot = dyn_array_get_element(memo, offset); - - block = slot->object; - type = slot->type; - - if ((block != NULL) && (type == MTR_MEMO_PAGE_X_FIX)) { - - mtr_log_write_full_page(block->frame, i, n_pages, mtr); - - i++; - } - } - - ut_ad(i == n_pages); -} - -/**************************************************************** -Checks if mtr is the first to modify any page after online_backup_lsn. */ -static -ibool -mtr_first_to_modify_page_after_backup( -/*==================================*/ - /* out: TRUE if first for a page */ - mtr_t* mtr, /* in: mini-transaction */ - ulint* n_pages) /* out: number of modified pages (all modified - pages, backup_lsn does not matter here) */ -{ - mtr_memo_slot_t* slot; - dyn_array_t* memo; - ulint offset; - buf_block_t* block; - ulint type; - dulint backup_lsn; - ibool ret = FALSE; - - ut_ad(mtr); - ut_ad(mtr->magic_n == MTR_MAGIC_N); - ut_ad(mtr->state == MTR_COMMITTING); - - backup_lsn = log_get_online_backup_lsn_low(); - - memo = &(mtr->memo); - - offset = dyn_array_get_data_size(memo); - - *n_pages = 0; - - while (offset > 0) { - offset -= sizeof(mtr_memo_slot_t); - slot = dyn_array_get_element(memo, offset); - - block = slot->object; - type = slot->type; - - if ((block != NULL) && (type == MTR_MEMO_PAGE_X_FIX)) { - - *n_pages = *n_pages + 1; - - if (ut_dulint_cmp(buf_frame_get_newest_modification( - block->frame), - backup_lsn) <= 0) { - - fprintf(stderr, - "Page %lu newest %lu backup %lu\n", - block->offset, - ut_dulint_get_low( - buf_frame_get_newest_modification( - block->frame)), - ut_dulint_get_low(backup_lsn)); - - ret = TRUE; - } - } - } - - return(ret); -} - /**************************************************************** Writes the contents of a mini-transaction log, if any, to the database log. */ static @@ -291,7 +118,6 @@ mtr_log_reserve_and_write( ulint data_size; ibool success; byte* first_data; - ulint n_modified_pages; ut_ad(mtr); @@ -322,27 +148,12 @@ mtr_log_reserve_and_write( if (mtr->log_mode == MTR_LOG_ALL) { - if (log_get_online_backup_state_low() - && mtr_first_to_modify_page_after_backup(mtr, - &n_modified_pages)) { - - /* The database is in the online backup state: write - to the log the full contents of all the pages if this - mtr is the first to modify any page in the buffer pool - after online_backup_lsn */ + block = mlog; - log_close(); - log_release(); - - mtr_log_write_backup_full_pages(mtr, n_modified_pages); - } else { - block = mlog; - - while (block != NULL) { - log_write_low(dyn_block_get_data(block), - dyn_block_get_used(block)); - block = dyn_array_get_next_block(mlog, block); - } + while (block != NULL) { + log_write_low(dyn_block_get_data(block), + dyn_block_get_used(block)); + block = dyn_array_get_next_block(mlog, block); } } else { ut_ad(mtr->log_mode == MTR_LOG_NONE); From 00c41b28504728ecdce90a3a2975102e401a3bfc Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 26 May 2004 21:40:27 +0500 Subject: [PATCH 11/38] Fix to make Windows compilation smoother VC++Files/innobase/innobase.dsp: non-existent file removed client/mysql.cc: local opt_max_allowed_packet and opt_net_buffer_length introduced client/mysqldump.c: local opt_max_allowed_packet and opt_net_buffer_length introduced include/mysql.h: mysql_get_parameters() interface added #define max_allowed_packet added include/mysql_com.h: these should not be exported libmysql/libmysql.c: mysql_get_parameters implementations libmysql/libmysql.def: interface changed libmysql_r/Makefile.am: MYSQL_CLIENT define added libmysqld/lib_sql.cc: line moved to be above the '#include "mysql.cc"' libmysqld/libmysqld.c: mysql_get_parameters implementation (embedded) libmysqld/libmysqld.def: interface changed sql/log_event.cc: should be like that in this case tools/mysqlmanager.c: compiler warns on this line --- VC++Files/innobase/innobase.dsp | 4 ---- client/mysql.cc | 16 ++++++++++++---- client/mysqldump.c | 13 ++++++++++--- include/mysql.h | 13 +++++++++++++ include/mysql_com.h | 9 --------- libmysql/libmysql.c | 8 ++++++++ libmysql/libmysql.def | 19 +------------------ libmysql_r/Makefile.am | 2 +- libmysqld/lib_sql.cc | 6 +++++- libmysqld/libmysqld.c | 12 ++++++++++++ libmysqld/libmysqld.def | 3 +-- sql/log_event.cc | 1 + tools/mysqlmanager.c | 2 +- 13 files changed, 65 insertions(+), 43 deletions(-) diff --git a/VC++Files/innobase/innobase.dsp b/VC++Files/innobase/innobase.dsp index 25e9d5d75b8..ea0aaeb3b83 100644 --- a/VC++Files/innobase/innobase.dsp +++ b/VC++Files/innobase/innobase.dsp @@ -368,10 +368,6 @@ SOURCE=.\row\row0vers.c # End Source File # Begin Source File -SOURCE=.\srv\srv0que.c -# End Source File -# Begin Source File - SOURCE=.\srv\srv0srv.c # End Source File # Begin Source File diff --git a/client/mysql.cc b/client/mysql.cc index 1fd909a397e..66a99bbdf75 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -129,6 +129,7 @@ static my_bool info_flag=0,ignore_errors=0,wait_flag=0,quick=0, vertical=0, line_numbers=1, column_names=1,opt_html=0, opt_xml=0,opt_nopager=1, opt_outfile=0, named_cmds= 0, tty_password= 0, opt_nobeep=0; +static ulong opt_max_allowed_packet, opt_net_buffer_length; static uint verbose=0,opt_silent=0,opt_mysql_port=0, opt_local_infile=0; static my_string opt_mysql_unix_port=0; static int connect_flag=CLIENT_INTERACTIVE; @@ -330,7 +331,7 @@ int main(int argc,char *argv[]) exit(1); } if (status.batch && !status.line_buff && - !(status.line_buff=batch_readline_init(max_allowed_packet+512,stdin))) + !(status.line_buff=batch_readline_init(opt_max_allowed_packet+512,stdin))) { free_defaults(defaults_argv); exit(1); @@ -573,11 +574,11 @@ static struct my_option my_long_options[] = (gptr*) &opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG, 0, 0, 3600*12, 0, 0, 1}, {"max_allowed_packet", OPT_MAX_ALLOWED_PACKET, "", - (gptr*) &max_allowed_packet, (gptr*) &max_allowed_packet, 0, GET_ULONG, + (gptr*) &opt_max_allowed_packet, (gptr*) &opt_max_allowed_packet, 0, GET_ULONG, REQUIRED_ARG, 16 *1024L*1024L, 4096, (longlong) 2*1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0}, {"net_buffer_length", OPT_NET_BUFFER_LENGTH, "", - (gptr*) &net_buffer_length, (gptr*) &net_buffer_length, 0, GET_ULONG, + (gptr*) &opt_net_buffer_length, (gptr*) &opt_net_buffer_length, 0, GET_ULONG, REQUIRED_ARG, 16384, 1024, 512*1024*1024L, MALLOC_OVERHEAD, 1024, 0}, {"select_limit", OPT_SELECT_LIMIT, "", (gptr*) &select_limit, (gptr*) &select_limit, 0, GET_ULONG, REQUIRED_ARG, 1000L, 1, ~0L, 0, 1, 0}, @@ -738,6 +739,7 @@ static int get_options(int argc, char **argv) { char *tmp, *pagpoint; int ho_error; + MYSQL_PARAMETERS *mysql_params= mysql_get_parameters(); tmp= (char *) getenv("MYSQL_HOST"); if (tmp) @@ -753,9 +755,15 @@ static int get_options(int argc, char **argv) strmov(pager, pagpoint); strmov(default_pager, pager); + opt_max_allowed_packet= *mysql_params->p_max_allowed_packet; + opt_net_buffer_length= *mysql_params->p_net_buffer_length; + if ((ho_error=handle_options(&argc, &argv, my_long_options, get_one_option))) exit(ho_error); + *mysql_params->p_max_allowed_packet= opt_max_allowed_packet; + *mysql_params->p_net_buffer_length= opt_net_buffer_length; + if (status.batch) /* disable pager and outfile in this case */ { strmov(default_pager, "stdout"); @@ -2164,7 +2172,7 @@ static int com_source(String *buffer, char *line) return put_info(buff, INFO_ERROR, 0); } - if (!(line_buff=batch_readline_init(max_allowed_packet+512,sql_file))) + if (!(line_buff=batch_readline_init(opt_max_allowed_packet+512,sql_file))) { my_fclose(sql_file,MYF(0)); return put_info("Can't initialize batch_readline", INFO_ERROR, 0); diff --git a/client/mysqldump.c b/client/mysqldump.c index 3f3746f2963..82c3ee53e33 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -79,6 +79,7 @@ static my_bool verbose=0,tFlag=0,cFlag=0,dFlag=0,quick=0, extended_insert = 0, opt_autocommit=0,opt_master_data,opt_disable_keys=0,opt_xml=0, opt_delete_master_logs=0, tty_password=0, opt_single_transaction=0, opt_comments= 0; +static ulong opt_max_allowed_packet, opt_net_buffer_length; static MYSQL mysql_connection,*sock=0; static char insert_pat[12 * 1024],*opt_password=0,*current_user=0, *current_host=0,*path=0,*fields_terminated=0, @@ -87,7 +88,6 @@ static char insert_pat[12 * 1024],*opt_password=0,*current_user=0, static uint opt_mysql_port=0; static my_string opt_mysql_unix_port=0; static int first_error=0; -extern ulong net_buffer_length; static DYNAMIC_STRING extended_row; #include FILE *md_result_file; @@ -238,11 +238,11 @@ static struct my_option my_long_options[] = {"xml", 'X', "Dump a database as well formed XML.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"max_allowed_packet", OPT_MAX_ALLOWED_PACKET, "", - (gptr*) &max_allowed_packet, (gptr*) &max_allowed_packet, 0, + (gptr*) &opt_max_allowed_packet, (gptr*) &opt_max_allowed_packet, 0, GET_ULONG, REQUIRED_ARG, 24*1024*1024, 4096, (longlong) 2L*1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0}, {"net_buffer_length", OPT_NET_BUFFER_LENGTH, "", - (gptr*) &net_buffer_length, (gptr*) &net_buffer_length, 0, + (gptr*) &opt_net_buffer_length, (gptr*) &opt_net_buffer_length, 0, GET_ULONG, REQUIRED_ARG, 1024*1024L-1025, 4096, 16*1024L*1024L, MALLOC_OVERHEAD-1024, 1024, 0}, {"comments", 'i', "Write additional information.", @@ -405,6 +405,10 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), static int get_options(int *argc, char ***argv) { int ho_error; + MYSQL_PARAMETERS *mysql_params= mysql_get_parameters(); + + opt_max_allowed_packet= *mysql_params->p_max_allowed_packet; + opt_net_buffer_length= *mysql_params->p_net_buffer_length; md_result_file= stdout; load_defaults("my",load_default_groups,argc,argv); @@ -412,6 +416,9 @@ static int get_options(int *argc, char ***argv) if ((ho_error=handle_options(argc, argv, my_long_options, get_one_option))) exit(ho_error); + *mysql_params->p_max_allowed_packet= opt_max_allowed_packet; + *mysql_params->p_net_buffer_length= opt_net_buffer_length; + if (opt_delayed) opt_lock=0; /* Can't have lock with delayed */ if (!path && (enclosed || opt_enclosed || escaped || lines_terminated || diff --git a/include/mysql.h b/include/mysql.h index 3ffc014c449..1665dd5027e 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -244,6 +244,17 @@ typedef struct st_mysql_manager char last_error[MAX_MYSQL_MANAGER_ERR]; } MYSQL_MANAGER; +typedef struct st_mysql_parameters +{ + unsigned long *p_max_allowed_packet; + unsigned long *p_net_buffer_length; +} MYSQL_PARAMETERS; + +#if !defined(MYSQL_CLIENT) && !defined(MYSQL_SERVER) && !defined(EMBEDDED_LIBRARY) +#define max_allowed_packet (*mysql_get_parameters()->p_max_allowed_packet) +#define net_buffer_length (*mysql_get_parameters()->p_net_buffer_length) +#endif + /* Set up and bring down the server; to ensure that applications will work when linked against either the standard client library or the @@ -252,6 +263,8 @@ typedef struct st_mysql_manager int STDCALL mysql_server_init(int argc, char **argv, char **groups); void STDCALL mysql_server_end(void); +MYSQL_PARAMETERS *STDCALL mysql_get_parameters(); + /* Set up and bring down a thread; these function should be called for each thread in an application which opens at least one MySQL diff --git a/include/mysql_com.h b/include/mysql_com.h index c81c90dec22..94b864375ba 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -34,12 +34,6 @@ #define MYSQL_SERVICENAME "MySQL" #endif /* __WIN__ */ -#if defined(__WIN__) && !defined(MYSQL_SERVER) && !defined(MYSQL_CLIENT) && !defined(EMBEDDED_LIBRARY) -#define dll_import_spec __declspec( dllimport ) -#else -#define dll_import_spec -#endif - enum enum_server_command { COM_SLEEP, COM_QUIT, COM_INIT_DB, COM_QUERY, COM_FIELD_LIST, COM_CREATE_DB, COM_DROP_DB, COM_REFRESH, COM_SHUTDOWN, COM_STATISTICS, @@ -229,9 +223,6 @@ typedef struct st_udf_init extern "C" { #endif -dll_import_spec extern unsigned long max_allowed_packet; -dll_import_spec extern unsigned long net_buffer_length; - void randominit(struct rand_struct *,unsigned long seed1, unsigned long seed2); double my_rnd(struct rand_struct *); diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index dba9c83b339..0a23954ae67 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -121,6 +121,14 @@ void STDCALL mysql_server_end() mysql_client_init= org_my_init_done= 0; } +static MYSQL_PARAMETERS mysql_internal_parameters= +{&max_allowed_packet, &net_buffer_length}; + +MYSQL_PARAMETERS *STDCALL mysql_get_parameters() +{ + return &mysql_internal_parameters; +} + my_bool STDCALL mysql_thread_init() { #ifdef THREAD diff --git a/libmysql/libmysql.def b/libmysql/libmysql.def index 721097905a8..b0433a34cb3 100644 --- a/libmysql/libmysql.def +++ b/libmysql/libmysql.def @@ -59,7 +59,6 @@ EXPORTS is_prefix list_add list_delete - max_allowed_packet my_casecmp my_init my_end @@ -70,7 +69,6 @@ EXPORTS my_realloc mysql_thread_end mysql_thread_init - net_buffer_length set_dynamic strcend strdup_root @@ -111,19 +109,4 @@ EXPORTS load_defaults free_defaults my_path - - - - - - - - - - - - - - - - + mysql_get_parameters diff --git a/libmysql_r/Makefile.am b/libmysql_r/Makefile.am index ae091d86a88..04b6f3b6c6c 100644 --- a/libmysql_r/Makefile.am +++ b/libmysql_r/Makefile.am @@ -18,7 +18,7 @@ target = libmysqlclient_r.la -target_defs = -DDONT_USE_RAID @LIB_EXTRA_CCFLAGS@ +target_defs = -DDONT_USE_RAID -DMYSQL_CLIENT @LIB_EXTRA_CCFLAGS@ LIBS = @LIBS@ @openssl_libs@ INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include \ diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index 4a96cb64ce4..0ec7d161f24 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -23,6 +23,11 @@ #define mysql_unix_port mysql_inix_port1 #define mysql_port mysql_port1 +extern "C" +{ + unsigned long max_allowed_packet, net_buffer_length; +} + #if defined (__WIN__) #include "../sql/mysqld.cpp" #else @@ -315,7 +320,6 @@ extern "C" static my_bool org_my_init_done; my_bool server_inited; -ulong max_allowed_packet, net_buffer_length; char ** copy_arguments_ptr= 0; int STDCALL mysql_server_init(int argc, char **argv, char **groups) diff --git a/libmysqld/libmysqld.c b/libmysqld/libmysqld.c index 2e8cd2a4861..6f60e4c4fbc 100644 --- a/libmysqld/libmysqld.c +++ b/libmysqld/libmysqld.c @@ -46,6 +46,9 @@ #define INADDR_NONE -1 #endif +extern ulong net_buffer_length; +extern ulong max_allowed_packet; + static my_bool mysql_client_init=0; uint mysql_port=0; my_string mysql_unix_port=0; @@ -722,6 +725,15 @@ read_one_row(MYSQL *mysql,uint fields,MYSQL_ROW row, ulong *lengths) return 0; } +static MYSQL_PARAMETERS mysql_internal_parameters= +{&max_allowed_packet, &net_buffer_length}; + +MYSQL_PARAMETERS *STDCALL mysql_get_parameters() +{ + return &mysql_internal_parameters; +} + + /**************************************************************************** ** Init MySQL structure or allocate one ****************************************************************************/ diff --git a/libmysqld/libmysqld.def b/libmysqld/libmysqld.def index 1c9bdea0a01..8db8a846562 100644 --- a/libmysqld/libmysqld.def +++ b/libmysqld/libmysqld.def @@ -63,6 +63,5 @@ EXPORTS mysql_refresh mysql_odbc_escape_string myodbc_remove_escape - net_buffer_length - max_allowed_packet get_tty_password + mysql_get_parameters diff --git a/sql/log_event.cc b/sql/log_event.cc index f84c8d1f579..f94056694cc 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -532,6 +532,7 @@ end: #else #define UNLOCK_MUTEX #define LOCK_MUTEX +#define max_allowed_packet (*mysql_get_parameters()->p_max_allowed_packet) #endif // allocates memory - the caller is responsible for clean-up diff --git a/tools/mysqlmanager.c b/tools/mysqlmanager.c index 27dfa18e421..ade6da895c6 100644 --- a/tools/mysqlmanager.c +++ b/tools/mysqlmanager.c @@ -355,7 +355,7 @@ LOG_MSG_FUNC(log_info,LOG_INFO) #ifndef DBUG_OFF LOG_MSG_FUNC(log_debug,LOG_DEBUG) #else -void log_debug(const char* __attribute__((unused)) fmt,...) {} +void log_debug(const char* fmt __attribute__((unused)),...) {} #endif static void handle_sigterm(int sig __attribute__((unused))) From e6b4c164eea6bbaf1c993907c3e8ec0715d1df71 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 26 May 2004 19:41:14 +0300 Subject: [PATCH 12/38] InnoDB fixup: remove debug assertion that causes compile error when UNIV_DEBUG is defined (introduced in ChangeSet@1.1850) innobase/que/que0que.c: Remove ut_ad() reference to removed parameter next_thr --- innobase/que/que0que.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/innobase/que/que0que.c b/innobase/que/que0que.c index c53a31adc6f..0a2e607807a 100644 --- a/innobase/que/que0que.c +++ b/innobase/que/que0que.c @@ -190,8 +190,6 @@ que_thr_end_wait( ut_ad(mutex_own(&kernel_mutex)); #endif /* UNIV_SYNC_DEBUG */ ut_ad(thr); - ut_ad(next_thr); - ut_ad(*next_thr == NULL); ut_ad((thr->state == QUE_THR_LOCK_WAIT) || (thr->state == QUE_THR_PROCEDURE_WAIT) || (thr->state == QUE_THR_SIG_REPLY_WAIT)); From cc24ac7079827af1290a87ca0d5ce817329a9f6b Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 26 May 2004 21:45:58 +0300 Subject: [PATCH 13/38] VC++ portability fix VC++Files/client/mysqlclient.dsp: Added missing /D MYSQL_CLIENT VC++Files/innobase/innobase.dsp: Remove not existing file sql/mysqld.cc: Fixed comment --- VC++Files/client/mysqlclient.dsp | 4 ++-- VC++Files/innobase/innobase.dsp | 4 ---- sql/mysqld.cc | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/VC++Files/client/mysqlclient.dsp b/VC++Files/client/mysqlclient.dsp index 9bf131f8243..b557d4cbd0f 100644 --- a/VC++Files/client/mysqlclient.dsp +++ b/VC++Files/client/mysqlclient.dsp @@ -41,7 +41,7 @@ RSC=rc.exe # PROP Intermediate_Dir "release" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "DBUG_OFF" /D "_WINDOWS" /D "USE_TLS" /D "NDEBUG" /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../" /D "DBUG_OFF" /D "_WINDOWS" /D "USE_TLS" /D "MYSQL_CLIENT" /D "NDEBUG" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 @@ -65,7 +65,7 @@ LIB32=xilink6.exe -lib # PROP Intermediate_Dir "debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /D "USE_TLS" /FD /c +# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "../include" /I "../" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /D "USE_TLS" /D "MYSQL_CLIENT" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 diff --git a/VC++Files/innobase/innobase.dsp b/VC++Files/innobase/innobase.dsp index ea0aaeb3b83..03a57191270 100644 --- a/VC++Files/innobase/innobase.dsp +++ b/VC++Files/innobase/innobase.dsp @@ -312,10 +312,6 @@ SOURCE=.\pars\pars0sym.c # End Source File # Begin Source File -SOURCE=.\que\que0que.c -# End Source File -# Begin Source File - SOURCE=.\read\read0read.c # End Source File # Begin Source File diff --git a/sql/mysqld.cc b/sql/mysqld.cc index b55121b3bc6..65903d7ce8a 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1473,7 +1473,7 @@ void mysql_cb_init() } -/ *To get the name of the NetWare volume having MySQL data folder */ +/* To get the name of the NetWare volume having MySQL data folder */ void getvolumename() { From 1d03d1629d64801681238152800bec49c4472afd Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 27 May 2004 02:47:04 +0300 Subject: [PATCH 14/38] netware files should always be in 'make dist' use opt_net_buffer_length instead of net_buffer_length Makefile.am: netware files should always be in 'make dist' client/mysqldump.c: use opt_net_buffer_length instead of net_buffer_length configure.in: netware files should always be in 'make dist' netware/Makefile.am: netware files should always be in 'make dist' --- Makefile.am | 3 +-- client/mysqldump.c | 4 ++-- configure.in | 1 + netware/Makefile.am | 26 +++++++++++++++++++++++++- 4 files changed, 29 insertions(+), 5 deletions(-) diff --git a/Makefile.am b/Makefile.am index 8aef19d0920..8a5df17c2cb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,9 +23,8 @@ EXTRA_DIST = INSTALL-SOURCE README COPYING SUBDIRS = . include @docs_dirs@ @readline_dir@ \ @thread_dirs@ pstack @sql_client_dirs@ \ @sql_server_dirs@ scripts man tests \ - BUILD @netware_dir@ os2 @libmysqld_dirs@ \ + BUILD netware os2 @libmysqld_dirs@ \ @bench_dirs@ support-files @fs_dirs@ @tools_dirs@ - # Relink after clean linked_sources = linked_client_sources linked_server_sources \ diff --git a/client/mysqldump.c b/client/mysqldump.c index 82c3ee53e33..6dad8182b87 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -1080,7 +1080,7 @@ static void dumpTable(uint numFields, char *table) if (opt_lock) fprintf(md_result_file,"LOCK TABLES %s WRITE;\n", opt_quoted_table); - total_length=net_buffer_length; /* Force row break */ + total_length= opt_net_buffer_length; /* Force row break */ row_break=0; rownr=0; init_length=(uint) strlen(insert_pat)+4; @@ -1225,7 +1225,7 @@ static void dumpTable(uint numFields, char *table) ulong row_length; dynstr_append(&extended_row,")"); row_length = 2 + extended_row.length; - if (total_length + row_length < net_buffer_length) + if (total_length + row_length < opt_net_buffer_length) { total_length += row_length; fputc(',',md_result_file); /* Always row break */ diff --git a/configure.in b/configure.in index 7a1d2228961..29a887076ac 100644 --- a/configure.in +++ b/configure.in @@ -2482,6 +2482,7 @@ if expr "$SYSTEM_TYPE" : ".*netware.*" > /dev/null; then fi AC_SUBST(netware_dir) AC_SUBST(linked_netware_sources) +AM_CONDITIONAL(HAVE_NETWARE, test "$netware_dir" = "netware") if test "$with_server" = "yes" -o "$THREAD_SAFE_CLIENT" != "no" then diff --git a/netware/Makefile.am b/netware/Makefile.am index 8d7efec8e3c..7d7d0a096e1 100644 --- a/netware/Makefile.am +++ b/netware/Makefile.am @@ -14,6 +14,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +if HAVE_NETWARE INCLUDES = -I$(srcdir)/../include -I../include -I.. bin_PROGRAMS = mysqld_safe mysql_install_db mysql_test_run libmysql mysqld_safe_SOURCES= mysqld_safe.c my_manage.c @@ -43,7 +44,30 @@ link_sources: org=`echo $$f | sed -e 's/.*\/\(.*\)/\1/g'`; \ @LN_CP_F@ $(srcdir)/$$org $(srcdir)/../$$f; \ done; - +else +EXTRA_DIST= comp_err.def init_db.sql install_test_db.ncf \ + isamchk.def isamlog.def libmysql.def libmysql.imp \ + libmysqlmain.c my_manage.c my_manage.h \ + my_print_defaults.def myisam_ftdump.def myisamchk.def \ + myisamlog.def myisampack.def mysql.def mysql.xdc \ + mysql_fix_privilege_tables.pl mysql_install.def \ + mysql_install_db.c mysql_install_db.def \ + mysql_secure_installation.pl mysql_test_run.c \ + mysql_test_run.def mysql_waitpid.def mysqladmin.def \ + mysqlbinlog.def mysqlcheck.def mysqld.def \ + mysqld_safe.c mysqld_safe.def mysqldump.def mysqlimport.def \ + mysqlshow.def mysqltest.def pack_isam.def perror.def \ + replace.def resolve_stack_dump.def resolveip.def test_db.sql \ + BUILD/apply-patch BUILD/compile-AUTOTOOLS \ + BUILD/compile-linux-tools BUILD/compile-netware-END \ + BUILD/compile-netware-START BUILD/compile-netware-all\ + BUILD/compile-netware-debug BUILD/compile-netware-max \ + BUILD/compile-netware-max-debug BUILD/compile-netware-src \ + BUILD/compile-netware-standard BUILD/create-patch \ + BUILD/cron-build BUILD/crontab BUILD/knetware.imp \ + BUILD/mwasmnlm BUILD/mwccnlm BUILD/mwenv BUILD/mwldnlm \ + BUILD/nwbootstrap BUILD/openssl.imp BUILD/save-patch +endif # Don't update the files from bitkeeper %::SCCS/s.% From a4237f3dd9975aa54b3cbab8efb61ee9a74f5442 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 27 May 2004 11:23:26 +0300 Subject: [PATCH 15/38] Add back wrongly deleted file --- VC++Files/innobase/innobase.dsp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/VC++Files/innobase/innobase.dsp b/VC++Files/innobase/innobase.dsp index 03a57191270..ea0aaeb3b83 100644 --- a/VC++Files/innobase/innobase.dsp +++ b/VC++Files/innobase/innobase.dsp @@ -312,6 +312,10 @@ SOURCE=.\pars\pars0sym.c # End Source File # Begin Source File +SOURCE=.\que\que0que.c +# End Source File +# Begin Source File + SOURCE=.\read\read0read.c # End Source File # Begin Source File From a4d82ab8fe2678fd0586fad16bae3e345bb7ef3d Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 27 May 2004 21:14:59 +0200 Subject: [PATCH 16/38] backport bug#2708 fix from 4.1 myisam/ft_boolean_search.c: perlify comment --- myisam/ft_boolean_search.c | 2 +- myisam/ft_parser.c | 40 +++++++++++++++++++++--------------- mysql-test/r/fulltext.result | 3 +++ mysql-test/t/fulltext.test | 4 ++++ 4 files changed, 32 insertions(+), 17 deletions(-) diff --git a/myisam/ft_boolean_search.c b/myisam/ft_boolean_search.c index 61381f80783..13f46849210 100644 --- a/myisam/ft_boolean_search.c +++ b/myisam/ft_boolean_search.c @@ -360,7 +360,7 @@ err: } -/* returns 1 if str0 ~= /\/ */ +/* returns 1 if str0 ~= /\bstr1\b/ */ static int _ftb_strstr(const byte *s0, const byte *e0, const byte *s1, const byte *e1, CHARSET_INFO *cs) diff --git a/myisam/ft_parser.c b/myisam/ft_parser.c index f397660af6b..e40b7472113 100644 --- a/myisam/ft_parser.c +++ b/myisam/ft_parser.c @@ -124,27 +124,30 @@ byte ft_get_word(byte **start, byte *end, FT_WORD *word, FTB_PARAM *param) for (;docquot) { + if (*doc == FTB_RQUOT && param->quot) + { param->quot=doc; *start=doc+1; return 3; /* FTB_RBR */ } - if ((*doc == FTB_LBR || *doc == FTB_RBR || *doc == FTB_LQUOT) - && !param->quot) + if (!param->quot) { - /* param->prev=' '; */ - *start=doc+1; - if (*doc == FTB_LQUOT) param->quot=*start; - return (*doc == FTB_RBR)+2; - } - if (param->prev == ' ' && !param->quot) - { - if (*doc == FTB_YES ) { param->yesno=+1; continue; } else - if (*doc == FTB_EGAL) { param->yesno= 0; continue; } else - if (*doc == FTB_NO ) { param->yesno=-1; continue; } else - if (*doc == FTB_INC ) { param->plusminus++; continue; } else - if (*doc == FTB_DEC ) { param->plusminus--; continue; } else - if (*doc == FTB_NEG ) { param->pmsign=!param->pmsign; continue; } + if (*doc == FTB_LBR || *doc == FTB_RBR || *doc == FTB_LQUOT) + { + /* param->prev=' '; */ + *start=doc+1; + if (*doc == FTB_LQUOT) param->quot=*start; + return (*doc == FTB_RBR)+2; + } + if (param->prev == ' ') + { + if (*doc == FTB_YES ) { param->yesno=+1; continue; } else + if (*doc == FTB_EGAL) { param->yesno= 0; continue; } else + if (*doc == FTB_NO ) { param->yesno=-1; continue; } else + if (*doc == FTB_INC ) { param->plusminus++; continue; } else + if (*doc == FTB_DEC ) { param->plusminus--; continue; } else + if (*doc == FTB_NEG ) { param->pmsign=!param->pmsign; continue; } + } } param->prev=*doc; param->yesno=(FTB_YES==' ') ? 1 : (param->quot != 0); @@ -170,6 +173,11 @@ byte ft_get_word(byte **start, byte *end, FT_WORD *word, FTB_PARAM *param) return 1; } } + if (param->quot) + { + param->quot=*start=doc; + return 3; /* FTB_RBR */ + } return 0; } diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index baa3a834f6f..19bd355f537 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -122,6 +122,9 @@ select * from t1 where MATCH a,b AGAINST ('+(support collections) +foobar*' IN B a b select * from t1 where MATCH a,b AGAINST ('+(+(support collections)) +foobar*' IN BOOLEAN MODE); a b +select * from t1 where MATCH a,b AGAINST('"space model' IN BOOLEAN MODE); +a b +Full-text search in MySQL implements vector space model select * from t1 where MATCH a AGAINST ("search" IN BOOLEAN MODE); a b Full-text search in MySQL implements vector space model diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test index 86d2cde370a..bd887bc63ee 100644 --- a/mysql-test/t/fulltext.test +++ b/mysql-test/t/fulltext.test @@ -57,6 +57,10 @@ select * from t1 where MATCH a,b AGAINST ('"xt indexes"' IN BOOLEAN MODE); select * from t1 where MATCH a,b AGAINST ('+(support collections) +foobar*' IN BOOLEAN MODE); select * from t1 where MATCH a,b AGAINST ('+(+(support collections)) +foobar*' IN BOOLEAN MODE); +# bug#2708, bug#3870 crash + +select * from t1 where MATCH a,b AGAINST('"space model' IN BOOLEAN MODE); + # boolean w/o index: select * from t1 where MATCH a AGAINST ("search" IN BOOLEAN MODE); From b4a4bc47b414690e1f7299c771b4cf4ef43aa76a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 27 May 2004 22:53:36 +0300 Subject: [PATCH 17/38] removed reference to not existing library lib_release\dbug.lib --- VC++Files/comp_err/comp_err.dsp | 2 +- VC++Files/sql/mysqld.dsp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VC++Files/comp_err/comp_err.dsp b/VC++Files/comp_err/comp_err.dsp index f35e69a7884..cd9910698bf 100644 --- a/VC++Files/comp_err/comp_err.dsp +++ b/VC++Files/comp_err/comp_err.dsp @@ -46,7 +46,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=xilink6.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 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# 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 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\lib_release\mysys.lib wsock32.lib ..\lib_release\strings.lib ..\lib_release\dbug.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"LIBC.lib" /out:"../client_release/comp-err.exe" +# 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 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\lib_release\mysys.lib wsock32.lib ..\lib_release\strings.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"LIBC.lib" /out:"../client_release/comp-err.exe" # Begin Target # Name "comp_err - Win32 Release" diff --git a/VC++Files/sql/mysqld.dsp b/VC++Files/sql/mysqld.dsp index 6045188b29a..454b79abe43 100644 --- a/VC++Files/sql/mysqld.dsp +++ b/VC++Files/sql/mysqld.dsp @@ -110,7 +110,7 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=xilink6.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 Wsock32.lib ..\lib_release\dbug.lib ..\lib_release\isam.lib ..\lib_release\merge.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib /nologo /subsystem:console /debug /machine:I386 +# 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 Wsock32.lib ..\lib_release\isam.lib ..\lib_release\merge.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib /nologo /subsystem:console /debug /machine:I386 # 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 Wsock32.lib ..\lib_release\vio.lib ..\lib_release\isam.lib ..\lib_release\merge.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\innodb.lib ..\lib_release\zlib.lib /nologo /subsystem:console /map /machine:I386 /out:"../client_release/mysqld-nt.exe" # SUBTRACT LINK32 /pdb:none /debug From d5d9f915750670a53674b438a9574ca91f869462 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 27 May 2004 23:39:50 +0300 Subject: [PATCH 18/38] Merged in some patches from Novell. netware/BUILD/nwbootstrap: Patch from Novell, create the libmysqld.imp file. netware/mysqld_safe.c: Patch from Novell, new option --set-variable. --- netware/BUILD/nwbootstrap | 5 ++ netware/mysqld_safe.c | 108 ++++++++++++++++++++++++-------------- 2 files changed, 74 insertions(+), 39 deletions(-) diff --git a/netware/BUILD/nwbootstrap b/netware/BUILD/nwbootstrap index f54775bf054..ba6d34bddc8 100755 --- a/netware/BUILD/nwbootstrap +++ b/netware/BUILD/nwbootstrap @@ -171,6 +171,11 @@ do rm $file.org done +# create the libmysql.imp file in netware folder from libmysql/libmysql.def +# file +echo "generating llibmysql.imp file..." +awk 'BEGIN{x=0;} x==1 {print $1;next} /EXPORTS/{x=1}' libmysql/libmysql.def > netware/libmysql.imp + # build linux tools echo "compiling linux tools..." ./netware/BUILD/compile-linux-tools diff --git a/netware/mysqld_safe.c b/netware/mysqld_safe.c index a815497ac0f..8d4a5c4a296 100644 --- a/netware/mysqld_safe.c +++ b/netware/mysqld_safe.c @@ -67,6 +67,7 @@ void check_data_vol(); void check_setup(); void check_tables(); void mysql_start(int, char*[]); +void parse_setvar(char *arg); /****************************************************************************** @@ -321,7 +322,8 @@ void parse_args(int argc, char *argv[]) OPT_ERR_LOG, OPT_SAFE_LOG, OPT_MYSQLD, - OPT_HELP + OPT_HELP, + OPT_SETVAR }; static struct option options[] = @@ -337,6 +339,7 @@ void parse_args(int argc, char *argv[]) {"safe-log", required_argument, 0, OPT_SAFE_LOG}, {"mysqld", required_argument, 0, OPT_MYSQLD}, {"help", no_argument, 0, OPT_HELP}, + {"set-variable", required_argument, 0, OPT_SETVAR}, {0, 0, 0, 0} }; @@ -384,7 +387,11 @@ void parse_args(int argc, char *argv[]) case OPT_MYSQLD: strcpy(mysqld, optarg); break; - + + case OPT_SETVAR: + parse_setvar(optarg); + break; + case OPT_HELP: usage(); break; @@ -396,6 +403,25 @@ void parse_args(int argc, char *argv[]) } } +/* + parse_setvar(char *arg) + Pasrsing for port just to display the port num on the mysqld_safe screen +*/ +void parse_setvar(char *arg) +{ + char *pos; + + if ((pos= strindex(arg, "port"))) + { + for (; *pos && *pos != '='; pos++) ; + if (*pos) + strcpy(port, pos + 1); + } +} +/****************************************************************************** + + + /****************************************************************************** get_options() @@ -599,32 +625,32 @@ void check_tables() ******************************************************************************/ void mysql_start(int argc, char *argv[]) { - arg_list_t al; - int i, j, err; - struct stat info; - time_t cal; - struct tm lt; - char stamp[PATH_MAX]; - char skip; + arg_list_t al; + int i, j, err; + struct stat info; + time_t cal; + struct tm lt; + char stamp[PATH_MAX]; + char skip; // private options static char *private_options[] = { - "--autoclose", + "--autoclose", "--check-tables", "--help", - "--err-log=", - "--mysqld=", - NULL + "--err-log=", + "--mysqld=", + NULL }; - // args - init_args(&al); - add_arg(&al, "%s", mysqld); - - // parent args - for(i = 1; i < argc; i++) - { + // args + init_args(&al); + add_arg(&al, "%s", mysqld); + + // parent args + for(i = 1; i < argc; i++) + { skip = FALSE; // skip private arguments @@ -633,38 +659,42 @@ void mysql_start(int argc, char *argv[]) if(!strnicmp(argv[i], private_options[j], strlen(private_options[j]))) { skip = TRUE; + consoleprintf("The argument skipped is %s\n",argv[i]); break; } } - - if (!skip) add_arg(&al, "%s", argv[i]); - } - + + if (!skip) + { + add_arg(&al, "%s", argv[i]); + consoleprintf("The final argument is %s\n",argv[i]); + } + } // spawn - do - { - // check the database tables - if (checktables) check_tables(); - - // status + do + { + // check the database tables + if (checktables) check_tables(); + + // status time(&cal); localtime_r(&cal, <); strftime(stamp, PATH_MAX, "%d %b %Y %H:%M:%S", <); log("mysql started : %s\n", stamp); - - // spawn mysqld - spawn(mysqld, &al, TRUE, NULL, NULL, err_log); - } - while (!stat(pid_file, &info)); - - // status + + // spawn mysqld + spawn(mysqld, &al, TRUE, NULL, NULL, err_log); + } + while (!stat(pid_file, &info)); + + // status time(&cal); localtime_r(&cal, <); strftime(stamp, PATH_MAX, "%d %b %Y %H:%M:%S", <); log("mysql stopped : %s\n\n", stamp); - // free args - free_args(&al); + // free args + free_args(&al); } /****************************************************************************** From b2842c3c07983e743763ba3798bc6c03373f4699 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 May 2004 00:32:55 +0300 Subject: [PATCH 19/38] Portability fix for 32 bit file systems --- mysql-test/r/variables.result | 2 +- mysql-test/t/variables.test | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index f84364089bc..e36f4165f46 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -380,4 +380,4 @@ Variable 'key_buffer_size' is a GLOBAL variable set global myisam_max_sort_file_size=4294967296; show global variables like 'myisam_max_sort_file_size'; Variable_name Value -myisam_max_sort_file_size 4294967296 +myisam_max_sort_file_size MAX_FILE_SIZE diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index e59667d6af4..b9aa52ec627 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -274,4 +274,5 @@ select @@session.key_buffer_size; # expected: check that there is no overflow when 64-bit unsigned # variables are set set global myisam_max_sort_file_size=4294967296; +--replace_result 4294967296 MAX_FILE_SIZE 2146435072 MAX_FILE_SIZE show global variables like 'myisam_max_sort_file_size'; From b9c825e4a03781dec314923671d6daa9584cbbb1 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 May 2004 01:02:20 +0300 Subject: [PATCH 20/38] Always enable HAVE_COMPRESS on netware include/config-netware.h: Always enable HAVE_COMPRESS on netware We can't detect compress in configure on netware because we must use AC_TRY_RUN to detect zlib on other platforms --- include/config-netware.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/config-netware.h b/include/config-netware.h index c4e63056353..3e145f566a1 100644 --- a/include/config-netware.h +++ b/include/config-netware.h @@ -57,6 +57,10 @@ extern "C" { #undef HAVE_CRYPT #endif /* HAVE_OPENSSL */ +/* Configure can't detect this because it uses AC_TRY_RUN */ +#undef HAVE_COMPRESS +#define HAVE_COMPRESS + /* include the old function apis */ #define USE_OLD_FUNCTIONS 1 From d1306dfa9df20972f20d1973042e0164a3183919 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 May 2004 02:00:34 +0300 Subject: [PATCH 21/38] Portability fix for HPUX configure.in: Ensure that innodb gets system specific CFLAGS and CXXFLAGS innobase/os/os0file.c: Don't use pread/pwrite on systems where these are not working. This fixes a bug on HPUX, where InnoDB didn't create the ibdata1 file correctly. --- configure.in | 3 +++ innobase/os/os0file.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 29a887076ac..f2b66d1e09d 100644 --- a/configure.in +++ b/configure.in @@ -2484,6 +2484,9 @@ AC_SUBST(netware_dir) AC_SUBST(linked_netware_sources) AM_CONDITIONAL(HAVE_NETWARE, test "$netware_dir" = "netware") +# Ensure that table handlers gets all modifications to CFLAGS/CXXFLAGS +export CC CXX CFLAGS CXXFLAGS LD LDFLAGS AR + if test "$with_server" = "yes" -o "$THREAD_SAFE_CLIENT" != "no" then AC_DEFINE(THREAD) diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c index 81566337218..681c4e487e7 100644 --- a/innobase/os/os0file.c +++ b/innobase/os/os0file.c @@ -1111,7 +1111,7 @@ os_file_pread( os_n_file_reads++; -#ifdef HAVE_PREAD +#if defined(HAVE_PREAD) && !defined(HAVE_BROKEN_PREAD) os_mutex_enter(os_file_count_mutex); os_file_n_pending_preads++; os_mutex_exit(os_file_count_mutex); @@ -1186,7 +1186,7 @@ os_file_pwrite( os_n_file_writes++; -#ifdef HAVE_PWRITE +#if defined(HAVE_PWRITE) && !defined(HAVE_BROKEN_PREAD) os_mutex_enter(os_file_count_mutex); os_file_n_pending_pwrites++; os_mutex_exit(os_file_count_mutex); From e356f66412b1aa0ef68d0992cacac2d4dd5b361e Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 May 2004 09:06:19 +0300 Subject: [PATCH 22/38] my_global.h: Improved a comment about HAVE_BROKEN_PREAD: pread() only works on HP-UX 11.0 if one installs kernel patch PHKL_20349 or greater include/my_global.h: Improved a comment about HAVE_BROKEN_PREAD: pread() only works on HP-UX 11.0 if one installs kernel patch PHKL_20349 or greater --- include/my_global.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/my_global.h b/include/my_global.h index 4964c5dae56..f3d39279b8d 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -158,7 +158,11 @@ C_MODE_END #ifdef HAVE_BROKEN_SNPRINTF /* HPUX 10.20 don't have this defined */ #undef HAVE_SNPRINTF #endif -#ifdef HAVE_BROKEN_PREAD /* These doesn't work on HPUX 11.x */ +#ifdef HAVE_BROKEN_PREAD /* + These don't work on HP-UX 11.0 without + installing the kernel patch PHKL_20349 or + greater + */ #undef HAVE_PREAD #undef HAVE_PWRITE #endif From 606cb09d86413fa13c98c9ebd0bfc50379a01a65 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 May 2004 11:02:34 +0300 Subject: [PATCH 23/38] Added option --config-extra-env to Do-compile Build-tools/Do-compile: Added option --config-extra-env include/my_global.h: Cleaned up comment to follow same indentation style as the rest of the code --- Build-tools/Do-compile | 21 +++++++++++++++++++-- include/my_global.h | 10 +++++----- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/Build-tools/Do-compile b/Build-tools/Do-compile index c4680d4b7e5..f968b06757f 100755 --- a/Build-tools/Do-compile +++ b/Build-tools/Do-compile @@ -7,7 +7,7 @@ use Sys::Hostname; @config_options= (); @make_options= (); -$opt_distribution=$opt_user=$opt_config_env=""; +$opt_distribution=$opt_user=$opt_config_env=$opt_config_extra_env=""; $opt_dbd_options=$opt_perl_options=$opt_config_options=$opt_make_options=$opt_suffix=""; $opt_tmp=$opt_version_suffix=""; $opt_help=$opt_delete=$opt_debug=$opt_stage=$opt_no_test=$opt_no_perl=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=$opt_tcpip=$opt_build_thread=$opt_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=$opt_with_debug=$opt_no_benchmark=$opt_no_mysqltest=$opt_without_embedded=0; @@ -17,6 +17,7 @@ GetOptions( "bdb", "build-thread=i", "config-env=s" => \@config_env, + "config-extra-env=s" => \@config_extra_env, "config-options=s" => \@config_options, "dbd-options=s", "debug", @@ -77,6 +78,12 @@ if (@config_env > 0) $opt_config_env= join(" ", @config_env); } +if (@config_extra_env > 0) +{ + chomp(@config_extra_env); + $opt_config_extra_env= join(" ", @config_extra_env); +} + $host= hostname(); chomp($uname=`uname`); $full_host_name=$host; @@ -87,6 +94,7 @@ $email="$opt_user\@mysql.com"; chomp($pwd = `pwd`); $VER= basename($opt_distribution); $VER=~ /mysql.*-([1-9]\.[0-9]{1,2}\.[0-9]{1,2}.*)\.tar*/; $version=$1; +$release=""; # Shut up perl ($major, $minor, $release) = split(/\./,$version); $log="$pwd/Logs/$host-$major.$minor$opt_version_suffix.log"; $opt_distribution =~ /(mysql[^\/]*)\.tar/; @@ -109,6 +117,8 @@ if (defined($gcc_version) && ! $opt_config_env) } } +$opt_config_env.=" $opt_config_extra_env"; + $new_opt_tmp=0; if ($opt_tmp) { @@ -152,6 +162,9 @@ select STDOUT; $|=1; info("Compiling MySQL$opt_version_suffix at $host$opt_suffix, stage: $opt_stage\n"); +info("LD_LIBRARY_PATH is $ENV{LD_LIBRARY_PATH}"); +info("PATH is $ENV{PATH}"); + log_timestamp(); if (-x "$host/bin/mysqladmin") @@ -440,7 +453,7 @@ exit 0; sub usage { print < To set up the environment, like 'CC=cc CXX=gcc CXXFLAGS=-O3' +--config-extra-env +Additional flags for environment (not CC or CXX). Should be used when one +wants Do-compile to propose proper CC and CXX flags. + --config-options To add some extra options to configure (e.g. '--with-perl=yes') diff --git a/include/my_global.h b/include/my_global.h index f3d39279b8d..b68eaf383a9 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -158,11 +158,11 @@ C_MODE_END #ifdef HAVE_BROKEN_SNPRINTF /* HPUX 10.20 don't have this defined */ #undef HAVE_SNPRINTF #endif -#ifdef HAVE_BROKEN_PREAD /* - These don't work on HP-UX 11.0 without - installing the kernel patch PHKL_20349 or - greater - */ +#ifdef HAVE_BROKEN_PREAD +/* + pread()/pwrite() are not 64 bit safe on HP-UX 11.0 without + installing the kernel patch PHKL_20349 or greater +*/ #undef HAVE_PREAD #undef HAVE_PWRITE #endif From 7aa93578dd7ad9a5a1dd86237a9fa4351f9e8525 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 May 2004 11:15:59 +0300 Subject: [PATCH 24/38] InnoDB: Add diagnostics when tmpfile() fails at start (Bug #3919) innobase/dict/dict0dict.c: Replace tmpfile() with os_file_create_tmpfile() innobase/include/os0file.h: Add os_file_create_tmpfile() innobase/lock/lock0lock.c: Replace tmpfile() with os_file_create_tmpfile() innobase/os/os0file.c: Add os_file_create_tmpfile() os_file_handle_error(): remove unused first parameter --- innobase/dict/dict0dict.c | 2 +- innobase/include/os0file.h | 7 ++++++ innobase/lock/lock0lock.c | 2 +- innobase/os/os0file.c | 44 ++++++++++++++++++++++++++------------ 4 files changed, 39 insertions(+), 16 deletions(-) diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c index 0fc4ac2b687..f14e2a4e58c 100644 --- a/innobase/dict/dict0dict.c +++ b/innobase/dict/dict0dict.c @@ -642,7 +642,7 @@ dict_init(void) rw_lock_create(&dict_operation_lock); rw_lock_set_level(&dict_operation_lock, SYNC_DICT_OPERATION); - dict_foreign_err_file = tmpfile(); + dict_foreign_err_file = os_file_create_tmpfile(); mutex_create(&dict_foreign_err_mutex); mutex_set_level(&dict_foreign_err_mutex, SYNC_ANY_LATCH); } diff --git a/innobase/include/os0file.h b/innobase/include/os0file.h index de17e2302ae..43741f79855 100644 --- a/innobase/include/os0file.h +++ b/innobase/include/os0file.h @@ -133,6 +133,13 @@ Creates the seek mutexes used in positioned reads and writes. */ void os_io_init_simple(void); /*===================*/ +/*************************************************************************** +Creates a temporary file. In case of error, causes abnormal termination. */ + +FILE* +os_file_create_tmpfile(void); +/*========================*/ + /* out: temporary file handle (never NULL) */ /******************************************************************** A simple function to open or create a file. */ diff --git a/innobase/lock/lock0lock.c b/innobase/lock/lock0lock.c index 791b81366b2..d9848577728 100644 --- a/innobase/lock/lock0lock.c +++ b/innobase/lock/lock0lock.c @@ -510,7 +510,7 @@ lock_sys_create( /* hash_create_mutexes(lock_sys->rec_hash, 2, SYNC_REC_LOCK); */ - lock_latest_err_file = tmpfile(); + lock_latest_err_file = os_file_create_tmpfile(); } /************************************************************************* diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c index 681c4e487e7..8cb2b171328 100644 --- a/innobase/os/os0file.c +++ b/innobase/os/os0file.c @@ -301,14 +301,11 @@ os_file_handle_error( /*=================*/ /* out: TRUE if we should retry the operation */ - os_file_t file, /* in: file pointer */ const char* name, /* in: name of a file or NULL */ const char* operation)/* in: operation */ { ulint err; - UT_NOT_USED(file); - err = os_file_get_last_error(); if (err == OS_FILE_DISK_FULL) { @@ -374,6 +371,25 @@ os_io_init_simple(void) } } +/*************************************************************************** +Creates a temporary file. In case of error, causes abnormal termination. */ + +FILE* +os_file_create_tmpfile(void) +/*========================*/ + /* out: temporary file handle (never NULL) */ +{ + FILE* file = tmpfile(); + if (file == NULL) { + ut_print_timestamp(stderr); + fputs(" InnoDB: Error: unable to create temporary file\n", + stderr); + os_file_handle_error(NULL, "tmpfile"); + ut_error; + } + return(file); +} + /******************************************************************** A simple function to open or create a file. */ @@ -430,7 +446,7 @@ try_again: if (file == INVALID_HANDLE_VALUE) { *success = FALSE; - retry = os_file_handle_error(file, name, + retry = os_file_handle_error(name, create_mode == OS_FILE_OPEN ? "open" : "create"); if (retry) { @@ -472,7 +488,7 @@ try_again: if (file == -1) { *success = FALSE; - retry = os_file_handle_error(file, name, + retry = os_file_handle_error(name, create_mode == OS_FILE_OPEN ? "open" : "create"); if (retry) { @@ -678,7 +694,7 @@ try_again: if (file == INVALID_HANDLE_VALUE) { *success = FALSE; - retry = os_file_handle_error(file, name, + retry = os_file_handle_error(name, create_mode == OS_FILE_OPEN ? "open" : "create"); if (retry) { @@ -766,7 +782,7 @@ try_again: if (file == -1) { *success = FALSE; - retry = os_file_handle_error(file, name, + retry = os_file_handle_error(name, create_mode == OS_FILE_OPEN ? "open" : "create"); if (retry) { @@ -801,7 +817,7 @@ os_file_close( return(TRUE); } - os_file_handle_error(file, NULL, "close"); + os_file_handle_error(NULL, "close"); return(FALSE); #else int ret; @@ -809,7 +825,7 @@ os_file_close( ret = close(file); if (ret == -1) { - os_file_handle_error(file, NULL, "close"); + os_file_handle_error(NULL, "close"); return(FALSE); } @@ -1029,7 +1045,7 @@ os_file_flush( return(TRUE); } - os_file_handle_error(file, NULL, "flush"); + os_file_handle_error(NULL, "flush"); /* It is a fatal error if a file flush does not succeed, because then the database can get corrupt on disk */ @@ -1063,7 +1079,7 @@ os_file_flush( fprintf(stderr, " InnoDB: Error: the OS said file flush did not succeed\n"); - os_file_handle_error(file, NULL, "flush"); + os_file_handle_error(NULL, "flush"); /* It is a fatal error if a file flush does not succeed, because then the database can get corrupt on disk */ @@ -1323,7 +1339,7 @@ try_again: #ifdef __WIN__ error_handling: #endif - retry = os_file_handle_error(file, NULL, "read"); + retry = os_file_handle_error(NULL, "read"); if (retry) { goto try_again; @@ -2278,7 +2294,7 @@ try_again: os_aio_array_free_slot(array, slot); - retry = os_file_handle_error(file, name, + retry = os_file_handle_error(name, type == OS_FILE_READ ? "aio read" : "aio write"); if (retry) { @@ -2378,7 +2394,7 @@ os_aio_windows_handle( ut_a(TRUE == os_file_flush(slot->file)); } } else { - os_file_handle_error(slot->file, slot->name, "Windows aio"); + os_file_handle_error(slot->name, "Windows aio"); ret_val = FALSE; } From 0cb0e7f5b9752e328d30d9704913f83508ef6161 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 May 2004 15:01:16 +0500 Subject: [PATCH 25/38] a fix. (Bug#3738: SQL_CALC_FOUND_ROWS ignores WHERE if LIMIT used, Bug#3845: wrong FOUND_ROWS result) --- mysql-test/r/select_found.result | 17 +++++++++++++++++ mysql-test/t/select_found.test | 19 +++++++++++++++++++ sql/sql_select.cc | 6 ++++-- 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/select_found.result b/mysql-test/r/select_found.result index 367bdd798b4..444124bcd67 100644 --- a/mysql-test/r/select_found.result +++ b/mysql-test/r/select_found.result @@ -206,3 +206,20 @@ WHERE ( r = 1 AND a IN ( 1, 2 ) AND ( u = 'w' OR u LIKE 'w/%' ) ) OR ( r = 1 AND a IN ( 3 ) AND ( u = 'w/U' OR u LIKE 'w/U/%' ) ) OR ( r = 1 AND a IN ( 1, 2, 3 ) AND ( u = 'w' ) ); drop table t1; +CREATE TABLE t1 (a VARCHAR(16), UNIQUE(a)); +INSERT INTO t1 VALUES ('1'), ('2'), ('3'); +SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a = '2' LIMIT 0, 1; +a +2 +SELECT FOUND_ROWS(); +FOUND_ROWS() +1 +DROP TABLE t1; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (0), (0), (1), (2); +SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a = 0 GROUP BY a HAVING a > 10; +a +SELECT FOUND_ROWS(); +FOUND_ROWS() +0 +DROP TABLE t1; diff --git a/mysql-test/t/select_found.test b/mysql-test/t/select_found.test index e584fca206f..7599277a867 100644 --- a/mysql-test/t/select_found.test +++ b/mysql-test/t/select_found.test @@ -127,3 +127,22 @@ WHERE ( r = 1 AND a IN ( 1, 2 ) AND ( u = 'w' OR u LIKE 'w/%' ) ) OR ( r = 1 AND a IN ( 1, 2, 3 ) AND ( u = 'w' ) ); drop table t1; +# +# Bug #3738: we have a ref key +# + +CREATE TABLE t1 (a VARCHAR(16), UNIQUE(a)); +INSERT INTO t1 VALUES ('1'), ('2'), ('3'); +SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a = '2' LIMIT 0, 1; +SELECT FOUND_ROWS(); +DROP TABLE t1; + +# +# Bug #3845: group by, having and empty result +# + +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (0), (0), (1), (2); +SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a = 0 GROUP BY a HAVING a > 10; +SELECT FOUND_ROWS(); +DROP TABLE t1; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index b299e3af0b7..5b754186736 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -5348,7 +5348,8 @@ end_send(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)), if ((join->tables == 1) && !join->tmp_table && !join->sort_and_group && !join->send_group_parts && !join->having && !jt->select_cond && !(jt->select && jt->select->quick) && - !(jt->table->file->table_flags() & HA_NOT_EXACT_COUNT)) + !(jt->table->file->table_flags() & HA_NOT_EXACT_COUNT) && + (jt->ref.key < 0)) { /* Join over all rows in table; Return number of found rows */ TABLE *table=jt->table; @@ -5429,7 +5430,8 @@ end_send_group(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)), DBUG_RETURN(-1); /* purecov: inspected */ if (end_of_records) { - join->send_records++; + if (!error) + join->send_records++; DBUG_RETURN(0); } if (!error && From f1ffa139230da35d789350c5e4502b001b839468 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 29 May 2004 17:52:20 +0200 Subject: [PATCH 26/38] backport wild_compare fix from 4.1 - bug#3924 --- include/my_sys.h | 2 +- mysys/mf_wcomp.c | 67 ++++++++++++++++++++++++++++++++---------------- mysys/mf_wfile.c | 4 +-- sql/sql_acl.cc | 10 ++++---- sql/sql_acl.h | 2 +- sql/sql_base.cc | 2 +- sql/sql_db.cc | 2 +- sql/sql_parse.cc | 4 +-- sql/sql_show.cc | 6 ++--- 9 files changed, 61 insertions(+), 38 deletions(-) diff --git a/include/my_sys.h b/include/my_sys.h index 8f0040055d6..4934df3c4e5 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -620,7 +620,7 @@ extern my_string my_path(my_string to,const char *progname, const char *own_pathname_part); extern my_string my_load_path(my_string to, const char *path, const char *own_path_prefix); -extern int wild_compare(const char *str,const char *wildstr); +extern int wild_compare(const char *str,const char *wildstr,pbool str_is_pattern); extern my_string my_strcasestr(const char *src,const char *suffix); extern int my_strcasecmp(const char *s,const char *t); extern int my_strsortcmp(const char *s,const char *t); diff --git a/mysys/mf_wcomp.c b/mysys/mf_wcomp.c index bdcfb0501d8..1a01388a3db 100644 --- a/mysys/mf_wcomp.c +++ b/mysys/mf_wcomp.c @@ -23,11 +23,12 @@ char wild_many='*'; char wild_one='?'; -char wild_prefix=0; +char wild_prefix=0; /* QQ this can potentially cause a SIGSEGV */ -int wild_compare(register const char *str, register const char *wildstr) +int wild_compare(register const char *str, register const char *wildstr, + pbool str_is_pattern) { - reg3 int flag; + char cmp; DBUG_ENTER("wild_compare"); while (*wildstr) @@ -35,33 +36,55 @@ int wild_compare(register const char *str, register const char *wildstr) while (*wildstr && *wildstr != wild_many && *wildstr != wild_one) { if (*wildstr == wild_prefix && wildstr[1]) + { wildstr++; - if (*wildstr++ != *str++) DBUG_RETURN(1); + if (str_is_pattern && *str++ != wild_prefix) + DBUG_RETURN(1); + } + if (*wildstr++ != *str++) + DBUG_RETURN(1); } - if (! *wildstr ) DBUG_RETURN (*str != 0); + if (! *wildstr ) + DBUG_RETURN(*str != 0); if (*wildstr++ == wild_one) { - if (! *str++) DBUG_RETURN (1); /* One char; skipp */ + if (! *str || (str_is_pattern && *str == wild_many)) + DBUG_RETURN(1); /* One char; skip */ + if (*str++ == wild_prefix && str_is_pattern && *str) + str++; } else { /* Found '*' */ - if (!*wildstr) DBUG_RETURN(0); /* '*' as last char: OK */ - flag=(*wildstr != wild_many && *wildstr != wild_one); - do + while (str_is_pattern && *str == wild_many) + str++; + for (; *wildstr == wild_many || *wildstr == wild_one; wildstr++) + if (*wildstr == wild_many) + { + while (str_is_pattern && *str == wild_many) + str++; + } + else + { + if (str_is_pattern && *str == wild_prefix && str[1]) + str+=2; + else if (! *str++) + DBUG_RETURN (1); + } + if (!*wildstr) + DBUG_RETURN(0); /* '*' as last char: OK */ + if ((cmp= *wildstr) == wild_prefix && wildstr[1] && !str_is_pattern) + cmp=wildstr[1]; + for (;;str++) { - if (flag) - { - char cmp; - if ((cmp= *wildstr) == wild_prefix && wildstr[1]) - cmp=wildstr[1]; - while (*str && *str != cmp) - str++; - if (!*str) DBUG_RETURN (1); - } - if (wild_compare(str,wildstr) == 0) DBUG_RETURN (0); - } while (*str++ && wildstr[0] != wild_many); - DBUG_RETURN(1); + while (*str && *str != cmp) + str++; + if (!*str) + DBUG_RETURN (1); + if (wild_compare(str,wildstr,str_is_pattern) == 0) + DBUG_RETURN (0); + } + /* We will never come here */ } } - DBUG_RETURN (*str != '\0'); + DBUG_RETURN (*str != 0); } /* wild_compare */ diff --git a/mysys/mf_wfile.c b/mysys/mf_wfile.c index e9e12c72755..067e4b7acc5 100644 --- a/mysys/mf_wfile.c +++ b/mysys/mf_wfile.c @@ -106,7 +106,7 @@ int wf_test(register WF_PACK *wf_pack, register const char *name) not_pos=wf_pack->not_pos; for (i=0 ; i < not_pos; i++) - if (wild_compare(name,wf_pack->wild[i]) == 0) + if (wild_compare(name,wf_pack->wild[i],0) == 0) goto found; if (i) DBUG_RETURN(1); /* No-match */ @@ -115,7 +115,7 @@ found: /* Test that it isn't in not-list */ for (i=not_pos ; i < wf_pack->wilds; i++) - if (wild_compare(name,wf_pack->wild[i]) == 0) + if (wild_compare(name,wf_pack->wild[i],0) == 0) DBUG_RETURN(1); DBUG_RETURN(0); } /* wf_test */ diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 6d2f662b7df..9b676442995 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -834,7 +834,7 @@ static void acl_insert_db(const char *user, const char *host, const char *db, */ ulong acl_get(const char *host, const char *ip, const char *bin_ip, - const char *user, const char *db) + const char *user, const char *db, my_bool db_is_pattern) { ulong host_access,db_access; uint i,key_length; @@ -868,7 +868,7 @@ ulong acl_get(const char *host, const char *ip, const char *bin_ip, { if (compare_hostname(&acl_db->host,host,ip)) { - if (!acl_db->db || !wild_compare(db,acl_db->db)) + if (!acl_db->db || !wild_compare(db,acl_db->db,db_is_pattern)) { db_access=acl_db->access; if (acl_db->host.hostname) @@ -890,7 +890,7 @@ ulong acl_get(const char *host, const char *ip, const char *bin_ip, ACL_HOST *acl_host=dynamic_element(&acl_hosts,i,ACL_HOST*); if (compare_hostname(&acl_host->host,host,ip)) { - if (!acl_host->db || !wild_compare(db,acl_host->db)) + if (!acl_host->db || !wild_compare(db,acl_host->db,0)) { host_access=acl_host->access; // Fully specified. Take it break; @@ -1222,7 +1222,7 @@ static bool compare_hostname(const acl_host_and_ip *host, const char *hostname, } return (!host->hostname || (hostname && !wild_case_compare(hostname,host->hostname)) || - (ip && !wild_compare(ip,host->hostname))); + (ip && !wild_compare(ip,host->hostname,0))); } @@ -1300,7 +1300,7 @@ static bool test_if_create_new_users(THD *thd) tl.db= (char*) "mysql"; tl.real_name= (char*) "user"; db_access=acl_get(thd->host, thd->ip, (char*) &thd->remote.sin_addr, - thd->priv_user, tl.db); + thd->priv_user, tl.db, 0); if (!(db_access & INSERT_ACL)) { if (check_grant(thd,INSERT_ACL,&tl,0,1)) diff --git a/sql/sql_acl.h b/sql/sql_acl.h index bf269e5a7e3..7d8dcfd2079 100644 --- a/sql/sql_acl.h +++ b/sql/sql_acl.h @@ -85,7 +85,7 @@ my_bool acl_init(THD *thd, bool dont_read_acl_tables); void acl_reload(THD *thd); void acl_free(bool end=0); ulong acl_get(const char *host, const char *ip, const char *bin_ip, - const char *user, const char *db); + const char *user, const char *db, my_bool db_is_pattern); ulong acl_getroot(THD *thd, const char *host, const char *ip, const char *user, const char *password,const char *scramble, char **priv_user, char *priv_host, diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 6bf0b0bd2ba..c4cad8a8786 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -149,7 +149,7 @@ OPEN_TABLE_LIST *list_open_tables(THD *thd, const char *wild) if (wild) { strxmov(name,entry->table_cache_key,".",entry->real_name,NullS); - if (wild_compare(name,wild)) + if (wild_compare(name,wild,0)) continue; } diff --git a/sql/sql_db.cc b/sql/sql_db.cc index 865b2e1328f..2ee725e7432 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -410,7 +410,7 @@ bool mysql_change_db(THD *thd,const char *name) db_access=DB_ACLS; else db_access= (acl_get(thd->host,thd->ip,(char*) &thd->remote.sin_addr, - thd->priv_user,dbname) | + thd->priv_user,dbname,0) | thd->master_access); if (!(db_access & DB_ACLS) && (!grant_option || check_grant_db(thd,dbname))) { diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 7e68db0dcd2..7ddbf79c6fe 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2672,7 +2672,7 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv, if (!(thd->master_access & SELECT_ACL) && (db && (!thd->db || strcmp(db,thd->db)))) db_access=acl_get(thd->host, thd->ip, (char*) &thd->remote.sin_addr, - thd->priv_user, db); /* purecov: inspected */ + thd->priv_user, db, 0); /* purecov: inspected */ *save_priv=thd->master_access | db_access; DBUG_RETURN(FALSE); } @@ -2692,7 +2692,7 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv, if (db && (!thd->db || strcmp(db,thd->db))) db_access=acl_get(thd->host, thd->ip, (char*) &thd->remote.sin_addr, - thd->priv_user, db); /* purecov: inspected */ + thd->priv_user, db, 0); /* purecov: inspected */ else db_access=thd->db_access; // Remove SHOW attribute and access rights we already have diff --git a/sql/sql_show.cc b/sql/sql_show.cc index a4ef735c715..26163ed9bef 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -78,7 +78,7 @@ mysqld_show_dbs(THD *thd,const char *wild) { if (thd->master_access & (DB_ACLS | SHOW_DB_ACL) || acl_get(thd->host, thd->ip, (char*) &thd->remote.sin_addr, - thd->priv_user, file_name) || + thd->priv_user, file_name, 0) || (grant_option && !check_grant_db(thd, file_name))) { thd->packet.length(0); @@ -214,7 +214,7 @@ mysql_find_files(THD *thd,List *files, const char *db,const char *path, #endif { if (file->name[0] == '.' || !MY_S_ISDIR(file->mystat->st_mode) || - (wild && wild_compare(file->name,wild))) + (wild && wild_compare(file->name,wild, 0))) continue; } } @@ -232,7 +232,7 @@ mysql_find_files(THD *thd,List *files, const char *db,const char *path, if (wild_case_compare(file->name,wild)) continue; } - else if (wild_compare(file->name,wild)) + else if (wild_compare(file->name,wild, 0)) continue; } } From 0858e15c13b1e990838ce6c4b32e90438728a955 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 30 May 2004 04:11:19 -0300 Subject: [PATCH 27/38] VC++ project for to compile the udf_example.cc on Windows --- .../examples/udf_example/udf_example.def | 9 ++ .../examples/udf_example/udf_example.dsp | 111 ++++++++++++++++++ .../examples/udf_example/udf_example.dsw | 29 +++++ 3 files changed, 149 insertions(+) create mode 100644 VC++Files/examples/udf_example/udf_example.def create mode 100644 VC++Files/examples/udf_example/udf_example.dsp create mode 100644 VC++Files/examples/udf_example/udf_example.dsw diff --git a/VC++Files/examples/udf_example/udf_example.def b/VC++Files/examples/udf_example/udf_example.def new file mode 100644 index 00000000000..c1cfeea63f8 --- /dev/null +++ b/VC++Files/examples/udf_example/udf_example.def @@ -0,0 +1,9 @@ +LIBRARY MYUDF +DESCRIPTION 'MySQL Sample for UDF' +VERSION 1.0 +EXPORTS + metaphon + myfunc_double + myfunc_int + sequence + avgcost \ No newline at end of file diff --git a/VC++Files/examples/udf_example/udf_example.dsp b/VC++Files/examples/udf_example/udf_example.dsp new file mode 100644 index 00000000000..bfe4d76bcc7 --- /dev/null +++ b/VC++Files/examples/udf_example/udf_example.dsp @@ -0,0 +1,111 @@ +# Microsoft Developer Studio Project File - Name="udf_example" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=udf_example - 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 "udf_example.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 "udf_example.mak" CFG="udf_example - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "udf_example - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "udf_example - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "udf_example - 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 Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UDF_EXAMPLE_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UDF_EXAMPLE_EXPORTS" /D "HAVE_DLOPEN" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x416 /d "NDEBUG" +# ADD RSC /l 0x416 /d "NDEBUG" +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 /nologo /dll /machine:I386 +# 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 ..\..\lib\opt\strings.lib /nologo /dll /machine:I386 /out:"Release/myudf.dll" + +!ELSEIF "$(CFG)" == "udf_example - 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 Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UDF_EXAMPLE_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UDF_EXAMPLE_EXPORTS" /D "HAVE_DLOPEN" /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x416 /d "_DEBUG" +# ADD RSC /l 0x416 /d "_DEBUG" +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 /nologo /dll /debug /machine:I386 /pdbtype:sept +# 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 ..\..\lib\debug\strings.lib /nologo /dll /debug /machine:I386 /out:"Debug/myudf.dll" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "udf_example - Win32 Release" +# Name "udf_example - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\udf_example.cpp +# End Source File +# Begin Source File + +SOURCE=.\udf_example.def +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/VC++Files/examples/udf_example/udf_example.dsw b/VC++Files/examples/udf_example/udf_example.dsw new file mode 100644 index 00000000000..6716e107f6a --- /dev/null +++ b/VC++Files/examples/udf_example/udf_example.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "udf_example"=.\udf_example.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + From 09b9182e2e73f06dac3142eb7a637c5c37778586 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 31 May 2004 13:53:10 +0500 Subject: [PATCH 28/38] mysql_get_parameter interface fixed include/mysql.h: (void) added to the empty parameter's list libmysql/libmysql.c: (void) added to the empty parameter's list --- include/mysql.h | 2 +- libmysql/libmysql.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/mysql.h b/include/mysql.h index 1665dd5027e..7db6b36e667 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -263,7 +263,7 @@ typedef struct st_mysql_parameters int STDCALL mysql_server_init(int argc, char **argv, char **groups); void STDCALL mysql_server_end(void); -MYSQL_PARAMETERS *STDCALL mysql_get_parameters(); +MYSQL_PARAMETERS *STDCALL mysql_get_parameters(void); /* Set up and bring down a thread; these function should be called diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 0a23954ae67..b3624ef3e94 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -124,7 +124,7 @@ void STDCALL mysql_server_end() static MYSQL_PARAMETERS mysql_internal_parameters= {&max_allowed_packet, &net_buffer_length}; -MYSQL_PARAMETERS *STDCALL mysql_get_parameters() +MYSQL_PARAMETERS *STDCALL mysql_get_parameters(void) { return &mysql_internal_parameters; } From fec8faa06a4f9b167e3cad9ac31cdf05bc4025e0 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 31 May 2004 16:33:45 +0300 Subject: [PATCH 29/38] InnoDB: Do not get a lock for consistent reads (Bug #3894) sql/ha_innodb.cc: start_stmt(): Obtain an exclusive lock for other than plain SELECT --- sql/ha_innodb.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index dee34b47ccb..e09a5e20d34 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -4504,6 +4504,17 @@ ha_innobase::start_stmt( prepared for an update of a row */ prebuilt->select_lock_type = LOCK_X; + } else { + /* For other than temporary tables, we obtain + no lock for consistent read (plain SELECT), and + an exclusive lock for SELECT ... FOR UPDATE or + SELECT ... LOCK IN SHARE MODE. */ + + prebuilt->select_lock_type = + thd->lex.sql_command == SQLCOM_SELECT + && thd->lex.lock_option == TL_READ + ? LOCK_NONE + : LOCK_X; } /* Set the MySQL flag to mark that there is an active transaction */ From 80c662479beae3c64ab96faff379b40565fc856a Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 1 Jun 2004 17:29:24 +0300 Subject: [PATCH 30/38] Changed --log-warnings to be integer instead of boolean. Given --skip-log-warnings will disable warnings, --log-warnings will increment warning level by one, or the level can be given as an optional argument. Default level is 1. Changed aborted connection warning to be logged only if the level is > 1. sql/sql_class.h: Changed boolean into ulong. sql/sql_parse.cc: Changed aborted connection warning to be logged only if the level is > 1. --- sql/mysqld.cc | 12 ++++++++++-- sql/set_var.cc | 2 +- sql/sql_class.h | 2 +- sql/sql_parse.cc | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 65903d7ce8a..3cd42dbeac1 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3944,11 +3944,11 @@ replicating a LOAD DATA INFILE command", 0, 0, 0, 0}, {"log-warnings", 'W', "Log some not critical warnings to the log file", (gptr*) &global_system_variables.log_warnings, - (gptr*) &max_system_variables.log_warnings, 0, GET_BOOL, NO_ARG, 1, 0, 0, + (gptr*) &max_system_variables.log_warnings, 0, GET_ULONG, OPT_ARG, 1, 0, 0, 0, 0, 0}, {"warnings", 'W', "Deprecated ; Use --log-warnings instead", (gptr*) &global_system_variables.log_warnings, - (gptr*) &max_system_variables.log_warnings, 0, GET_BOOL, NO_ARG, 1, 0, 0, + (gptr*) &max_system_variables.log_warnings, 0, GET_ULONG, OPT_ARG, 1, 0, 0, 0, 0, 0}, { "back_log", OPT_BACK_LOG, "The number of outstanding connection requests MySQL can have. This comes into play when the main MySQL thread gets very many connection requests in a very short time.", @@ -4656,6 +4656,14 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), case 'V': print_version(); exit(0); + case 'W': + if (!argument) + global_system_variables.log_warnings++; + else if (argument == disabled_my_option) + global_system_variables.log_warnings= 0L; + else + global_system_variables.log_warnings= atoi(argument); + break; case 'I': case '?': usage(); diff --git a/sql/set_var.cc b/sql/set_var.cc index 525da26a5ac..4b66a621f62 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -133,7 +133,7 @@ sys_var_ulonglong_ptr sys_key_buffer_size("key_buffer_size", fix_key_buffer_size); sys_var_bool_ptr sys_local_infile("local_infile", &opt_local_infile); -sys_var_thd_bool sys_log_warnings("log_warnings", &SV::log_warnings); +sys_var_thd_ulong sys_log_warnings("log_warnings", &SV::log_warnings); sys_var_thd_ulong sys_long_query_time("long_query_time", &SV::long_query_time); sys_var_thd_bool sys_low_priority_updates("low_priority_updates", diff --git a/sql/sql_class.h b/sql/sql_class.h index 9663957963f..484a442af20 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -333,8 +333,8 @@ struct system_variables ulong query_prealloc_size; ulong trans_alloc_block_size; ulong trans_prealloc_size; + ulong log_warnings; - my_bool log_warnings; my_bool low_priority_updates; my_bool new_mode; my_bool query_cache_wlock_invalidate; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 7ddbf79c6fe..a9723108674 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -742,7 +742,7 @@ pthread_handler_decl(handle_one_connection,arg) free_root(&thd->mem_root,MYF(0)); if (net->error && net->vio != 0) { - if (!thd->killed && thd->variables.log_warnings) + if (!thd->killed && thd->variables.log_warnings > 1) sql_print_error(ER(ER_NEW_ABORTING_CONNECTION), thd->thread_id,(thd->db ? thd->db : "unconnected"), thd->user ? thd->user : "unauthenticated", From 3db332ca6b1c65d32c4f70b479dee73d5f3bb7bd Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 1 Jun 2004 19:19:48 +0300 Subject: [PATCH 31/38] row0mysql.c, row0mysql.h, ha_innodb.cc: Inside LOCK TABLES, use either LOCK_S or LOCK_X in locking reads; an improvent over the previous patch sql/ha_innodb.cc: Inside LOCK TABLES, use either LOCK_S or LOCK_X in locking reads; an improvent over the previous patch innobase/include/row0mysql.h: Inside LOCK TABLES, use either LOCK_S or LOCK_X in locking reads; an improvent over the previous patch innobase/row/row0mysql.c: Inside LOCK TABLES, use either LOCK_S or LOCK_X in locking reads; an improvent over the previous patch --- innobase/include/row0mysql.h | 3 +++ innobase/row/row0mysql.c | 1 + sql/ha_innodb.cc | 40 ++++++++++++++++++++++++++++-------- 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/innobase/include/row0mysql.h b/innobase/include/row0mysql.h index a74c5bf4c60..e088071a1c4 100644 --- a/innobase/include/row0mysql.h +++ b/innobase/include/row0mysql.h @@ -507,6 +507,9 @@ struct row_prebuilt_struct { dtuple_t* clust_ref; /* prebuilt dtuple used in sel/upd/del */ ulint select_lock_type;/* LOCK_NONE, LOCK_S, or LOCK_X */ + ulint stored_select_lock_type;/* inside LOCK TABLES, either + LOCK_S or LOCK_X depending on the lock + type */ ulint mysql_row_len; /* length in bytes of a row in the MySQL format */ ulint n_rows_fetched; /* number of rows fetched after diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c index 228f19c865f..4bbe901532c 100644 --- a/innobase/row/row0mysql.c +++ b/innobase/row/row0mysql.c @@ -380,6 +380,7 @@ row_create_prebuilt( prebuilt->clust_pcur = btr_pcur_create_for_mysql(); prebuilt->select_lock_type = LOCK_NONE; + prebuilt->stored_select_lock_type = 99999999; prebuilt->sel_graph = NULL; diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index e09a5e20d34..df193bde947 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -4505,16 +4505,38 @@ ha_innobase::start_stmt( prebuilt->select_lock_type = LOCK_X; } else { - /* For other than temporary tables, we obtain - no lock for consistent read (plain SELECT), and - an exclusive lock for SELECT ... FOR UPDATE or - SELECT ... LOCK IN SHARE MODE. */ + /* When we first come here after LOCK TABLES, + select_lock_type is set to LOCK_S or LOCK_X. Store the value + in case we run also consistent reads and need to restore the + value later. */ - prebuilt->select_lock_type = - thd->lex.sql_command == SQLCOM_SELECT - && thd->lex.lock_option == TL_READ - ? LOCK_NONE - : LOCK_X; + if (prebuilt->select_lock_type != LOCK_NONE) { + prebuilt->stored_select_lock_type = + prebuilt->select_lock_type; + } + + if (prebuilt->stored_select_lock_type != LOCK_S + && prebuilt->stored_select_lock_type != LOCK_X) { + fprintf(stderr, +"InnoDB: Error: select_lock_type is %lu inside ::start_stmt()!\n", + prebuilt->stored_select_lock_type); + + ut_error; + } + + if (thd->lex.sql_command == SQLCOM_SELECT + && thd->lex.lock_option == TL_READ) { + + /* For other than temporary tables, we obtain + no lock for consistent read (plain SELECT) */ + + prebuilt->select_lock_type = LOCK_NONE; + } else { + /* Not a consistent read: restore the + select_lock_type value */ + prebuilt->select_lock_type = + prebuilt->stored_select_lock_type; + } } /* Set the MySQL flag to mark that there is an active transaction */ From 063deb90d347a2710afee94e5f6ef04619060209 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 1 Jun 2004 14:18:34 -0500 Subject: [PATCH 32/38] README: Update README URL. (Bug #3678) mysql-test/README: Update README URL. (Bug #3678) --- mysql-test/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/README b/mysql-test/README index c5dc3e219de..6ad97adbd2b 100644 --- a/mysql-test/README +++ b/mysql-test/README @@ -8,7 +8,7 @@ conflict with it. All tests must pass. If one or more of them fail on your system, please read the following manual section of how to report the problem: -http://www.mysql.com/doc/M/y/MySQL_test_suite.html +http://dev.mysql.com/doc/mysql/en/MySQL_test_suite.html You can create your own test cases. To create a test case: From 010fffc2f7568e219018706918e08e7310b38fcd Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 1 Jun 2004 23:34:47 +0300 Subject: [PATCH 33/38] Updated version number Portability fix for netware. (We can't use TRY_RUN when cross compiling) --- configure.in | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index f2b66d1e09d..e346ebfa15e 100644 --- a/configure.in +++ b/configure.in @@ -4,7 +4,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(sql/mysqld.cc) AC_CANONICAL_SYSTEM # The Docs Makefile.am parses this line! -AM_INIT_AUTOMAKE(mysql, 4.0.20) +AM_INIT_AUTOMAKE(mysql, 4.0.21) AM_CONFIG_HEADER(config.h) PROTOCOL_VERSION=10 @@ -767,7 +767,14 @@ AC_CHECK_FUNC(crypt, AC_DEFINE(HAVE_CRYPT)) AC_CHECK_FUNC(sem_init, , AC_CHECK_LIB(posix4, sem_init)) # For compress in zlib -MYSQL_CHECK_ZLIB_WITH_COMPRESS($with_named_zlib) +case $SYSTEM_TYPE in + *netware*) + AC_DEFINE(HAVE_COMPRESS) + ;; + *) + MYSQL_CHECK_ZLIB_WITH_COMPRESS($with_named_zlib) + ;; +esac #-------------------------------------------------------------------- # Check for TCP wrapper support From 1a36eff30c4f661081d0943e2c764a0c1807acaf Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 1 Jun 2004 19:35:09 -0100 Subject: [PATCH 34/38] Fix applied to allow building of 4.0.20 for NetWare client/mysqltest.c: Fix compilation errors for NetWare --- client/mysqltest.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index cdf1648769b..22ce5208445 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -185,7 +185,7 @@ typedef struct */ static char *subst_env_var(const char *cmd); -static int my_popen(const char *cmd, const char *mode); +static FILE *my_popen(const char *cmd, const char *mode); #define popen(A,B) my_popen((A),(B)) #endif /* __NETWARE__ */ @@ -3509,6 +3509,7 @@ static void get_replace_column(struct st_query *q) static char *subst_env_var(const char *str) { char *result; + char *pos; result= pos= my_malloc(MAX_QUERY, MYF(MY_FAE)); while (*str) @@ -3528,7 +3529,7 @@ static char *subst_env_var(const char *str) *str && !isspace(*str) && *str != '\\' && *str != '/' && *str != '$'; str++) - *env_pos++ *str; + *env_pos++= *str; *env_pos= 0; if (!(subst= getenv(env_var))) @@ -3571,11 +3572,11 @@ static char *subst_env_var(const char *str) #undef popen /* Remove wrapper */ -int my_popen(const char *cmd, const char *mode __attribute__((unused)) t) +FILE *my_popen(const char *cmd, const char *mode __attribute__((unused))) { char *subst_cmd; - int res_file; - + FILE *res_file; + subst_cmd= subst_env_var(cmd); res_file= popen(subst_cmd, "r0"); my_free(subst_cmd, MYF(0)); From daf33a49ba93291a1f1becd5f76fb3d207aa90ed Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 2 Jun 2004 11:12:04 +0300 Subject: [PATCH 35/38] InnoDB cleanup: Remove debug function cmp_debug_dtuple_rec_with_match() unless #ifdef UNIV_DEBUG innobase/rem/rem0cmp.c: Remove cmp_debug_dtuple_rec_with_match() unless #ifdef UNIV_DEBUG --- innobase/rem/rem0cmp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/innobase/rem/rem0cmp.c b/innobase/rem/rem0cmp.c index dea2621faf3..5dae9f7bc74 100644 --- a/innobase/rem/rem0cmp.c +++ b/innobase/rem/rem0cmp.c @@ -33,12 +33,13 @@ At the present, the comparison functions return 0 in the case, where two records disagree only in the way that one has more fields than the other. */ +#ifdef UNIV_DEBUG /***************************************************************** Used in debug checking of cmp_dtuple_... . This function is used to compare a data tuple to a physical record. If dtuple has n fields then rec must have either m >= n fields, or it must differ from dtuple in some of the m fields rec has. */ - +static int cmp_debug_dtuple_rec_with_match( /*============================*/ @@ -54,6 +55,7 @@ cmp_debug_dtuple_rec_with_match( completely matched fields; when function returns, contains the value for current comparison */ +#endif /* UNIV_DEBUG */ /***************************************************************** This function is used to compare two data fields for which the data type is such that we must use MySQL code to compare them. The prototype here @@ -946,13 +948,14 @@ order_resolved: return(ret); } +#ifdef UNIV_DEBUG /***************************************************************** Used in debug checking of cmp_dtuple_... . This function is used to compare a data tuple to a physical record. If dtuple has n fields then rec must have either m >= n fields, or it must differ from dtuple in some of the m fields rec has. If encounters an externally stored field, returns 0. */ - +static int cmp_debug_dtuple_rec_with_match( /*============================*/ @@ -1048,3 +1051,4 @@ order_resolved: return(ret); } +#endif /* UNIV_DEBUG */ From 427590f86522204045b6b886fcd73270571319ea Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 2 Jun 2004 12:56:26 -0500 Subject: [PATCH 36/38] Touchups to .cnf file comments. --- support-files/my-huge.cnf.sh | 10 +++++----- support-files/my-innodb-heavy-4G.cnf.sh | 4 ++-- support-files/my-large.cnf.sh | 10 +++++----- support-files/my-medium.cnf.sh | 8 ++++---- support-files/my-small.cnf.sh | 8 ++++---- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/support-files/my-huge.cnf.sh b/support-files/my-huge.cnf.sh index 18e926b1400..e11b85f266f 100644 --- a/support-files/my-huge.cnf.sh +++ b/support-files/my-huge.cnf.sh @@ -1,6 +1,6 @@ -# Example mysql config file for very large systems. +# Example MySQL config file for very large systems. # -# This is for large system with memory of 1G-2G where the system runs mainly +# This is for a large system with memory of 1G-2G where the system runs mainly # MySQL. # # You can copy this file to @@ -9,9 +9,9 @@ # installation this directory is @localstatedir@) or # ~/.my.cnf to set user-specific options. # -# One can in this file use all long options that the program supports. -# If you want to know which options a program support, run the program -# with --help option. +# In this file, you can use all long options that a program supports. +# If you want to know which options a program supports, run the program +# with the "--help" option. # The following options will be passed to all MySQL clients [client] diff --git a/support-files/my-innodb-heavy-4G.cnf.sh b/support-files/my-innodb-heavy-4G.cnf.sh index ed2c2ce9dfd..70944873144 100644 --- a/support-files/my-innodb-heavy-4G.cnf.sh +++ b/support-files/my-innodb-heavy-4G.cnf.sh @@ -13,8 +13,8 @@ # (@localstatedir@ for this installation) or to # ~/.my.cnf to set user-specific options. # -# In this file, you can use all long options that the program supports. -# If you want to know the options a program supports, run the program +# In this file, you can use all long options that a program supports. +# If you want to know which options a program supports, run the program # with the "--help" option. # # More detailed information about the individual options can also be diff --git a/support-files/my-large.cnf.sh b/support-files/my-large.cnf.sh index 2b92dc61053..5995064fb4e 100644 --- a/support-files/my-large.cnf.sh +++ b/support-files/my-large.cnf.sh @@ -1,6 +1,6 @@ -# Example mysql config file for large systems. +# Example MySQL config file for large systems. # -# This is for large system with memory = 512M where the system runs mainly +# This is for a large system with memory = 512M where the system runs mainly # MySQL. # # You can copy this file to @@ -9,9 +9,9 @@ # installation this directory is @localstatedir@) or # ~/.my.cnf to set user-specific options. # -# One can in this file use all long options that the program supports. -# If you want to know which options a program support, run the program -# with --help option. +# In this file, you can use all long options that a program supports. +# If you want to know which options a program supports, run the program +# with the "--help" option. # The following options will be passed to all MySQL clients [client] diff --git a/support-files/my-medium.cnf.sh b/support-files/my-medium.cnf.sh index bc13d7c0a61..f3a99db8019 100644 --- a/support-files/my-medium.cnf.sh +++ b/support-files/my-medium.cnf.sh @@ -1,4 +1,4 @@ -# Example mysql config file for medium systems. +# Example MySQL config file for medium systems. # # This is for a system with little memory (32M - 64M) where MySQL plays # an important part, or systems up to 128M where MySQL is used together with @@ -10,9 +10,9 @@ # installation this directory is @localstatedir@) or # ~/.my.cnf to set user-specific options. # -# One can in this file use all long options that the program supports. -# If you want to know which options a program support, run the program -# with --help option. +# In this file, you can use all long options that a program supports. +# If you want to know which options a program supports, run the program +# with the "--help" option. # The following options will be passed to all MySQL clients [client] diff --git a/support-files/my-small.cnf.sh b/support-files/my-small.cnf.sh index 3c4cafa688f..f1e3654dd88 100644 --- a/support-files/my-small.cnf.sh +++ b/support-files/my-small.cnf.sh @@ -1,4 +1,4 @@ -# Example mysql config file for small systems. +# Example MySQL config file for small systems. # # This is for a system with little memory (<= 64M) where MySQL is only used # from time to time and it's important that the mysqld daemon @@ -10,9 +10,9 @@ # installation this directory is @localstatedir@) or # ~/.my.cnf to set user-specific options. # -# One can in this file use all long options that the program supports. -# If you want to know which options a program support, run the program -# with --help option. +# In this file, you can use all long options that a program supports. +# If you want to know which options a program supports, run the program +# with the "--help" option. # The following options will be passed to all MySQL clients [client] From 7dc2426be0b6a3db11249827f32aa45214fff1ec Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 7 Jun 2004 12:38:35 +0200 Subject: [PATCH 37/38] BUG#3987 - if(int, aggregate(int)) --- mysql-test/r/func_if.result | 6 ++++++ mysql-test/t/func_if.test | 9 +++++++++ sql/item_cmpfunc.cc | 4 ++-- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/func_if.result b/mysql-test/r/func_if.result index 470004d2646..aee54ede324 100644 --- a/mysql-test/r/func_if.result +++ b/mysql-test/r/func_if.result @@ -58,3 +58,9 @@ select min(if(y -x > 5,y,NULL)), max(if(y - x > 5,y,NULL)) from t1; min(if(y -x > 5,y,NULL)) max(if(y - x > 5,y,NULL)) 6 56 drop table t1; +create table t1 (a int); +insert t1 values (1),(2); +select if(1>2,a,avg(a)) from t1; +if(1>2,a,avg(a)) +1.5000 +drop table t1; diff --git a/mysql-test/t/func_if.test b/mysql-test/t/func_if.test index 1f95239bf4b..5e605dbe97b 100644 --- a/mysql-test/t/func_if.test +++ b/mysql-test/t/func_if.test @@ -38,3 +38,12 @@ create table t1 (x int, y int); insert into t1 values (0,6),(10,16),(20,26),(30,10),(40,46),(50,56); select min(if(y -x > 5,y,NULL)), max(if(y - x > 5,y,NULL)) from t1; drop table t1; + +# +# BUG#3987 +# +create table t1 (a int); +insert t1 values (1),(2); +select if(1>2,a,avg(a)) from t1; +drop table t1; + diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index d84dab3425a..013304d9df5 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -535,8 +535,8 @@ Item_func_if::fix_length_and_dec() decimals=max(args[1]->decimals,args[2]->decimals); enum Item_result arg1_type=args[1]->result_type(); enum Item_result arg2_type=args[2]->result_type(); - bool null1=args[1]->null_value; - bool null2=args[2]->null_value; + bool null1=args[1]->const_item() && args[1]->null_value; + bool null2=args[2]->const_item() && args[2]->null_value; if (null1) { From 3e159f3fc9dfc652a5338e6b564226717560add1 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 Jun 2004 12:35:22 +0600 Subject: [PATCH 38/38] BUG#3439 problem with UDF functions VC++Files/examples/udf_example/udf_example.def: Add definitions of init and deinit functions --- .../examples/udf_example/udf_example.def | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/VC++Files/examples/udf_example/udf_example.def b/VC++Files/examples/udf_example/udf_example.def index c1cfeea63f8..9764343e5f2 100644 --- a/VC++Files/examples/udf_example/udf_example.def +++ b/VC++Files/examples/udf_example/udf_example.def @@ -2,8 +2,17 @@ LIBRARY MYUDF DESCRIPTION 'MySQL Sample for UDF' VERSION 1.0 EXPORTS - metaphon - myfunc_double - myfunc_int - sequence - avgcost \ No newline at end of file + metaphon_init + metaphon_deinit + metaphon + myfunc_double_init + myfunc_double + myfunc_int + sequence_init + sequence_deinit + sequence + avgcost_init + avgcost_deinit + avgcost_reset + avgcost_add + avgcost