From 1b4e19f3e6ee2a534981324bdaee8089b5e8975f Mon Sep 17 00:00:00 2001 From: "joerg@mysql.com" <> Date: Fri, 29 Jul 2005 11:54:22 +0200 Subject: [PATCH 01/12] Increase version number (prepare for new build including security fixes in "zlib"). --- BitKeeper/etc/config | 2 +- configure.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BitKeeper/etc/config b/BitKeeper/etc/config index c609fcdbd49..6ddd492ebc4 100644 --- a/BitKeeper/etc/config +++ b/BitKeeper/etc/config @@ -24,7 +24,7 @@ description: MySQL - fast and reliable SQL database # repository is commercial it can be an internal email address or "none" # to disable logging. # -logging: logging@openlogging.org +logging: none # # If this field is set, all checkins will appear to be made by this user, # in effect making this a single user package. Single user packages are diff --git a/configure.in b/configure.in index 314283f6012..60b91f5cc60 100644 --- a/configure.in +++ b/configure.in @@ -5,7 +5,7 @@ AC_INIT(sql/mysqld.cc) AC_CANONICAL_SYSTEM # The Docs Makefile.am parses this line! # remember to also change ndb version below and update version.c in ndb -AM_INIT_AUTOMAKE(mysql, 4.1.10a) +AM_INIT_AUTOMAKE(mysql, 4.1.10b) AM_CONFIG_HEADER(config.h) PROTOCOL_VERSION=10 From 3503b1316eb187a2a0dde070939b10f1d3cc94b4 Mon Sep 17 00:00:00 2001 From: "joerg@mysql.com" <> Date: Fri, 29 Jul 2005 13:49:25 +0200 Subject: [PATCH 02/12] Security fix in "zlib": - upgrade zlib to 1.2.2 (originally: 2005/03/23 21:08:13+01:00 serg@serg.mylan ) - fixed linking with zlib (originally: 2005/05/24 22:42:43+02:00 lenz@mysql.com ) - one more build fix for zlib.lib - added libpath to the mysql_test_run_new project files (originally: 2005/05/25 10:55:21+02:00 lenz@mysql.com ) - Do not build the RPMs statically on i386 by default, only when adding either "--with static" or "--define '_with_static 1'" to the RPM build options. Static linking really only makes sense when linking against the specially patched glibc 2.2.5. (originally: 2005/06/14 21:39:08+02:00 lenz@mysql.com ) - Apply security patch to bundled zlib for CAN-2005-2096. (Bug #11844) (originally: 2005/07/11 10:37:21-07:00 jimw@mysql.com ) - applied a security fix to inftrees.h from the bundled zlib to resolve a second potential zlib security vulnerability (CAN-2005-1849). Fix was taken from the official zlib-1.2.3 distribution (no other zlib-1.2.3 changes were applied) (originally: 2005/07/27 14:55:08+02:00 lenz@mysql.com ) - build the RPM binaries against the bundled zlib, when static linking is requested (originally: 2005/07/27 16:42:13+02:00 lenz@mysql.com ) --- VC++Files/client/mysql.dsp | 6 +- VC++Files/client/mysqladmin.dsp | 6 +- VC++Files/client/mysqlcheck.dsp | 2 +- VC++Files/client/mysqldump.dsp | 6 +- VC++Files/client/mysqlimport.dsp | 6 +- VC++Files/client/mysqlshow.dsp | 6 +- VC++Files/client/mysqltest.dsp | 4 +- VC++Files/mysql-test/mysql_test_run_new.dsp | 4 +- VC++Files/mysqlbinlog/mysqlbinlog.dsp | 6 +- VC++Files/mysqlcheck/mysqlcheck.dsp | 6 +- VC++Files/mysqlmanager/mysqlmanager.dsp | 4 +- acinclude.m4 | 5 +- support-files/mysql.spec.sh | 16 +++- zlib/ChangeLog | 42 ++++++++++ zlib/FAQ | 88 +++++++++++++-------- zlib/INDEX | 3 + zlib/README | 8 +- zlib/crc32.c | 74 +++++++++++------ zlib/deflate.c | 4 +- zlib/deflate.h | 1 - zlib/gzio.c | 4 + zlib/infback.c | 3 + zlib/inffast.c | 4 +- zlib/inflate.c | 4 + zlib/inftrees.c | 19 +++-- zlib/inftrees.h | 10 +-- zlib/trees.c | 4 +- zlib/zconf.h | 83 +++++++++---------- zlib/zlib.3 | 6 +- zlib/zlib.h | 30 +++---- zlib/zutil.h | 7 +- 31 files changed, 299 insertions(+), 172 deletions(-) diff --git a/VC++Files/client/mysql.dsp b/VC++Files/client/mysql.dsp index ec16e780d3e..8298e62d8ad 100644 --- a/VC++Files/client/mysql.dsp +++ b/VC++Files/client/mysql.dsp @@ -52,7 +52,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 /subsystem:console /machine:I386 -# ADD LINK32 mysqlclient.lib wsock32.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 /debug /machine:I386 /out:"../client_release/mysql.exe" /libpath:"..\lib_release\\" +# ADD LINK32 mysqlclient.lib wsock32.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 zlib.lib /nologo /subsystem:console /debug /machine:I386 /out:"../client_release/mysql.exe" /libpath:"..\lib_release\\" # SUBTRACT LINK32 /incremental:yes !ELSEIF "$(CFG)" == "mysql - Win32 Debug" @@ -78,7 +78,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 /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 mysqlclient.lib wsock32.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 /incremental:no /debug /machine:I386 /out:"../client_debug/mysql.exe" /pdbtype:sept /libpath:"..\lib_debug\\" +# ADD LINK32 mysqlclient.lib wsock32.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 zlib.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../client_debug/mysql.exe" /pdbtype:sept /libpath:"..\lib_debug\\" !ELSEIF "$(CFG)" == "mysql - Win32 classic" @@ -106,7 +106,7 @@ BSC32=bscmake.exe LINK32=xilink6.exe # ADD BASE LINK32 mysqlclient.lib wsock32.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 /debug /machine:I386 /out:"../client_release/mysql.exe" /libpath:"..\lib_release\\" # SUBTRACT BASE LINK32 /incremental:yes -# ADD LINK32 mysqlclient.lib wsock32.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 /debug /machine:I386 /out:"../client_classic/mysql.exe" /libpath:"..\lib_release\\" +# ADD LINK32 mysqlclient.lib wsock32.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 zlib.lib /nologo /subsystem:console /debug /machine:I386 /out:"../client_classic/mysql.exe" /libpath:"..\lib_release\\" # SUBTRACT LINK32 /incremental:yes !ENDIF diff --git a/VC++Files/client/mysqladmin.dsp b/VC++Files/client/mysqladmin.dsp index 7a0b3bec1a7..b473d104a76 100644 --- a/VC++Files/client/mysqladmin.dsp +++ b/VC++Files/client/mysqladmin.dsp @@ -52,7 +52,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 /subsystem:console /machine:I386 -# ADD LINK32 mysqlclient.lib wsock32.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 /out:"../client_release/mysqladmin.exe" /libpath:"..\lib_release\\" +# ADD LINK32 mysqlclient.lib wsock32.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 zlib.lib /nologo /subsystem:console /machine:I386 /out:"../client_release/mysqladmin.exe" /libpath:"..\lib_release\\" !ELSEIF "$(CFG)" == "mysqladmin - Win32 Debug" @@ -77,7 +77,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 /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 mysqlclient.lib wsock32.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 /incremental:no /debug /machine:I386 /out:"../client_debug/mysqladmin.exe" /pdbtype:sept /libpath:"..\lib_debug\\" +# ADD LINK32 mysqlclient.lib wsock32.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 zlib.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../client_debug/mysqladmin.exe" /pdbtype:sept /libpath:"..\lib_debug\\" !ELSEIF "$(CFG)" == "mysqladmin - Win32 classic" @@ -104,7 +104,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=xilink6.exe # ADD BASE LINK32 mysqlclient.lib wsock32.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 /out:"../client_release/mysqladmin.exe" /libpath:"..\lib_release\\" -# ADD LINK32 mysqlclient.lib wsock32.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 /out:"../client_classic/mysqladmin.exe" /libpath:"..\lib_release\\" +# ADD LINK32 mysqlclient.lib wsock32.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 zlib.lib /nologo /subsystem:console /machine:I386 /out:"../client_classic/mysqladmin.exe" /libpath:"..\lib_release\\" !ENDIF diff --git a/VC++Files/client/mysqlcheck.dsp b/VC++Files/client/mysqlcheck.dsp index 30e7a365f04..399b18d16fc 100644 --- a/VC++Files/client/mysqlcheck.dsp +++ b/VC++Files/client/mysqlcheck.dsp @@ -46,7 +46,7 @@ BSC32=bscmake.exe # 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 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 mysqlclient.lib wsock32.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 /pdb:"release/mysqlcheck.pdb" /machine:I386 /out:"../client_release/mysqlcheck.exe" /libpath:"..\lib_release\\" +# ADD LINK32 mysqlclient.lib wsock32.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 zlib.lib /nologo /subsystem:console /pdb:"release/mysqlcheck.pdb" /machine:I386 /out:"../client_release/mysqlcheck.exe" /libpath:"..\lib_release\\" # SUBTRACT LINK32 /pdb:none # Begin Target diff --git a/VC++Files/client/mysqldump.dsp b/VC++Files/client/mysqldump.dsp index 3c955639596..45d1d8777aa 100644 --- a/VC++Files/client/mysqldump.dsp +++ b/VC++Files/client/mysqldump.dsp @@ -52,7 +52,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 mysys.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 mysqlclient.lib wsock32.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 mysys.lib /nologo /subsystem:console /machine:I386 /out:"../client_release/mysqldump.exe" /libpath:"..\lib_release\\" +# ADD LINK32 mysqlclient.lib wsock32.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 mysys.lib zlib.lib /nologo /subsystem:console /machine:I386 /out:"../client_release/mysqldump.exe" /libpath:"..\lib_release\\" !ELSEIF "$(CFG)" == "mysqldump - Win32 Debug" @@ -77,7 +77,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 mysys.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 mysqlclient.lib wsock32.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 mysys.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../client_debug/mysqldump.exe" /pdbtype:sept /libpath:"..\lib_debug\\" +# ADD LINK32 mysqlclient.lib wsock32.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 mysys.lib zlib.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../client_debug/mysqldump.exe" /pdbtype:sept /libpath:"..\lib_debug\\" !ELSEIF "$(CFG)" == "mysqldump - Win32 classic" @@ -104,7 +104,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=xilink6.exe # ADD BASE LINK32 mysqlclient.lib wsock32.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 mysys.lib /nologo /subsystem:console /machine:I386 /out:"../client_release/mysqldump.exe" /libpath:"..\lib_release\\" -# ADD LINK32 mysqlclient.lib wsock32.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 mysys.lib /nologo /subsystem:console /machine:I386 /out:"../client_classic/mysqldump.exe" /libpath:"..\lib_release\\" +# ADD LINK32 mysqlclient.lib wsock32.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 mysys.lib zlib.lib /nologo /subsystem:console /machine:I386 /out:"../client_classic/mysqldump.exe" /libpath:"..\lib_release\\" !ENDIF diff --git a/VC++Files/client/mysqlimport.dsp b/VC++Files/client/mysqlimport.dsp index d5fd8557397..1a9b64a0383 100644 --- a/VC++Files/client/mysqlimport.dsp +++ b/VC++Files/client/mysqlimport.dsp @@ -52,7 +52,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 /subsystem:console /machine:I386 -# ADD LINK32 mysqlclient.lib wsock32.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 /out:"../client_release/mysqlimport.exe" /libpath:"..\lib_release\\" +# ADD LINK32 mysqlclient.lib wsock32.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 zlib.lib /nologo /subsystem:console /machine:I386 /out:"../client_release/mysqlimport.exe" /libpath:"..\lib_release\\" # SUBTRACT LINK32 /incremental:yes !ELSEIF "$(CFG)" == "mysqlimport - Win32 Debug" @@ -78,7 +78,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 /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 mysqlclient.lib wsock32.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 setargv.obj /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../client_debug/mysqlimport.exe" /pdbtype:sept /libpath:"..\lib_debug\\" +# ADD LINK32 mysqlclient.lib wsock32.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 zlib.lib setargv.obj /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../client_debug/mysqlimport.exe" /pdbtype:sept /libpath:"..\lib_debug\\" !ELSEIF "$(CFG)" == "mysqlimport - Win32 classic" @@ -106,7 +106,7 @@ BSC32=bscmake.exe LINK32=xilink6.exe # ADD BASE LINK32 mysqlclient.lib wsock32.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 /out:"../client_release/mysqlimport.exe" /libpath:"..\lib_release\\" # SUBTRACT BASE LINK32 /incremental:yes -# ADD LINK32 mysqlclient.lib wsock32.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 /out:"../client_classic/mysqlimport.exe" /libpath:"..\lib_release\\" +# ADD LINK32 mysqlclient.lib wsock32.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 zlib.lib /nologo /subsystem:console /machine:I386 /out:"../client_classic/mysqlimport.exe" /libpath:"..\lib_release\\" # SUBTRACT LINK32 /incremental:yes !ENDIF diff --git a/VC++Files/client/mysqlshow.dsp b/VC++Files/client/mysqlshow.dsp index b9fd0d27e46..855c2dcdf34 100644 --- a/VC++Files/client/mysqlshow.dsp +++ b/VC++Files/client/mysqlshow.dsp @@ -52,7 +52,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 /subsystem:console /machine:I386 -# ADD LINK32 mysqlclient.lib wsock32.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 /out:"../client_release/mysqlshow.exe" /libpath:"..\lib_release\\" +# ADD LINK32 mysqlclient.lib wsock32.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 zlib.lib /nologo /subsystem:console /machine:I386 /out:"../client_release/mysqlshow.exe" /libpath:"..\lib_release\\" !ELSEIF "$(CFG)" == "mysqlshow - Win32 Debug" @@ -77,7 +77,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 /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 mysqlclient.lib wsock32.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 /incremental:no /debug /machine:I386 /out:"../client_debug/mysqlshow.exe" /pdbtype:sept /libpath:"..\lib_debug\\" +# ADD LINK32 mysqlclient.lib wsock32.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 zlib.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../client_debug/mysqlshow.exe" /pdbtype:sept /libpath:"..\lib_debug\\" !ELSEIF "$(CFG)" == "mysqlshow - Win32 classic" @@ -104,7 +104,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=xilink6.exe # ADD BASE LINK32 mysqlclient.lib wsock32.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 /out:"../client_release/mysqlshow.exe" /libpath:"..\lib_release\\" -# ADD LINK32 mysqlclient.lib wsock32.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 /out:"../client_classic/mysqlshow.exe" /libpath:"..\lib_release\\" +# ADD LINK32 mysqlclient.lib wsock32.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 zlib.lib /nologo /subsystem:console /machine:I386 /out:"../client_classic/mysqlshow.exe" /libpath:"..\lib_release\\" !ENDIF diff --git a/VC++Files/client/mysqltest.dsp b/VC++Files/client/mysqltest.dsp index d04dc5bfce8..e705b17b0f0 100644 --- a/VC++Files/client/mysqltest.dsp +++ b/VC++Files/client/mysqltest.dsp @@ -78,7 +78,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib mysys.lib regex.lib /nologo /out:"..\client_classic\mysqltest.exe" /incremental:no /libpath:"..\lib_release\" /pdb:".\classic\mysqltest.pdb" /pdbtype:sept /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 odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib mysys.lib regex.lib /nologo /out:"..\client_classic\mysqltest.exe" /incremental:no /libpath:"..\lib_release\" /pdb:".\classic\mysqltest.pdb" /pdbtype:sept /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 odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib mysys.lib regex.lib zlib.lib /nologo /out:"..\client_classic\mysqltest.exe" /incremental:no /libpath:"..\lib_release\" /pdb:".\classic\mysqltest.pdb" /pdbtype:sept /subsystem:console /MACHINE:I386 !ELSEIF "$(CFG)" == "mysqltest - Win32 Release" @@ -103,7 +103,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib mysys.lib regex.lib /nologo /out:"..\client_release\mysqltest.exe" /incremental:no /libpath:"..\lib_release\" /pdb:".\release\mysqltest.pdb" /pdbtype:sept /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 odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib mysys.lib regex.lib /nologo /out:"..\client_release\mysqltest.exe" /incremental:no /libpath:"..\lib_release\" /pdb:".\release\mysqltest.pdb" /pdbtype:sept /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 odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib mysys.lib regex.lib zlib.lib /nologo /out:"..\client_release\mysqltest.exe" /incremental:no /libpath:"..\lib_release\" /pdb:".\release\mysqltest.pdb" /pdbtype:sept /subsystem:console /MACHINE:I386 !ENDIF diff --git a/VC++Files/mysql-test/mysql_test_run_new.dsp b/VC++Files/mysql-test/mysql_test_run_new.dsp index 61392b00b94..467ff939502 100644 --- a/VC++Files/mysql-test/mysql_test_run_new.dsp +++ b/VC++Files/mysql-test/mysql_test_run_new.dsp @@ -52,7 +52,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\mysql-test\mysql_test_run_new.exe" /incremental:yes /debug /pdb:".\Debug\mysql_test_run_new.pdb" /pdbtype:sept /map:".\Debug\mysql_test_run_new.map" /subsystem:console -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\mysql-test\mysql_test_run_new.exe" /incremental:yes /debug /pdb:".\Debug\mysql_test_run_new.pdb" /pdbtype:sept /map:".\Debug\mysql_test_run_new.map" /subsystem:console +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib zlib.lib /nologo /out:"..\mysql-test\mysql_test_run_new.exe" /incremental:yes /libpath:"..\lib_debug\" /debug /pdb:".\Debug\mysql_test_run_new.pdb" /pdbtype:sept /map:".\Debug\mysql_test_run_new.map" /subsystem:console !ELSEIF "$(CFG)" == "mysql_test_run_new - Win32 Release" @@ -77,7 +77,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\mysql-test\mysql_test_run_new.exe" /incremental:no /pdb:".\Release\mysql_test_run_new.pdb" /pdbtype:sept /subsystem:console -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\mysql-test\mysql_test_run_new.exe" /incremental:no /pdb:".\Release\mysql_test_run_new.pdb" /pdbtype:sept /subsystem:console +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib zlib.lib /nologo /out:"..\mysql-test\mysql_test_run_new.exe" /incremental:no /libpath:"..\lib_release\" /pdb:".\Release\mysql_test_run_new.pdb" /pdbtype:sept /subsystem:console !ENDIF diff --git a/VC++Files/mysqlbinlog/mysqlbinlog.dsp b/VC++Files/mysqlbinlog/mysqlbinlog.dsp index 8b8895d6f17..1b129072d8e 100644 --- a/VC++Files/mysqlbinlog/mysqlbinlog.dsp +++ b/VC++Files/mysqlbinlog/mysqlbinlog.dsp @@ -51,7 +51,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 mysqlclient.lib wsock32.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 /out:"../client_release/mysqlbinlog.exe" /libpath:"..\lib_release\\" +# ADD LINK32 mysqlclient.lib wsock32.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 zlib.lib /nologo /subsystem:console /machine:I386 /out:"../client_release/mysqlbinlog.exe" /libpath:"..\lib_release\\" # SUBTRACT LINK32 /pdb:none /debug !ELSEIF "$(CFG)" == "mysqlbinlog - Win32 Debug" @@ -76,7 +76,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 /debug /machine:I386 /pdbtype:sept -# ADD LINK32 mysqlclient.lib wsock32.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 /incremental:no /debug /machine:I386 /out:"../client_debug/mysqlbinlog.exe" /pdbtype:sept /libpath:"..\lib_debug\\" +# ADD LINK32 mysqlclient.lib wsock32.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 zlib.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../client_debug/mysqlbinlog.exe" /pdbtype:sept /libpath:"..\lib_debug\\" !ELSEIF "$(CFG)" == "mysqlbinlog - Win32 classic" @@ -102,7 +102,7 @@ BSC32=bscmake.exe LINK32=xilink6.exe # ADD BASE LINK32 mysqlclient.lib wsock32.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 /out:"../client_release/mysqlbinlog.exe" /libpath:"..\lib_release\\" # SUBTRACT BASE LINK32 /pdb:none /debug -# ADD LINK32 mysqlclient.lib wsock32.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 /out:"../client_classic/mysqlbinlog.exe" /libpath:"..\lib_release\\" +# ADD LINK32 mysqlclient.lib wsock32.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 zlib.lib /nologo /subsystem:console /machine:I386 /out:"../client_classic/mysqlbinlog.exe" /libpath:"..\lib_release\\" # SUBTRACT LINK32 /pdb:none /debug !ENDIF diff --git a/VC++Files/mysqlcheck/mysqlcheck.dsp b/VC++Files/mysqlcheck/mysqlcheck.dsp index bd24a14128d..51a817cc067 100644 --- a/VC++Files/mysqlcheck/mysqlcheck.dsp +++ b/VC++Files/mysqlcheck/mysqlcheck.dsp @@ -51,7 +51,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 mysqlclient.lib wsock32.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 /out:"../client_release/mysqlcheck.exe" /libpath:"..\lib_release\\" +# ADD LINK32 mysqlclient.lib wsock32.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 zlib.lib /nologo /subsystem:console /machine:I386 /out:"../client_release/mysqlcheck.exe" /libpath:"..\lib_release\\" !ELSEIF "$(CFG)" == "mysqlcheck - Win32 Debug" @@ -75,7 +75,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 /debug /machine:I386 /pdbtype:sept -# ADD LINK32 mysqlclient.lib wsock32.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 /incremental:no /debug /machine:I386 /out:"../client_debug/mysqlcheck.exe" /pdbtype:sept /libpath:"..\lib_debug\\" +# ADD LINK32 mysqlclient.lib wsock32.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 zlib.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../client_debug/mysqlcheck.exe" /pdbtype:sept /libpath:"..\lib_debug\\" !ELSEIF "$(CFG)" == "mysqlcheck - Win32 classic" @@ -100,7 +100,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=xilink6.exe # ADD BASE LINK32 mysqlclient.lib wsock32.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 /out:"../client_release/mysqlcheck.exe" /libpath:"..\lib_release\\" -# ADD LINK32 mysqlclient.lib wsock32.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 /out:"../client_classic/mysqlcheck.exe" /libpath:"..\lib_release\\" +# ADD LINK32 mysqlclient.lib wsock32.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 zlib.lib /nologo /subsystem:console /machine:I386 /out:"../client_classic/mysqlcheck.exe" /libpath:"..\lib_release\\" !ENDIF diff --git a/VC++Files/mysqlmanager/mysqlmanager.dsp b/VC++Files/mysqlmanager/mysqlmanager.dsp index 7f92e091904..27aa1a77024 100644 --- a/VC++Files/mysqlmanager/mysqlmanager.dsp +++ b/VC++Files/mysqlmanager/mysqlmanager.dsp @@ -54,7 +54,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=xilink6.exe # ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 -# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"../client_release/MySqlManager.exe" +# ADD LINK32 zlib.lib /nologo /subsystem:windows /machine:I386 /out:"../client_release/MySqlManager.exe" /libpath:"..\lib_release\\" # SUBTRACT LINK32 /nodefaultlib !ELSEIF "$(CFG)" == "MySqlManager - Win32 Debug" @@ -83,7 +83,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=xilink6.exe # ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib uuid.lib /nologo /subsystem:windows /incremental:no /debug /machine:I386 /out:"../client_debug/MySqlManager.exe" /pdbtype:sept /libpath:"..\lib_debug\\" +# ADD LINK32 wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib uuid.lib zlib.lib /nologo /subsystem:windows /incremental:no /debug /machine:I386 /out:"../client_debug/MySqlManager.exe" /pdbtype:sept /libpath:"..\lib_debug\\" # SUBTRACT LINK32 /pdb:none !ENDIF diff --git a/acinclude.m4 b/acinclude.m4 index 5ddd8952c42..c1803c5c0e1 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -256,9 +256,10 @@ case $SYSTEM_TYPE in AC_ARG_WITH([zlib-dir], AC_HELP_STRING([--with-zlib-dir=DIR], [Provide MySQL with a custom location of - compression library. Given DIR, zlib binary is + compression library. Given DIR, zlib library is assumed to be in $DIR/lib and header files - in $DIR/include.]), + in $DIR/include. Specify "bundled" to use + bundled zlib.]), [mysql_zlib_dir=${withval}], [mysql_zlib_dir=""]) case "$mysql_zlib_dir" in diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 07c8e6a46fb..4586b880845 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -1,5 +1,9 @@ %define mysql_version @VERSION@ -%ifarch i386 +# use "rpmbuild --with static" or "rpm --define '_with_static 1'" (for RPM 3.x) +# to enable static linking (off by default) +%{?_with_static:%define STATIC_BUILD 1} +%{!?_with_static:%define STATIC_BUILD 0} +%if %{STATIC_BUILD} %define release 0 %else %define release 0.glibc23 @@ -374,9 +378,10 @@ mv Docs/manual.ps.save Docs/manual.ps # so don't link statically there # BuildMySQL "--disable-shared \ -%ifarch i386 +%if %{STATIC_BUILD} --with-mysqld-ldflags='-all-static' \ --with-client-ldflags='-all-static' \ + --with-zlib-dir=bundled \ $USE_OTHER_LIBC_DIR \ %endif --with-comment=\"MySQL Community Edition - Standard (GPL)\" \ @@ -695,6 +700,13 @@ fi # itself - note that they must be ordered by date (important when # merging BK trees) %changelog +* Tue Jun 14 2005 Lenz Grimmer + +- Do not build statically on i386 by default, only when adding either "--with + static" or "--define '_with_static 1'" to the RPM build options. Static + linking really only makes sense when linking against the specially patched + glibc 2.2.5. + * Mon Feb 14 2005 Lenz Grimmer * Fixed the compilation comments and moved them into the separate build sections diff --git a/zlib/ChangeLog b/zlib/ChangeLog index 243a5062fae..1af7633d668 100644 --- a/zlib/ChangeLog +++ b/zlib/ChangeLog @@ -6,6 +6,48 @@ in MySQL distribution. If you are working on porting MySQL to one of rare platforms, you might find worth looking at the original zlib distribution and using appropriate Makefiles/project files from it. +Changes in 1.2.2 (3 October 2004) +- Update zlib.h comments on gzip in-memory processing +- Set adler to 1 in inflateReset() to support Java test suite [Walles] +- Add contrib/dotzlib [Ravn] +- Update win32/DLL_FAQ.txt [Truta] +- Update contrib/minizip [Vollant] +- Move contrib/visual-basic.txt to old/ [Truta] +- Fix assembler builds in projects/visualc6/ [Truta] + +Changes in 1.2.1.2 (9 September 2004) +- Update INDEX file +- Fix trees.c to update strm->data_type (no one ever noticed!) +- Fix bug in error case in inflate.c, infback.c, and infback9.c [Brown] +- Add "volatile" to crc table flag declaration (for DYNAMIC_CRC_TABLE) +- Add limited multitasking protection to DYNAMIC_CRC_TABLE +- Add NO_vsnprintf for VMS in zutil.h [Mozilla] +- Don't declare strerror() under VMS [Mozilla] +- Add comment to DYNAMIC_CRC_TABLE to use get_crc_table() to initialize +- Update contrib/ada [Anisimkov] +- Update contrib/minizip [Vollant] +- Fix configure to not hardcode directories for Darwin [Peterson] +- Fix gzio.c to not return error on empty files [Brown] +- Fix indentation; update version in contrib/delphi/ZLib.pas and + contrib/pascal/zlibpas.pas [Truta] +- Update mkasm.bat in contrib/masmx86 [Truta] +- Update contrib/untgz [Truta] +- Add projects/README.projects [Truta] +- Add project for MS Visual C++ 6.0 in projects/visualc6 [Cadieux, Truta] +- Update win32/DLL_FAQ.txt [Truta] +- Update list of Z_PREFIX symbols in zconf.h [Randers-Pehrson, Truta] +- Remove an unnecessary assignment to curr in inftrees.c [Truta] +- Add OS/2 to exe builds in configure [Poltorak] +- Remove err dummy parameter in zlib.h [Kientzle] + +Changes in 1.2.1.1 (9 January 2004) +- Update email address in README +- Several FAQ updates +- Fix a big fat bug in inftrees.c that prevented decoding valid + dynamic blocks with only literals and no distance codes -- + Thanks to "Hot Emu" for the bug report and sample file +- Add a note to puff.c on no distance codes case. + Changes in 1.2.1 (17 November 2003) - Remove a tab in contrib/gzappend/gzappend.c - Update some interfaces in contrib for new zlib functions diff --git a/zlib/FAQ b/zlib/FAQ index 7115ec38d60..4f61f1094e6 100644 --- a/zlib/FAQ +++ b/zlib/FAQ @@ -21,18 +21,18 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html 3. Where can I get a Visual Basic interface to zlib? See - * http://www.winimage.com/zLibDll/ * http://www.dogma.net/markn/articles/zlibtool/zlibtool.htm * contrib/visual-basic.txt in the zlib distribution + * win32/DLL_FAQ.txt in the zlib distribution - 4. compress() returns Z_BUF_ERROR + 4. compress() returns Z_BUF_ERROR. Make sure that before the call of compress, the length of the compressed buffer is equal to the total size of the compressed buffer and not zero. For Visual Basic, check that this parameter is passed by reference ("as any"), not by value ("as long"). - 5. deflate() or inflate() returns Z_BUF_ERROR + 5. deflate() or inflate() returns Z_BUF_ERROR. Before making the call, make sure that avail_in and avail_out are not zero. When setting the parameter flush equal to Z_FINISH, also make sure @@ -47,8 +47,8 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html It's in zlib.h for the moment, and Francis S. Lin has converted it to a web page zlib.html. Volunteers to transform this to Unix-style man pages, - please contact Jean-loup Gailly (jloup@gzip.org). Examples of zlib usage - are in the files example.c and minigzip.c. + please contact us (zlib@gzip.org). Examples of zlib usage are in the files + example.c and minigzip.c. 7. Why don't you use GNU autoconf or libtool or ...? @@ -77,7 +77,8 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html 11. Can zlib handle .zip archives? - See the directory contrib/minizip in the zlib distribution. + Not by itself, no. See the directory contrib/minizip in the zlib + distribution. 12. Can zlib handle .Z files? @@ -92,6 +93,8 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html 14. How do I install a shared zlib library on Unix? + After the above, then: + make install However, many flavors of Unix come with a shared zlib already installed. @@ -99,12 +102,31 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html trying to install it, you may want to check if it's already there! If you can #include , it's there. The -lz option will probably link to it. -15. I have a question about OttoPDF +15. I have a question about OttoPDF. We are not the authors of OttoPDF. The real author is on the OttoPDF web - site Joel Hainley jhainley@myndkryme.com. + site: Joel Hainley, jhainley@myndkryme.com. -16. Why does gzip give an error on a file I make with compress/deflate? +16. Can zlib decode Flate data in an Adobe PDF file? + + Yes. See http://www.fastio.com/ (ClibPDF), or http://www.pdflib.com/ . + To modify PDF forms, see http://sourceforge.net/projects/acroformtool/ . + +17. Why am I getting this "register_frame_info not found" error on Solaris? + + After installing zlib 1.1.4 on Solaris 2.6, running applications using zlib + generates an error such as: + + ld.so.1: rpm: fatal: relocation error: file /usr/local/lib/libz.so: + symbol __register_frame_info: referenced symbol not found + + The symbol __register_frame_info is not part of zlib, it is generated by + the C compiler (cc or gcc). You must recompile applications using zlib + which have this problem. This problem is specific to Solaris. See + http://www.sunfreeware.com for Solaris versions of zlib and applications + using zlib. + +18. Why does gzip give an error on a file I make with compress/deflate? The compress and deflate functions produce data in the zlib format, which is different and incompatible with the gzip format. The gz* functions in @@ -112,7 +134,7 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html formats use the same compressed data format internally, but have different headers and trailers around the compressed data. -17. Ok, so why are there two different formats? +19. Ok, so why are there two different formats? The gzip format was designed to retain the directory information about a single file, such as the name and last modification date. The zlib @@ -120,7 +142,7 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html channel applications, and has a much more compact header and trailer and uses a faster integrity check than gzip. -18. Well that's nice, but how do I make a gzip file in memory? +20. Well that's nice, but how do I make a gzip file in memory? You can request that deflate write the gzip format instead of the zlib format using deflateInit2(). You can also request that inflate decode @@ -133,7 +155,7 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html function and roll your own gzip encoding and decoding. Read the gzip RFC 1952 for details of the header and trailer format. -19. Is zlib thread-safe? +21. Is zlib thread-safe? Yes. However any library routines that zlib uses and any application- provided memory allocation routines must also be thread-safe. zlib's gz* @@ -144,15 +166,15 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html Of course, you should only operate on any given zlib or gzip stream from a single thread at a time. -20. Can I use zlib in my commercial application? +22. Can I use zlib in my commercial application? Yes. Please read the license in zlib.h. -21. Is zlib under the GNU license? +23. Is zlib under the GNU license? No. Please read the license in zlib.h. -22. The license says that altered source versions must be "plainly marked". So +24. The license says that altered source versions must be "plainly marked". So what exactly do I need to do to meet that requirement? You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In @@ -175,24 +197,24 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html ZLIB_VERSION and ZLIB_VERNUM and note the origin and nature of the changes in zlib.h as you would for a full source distribution. -23. Will zlib work on a big-endian or little-endian architecture, and can I +25. Will zlib work on a big-endian or little-endian architecture, and can I exchange compressed data between them? Yes and yes. -24. Will zlib work on a 64-bit machine? +26. Will zlib work on a 64-bit machine? It should. It has been tested on 64-bit machines, and has no dependence on any data types being limited to 32-bits in length. If you have any difficulties, please provide a complete problem report to zlib@gzip.org -25. Will zlib decompress data from the PKWare Data Compression Library? +27. Will zlib decompress data from the PKWare Data Compression Library? No. The PKWare DCL uses a completely different compressed data format than does PKZIP and zlib. However, you can look in zlib's contrib/blast directory for a possible solution to your problem. -26. Can I access data randomly in a compressed stream? +28. Can I access data randomly in a compressed stream? No, not without some preparation. If when compressing you periodically use Z_FULL_FLUSH, carefully write all the pending data at those points, @@ -200,27 +222,27 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html at those points. You have to be careful to not use Z_FULL_FLUSH too often, since it can significantly degrade compression. -27. Does zlib work on MVS, OS/390, CICS, etc.? +29. Does zlib work on MVS, OS/390, CICS, etc.? We don't know for sure. We have heard occasional reports of success on these systems. If you do use it on one of these, please provide us with a report, instructions, and patches that we can reference when we get these questions. Thanks. -28. Is there some simpler, easier to read version of inflate I can look at +30. Is there some simpler, easier to read version of inflate I can look at to understand the deflate format? First off, you should read RFC 1951. Second, yes. Look in zlib's contrib/puff directory. -29. Does zlib infringe on any patents? +31. Does zlib infringe on any patents? As far as we know, no. In fact, that was originally the whole point behind zlib. Look here for some more information: http://www.gzip.org/#faq11 -30. Can zlib work with greater than 4 GB of data? +32. Can zlib work with greater than 4 GB of data? Yes. inflate() and deflate() will process any amount of data correctly. Each call of inflate() or deflate() is limited to input and output chunks @@ -238,7 +260,7 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html only if the compiler's "long" type is 32 bits. If the compiler's "long" type is 64 bits, then the limit is 16 exabytes. -31. Does zlib have any security vulnerabilities? +33. Does zlib have any security vulnerabilities? The only one that we are aware of is potentially in gzprintf(). If zlib is compiled to use sprintf() or vsprintf(), then there is no protection @@ -258,35 +280,35 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html Note that you should be using the most recent version of zlib. Versions 1.1.3 and before were subject to a double-free vulnerability. -32. Is there a Java version of zlib? +34. Is there a Java version of zlib? Probably what you want is to use zlib in Java. zlib is already included as part of the Java SDK in the java.util.zip package. If you really want a version of zlib written in the Java language, look on the zlib home page for links: http://www.zlib.org/ -33. I get this or that compiler or source-code scanner warning when I crank it - up to maximally-pendantic. Can't you guys write proper code? +35. I get this or that compiler or source-code scanner warning when I crank it + up to maximally-pedantic. Can't you guys write proper code? Many years ago, we gave up attempting to avoid warnings on every compiler in the universe. It just got to be a waste of time, and some compilers were downright silly. So now, we simply make sure that the code always works. -34. Will zlib read the (insert any ancient or arcane format here) compressed +36. Will zlib read the (insert any ancient or arcane format here) compressed data format? Probably not. Look in the comp.compression FAQ for pointers to various formats and associated software. -35. How can I encrypt/decrypt zip files with zlib? +37. How can I encrypt/decrypt zip files with zlib? zlib doesn't support encryption. The original PKZIP encryption is very weak and can be broken with freely available programs. To get strong encryption, - use gpg ( http://www.gnupg.org/ ) which already includes zlib compression. + use GnuPG, http://www.gnupg.org/ , which already includes zlib compression. For PKZIP compatible "encryption", look at http://www.info-zip.org/ -36. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings? +38. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings? "gzip" is the gzip format, and "deflate" is the zlib format. They should probably have called the second one "zlib" instead to avoid confusion @@ -302,14 +324,14 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html Bottom line: use the gzip format for HTTP 1.1 encoding. -37. Does zlib support the new "Deflate64" format introduced by PKWare? +39. Does zlib support the new "Deflate64" format introduced by PKWare? No. PKWare has apparently decided to keep that format proprietary, since they have not documented it as they have previous compression formats. In any case, the compression improvements are so modest compared to other more modern approaches, that it's not worth the effort to implement. -38. Can you please sign these lengthy legal documents and fax them back to us +40. Can you please sign these lengthy legal documents and fax them back to us so that we can use your software in our product? No. Go away. Shoo. diff --git a/zlib/INDEX b/zlib/INDEX index a9de7844d16..0587e5902bd 100644 --- a/zlib/INDEX +++ b/zlib/INDEX @@ -8,9 +8,12 @@ algorithm.txt description of the (de)compression algorithm configure configure script for Unix zconf.in.h template for zconf.h (used by configure) +amiga/ makefiles for Amiga SAS C +as400/ makefiles for IBM AS/400 msdos/ makefiles for MSDOS old/ makefiles for various architectures and zlib documentation files that have not yet been updated for zlib 1.2.x +projects/ projects for various Integrated Development Environments qnx/ makefiles for QNX win32/ makefiles for Windows diff --git a/zlib/README b/zlib/README index 0f1205481c1..df95ae13f54 100644 --- a/zlib/README +++ b/zlib/README @@ -1,6 +1,6 @@ ZLIB DATA COMPRESSION LIBRARY -zlib 1.2.1 is a general purpose data compression library. All the code is +zlib 1.2.2 is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) @@ -34,7 +34,7 @@ Mark Nelson wrote an article about zlib for the Jan. 1997 issue of Dr. Dobb's Journal; a copy of the article is available in http://dogma.net/markn/articles/zlibtool/zlibtool.htm -The changes made in version 1.2.1 are documented in the file ChangeLog. +The changes made in version 1.2.2 are documented in the file ChangeLog. Unsupported third party contributions are provided in directory "contrib". @@ -46,7 +46,7 @@ A Perl interface to zlib written by Paul Marquess is in the CPAN (Comprehensive Perl Archive Network) sites http://www.cpan.org/modules/by-module/Compress/ -A Python interface to zlib written by A.M. Kuchling is +A Python interface to zlib written by A.M. Kuchling is available in Python 1.5 and later versions, see http://www.python.org/doc/lib/module-zlib.html @@ -93,7 +93,7 @@ Acknowledgments: Copyright notice: - (C) 1995-2003 Jean-loup Gailly and Mark Adler + (C) 1995-2004 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/zlib/crc32.c b/zlib/crc32.c index 689b2883b43..b39c7e1253e 100644 --- a/zlib/crc32.c +++ b/zlib/crc32.c @@ -11,6 +11,14 @@ /* @(#) $Id$ */ +/* + Note on the use of DYNAMIC_CRC_TABLE: there is no mutex or semaphore + protection on the static variables used to control the first-use generation + of the crc tables. Therefore, if you #define DYNAMIC_CRC_TABLE, you should + first call get_crc_table() to initialize the tables before allowing more than + one thread to use crc32(). + */ + #ifdef MAKECRCH # include # ifndef DYNAMIC_CRC_TABLE @@ -58,7 +66,7 @@ #ifdef DYNAMIC_CRC_TABLE -local int crc_table_empty = 1; +local volatile int crc_table_empty = 1; local unsigned long FAR crc_table[TBLS][256]; local void make_crc_table OF((void)); #ifdef MAKECRCH @@ -95,38 +103,51 @@ local void make_crc_table() { unsigned long c; int n, k; - unsigned long poly; /* polynomial exclusive-or pattern */ + unsigned long poly; /* polynomial exclusive-or pattern */ /* terms of polynomial defining this crc (except x^32): */ + static volatile int first = 1; /* flag to limit concurrent making */ static const unsigned char p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26}; - /* make exclusive-or pattern from polynomial (0xedb88320UL) */ - poly = 0UL; - for (n = 0; n < sizeof(p)/sizeof(unsigned char); n++) - poly |= 1UL << (31 - p[n]); + /* See if another task is already doing this (not thread-safe, but better + than nothing -- significantly reduces duration of vulnerability in + case the advice about DYNAMIC_CRC_TABLE is ignored) */ + if (first) { + first = 0; - /* generate a crc for every 8-bit value */ - for (n = 0; n < 256; n++) { - c = (unsigned long)n; - for (k = 0; k < 8; k++) - c = c & 1 ? poly ^ (c >> 1) : c >> 1; - crc_table[0][n] = c; - } + /* make exclusive-or pattern from polynomial (0xedb88320UL) */ + poly = 0UL; + for (n = 0; n < sizeof(p)/sizeof(unsigned char); n++) + poly |= 1UL << (31 - p[n]); + + /* generate a crc for every 8-bit value */ + for (n = 0; n < 256; n++) { + c = (unsigned long)n; + for (k = 0; k < 8; k++) + c = c & 1 ? poly ^ (c >> 1) : c >> 1; + crc_table[0][n] = c; + } #ifdef BYFOUR - /* generate crc for each value followed by one, two, and three zeros, and - then the byte reversal of those as well as the first table */ - for (n = 0; n < 256; n++) { - c = crc_table[0][n]; - crc_table[4][n] = REV(c); - for (k = 1; k < 4; k++) { - c = crc_table[0][c & 0xff] ^ (c >> 8); - crc_table[k][n] = c; - crc_table[k + 4][n] = REV(c); + /* generate crc for each value followed by one, two, and three zeros, + and then the byte reversal of those as well as the first table */ + for (n = 0; n < 256; n++) { + c = crc_table[0][n]; + crc_table[4][n] = REV(c); + for (k = 1; k < 4; k++) { + c = crc_table[0][c & 0xff] ^ (c >> 8); + crc_table[k][n] = c; + crc_table[k + 4][n] = REV(c); + } } - } #endif /* BYFOUR */ - crc_table_empty = 0; + crc_table_empty = 0; + } + else { /* not first */ + /* wait for the other guy to finish (not efficient, but rare) */ + while (crc_table_empty) + ; + } #ifdef MAKECRCH /* write out CRC tables to crc32.h */ @@ -180,9 +201,10 @@ local void write_table(out, table) const unsigned long FAR * ZEXPORT get_crc_table() { #ifdef DYNAMIC_CRC_TABLE - if (crc_table_empty) make_crc_table(); + if (crc_table_empty) + make_crc_table(); #endif /* DYNAMIC_CRC_TABLE */ - return (const unsigned long FAR *)crc_table; + return (const unsigned long FAR *)crc_table; } /* ========================================================================= */ diff --git a/zlib/deflate.c b/zlib/deflate.c index 0525b2f33ca..0fc53bc1e82 100644 --- a/zlib/deflate.c +++ b/zlib/deflate.c @@ -1,5 +1,5 @@ /* deflate.c -- compress data using the deflation algorithm - * Copyright (C) 1995-2003 Jean-loup Gailly. + * Copyright (C) 1995-2004 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -52,7 +52,7 @@ #include "deflate.h" const char deflate_copyright[] = - " deflate 1.2.1 Copyright 1995-2003 Jean-loup Gailly "; + " deflate 1.2.2 Copyright 1995-2004 Jean-loup Gailly "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot diff --git a/zlib/deflate.h b/zlib/deflate.h index e31f66be521..410681d18a4 100644 --- a/zlib/deflate.h +++ b/zlib/deflate.h @@ -95,7 +95,6 @@ typedef struct internal_state { Bytef *pending_out; /* next pending byte to output to the stream */ int pending; /* nb of bytes in the pending buffer */ int wrap; /* bit 0 true for zlib, bit 1 true for gzip */ - Byte data_type; /* UNKNOWN, BINARY or ASCII */ Byte method; /* STORED (for zip only) or DEFLATED */ int last_flush; /* value of flush param for previous deflate call */ diff --git a/zlib/gzio.c b/zlib/gzio.c index 4afd102b3f3..5e71b0ab3ae 100644 --- a/zlib/gzio.c +++ b/zlib/gzio.c @@ -455,6 +455,10 @@ int ZEXPORT gzread (file, buf, len) s->z_err = Z_ERRNO; break; } + if (feof(s->file)) { /* avoid error for empty file */ + s->z_err = Z_STREAM_END; + break; + } } s->stream.next_in = s->inbuf; } diff --git a/zlib/infback.c b/zlib/infback.c index 110b03b857f..262f97c73ac 100644 --- a/zlib/infback.c +++ b/zlib/infback.c @@ -434,6 +434,9 @@ void FAR *out_desc; } } + /* handle error breaks in while */ + if (state->mode == BAD) break; + /* build code tables */ state->next = state->codes; state->lencode = (code const FAR *)(state->next); diff --git a/zlib/inffast.c b/zlib/inffast.c index c716440a92a..8c02a178d04 100644 --- a/zlib/inffast.c +++ b/zlib/inffast.c @@ -1,5 +1,5 @@ /* inffast.c -- fast decoding - * Copyright (C) 1995-2003 Mark Adler + * Copyright (C) 1995-2004 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -19,7 +19,7 @@ - none No measurable difference: - Pentium III (Anderson) - - 68060 (Nikl) + - M68060 (Nikl) */ #ifdef POSTINC # define OFF 0 diff --git a/zlib/inflate.c b/zlib/inflate.c index a53b5c7446e..c6d38266d07 100644 --- a/zlib/inflate.c +++ b/zlib/inflate.c @@ -109,6 +109,7 @@ z_streamp strm; state = (struct inflate_state FAR *)strm->state; strm->total_in = strm->total_out = state->total = 0; strm->msg = Z_NULL; + strm->adler = 1; /* to support ill-conceived Java test suite */ state->mode = HEAD; state->last = 0; state->havedict = 0; @@ -861,6 +862,9 @@ int flush; } } + /* handle error breaks in while */ + if (state->mode == BAD) break; + /* build code tables */ state->next = state->codes; state->lencode = (code const FAR *)(state->next); diff --git a/zlib/inftrees.c b/zlib/inftrees.c index 3bb56398e1c..509461d9273 100644 --- a/zlib/inftrees.c +++ b/zlib/inftrees.c @@ -1,5 +1,5 @@ /* inftrees.c -- generate Huffman trees for efficient decoding - * Copyright (C) 1995-2003 Mark Adler + * Copyright (C) 1995-2004 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -9,7 +9,7 @@ #define MAXBITS 15 const char inflate_copyright[] = - " inflate 1.2.1 Copyright 1995-2003 Mark Adler "; + " inflate 1.2.2 Copyright 1995-2004 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -62,7 +62,7 @@ unsigned short FAR *work; 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 76, 66}; + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 199, 198}; static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, @@ -114,7 +114,15 @@ unsigned short FAR *work; for (max = MAXBITS; max >= 1; max--) if (count[max] != 0) break; if (root > max) root = max; - if (max == 0) return -1; /* no codes! */ + if (max == 0) { /* no symbols to code at all */ + this.op = (unsigned char)64; /* invalid code marker */ + this.bits = (unsigned char)1; + this.val = (unsigned short)0; + *(*table)++ = this; /* make a table to force an error */ + *(*table)++ = this; + *bits = 1; + return 0; /* no symbols, but wait for decoding to report error */ + } for (min = 1; min <= MAXBITS; min++) if (count[min] != 0) break; if (root < min) root = min; @@ -126,7 +134,7 @@ unsigned short FAR *work; left -= count[len]; if (left < 0) return -1; /* over-subscribed */ } - if (left > 0 && (type == CODES || (codes - count[0] != 1))) + if (left > 0 && (type == CODES || max != 1)) return -1; /* incomplete set */ /* generate offsets into symbol table for each length for sorting */ @@ -295,7 +303,6 @@ unsigned short FAR *work; drop = 0; len = root; next = *table; - curr = root; this.bits = (unsigned char)len; } diff --git a/zlib/inftrees.h b/zlib/inftrees.h index 82d365a7e90..b1104c87e76 100644 --- a/zlib/inftrees.h +++ b/zlib/inftrees.h @@ -1,5 +1,5 @@ /* inftrees.h -- header to use inftrees.c - * Copyright (C) 1995-2003 Mark Adler + * Copyright (C) 1995-2005 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -36,12 +36,12 @@ typedef struct { */ /* Maximum size of dynamic tree. The maximum found in a long but non- - exhaustive search was 1004 code structures (850 for length/literals - and 154 for distances, the latter actually the result of an + exhaustive search was 1444 code structures (852 for length/literals + and 592 for distances, the latter actually the result of an exhaustive search). The true maximum is not known, but the value below is more than safe. */ -#define ENOUGH 1440 -#define MAXD 154 +#define ENOUGH 2048 +#define MAXD 592 /* Type of code to build for inftable() */ typedef enum { diff --git a/zlib/trees.c b/zlib/trees.c index bb09554938b..52c820fa2e9 100644 --- a/zlib/trees.c +++ b/zlib/trees.c @@ -931,7 +931,7 @@ void _tr_flush_block(s, buf, stored_len, eof) if (s->level > 0) { /* Check if the file is ascii or binary */ - if (s->data_type == Z_UNKNOWN) set_data_type(s); + if (s->strm->data_type == Z_UNKNOWN) set_data_type(s); /* Construct the literal and distance trees */ build_tree(s, (tree_desc *)(&(s->l_desc))); @@ -1131,7 +1131,7 @@ local void set_data_type(s) while (n < 7) bin_freq += s->dyn_ltree[n++].Freq; while (n < 128) ascii_freq += s->dyn_ltree[n++].Freq; while (n < LITERALS) bin_freq += s->dyn_ltree[n++].Freq; - s->data_type = (Byte)(bin_freq > (ascii_freq >> 2) ? Z_BINARY : Z_ASCII); + s->strm->data_type = bin_freq > (ascii_freq >> 2) ? Z_BINARY : Z_ASCII; } /* =========================================================================== diff --git a/zlib/zconf.h b/zlib/zconf.h index 3cea897eda7..3c21403fce6 100644 --- a/zlib/zconf.h +++ b/zlib/zconf.h @@ -1,5 +1,5 @@ /* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2003 Jean-loup Gailly. + * Copyright (C) 1995-2004 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -13,43 +13,46 @@ * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. */ #ifdef Z_PREFIX -# define deflateInit_ z_deflateInit_ -# define deflate z_deflate -# define deflateEnd z_deflateEnd -# define inflateInit_ z_inflateInit_ -# define inflate z_inflate -# define inflateEnd z_inflateEnd -# define deflateInit2_ z_deflateInit2_ -# define deflateSetDictionary z_deflateSetDictionary -# define deflateCopy z_deflateCopy -# define deflateReset z_deflateReset -# define deflatePrime z_deflatePrime -# define deflateParams z_deflateParams -# define deflateBound z_deflateBound -# define inflateInit2_ z_inflateInit2_ -# define inflateSetDictionary z_inflateSetDictionary -# define inflateSync z_inflateSync -# define inflateSyncPoint z_inflateSyncPoint -# define inflateCopy z_inflateCopy -# define inflateReset z_inflateReset -# define compress z_compress -# define compress2 z_compress2 -# define compressBound z_compressBound -# define uncompress z_uncompress -# define adler32 z_adler32 -# define crc32 z_crc32 -# define get_crc_table z_get_crc_table +# define deflateInit_ z_deflateInit_ +# define deflate z_deflate +# define deflateEnd z_deflateEnd +# define inflateInit_ z_inflateInit_ +# define inflate z_inflate +# define inflateEnd z_inflateEnd +# define deflateInit2_ z_deflateInit2_ +# define deflateSetDictionary z_deflateSetDictionary +# define deflateCopy z_deflateCopy +# define deflateReset z_deflateReset +# define deflateParams z_deflateParams +# define deflateBound z_deflateBound +# define deflatePrime z_deflatePrime +# define inflateInit2_ z_inflateInit2_ +# define inflateSetDictionary z_inflateSetDictionary +# define inflateSync z_inflateSync +# define inflateSyncPoint z_inflateSyncPoint +# define inflateCopy z_inflateCopy +# define inflateReset z_inflateReset +# define inflateBack z_inflateBack +# define inflateBackEnd z_inflateBackEnd +# define compress z_compress +# define compress2 z_compress2 +# define compressBound z_compressBound +# define uncompress z_uncompress +# define adler32 z_adler32 +# define crc32 z_crc32 +# define get_crc_table z_get_crc_table +# define zError z_zError -# define Byte z_Byte -# define uInt z_uInt -# define uLong z_uLong -# define Bytef z_Bytef -# define charf z_charf -# define intf z_intf -# define uIntf z_uIntf -# define uLongf z_uLongf -# define voidpf z_voidpf -# define voidp z_voidp +# define Byte z_Byte +# define uInt z_uInt +# define uLong z_uLong +# define Bytef z_Bytef +# define charf z_charf +# define intf z_intf +# define uIntf z_uIntf +# define uLongf z_uLongf +# define voidpf z_voidpf +# define voidp z_voidp #endif #if defined(__MSDOS__) && !defined(MSDOS) @@ -281,7 +284,7 @@ typedef uLong FAR uLongf; # ifdef VMS # include /* for off_t */ # endif -# define z_off_t off_t +# define z_off_t off_t #endif #ifndef SEEK_SET # define SEEK_SET 0 /* Seek from beginning of file. */ @@ -289,11 +292,11 @@ typedef uLong FAR uLongf; # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ #endif #ifndef z_off_t -# define z_off_t long +# define z_off_t long #endif #if defined(__OS400__) -#define NO_vsnprintf +# define NO_vsnprintf #endif #if defined(__MVS__) diff --git a/zlib/zlib.3 b/zlib/zlib.3 index 890098449dd..3139e2467f2 100644 --- a/zlib/zlib.3 +++ b/zlib/zlib.3 @@ -1,4 +1,4 @@ -.TH ZLIB 3 "17 November 2003" +.TH ZLIB 3 "3 October 2004" .SH NAME zlib \- compression/decompression library .SH SYNOPSIS @@ -133,8 +133,8 @@ before asking for help. Send questions and/or comments to zlib@gzip.org, or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). .SH AUTHORS -Version 1.2.1 -Copyright (C) 1995-2003 Jean-loup Gailly (jloup@gzip.org) +Version 1.2.2 +Copyright (C) 1995-2004 Jean-loup Gailly (jloup@gzip.org) and Mark Adler (madler@alumni.caltech.edu). .LP This software is provided "as-is," diff --git a/zlib/zlib.h b/zlib/zlib.h index 92edf96ff3e..b4ddd34395c 100644 --- a/zlib/zlib.h +++ b/zlib/zlib.h @@ -1,7 +1,7 @@ /* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.1, November 17th, 2003 + version 1.2.2, October 3rd, 2004 - Copyright (C) 1995-2003 Jean-loup Gailly and Mark Adler + Copyright (C) 1995-2004 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -37,8 +37,8 @@ extern "C" { #endif -#define ZLIB_VERSION "1.2.1" -#define ZLIB_VERNUM 0x1210 +#define ZLIB_VERSION "1.2.2" +#define ZLIB_VERNUM 0x1220 /* The 'zlib' compression library provides in-memory compression and @@ -53,24 +53,22 @@ extern "C" { application must provide more input and/or consume the output (providing more output space) before each call. - The compressed data format used by the in-memory functions is the zlib - format, which is a zlib wrapper documented in RFC 1950, wrapped around a - deflate stream, which is itself documented in RFC 1951. + The compressed data format used by default by the in-memory functions is + the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped + around a deflate stream, which is itself documented in RFC 1951. The library also supports reading and writing files in gzip (.gz) format with an interface similar to that of stdio using the functions that start with "gz". The gzip format is different from the zlib format. gzip is a gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. + This library can optionally read and write gzip streams in memory as well. + The zlib format was designed to be compact and fast for use in memory and on communications channels. The gzip format was designed for single- file compression on file systems, has a larger header than zlib to maintain directory information, and uses a different, slower check method than zlib. - This library does not provide any functions to write gzip files in memory. - However such functions could be easily written using zlib's deflate function, - the documentation in the gzip RFC, and the examples in gzio.c. - The library does not install any signal handler. The decoder checks the consistency of the compressed data, so the library should never crash even in case of corrupted input. @@ -401,7 +399,7 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); because Z_BLOCK is used. If a preset dictionary is needed after this call (see inflateSetDictionary - below), inflate sets strm-adler to the adler32 checksum of the dictionary + below), inflate sets strm->adler to the adler32 checksum of the dictionary chosen by the compressor and returns Z_NEED_DICT; otherwise it sets strm->adler to the adler32 checksum of all output produced so far (that is, total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described @@ -478,7 +476,8 @@ ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, 16 to windowBits to write a simple gzip header and trailer around the compressed data instead of a zlib wrapper. The gzip header will have no file name, no extra data, no comment, no modification time (set to zero), - no header crc, and the operating system will be set to 255 (unknown). + no header crc, and the operating system will be set to 255 (unknown). If a + gzip stream is being written, strm->adler is a crc32 instead of an adler32. The memLevel parameter specifies how much memory should be allocated for the internal compression state. memLevel=1 uses minimum memory but @@ -649,7 +648,8 @@ ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, windowBits can also be greater than 15 for optional gzip decoding. Add 32 to windowBits to enable zlib and gzip decoding with automatic header detection, or add 16 to decode only the gzip format (the zlib format will - return a Z_DATA_ERROR). + return a Z_DATA_ERROR. If a gzip stream is being decoded, strm->adler is + a crc32 instead of an adler32. inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_STREAM_ERROR if a parameter is invalid (such as a negative @@ -1189,7 +1189,7 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_stream FAR *strm, int windowBits, struct internal_state {int dummy;}; /* hack for buggy compilers */ #endif -ZEXTERN const char * ZEXPORT zError OF((int err)); +ZEXTERN const char * ZEXPORT zError OF((int)); ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z)); ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void)); diff --git a/zlib/zutil.h b/zlib/zutil.h index 87b70acec23..7b42edcaa98 100644 --- a/zlib/zutil.h +++ b/zlib/zutil.h @@ -189,9 +189,14 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ # define NO_vsnprintf # endif #endif +#ifdef VMS +# define NO_vsnprintf +#endif #ifdef HAVE_STRERROR - extern char *strerror OF((int)); +# ifndef VMS + extern char *strerror OF((int)); +# endif # define zstrerror(errnum) strerror(errnum) #else # define zstrerror(errnum) "" From 6893e5969a032d679e7ded45ce4986e951df5ba2 Mon Sep 17 00:00:00 2001 From: "lenz@mysql.com" <> Date: Wed, 3 Aug 2005 13:46:38 +0200 Subject: [PATCH 03/12] Portability fixes: - Moved a few DBUG_ENTER statements after the variable declarations to satisfy some compilers (e.g. gcc-2.95.x, gcc-2.96, IBM xlc_r) in ndb/src/common/portlib/NdbMutex.c and ndb/src/common/portlib/NdbThread.c - portability fix for FreeBSD 4.x and HPUX: replaced atoll() with strtoll() in ndb/tools/config.cpp --- ndb/src/common/portlib/NdbMutex.c | 4 ++-- ndb/src/common/portlib/NdbThread.c | 2 +- ndb/tools/config.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ndb/src/common/portlib/NdbMutex.c b/ndb/src/common/portlib/NdbMutex.c index 18f8548e4e6..4a170d87e5c 100644 --- a/ndb/src/common/portlib/NdbMutex.c +++ b/ndb/src/common/portlib/NdbMutex.c @@ -23,9 +23,9 @@ NdbMutex* NdbMutex_Create(void) { - DBUG_ENTER("NdbMutex_Create"); NdbMutex* pNdbMutex; int result; + DBUG_ENTER("NdbMutex_Create"); pNdbMutex = (NdbMutex*)NdbMem_Allocate(sizeof(NdbMutex)); DBUG_PRINT("info",("NdbMem_Allocate 0x%lx",pNdbMutex)); @@ -42,8 +42,8 @@ NdbMutex* NdbMutex_Create(void) int NdbMutex_Destroy(NdbMutex* p_mutex) { - DBUG_ENTER("NdbMutex_Destroy"); int result; + DBUG_ENTER("NdbMutex_Destroy"); if (p_mutex == NULL) DBUG_RETURN(-1); diff --git a/ndb/src/common/portlib/NdbThread.c b/ndb/src/common/portlib/NdbThread.c index cee4ec018a0..55ebc4c8111 100644 --- a/ndb/src/common/portlib/NdbThread.c +++ b/ndb/src/common/portlib/NdbThread.c @@ -71,10 +71,10 @@ struct NdbThread* NdbThread_Create(NDB_THREAD_FUNC *p_thread_func, const char* p_thread_name, NDB_THREAD_PRIO thread_prio) { - DBUG_ENTER("NdbThread_Create"); struct NdbThread* tmpThread; int result; pthread_attr_t thread_attr; + DBUG_ENTER("NdbThread_Create"); (void)thread_prio; /* remove warning for unused parameter */ diff --git a/ndb/tools/config.cpp b/ndb/tools/config.cpp index 7944f66f71c..d188aec1337 100644 --- a/ndb/tools/config.cpp +++ b/ndb/tools/config.cpp @@ -359,7 +359,7 @@ Match::eval(NdbMgmHandle h, const Iter& iter) } else if(iter.get(m_key, &val64) == 0) { - if(atoll(m_value.c_str()) != val64) + if(strtoll(m_value.c_str(), (char **)NULL, 10) != val64) return 0; } else if(iter.get(m_key, &valc) == 0) From c9c6b8240467c1d60098d6aeea55c8dc8e2bef47 Mon Sep 17 00:00:00 2001 From: "heikki@hundin.mysql.fi" <> Date: Wed, 3 Aug 2005 18:11:55 +0300 Subject: [PATCH 04/12] ha_innodb.cc: Backport of Bug #9670 to 4.0: assertion failure in ut_a(cursor->old_stored == BTR_PCUR_OLD_STORED) --- sql/ha_innodb.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 81a803e36b9..31c26f774a6 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -4928,7 +4928,8 @@ ha_innobase::store_lock( (lock_type == TL_READ_HIGH_PRIORITY && thd->in_lock_tables) || lock_type == TL_READ_WITH_SHARED_LOCKS || lock_type == TL_READ_NO_INSERT || - thd->lex.sql_command != SQLCOM_SELECT) { + (thd->lex->sql_command != SQLCOM_SELECT + && lock_type != TL_IGNORE)) { /* The OR cases above are in this order: 1) MySQL is doing LOCK TABLES ... READ LOCAL, or From 82b2a0a3664363d805c1ca12577b2ea6cb06faa5 Mon Sep 17 00:00:00 2001 From: "heikki@hundin.mysql.fi" <> Date: Wed, 3 Aug 2005 18:21:38 +0300 Subject: [PATCH 05/12] buf0buf.c: Fix a bug: InnoDB could in a crash recovery print a big false corruption warning if the first page of an ibdata file was 'recreated' in the buffer pool; this could happen, for example, if a table was dropped, and the page used later --- innobase/buf/buf0buf.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/innobase/buf/buf0buf.c b/innobase/buf/buf0buf.c index 699ad5fb42e..31a581d2ba8 100644 --- a/innobase/buf/buf0buf.c +++ b/innobase/buf/buf0buf.c @@ -1762,6 +1762,15 @@ buf_page_create( buf_flush_free_margin(); frame = block->frame; + + /* Reset to zero the file flush lsn field in the page; if the first + page of an ibdata file is 'created' in this function into the buffer + pool then we lose the original contents of the file flush lsn stamp. + Then InnoDB could in a crash recovery print a big, false, corruption + warning if the stamp contains an lsn bigger than the ib_logfile lsn. */ + + memset(frame + FIL_PAGE_FILE_FLUSH_LSN, 0, 8); + #ifdef UNIV_DEBUG buf_dbg_counter++; From 353b3a2cad849085fa0b6d5f23e45f2001e69d14 Mon Sep 17 00:00:00 2001 From: "heikki@hundin.mysql.fi" <> Date: Wed, 3 Aug 2005 18:47:50 +0300 Subject: [PATCH 06/12] ha_innodb.cc: Fix compilation error in previous commit --- sql/ha_innodb.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 31c26f774a6..bcd07198f5c 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -4928,7 +4928,7 @@ ha_innobase::store_lock( (lock_type == TL_READ_HIGH_PRIORITY && thd->in_lock_tables) || lock_type == TL_READ_WITH_SHARED_LOCKS || lock_type == TL_READ_NO_INSERT || - (thd->lex->sql_command != SQLCOM_SELECT + (thd->lex.sql_command != SQLCOM_SELECT && lock_type != TL_IGNORE)) { /* The OR cases above are in this order: From fcaff839de4b8089b02894735acd521cd285c866 Mon Sep 17 00:00:00 2001 From: "elliot@mysql.com" <> Date: Wed, 3 Aug 2005 15:08:03 -0400 Subject: [PATCH 07/12] BUG#12330 Add --replace_column in order to make test deterministic. --- mysql-test/t/rpl_slave_status.test | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/t/rpl_slave_status.test b/mysql-test/t/rpl_slave_status.test index 4e0d7dae35c..7e16097edd0 100644 --- a/mysql-test/t/rpl_slave_status.test +++ b/mysql-test/t/rpl_slave_status.test @@ -23,6 +23,7 @@ connection slave; stop slave; start slave; --replace_result $MASTER_MYPORT MASTER_MYPORT +--replace_column 7 # 8 # 9 # 22 # 23 # --vertical_results show slave status; From fc5829d65165019cc6b27814810d85b2e3081975 Mon Sep 17 00:00:00 2001 From: "elliot@mysql.com" <> Date: Wed, 3 Aug 2005 16:12:06 -0400 Subject: [PATCH 08/12] BUG#12330 Adding updated result file which I missed in last changeset. Adds --replace_column to make test results deterministic. --- mysql-test/r/rpl_slave_status.result | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mysql-test/r/rpl_slave_status.result b/mysql-test/r/rpl_slave_status.result index 5e9b6ab31ad..8badbab85ff 100644 --- a/mysql-test/r/rpl_slave_status.result +++ b/mysql-test/r/rpl_slave_status.result @@ -25,9 +25,9 @@ Master_User rpl Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 357 -Relay_Log_File slave-relay-bin.000001 -Relay_Log_Pos 401 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 Slave_IO_Running No Slave_SQL_Running Yes @@ -40,8 +40,8 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 357 -Relay_Log_Space 401 +Exec_Master_Log_Pos # +Relay_Log_Space # Until_Condition None Until_Log_File Until_Log_Pos 0 From 08694dc2acefdc3ddab9c77c3a76fc96b8ee15f7 Mon Sep 17 00:00:00 2001 From: "lenz@mysql.com" <> Date: Thu, 4 Aug 2005 11:57:30 +0200 Subject: [PATCH 09/12] - fixed enabling the Archive storage engine for the mysqld-max RPM binary --- support-files/mysql.spec.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 3c58e642a1d..81fed07079f 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -300,7 +300,7 @@ BuildMySQL "--enable-shared \ --with-innodb \ --with-ndbcluster \ --with-raid \ - --with-archive \ + --with-archive-storage-engine \ --with-csv-storage-engine \ --with-example-storage-engine \ --with-blackhole-storage-engine \ @@ -668,6 +668,10 @@ fi # itself - note that they must be ordered by date (important when # merging BK trees) %changelog +* Thu Aug 04 2005 Lenz Grimmer + +- Fixed enabling the Archive storage engine in the Max binary + * Tue Aug 02 2005 Lenz Grimmer - Fixed the Requires: tag for the server RPM (BUG 12233) From 307c9203548244c8d634f613bbb13f7f56db6a06 Mon Sep 17 00:00:00 2001 From: "lenz@mysql.com" <> Date: Thu, 4 Aug 2005 12:22:51 +0200 Subject: [PATCH 10/12] - Fixed the creation of the mysql user group account in the postinstall section of the MySQL-server RPM spec file (BUG#12348) --- support-files/mysql.spec.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index ade774fb4e3..325ebdf2c01 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -371,7 +371,7 @@ fi # Create a MySQL user and group. Do not report any problems if it already # exists. -groupadd -r -c "MySQL server" %{mysqld_user} 2> /dev/null || true +groupadd -r %{mysqld_user} 2> /dev/null || true useradd -M -r -d $mysql_datadir -s /bin/bash -c "MySQL server" -g %{mysqld_user} %{mysqld_user} 2> /dev/null || true # Change permissions so that the user that will run the MySQL daemon @@ -562,6 +562,11 @@ fi # itself - note that they must be ordered by date (important when # merging BK trees) %changelog +* Thu Aug 04 2005 Lenz Grimmer + +- Fixed the creation of the mysql user group account in the postinstall + section (BUG 12348) + * Fri Jul 15 2005 Lenz Grimmer - create a "mysql" user group and assign the mysql user account to that group From d17a4773b4dbf49c163a1a543b9a2d7ead1cab84 Mon Sep 17 00:00:00 2001 From: "kent@mysql.com" <> Date: Thu, 4 Aug 2005 13:47:02 +0200 Subject: [PATCH 11/12] mysqld.dsp: Added the blackhole storage engine to the Max builds --- VC++Files/sql/mysqld.dsp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/VC++Files/sql/mysqld.dsp b/VC++Files/sql/mysqld.dsp index 034c8350c67..6a33889da53 100644 --- a/VC++Files/sql/mysqld.dsp +++ b/VC++Files/sql/mysqld.dsp @@ -75,7 +75,7 @@ LINK32=xilink6.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "../bdb/build_win32" /I "../include" /I "../regex" /I "../zlib" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "HAVE_INNOBASE_DB" /D "HAVE_BERKELEY_DB" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "HAVE_DLOPEN" /FD /c +# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "../bdb/build_win32" /I "../include" /I "../regex" /I "../zlib" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "HAVE_INNOBASE_DB" /D "HAVE_BERKELEY_DB" /D "HAVE_BLACKHOLE_DB" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "HAVE_DLOPEN" /FD /c # SUBTRACT CPP /Fr /YX # ADD BASE RSC /l 0x410 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" @@ -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 "../bdb/build_win32" /I "../include" /I "../regex" /I "../zlib" /D "NDEBUG" /D "__NT__" /D "DBUG_OFF" /D "HAVE_INNOBASE_DB" /D "HAVE_BERKELEY_DB" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "HAVE_DLOPEN" /D MYSQL_SERVER_SUFFIX=-nt-max /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../bdb/build_win32" /I "../include" /I "../regex" /I "../zlib" /D "NDEBUG" /D "__NT__" /D "DBUG_OFF" /D "HAVE_INNOBASE_DB" /D "HAVE_BERKELEY_DB" /D "HAVE_BLACKHOLE_DB" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "HAVE_DLOPEN" /D MYSQL_SERVER_SUFFIX=-nt-max /FD /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 "../bdb/build_win32" /I "../include" /I "../regex" /I "../zlib" /D "NDEBUG" /D "DBUG_OFF" /D "USE_SYMDIR" /D "HAVE_INNOBASE_DB" /D "HAVE_BERKELEY_DB" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "HAVE_DLOPEN" /D MYSQL_SERVER_SUFFIX=-max /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../bdb/build_win32" /I "../include" /I "../regex" /I "../zlib" /D "NDEBUG" /D "DBUG_OFF" /D "USE_SYMDIR" /D "HAVE_INNOBASE_DB" /D "HAVE_BERKELEY_DB" /D "HAVE_BLACKHOLE_DB" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "HAVE_DLOPEN" /D MYSQL_SERVER_SUFFIX=-max /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" @@ -451,6 +451,10 @@ SOURCE=.\gstream.cpp # End Source File # Begin Source File +SOURCE=.\ha_blackhole.cpp +# End Source File +# Begin Source File + SOURCE=.\ha_berkeley.cpp # End Source File # Begin Source File From 468c3ad532634203dae06e852812fc9a283f6fff Mon Sep 17 00:00:00 2001 From: "kent@mysql.com" <> Date: Thu, 4 Aug 2005 13:54:39 +0200 Subject: [PATCH 12/12] mysql-test-run.pl: Back ported ndbcluster_support() from 5.0 Corrected the server id handling --- mysql-test/mysql-test-run.pl | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 4272c05f7dc..523f31f5a5f 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -287,6 +287,7 @@ sub executable_setup (); sub environment_setup (); sub kill_running_server (); sub kill_and_cleanup (); +sub ndbcluster_support (); sub ndbcluster_install (); sub ndbcluster_start (); sub ndbcluster_stop (); @@ -319,6 +320,12 @@ sub main () { initial_setup(); command_line_setup(); executable_setup(); + + if (! $opt_skip_ndbcluster and ! $opt_with_ndbcluster) + { + $opt_with_ndbcluster= ndbcluster_support(); + } + environment_setup(); signal_setup(); @@ -1026,6 +1033,23 @@ sub kill_and_cleanup () { # ############################################################################## +sub ndbcluster_support () { + + # check ndbcluster support by testing using a switch + # that is only available in that case + if ( mtr_run($exe_mysqld, + ["--no-defaults", + "--ndb-use-exact-count", + "--help"], + "", "/dev/null", "/dev/null", "") != 0 ) + { + mtr_report("No ndbcluster support"); + return 0; + } + mtr_report("Has ndbcluster support"); + return 1; +} + # FIXME why is there a different start below?! sub ndbcluster_install () { @@ -1663,13 +1687,15 @@ sub mysqld_arguments ($$$$$) { if ( $type eq 'master' ) { + my $id= $idx > 0 ? $idx + 101 : 1; + mtr_add_arg($args, "%s--log-bin=%s/log/master-bin%s", $prefix, $opt_vardir, $sidx); mtr_add_arg($args, "%s--pid-file=%s", $prefix, $master->[$idx]->{'path_mypid'}); mtr_add_arg($args, "%s--port=%d", $prefix, $master->[$idx]->{'path_myport'}); - mtr_add_arg($args, "%s--server-id=1", $prefix); + mtr_add_arg($args, "%s--server-id=%d", $prefix, $id); mtr_add_arg($args, "%s--socket=%s", $prefix, $master->[$idx]->{'path_mysock'}); mtr_add_arg($args, "%s--innodb_data_file_path=ibdata1:50M", $prefix); @@ -1677,6 +1703,11 @@ sub mysqld_arguments ($$$$$) { mtr_add_arg($args, "%s--datadir=%s", $prefix, $master->[$idx]->{'path_myddir'}); + if ( $idx > 0 ) + { + mtr_add_arg($args, "%s--skip-innodb", $prefix); + } + if ( $opt_skip_ndbcluster ) { mtr_add_arg($args, "%s--skip-ndbcluster", $prefix); @@ -1686,7 +1717,7 @@ sub mysqld_arguments ($$$$$) { if ( $type eq 'slave' ) { my $slave_server_id= 2 + $idx; - my $slave_rpl_rank= $idx > 0 ? 2 : $slave_server_id; + my $slave_rpl_rank= $slave_server_id; mtr_add_arg($args, "%s--datadir=%s", $prefix, $slave->[$idx]->{'path_myddir'});