summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xBUILD/SETUP.sh4
-rwxr-xr-xBUILD/check-cpu4
-rw-r--r--VC++Files/client/mysql.dsp6
-rw-r--r--VC++Files/client/mysql_ia64.dsp6
-rw-r--r--VC++Files/client/mysqladmin.dsp6
-rw-r--r--VC++Files/client/mysqladmin_ia64.dsp6
-rw-r--r--VC++Files/client/mysqlcheck.dsp2
-rw-r--r--VC++Files/client/mysqlcheck_ia64.dsp2
-rw-r--r--VC++Files/client/mysqlclient.dsp4
-rw-r--r--VC++Files/client/mysqlclient_ia64.dsp4
-rw-r--r--VC++Files/client/mysqldump.dsp6
-rw-r--r--VC++Files/client/mysqldump_ia64.dsp6
-rw-r--r--VC++Files/client/mysqlimport.dsp6
-rw-r--r--VC++Files/client/mysqlimport_ia64.dsp6
-rw-r--r--VC++Files/client/mysqlshow.dsp6
-rw-r--r--VC++Files/client/mysqlshow_ia64.dsp6
-rw-r--r--VC++Files/client/mysqltest.dsp4
-rw-r--r--VC++Files/client/mysqltest_ia64.dsp6
-rw-r--r--VC++Files/libmysql/libmysql.dsp4
-rw-r--r--VC++Files/libmysql/libmysql_ia64.dsp4
-rw-r--r--VC++Files/mysql-test/mysql_test_run_new.dsp4
-rw-r--r--VC++Files/mysql-test/mysql_test_run_new_ia64.dsp4
-rw-r--r--VC++Files/mysqlbinlog/mysqlbinlog.dsp6
-rw-r--r--VC++Files/mysqlbinlog/mysqlbinlog_ia64.dsp6
-rw-r--r--VC++Files/mysqlcheck/mysqlcheck.dsp6
-rw-r--r--VC++Files/mysqlcheck/mysqlcheck_ia64.dsp6
-rw-r--r--VC++Files/mysqlmanager/mysqlmanager.dsp4
-rw-r--r--VC++Files/strings/strings.dsp4
-rw-r--r--VC++Files/strings/strings_ia64.dsp4
-rw-r--r--client/sql_string.cc5
-rw-r--r--client/sql_string.h2
-rw-r--r--configure.in10
-rw-r--r--include/config-win.h1
-rw-r--r--include/my_global.h5
-rw-r--r--include/my_sys.h1
-rw-r--r--innobase/row/row0mysql.c5
-rw-r--r--mysql-test/mysql-test-run.sh4
-rw-r--r--mysql-test/r/create.result18
-rw-r--r--mysql-test/r/func_gconcat.result23
-rw-r--r--mysql-test/r/func_str.result6
-rw-r--r--mysql-test/r/lowercase_table2.result12
-rw-r--r--mysql-test/r/olap.result68
-rw-r--r--mysql-test/r/rpl_failed_optimize.result1
-rw-r--r--mysql-test/r/union.result14
-rw-r--r--mysql-test/t/create.test30
-rw-r--r--mysql-test/t/func_gconcat.test12
-rw-r--r--mysql-test/t/func_str.test6
-rw-r--r--mysql-test/t/olap.test30
-rw-r--r--mysql-test/t/union.test10
-rw-r--r--mysys/my_access.c120
-rw-r--r--mysys/my_fopen.c11
-rw-r--r--mysys/my_open.c13
-rw-r--r--mysys/raid.cc4
-rw-r--r--ndb/src/common/util/File.cpp26
-rw-r--r--ndb/src/kernel/blocks/dbtux/Dbtux.hpp1
-rw-r--r--scripts/make_binary_distribution.sh3
-rw-r--r--sql/examples/ha_archive.cc4
-rw-r--r--sql/examples/ha_example.cc4
-rw-r--r--sql/examples/ha_tina.cc4
-rw-r--r--sql/field.cc4
-rw-r--r--sql/ha_berkeley.cc4
-rw-r--r--sql/ha_blackhole.cc4
-rw-r--r--sql/ha_heap.cc4
-rw-r--r--sql/ha_innodb.cc7
-rw-r--r--sql/ha_isam.cc4
-rw-r--r--sql/ha_isammrg.cc4
-rw-r--r--sql/ha_myisam.cc4
-rw-r--r--sql/ha_myisammrg.cc4
-rw-r--r--sql/ha_ndbcluster.cc4
-rw-r--r--sql/handler.cc4
-rw-r--r--sql/hash_filo.cc4
-rw-r--r--sql/hash_filo.h2
-rw-r--r--sql/item.cc8
-rw-r--r--sql/item_cmpfunc.cc4
-rw-r--r--sql/item_func.cc16
-rw-r--r--sql/item_geofunc.cc4
-rw-r--r--sql/item_strfunc.cc4
-rw-r--r--sql/item_subselect.cc4
-rw-r--r--sql/item_sum.cc47
-rw-r--r--sql/item_timefunc.cc4
-rw-r--r--sql/item_uniq.cc5
-rw-r--r--sql/item_uniq.h2
-rw-r--r--sql/lock.cc69
-rw-r--r--sql/log_event.cc5
-rw-r--r--sql/log_event.h2
-rw-r--r--sql/mysql_priv.h7
-rw-r--r--sql/opt_range.cc4
-rw-r--r--sql/procedure.cc4
-rw-r--r--sql/protocol.cc4
-rw-r--r--sql/protocol_cursor.cc4
-rw-r--r--sql/set_var.cc4
-rw-r--r--sql/sql_acl.cc4
-rw-r--r--sql/sql_analyse.cc4
-rw-r--r--sql/sql_analyse.h2
-rw-r--r--sql/sql_base.cc6
-rw-r--r--sql/sql_class.cc4
-rw-r--r--sql/sql_crypt.cc4
-rw-r--r--sql/sql_crypt.h2
-rw-r--r--sql/sql_handler.cc2
-rw-r--r--sql/sql_insert.cc24
-rw-r--r--sql/sql_lex.cc2
-rw-r--r--sql/sql_list.cc4
-rw-r--r--sql/sql_map.cc4
-rw-r--r--sql/sql_map.h2
-rw-r--r--sql/sql_olap.cc4
-rw-r--r--sql/sql_parse.cc37
-rw-r--r--sql/sql_repl.cc35
-rw-r--r--sql/sql_select.cc96
-rw-r--r--sql/sql_string.cc5
-rw-r--r--sql/sql_table.cc151
-rw-r--r--sql/sql_udf.cc4
-rw-r--r--sql/sql_yacc.yy26
-rw-r--r--sql/tztime.cc12
-rw-r--r--support-files/mysql-max.spec.sh263
-rw-r--r--support-files/mysql.spec.sh37
-rw-r--r--vio/viossl.c45
116 files changed, 963 insertions, 665 deletions
diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh
index 8bb281f20e9..3f8a9ccaf22 100755
--- a/BUILD/SETUP.sh
+++ b/BUILD/SETUP.sh
@@ -48,8 +48,8 @@ global_warnings="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wch
c_warnings="$global_warnings -Wunused"
cxx_warnings="$global_warnings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor"
-base_max_configs="--with-innodb --with-bdb --with-ndbcluster --with-archive-storage-engine --with-raid --with-openssl --with-raid --with-vio"
-max_leave_isam_configs="--with-innodb --with-bdb --with-ndbcluster --with-archive-storage-engine --with-raid --with-openssl --with-raid --with-vio --with-embedded-server"
+base_max_configs="--with-innodb --with-berkeley-db --with-ndbcluster --with-archive-storage-engine --with-raid --with-openssl --with-raid --with-vio"
+max_leave_isam_configs="--with-innodb --with-berkeley-db --with-ndbcluster --with-archive-storage-engine --with-raid --with-openssl --with-raid --with-vio --with-embedded-server"
max_no_es_configs="$max_leave_isam_configs --without-isam"
max_configs="$max_no_es_configs --with-embedded-server"
diff --git a/BUILD/check-cpu b/BUILD/check-cpu
index 7619224314b..0283c669fb2 100755
--- a/BUILD/check-cpu
+++ b/BUILD/check-cpu
@@ -72,6 +72,7 @@ case "$cpu_family--$model_name" in
;;
*ppc)
cpu_flag="powerpc";
+ no_march=1;
;;
*)
cpu_flag="";
@@ -106,6 +107,9 @@ case "$cc_ver--$cc_verno" in
cpu_flag="$cpu_flag_old"
fi
check_cpu_cflags="-mcpu=$cpu_flag -march=$cpu_flag"
+ if test -n "$no_march"; then
+ check_cpu_cflags="-mcpu=$cpu_flag"
+ fi
;;
*)
check_cpu_cflags=""
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/mysql_ia64.dsp b/VC++Files/client/mysql_ia64.dsp
index 43bc9fa5b09..3fe2e2a2328 100644
--- a/VC++Files/client/mysql_ia64.dsp
+++ b/VC++Files/client/mysql_ia64.dsp
@@ -53,7 +53,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 /nologo /subsystem:console /machine:IX86 /machine:IA64
-# 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 /out:"../client_release/mysql.exe" /libpath:"..\lib_release\\" /machine:IA64
+# 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 /out:"../client_release/mysql.exe" /libpath:"..\lib_release\\" /machine:IA64
!ELSEIF "$(CFG)" == "mysql - WinIA64 Debug"
@@ -79,7 +79,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 /nologo /subsystem:console /debug /machine:IA64
-# 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 /out:"../client_debug/mysql.exe" /libpath:"..\lib_debug\\" /machine:IA64
+# 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 /out:"../client_debug/mysql.exe" /libpath:"..\lib_debug\\" /machine:IA64
!ELSEIF "$(CFG)" == "mysql - WinIA64 classic"
@@ -107,7 +107,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.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 /out:"../client_release/mysql.exe" /libpath:"..\lib_release\\" /machine:IA64
-# 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 /out:"../client_classic/mysql.exe" /libpath:"..\lib_release\\" /machine:IA64
+# 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 /out:"../client_classic/mysql.exe" /libpath:"..\lib_release\\" /machine:IA64
!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/mysqladmin_ia64.dsp b/VC++Files/client/mysqladmin_ia64.dsp
index 5a5e4a99071..f7823479d5a 100644
--- a/VC++Files/client/mysqladmin_ia64.dsp
+++ b/VC++Files/client/mysqladmin_ia64.dsp
@@ -53,7 +53,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 /nologo /subsystem:console /machine:IA64
-# ADD LINK32 ..\lib_release\zlib.lib 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 bufferoverflowU.lib /nologo /subsystem:console /out:"../client_release/mysqladmin.exe" /libpath:"..\lib_release\\" /machine:IA64
+# ADD LINK32 ..\lib_release\zlib.lib 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 bufferoverflowU.lib zlib.lib /nologo /subsystem:console /out:"../client_release/mysqladmin.exe" /libpath:"..\lib_release\\" /machine:IA64
!ELSEIF "$(CFG)" == "mysqladmin - WinIA64 Debug"
@@ -79,7 +79,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 /nologo /subsystem:console /debug /machine:IA64
-# ADD LINK32 ..\lib_debug\zlib.lib 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 bufferoverflowU.lib /nologo /subsystem:console /incremental:no /debug /out:"../client_debug/mysqladmin.exe" /libpath:"..\lib_debug\\" /machine:IA64
+# ADD LINK32 ..\lib_debug\zlib.lib 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 bufferoverflowU.lib zlib.lib /nologo /subsystem:console /incremental:no /debug /out:"../client_debug/mysqladmin.exe" /libpath:"..\lib_debug\\" /machine:IA64
!ELSEIF "$(CFG)" == "mysqladmin - WinIA64 classic"
@@ -107,7 +107,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.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 /out:"../client_release/mysqladmin.exe" /libpath:"..\lib_release\\" /machine:IA64
-# ADD LINK32 ..\lib_release\zlib.lib 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 bufferoverflowU.lib /nologo /subsystem:console /out:"../client_classic/mysqladmin.exe" /libpath:"..\lib_release\\" /machine:IA64
+# ADD LINK32 ..\lib_release\zlib.lib 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 bufferoverflowU.lib zlib.lib /nologo /subsystem:console /out:"../client_classic/mysqladmin.exe" /libpath:"..\lib_release\\" /machine:IA64
!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/mysqlcheck_ia64.dsp b/VC++Files/client/mysqlcheck_ia64.dsp
index 4b2c2bb4c46..aa49d86a523 100644
--- a/VC++Files/client/mysqlcheck_ia64.dsp
+++ b/VC++Files/client/mysqlcheck_ia64.dsp
@@ -49,7 +49,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:IA64
-# 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:IA64 /out:"../client_release/mysqlcheck.exe" /libpath:"..\lib_release\\" /incremental:no
+# 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:IA64 /out:"../client_release/mysqlcheck.exe" /libpath:"..\lib_release\\" /incremental:no
# SUBTRACT LINK32
!ENDIF
diff --git a/VC++Files/client/mysqlclient.dsp b/VC++Files/client/mysqlclient.dsp
index 75008858e55..599bad92d7f 100644
--- a/VC++Files/client/mysqlclient.dsp
+++ b/VC++Files/client/mysqlclient.dsp
@@ -151,6 +151,10 @@ SOURCE="..\strings\ctype-czech.c"
# End Source File
# Begin Source File
+SOURCE="..\strings\ctype-cp932.c"
+# End Source File
+# Begin Source File
+
SOURCE="..\strings\ctype-euc_kr.c"
# End Source File
# Begin Source File
diff --git a/VC++Files/client/mysqlclient_ia64.dsp b/VC++Files/client/mysqlclient_ia64.dsp
index e91245c12b2..3edc979b9dc 100644
--- a/VC++Files/client/mysqlclient_ia64.dsp
+++ b/VC++Files/client/mysqlclient_ia64.dsp
@@ -151,6 +151,10 @@ SOURCE="..\strings\ctype-czech.c"
# End Source File
# Begin Source File
+SOURCE="..\strings\ctype-cp963.c"
+# End Source File
+# Begin Source File
+
SOURCE="..\strings\ctype-euc_kr.c"
# End Source File
# Begin Source File
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/mysqldump_ia64.dsp b/VC++Files/client/mysqldump_ia64.dsp
index 698cd0b9c2c..79a7059cae5 100644
--- a/VC++Files/client/mysqldump_ia64.dsp
+++ b/VC++Files/client/mysqldump_ia64.dsp
@@ -53,7 +53,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 mysys.lib /nologo /subsystem:console /machine:IA64
-# ADD LINK32 ..\lib_release\zlib.lib 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 bufferoverflowU.lib /nologo /subsystem:console /out:"../client_release/mysqldump.exe" /libpath:"..\lib_release\\" /machine:IA64
+# ADD LINK32 ..\lib_release\zlib.lib 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 bufferoverflowU.lib zlib.lib /nologo /subsystem:console /out:"../client_release/mysqldump.exe" /libpath:"..\lib_release\\" /machine:IA64
!ELSEIF "$(CFG)" == "mysqldump - WinIA64 Debug"
@@ -79,7 +79,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 mysys.lib /nologo /subsystem:console /debug /machine:IA64
-# ADD LINK32 ..\lib_debug\dbug.lib ..\lib_debug\zlib.lib 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 bufferoverflowU.lib /nologo /subsystem:console /incremental:no /debug /out:"../client_debug/mysqldump.exe" /libpath:"..\lib_debug\\" /machine:IA64
+# ADD LINK32 ..\lib_debug\dbug.lib ..\lib_debug\zlib.lib 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 bufferoverflowU.lib zlib.lib /nologo /subsystem:console /incremental:no /debug /out:"../client_debug/mysqldump.exe" /libpath:"..\lib_debug\\" /machine:IA64
!ELSEIF "$(CFG)" == "mysqldump - WinIA64 classic"
@@ -107,7 +107,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.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 /out:"../client_release/mysqldump.exe" /libpath:"..\lib_release\\" /machine:IA64
-# ADD LINK32 ..\lib_release\zlib.lib 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 bufferoverflowU.lib /nologo /subsystem:console /out:"../client_classic/mysqldump.exe" /libpath:"..\lib_release\\" /machine:IA64
+# ADD LINK32 ..\lib_release\zlib.lib 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 bufferoverflowU.lib zlib.lib /nologo /subsystem:console /out:"../client_classic/mysqldump.exe" /libpath:"..\lib_release\\" /machine:IA64
!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/mysqlimport_ia64.dsp b/VC++Files/client/mysqlimport_ia64.dsp
index cd8f5523efd..c6f51c0ef6f 100644
--- a/VC++Files/client/mysqlimport_ia64.dsp
+++ b/VC++Files/client/mysqlimport_ia64.dsp
@@ -53,7 +53,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 /nologo /subsystem:console /machine:IA64
-# ADD LINK32 ..\lib_release\zlib.lib 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 bufferoverflowU.lib /nologo /subsystem:console /out:"../client_release/mysqlimport.exe" /libpath:"..\lib_release\\" /machine:IA64
+# ADD LINK32 ..\lib_release\zlib.lib 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 bufferoverflowU.lib zlib.lib /nologo /subsystem:console /out:"../client_release/mysqlimport.exe" /libpath:"..\lib_release\\" /machine:IA64
!ELSEIF "$(CFG)" == "mysqlimport - WinIA64 Debug"
@@ -79,7 +79,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 /nologo /subsystem:console /debug /machine:IA64
-# ADD LINK32 setargv.obj ..\lib_debug\zlib.lib ..\lib_debug\dbug.lib 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 bufferoverflowU.lib /nologo /subsystem:console /incremental:no /debug /out:"../client_debug/mysqlimport.exe" /libpath:"..\lib_debug\\" /machine:IA64
+# ADD LINK32 setargv.obj ..\lib_debug\zlib.lib ..\lib_debug\dbug.lib 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 bufferoverflowU.lib zlib.lib /nologo /subsystem:console /incremental:no /debug /out:"../client_debug/mysqlimport.exe" /libpath:"..\lib_debug\\" /machine:IA64
!ELSEIF "$(CFG)" == "mysqlimport - WinIA64 classic"
@@ -107,7 +107,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.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 /out:"../client_release/mysqlimport.exe" /libpath:"..\lib_release\\" /machine:IA64
-# ADD LINK32 ..\lib_release\zlib.lib 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 bufferoverflowU.lib /nologo /subsystem:console /out:"../client_classic/mysqlimport.exe" /libpath:"..\lib_release\\" /machine:IA64
+# ADD LINK32 ..\lib_release\zlib.lib 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 bufferoverflowU.lib zlib.lib /nologo /subsystem:console /out:"../client_classic/mysqlimport.exe" /libpath:"..\lib_release\\" /machine:IA64
!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/mysqlshow_ia64.dsp b/VC++Files/client/mysqlshow_ia64.dsp
index dd83a3f1ef5..4995f3f9ae8 100644
--- a/VC++Files/client/mysqlshow_ia64.dsp
+++ b/VC++Files/client/mysqlshow_ia64.dsp
@@ -53,7 +53,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 /nologo /subsystem:console /machine:IA64
-# ADD LINK32 ..\lib_release\zlib.lib 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 bufferoverflowU.lib /nologo /subsystem:console /out:"../client_release/mysqlshow.exe" /libpath:"..\lib_release\\" /machine:IA64
+# ADD LINK32 ..\lib_release\zlib.lib 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 bufferoverflowU.lib zlib.lib /nologo /subsystem:console /out:"../client_release/mysqlshow.exe" /libpath:"..\lib_release\\" /machine:IA64
!ELSEIF "$(CFG)" == "mysqlshow - WinIA64 Debug"
@@ -79,7 +79,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 /nologo /subsystem:console /debug /machine:IA64
-# ADD LINK32 ..\lib_debug\zlib.lib ..\lib_debug\dbug.lib 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 bufferoverflowU.lib /nologo /subsystem:console /incremental:no /debug /out:"../client_debug/mysqlshow.exe" /libpath:"..\lib_debug\\" /machine:IA64
+# ADD LINK32 ..\lib_debug\zlib.lib ..\lib_debug\dbug.lib 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 bufferoverflowU.lib zlib.lib /nologo /subsystem:console /incremental:no /debug /out:"../client_debug/mysqlshow.exe" /libpath:"..\lib_debug\\" /machine:IA64
!ELSEIF "$(CFG)" == "mysqlshow - WinIA64 classic"
@@ -107,7 +107,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.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 /out:"../client_release/mysqlshow.exe" /libpath:"..\lib_release\\" /machine:IA64
-# ADD LINK32 ..\lib_release\zlib.lib 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 bufferoverflowU.lib /nologo /subsystem:console /out:"../client_classic/mysqlshow.exe" /libpath:"..\lib_release\\" /machine:IA64
+# ADD LINK32 ..\lib_release\zlib.lib 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 bufferoverflowU.lib zlib.lib /nologo /subsystem:console /out:"../client_classic/mysqlshow.exe" /libpath:"..\lib_release\\" /machine:IA64
!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/client/mysqltest_ia64.dsp b/VC++Files/client/mysqltest_ia64.dsp
index 160683725e6..86edb4ab177 100644
--- a/VC++Files/client/mysqltest_ia64.dsp
+++ b/VC++Files/client/mysqltest_ia64.dsp
@@ -55,7 +55,7 @@ BSC32=bscmake.exe
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 /subsystem:console /debug /out:"..\client_debug\mysqltest.exe" /libpath:"..\lib_debug\\"
# SUBTRACT BASE LINK32 /pdb:none
-# ADD LINK32 ..\lib_debug\zlib.lib ..\lib_debug\dbug.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 mysqlclient.lib wsock32.lib mysys.lib regex.lib bufferoverflowU.lib /nologo /subsystem:console /incremental:no /debug /out:"..\client_debug\mysqltest.exe" /libpath:"..\lib_debug\\" /machine:IA64
+# ADD LINK32 ..\lib_debug\zlib.lib ..\lib_debug\dbug.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 mysqlclient.lib wsock32.lib mysys.lib regex.lib bufferoverflowU.lib zlib.lib /nologo /subsystem:console /incremental:no /debug /out:"..\client_debug\mysqltest.exe" /libpath:"..\lib_debug\\" /machine:IA64
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "mysqltest - WinIA64 classic"
@@ -84,7 +84,7 @@ BSC32=bscmake.exe
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 /subsystem:console /out:"..\client_classic\mysqltest.exe" /libpath:"..\lib_release\\"
# SUBTRACT BASE LINK32 /pdb:none
-# ADD LINK32 ..\lib_release\zlib.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 mysqlclient.lib wsock32.lib mysys.lib regex.lib bufferoverflowU.lib /nologo /subsystem:console /out:"..\client_classic\mysqltest.exe" /libpath:"..\lib_release\\" /machine:IA64
+# ADD LINK32 ..\lib_release\zlib.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 mysqlclient.lib wsock32.lib mysys.lib regex.lib bufferoverflowU.lib zlib.lib /nologo /subsystem:console /out:"..\client_classic\mysqltest.exe" /libpath:"..\lib_release\\" /machine:IA64
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "mysqltest - WinIA64 Release"
@@ -113,7 +113,7 @@ BSC32=bscmake.exe
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 /subsystem:console /out:"..\client_release\mysqltest.exe" /libpath:"..\lib_release\\"
# SUBTRACT BASE LINK32 /pdb:none
-# ADD LINK32 ..\lib_release\zlib.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 mysqlclient.lib wsock32.lib mysys.lib regex.lib bufferoverflowU.lib /nologo /subsystem:console /out:"..\client_release\mysqltest.exe" /libpath:"..\lib_release\\" /machine:IA64
+# ADD LINK32 ..\lib_release\zlib.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 mysqlclient.lib wsock32.lib mysys.lib regex.lib bufferoverflowU.lib zlib.lib /nologo /subsystem:console /out:"..\client_release\mysqltest.exe" /libpath:"..\lib_release\\" /machine:IA64
# SUBTRACT LINK32 /pdb:none
!ENDIF
diff --git a/VC++Files/libmysql/libmysql.dsp b/VC++Files/libmysql/libmysql.dsp
index ce81a3b7435..21e393f137d 100644
--- a/VC++Files/libmysql/libmysql.dsp
+++ b/VC++Files/libmysql/libmysql.dsp
@@ -143,6 +143,10 @@ SOURCE="..\strings\ctype-czech.c"
# End Source File
# Begin Source File
+SOURCE="..\strings\ctype-cp932.c"
+# End Source File
+# Begin Source File
+
SOURCE="..\strings\ctype-euc_kr.c"
# End Source File
# Begin Source File
diff --git a/VC++Files/libmysql/libmysql_ia64.dsp b/VC++Files/libmysql/libmysql_ia64.dsp
index 4c4776dfc2f..12932ed3924 100644
--- a/VC++Files/libmysql/libmysql_ia64.dsp
+++ b/VC++Files/libmysql/libmysql_ia64.dsp
@@ -142,6 +142,10 @@ SOURCE="..\strings\ctype-czech.c"
# End Source File
# Begin Source File
+SOURCE="..\strings\ctype-cp932.c"
+# End Source File
+# Begin Source File
+
SOURCE="..\strings\ctype-euc_kr.c"
# End Source File
# Begin Source File
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/mysql-test/mysql_test_run_new_ia64.dsp b/VC++Files/mysql-test/mysql_test_run_new_ia64.dsp
index a6252d0cb7b..023b38bd3c6 100644
--- a/VC++Files/mysql-test/mysql_test_run_new_ia64.dsp
+++ b/VC++Files/mysql-test/mysql_test_run_new_ia64.dsp
@@ -54,7 +54,7 @@ BSC32=bscmake.exe
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /subsystem:console /map /debug /out:"..\mysql-test\mysql_test_run_new.exe" /machine:IA64
# SUBTRACT BASE LINK32 /pdb:none
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Ws2_32.lib bufferoverflowU.lib /nologo /subsystem:console /incremental:no /map /debug /out:"..\mysql-test\mysql_test_run_new.exe" /machine:IA64
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Ws2_32.lib bufferoverflowU.lib zlib.lib /nologo /subsystem:console /incremental:no /libpath:"..\lib_debug\" /map /debug /out:"..\mysql-test\mysql_test_run_new.exe" /machine:IA64
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "mysql_test_run_new - WinIA64 Release"
@@ -83,7 +83,7 @@ BSC32=bscmake.exe
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /subsystem:console /out:"..\mysql-test\mysql_test_run_new.exe" /machine:IA64
# SUBTRACT BASE LINK32 /pdb:none
-# ADD LINK32 t kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Ws2_32.lib bufferoverflowU.lib /nologo /subsystem:console /out:"..\mysql-test\mysql_test_run_new.exe" /machine:IA64
+# ADD LINK32 t kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Ws2_32.lib bufferoverflowU.lib zlib.lib /nologo /subsystem:console /libpath:"..\lib_release\" /out:"..\mysql-test\mysql_test_run_new.exe" /machine:IA64
# SUBTRACT LINK32 /pdb:none
!ENDIF
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/mysqlbinlog/mysqlbinlog_ia64.dsp b/VC++Files/mysqlbinlog/mysqlbinlog_ia64.dsp
index 334c5087365..0bb6e9ed747 100644
--- a/VC++Files/mysqlbinlog/mysqlbinlog_ia64.dsp
+++ b/VC++Files/mysqlbinlog/mysqlbinlog_ia64.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 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:IA64
-# ADD LINK32 ..\lib_release\zlib.lib 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 bufferoverflowU.lib /nologo /subsystem:console /out:"../client_release/mysqlbinlog.exe" /libpath:"..\lib_release\\" /machine:IA64
+# ADD LINK32 ..\lib_release\zlib.lib 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 bufferoverflowU.lib zlib.lib /nologo /subsystem:console /out:"../client_release/mysqlbinlog.exe" /libpath:"..\lib_release\\" /machine:IA64
# SUBTRACT LINK32 /debug
!ELSEIF "$(CFG)" == "mysqlbinlog - WinIA64 Debug"
@@ -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 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:IA64
-# ADD LINK32 ..\lib_debug\zlib.lib 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 bufferoverflowU.lib /nologo /subsystem:console /incremental:no /debug /out:"../client_debug/mysqlbinlog.exe" /libpath:"..\lib_debug\\" /machine:IA64
+# ADD LINK32 ..\lib_debug\zlib.lib 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 bufferoverflowU.lib zlib.lib /nologo /subsystem:console /incremental:no /debug /out:"../client_debug/mysqlbinlog.exe" /libpath:"..\lib_debug\\" /machine:IA64
!ELSEIF "$(CFG)" == "mysqlbinlog - WinIA64 classic"
@@ -105,7 +105,7 @@ BSC32=bscmake.exe
LINK32=link.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 /out:"../client_release/mysqlbinlog.exe" /libpath:"..\lib_release\\" /machine:IA64
# SUBTRACT BASE LINK32 /debug
-# ADD LINK32 ..\lib_release\zlib.lib 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 bufferoverflowU.lib /nologo /subsystem:console /out:"../client_classic/mysqlbinlog.exe" /libpath:"..\lib_release\\" /machine:IA64
+# ADD LINK32 ..\lib_release\zlib.lib 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 bufferoverflowU.lib zlib.lib /nologo /subsystem:console /out:"../client_classic/mysqlbinlog.exe" /libpath:"..\lib_release\\" /machine:IA64
# SUBTRACT LINK32 /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/mysqlcheck/mysqlcheck_ia64.dsp b/VC++Files/mysqlcheck/mysqlcheck_ia64.dsp
index 1f1cf76276f..04f10a2ddb8 100644
--- a/VC++Files/mysqlcheck/mysqlcheck_ia64.dsp
+++ b/VC++Files/mysqlcheck/mysqlcheck_ia64.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 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:IA64
-# ADD LINK32 ..\lib_release\zlib.lib 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 bufferoverflowU.lib /nologo /subsystem:console /out:"../client_release/mysqlcheck.exe" /libpath:"..\lib_release\\" /machine:IA64
+# ADD LINK32 ..\lib_release\zlib.lib 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 bufferoverflowU.lib zlib.lib /nologo /subsystem:console /out:"../client_release/mysqlcheck.exe" /libpath:"..\lib_release\\" /machine:IA64
!ELSEIF "$(CFG)" == "mysqlcheck - WinIA64 Debug"
@@ -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 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:IA64
-# ADD LINK32 ..\lib_debug\zlib.lib 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 bufferoverflowU.lib /nologo /subsystem:console /incremental:no /debug /out:"../client_debug/mysqlcheck.exe" /libpath:"..\lib_debug\\" /machine:IA64
+# ADD LINK32 ..\lib_debug\zlib.lib 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 bufferoverflowU.lib zlib.lib /nologo /subsystem:console /incremental:no /debug /out:"../client_debug/mysqlcheck.exe" /libpath:"..\lib_debug\\" /machine:IA64
!ELSEIF "$(CFG)" == "mysqlcheck - WinIA64 classic"
@@ -103,7 +103,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.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 /out:"../client_release/mysqlcheck.exe" /libpath:"..\lib_release\\" /machine:IA64
-# ADD LINK32 ..\lib_release\zlib.lib 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 bufferoverflowU.lib /nologo /subsystem:console /out:"../client_classic/mysqlcheck.exe" /libpath:"..\lib_release\\" /machine:IA64
+# ADD LINK32 ..\lib_release\zlib.lib 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 bufferoverflowU.lib zlib.lib /nologo /subsystem:console /out:"../client_classic/mysqlcheck.exe" /libpath:"..\lib_release\\" /machine:IA64
!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/VC++Files/strings/strings.dsp b/VC++Files/strings/strings.dsp
index c8f3208e822..d1156702956 100644
--- a/VC++Files/strings/strings.dsp
+++ b/VC++Files/strings/strings.dsp
@@ -113,6 +113,10 @@ SOURCE=".\ctype-bin.c"
# End Source File
# Begin Source File
+SOURCE=".\ctype-cp932.c"
+# End Source File
+# Begin Source File
+
SOURCE=".\ctype-czech.c"
# End Source File
# Begin Source File
diff --git a/VC++Files/strings/strings_ia64.dsp b/VC++Files/strings/strings_ia64.dsp
index 6449b2b1355..edbcdee2f11 100644
--- a/VC++Files/strings/strings_ia64.dsp
+++ b/VC++Files/strings/strings_ia64.dsp
@@ -116,6 +116,10 @@ SOURCE=".\ctype-czech.c"
# End Source File
# Begin Source File
+SOURCE=".\ctype-cp932.c"
+# End Source File
+# Begin Source File
+
SOURCE=".\ctype-euc_kr.c"
# End Source File
# Begin Source File
diff --git a/client/sql_string.cc b/client/sql_string.cc
index 9dcf19dad1d..8f0e46c5eea 100644
--- a/client/sql_string.cc
+++ b/client/sql_string.cc
@@ -16,11 +16,12 @@
/* This file is originally from the mysql distribution. Coded by monty */
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
-#include <my_global.h>
#include <my_sys.h>
#include <m_string.h>
#include <m_ctype.h>
diff --git a/client/sql_string.h b/client/sql_string.h
index aec40466d2b..fd6d3ef59d9 100644
--- a/client/sql_string.h
+++ b/client/sql_string.h
@@ -16,7 +16,7 @@
/* This file is originally from the mysql distribution. Coded by monty */
-#ifdef __GNUC__
+#ifdef USE_PRAGMA_INTERFACE
#pragma interface /* gcc class implementation */
#endif
diff --git a/configure.in b/configure.in
index 7dd49ca8dea..a5c2e7044fe 100644
--- a/configure.in
+++ b/configure.in
@@ -16,7 +16,7 @@ SHARED_LIB_VERSION=14:0:0
# ndb version
NDB_VERSION_MAJOR=4
NDB_VERSION_MINOR=1
-NDB_VERSION_BUILD=12
+NDB_VERSION_BUILD=13
NDB_VERSION_STATUS=""
# Set all version vars based on $VERSION. How do we do this more elegant ?
@@ -1262,16 +1262,10 @@ EOF
#
echo -n "making sure specific build files are writable... "
for file in \
- Docs/include.texi \
Docs/mysql.info \
- Docs/manual.txt \
- Docs/manual_toc.html \
- Docs/manual.html \
Docs/INSTALL-BINARY \
INSTALL-SOURCE \
- COPYING \
- COPYING.LIB \
- MIRRORS
+ COPYING
do
if test -e $file; then
chmod +w $file
diff --git a/include/config-win.h b/include/config-win.h
index b3865c1fda7..86704c4740b 100644
--- a/include/config-win.h
+++ b/include/config-win.h
@@ -393,6 +393,7 @@ inline double ulonglong2double(ulonglong value)
/* #undef HAVE_CHARSET_cp850 */
/* #undef HAVE_CHARSET_cp852 */
/* #undef HAVE_CHARSET_cp866 */
+#define HAVE_CHARSET_cp932 1
/* #undef HAVE_CHARSET_dec8 */
#define HAVE_CHARSET_euckr 1
#define HAVE_CHARSET_gb2312 1
diff --git a/include/my_global.h b/include/my_global.h
index d7cda085353..79f4a16caa9 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -48,6 +48,11 @@
#define USE_PRAGMA_INTERFACE
#endif
+/* Determine when to use "#pragma implementation" */
+#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ < 3)
+#define USE_PRAGMA_IMPLEMENTATION
+#endif
+
#if defined(i386) && !defined(__i386__)
#define __i386__
#endif
diff --git a/include/my_sys.h b/include/my_sys.h
index a0a008056ae..70c410e66d8 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -578,6 +578,7 @@ extern int my_access(const char *path, int amode);
#else
#define my_access access
#endif
+extern int check_if_legal_filename(const char *path);
#ifndef TERMINATE
extern void TERMINATE(FILE *file);
diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c
index 280c306cce4..7ce5c766e06 100644
--- a/innobase/row/row0mysql.c
+++ b/innobase/row/row0mysql.c
@@ -2575,6 +2575,7 @@ row_drop_table_for_mysql(
foreign = UT_LIST_GET_FIRST(table->referenced_list);
while (foreign && foreign->foreign_table == table) {
+ check_next_foreign:
foreign = UT_LIST_GET_NEXT(referenced_list, foreign);
}
@@ -2603,6 +2604,10 @@ row_drop_table_for_mysql(
goto funct_exit;
}
+ if (foreign && trx->check_foreigns) {
+ goto check_next_foreign;
+ }
+
if (table->n_mysql_handles_opened > 0) {
ibool added;
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh
index 4fee560ee44..3f7e7d22200 100644
--- a/mysql-test/mysql-test-run.sh
+++ b/mysql-test/mysql-test-run.sh
@@ -1181,8 +1181,8 @@ start_master()
$NOT_FIRST_MASTER_EXTRA_OPTS"
fi
- CUR_MYERR=$MASTER_MYERR
- CUR_MYSOCK=$MASTER_MYSOCK
+ CUR_MYERR=$MASTER_MYERR$1
+ CUR_MYSOCK=$MASTER_MYSOCK$1
# For embedded server we collect the server flags and return
if [ "x$USE_EMBEDDED_SERVER" = "x1" ] ; then
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index 103bed598ef..a504823a2a9 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -563,3 +563,21 @@ select * from t2;
b
1
drop table t1,t2;
+use test;
+create table t1 (a int);
+create table t1 select * from t1;
+ERROR HY000: You can't specify target table 't1' for update in FROM clause
+create table t2 union = (t1) select * from t1;
+ERROR HY000: You can't specify target table 't1' for update in FROM clause
+flush tables with read lock;
+unlock tables;
+drop table t1;
+create table t1(column.name int);
+ERROR 42000: Incorrect table name 'column'
+create table t1(test.column.name int);
+ERROR 42000: Incorrect table name 'column'
+create table t1(xyz.t1.name int);
+ERROR 42000: Incorrect database name 'xyz'
+create table t1(t1.name int);
+create table t2(test.t2.name int);
+drop table t1,t2;
diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result
index c1ac1c084df..057822839fa 100644
--- a/mysql-test/r/func_gconcat.result
+++ b/mysql-test/r/func_gconcat.result
@@ -469,3 +469,26 @@ x (select group_concat(x) from r2)
1 1,1
2 2,2
drop table r2;
+create table t1 (d int, a int, b int, c int);
+insert into t1(a,b) values (1,3), (1,4), (1,2), (2,7), (1,1), (1,2), (2,3), (2,3);
+select a, group_concat(b) from t1 group by a with rollup;
+a group_concat(b)
+1 3,4,2,1,2
+2 7,3,3
+NULL 3,4,2,1,2,7,3,3
+select a, group_concat(distinct b) from t1 group by a with rollup;
+a group_concat(distinct b)
+1 3,4,2,1
+2 7,3
+NULL 3,4,2,1,7
+select a, group_concat(b order by b) from t1 group by a with rollup;
+a group_concat(b order by b)
+1 1,2,2,3,4
+2 3,3,7
+NULL 1,2,2,3,3,3,4,7
+select a, group_concat(distinct b order by b) from t1 group by a with rollup;
+a group_concat(distinct b order by b)
+1 1,2,3,4
+2 3,7
+NULL 1,2,3,4,7
+drop table t1;
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result
index 5405dbf53d9..ea1efbc7c0a 100644
--- a/mysql-test/r/func_str.result
+++ b/mysql-test/r/func_str.result
@@ -783,3 +783,9 @@ id aes_decrypt(str, 'bar')
1 foo
2 NULL
DROP TABLE t1, t2;
+select field(0,NULL,1,0), field("",NULL,"bar",""), field(0.0,NULL,1.0,0.0);
+field(0,NULL,1,0) field("",NULL,"bar","") field(0.0,NULL,1.0,0.0)
+3 3 3
+select field(NULL,1,2,NULL), field(NULL,1,2,0);
+field(NULL,1,2,NULL) field(NULL,1,2,0)
+0 0
diff --git a/mysql-test/r/lowercase_table2.result b/mysql-test/r/lowercase_table2.result
index 8361b66817a..1015990df9a 100644
--- a/mysql-test/r/lowercase_table2.result
+++ b/mysql-test/r/lowercase_table2.result
@@ -72,7 +72,7 @@ T1 CREATE TABLE `T1` (
RENAME TABLE T1 TO T2;
SHOW TABLES LIKE "T2";
Tables_in_test (T2)
-t2
+T2
SELECT * FROM t2;
a
1
@@ -83,25 +83,25 @@ t3
RENAME TABLE T3 TO T1;
SHOW TABLES LIKE "T1";
Tables_in_test (T1)
-t1
+T1
ALTER TABLE T1 add b int;
SHOW TABLES LIKE "T1";
Tables_in_test (T1)
-t1
+T1
ALTER TABLE T1 RENAME T2;
SHOW TABLES LIKE "T2";
Tables_in_test (T2)
-t2
+T2
LOCK TABLE T2 WRITE;
ALTER TABLE T2 drop b;
SHOW TABLES LIKE "T2";
Tables_in_test (T2)
-t2
+T2
UNLOCK TABLES;
RENAME TABLE T2 TO T1;
SHOW TABLES LIKE "T1";
Tables_in_test (T1)
-t1
+T1
SELECT * from T1;
a
1
diff --git a/mysql-test/r/olap.result b/mysql-test/r/olap.result
index 013952403d7..ab84fa5739a 100644
--- a/mysql-test/r/olap.result
+++ b/mysql-test/r/olap.result
@@ -248,7 +248,7 @@ concat(':',product,':') sum(profit) avg(profit)
:Computer: 6900 1380.0000
:Phone: 10 10.0000
:TV: 600 120.0000
-:TV: 7785 519.0000
+NULL 7785 519.0000
select product, country_id , year, sum(profit) from t1 group by product, country_id, year with cube;
ERROR 42000: This version of MySQL doesn't yet support 'CUBE'
explain select product, country_id , year, sum(profit) from t1 group by product, country_id, year with cube;
@@ -438,3 +438,69 @@ a SUM(a) SUM(a)+1 CONCAT(SUM(a),'x') SUM(a)+SUM(a) SUM(a)
5 5 6 5x 10 5
NULL 8 9 8x 16 8
DROP TABLE t1;
+CREATE TABLE t1 (a int(11));
+INSERT INTO t1 VALUES (1),(2);
+SELECT a, a+1, SUM(a) FROM t1 GROUP BY a WITH ROLLUP;
+a a+1 SUM(a)
+1 2 1
+2 3 2
+NULL NULL 3
+SELECT a+1 FROM t1 GROUP BY a WITH ROLLUP;
+a+1
+2
+3
+NULL
+SELECT a+SUM(a) FROM t1 GROUP BY a WITH ROLLUP;
+a+SUM(a)
+2
+4
+NULL
+SELECT a, a+1 as b FROM t1 GROUP BY a WITH ROLLUP HAVING b > 2;
+a b
+2 3
+SELECT a, a+1 as b FROM t1 GROUP BY a WITH ROLLUP HAVING a IS NULL;
+a b
+NULL NULL
+SELECT a, a+1 as b FROM t1 GROUP BY a WITH ROLLUP HAVING b IS NULL;
+a b
+NULL NULL
+SELECT IFNULL(a, 'TEST') FROM t1 GROUP BY a WITH ROLLUP;
+IFNULL(a, 'TEST')
+1
+2
+TEST
+CREATE TABLE t2 (a int, b int);
+INSERT INTO t2 VALUES
+(1,4),
+(2,2), (2,2),
+(4,1), (4,1), (4,1), (4,1),
+(2,1), (2,1);
+SELECT a,b,SUM(b) FROM t2 GROUP BY a,b WITH ROLLUP;
+a b SUM(b)
+1 4 4
+1 NULL 4
+2 1 2
+2 2 4
+2 NULL 6
+4 1 4
+4 NULL 4
+NULL NULL 14
+SELECT a,b,SUM(b), a+b as c FROM t2
+GROUP BY a,b WITH ROLLUP HAVING c IS NULL;
+a b SUM(b) c
+1 NULL 4 NULL
+2 NULL 6 NULL
+4 NULL 4 NULL
+NULL NULL 14 NULL
+SELECT IFNULL(a, 'TEST'), COALESCE(b, 'TEST') FROM t2
+GROUP BY a, b WITH ROLLUP;
+IFNULL(a, 'TEST') COALESCE(b, 'TEST')
+1 4
+1 TEST
+2 1
+2 2
+2 TEST
+4 1
+4 TEST
+TEST TEST
+DROP TABLE t1,t2;
diff --git a/mysql-test/r/rpl_failed_optimize.result b/mysql-test/r/rpl_failed_optimize.result
index 1576ec60500..120bb53ed25 100644
--- a/mysql-test/r/rpl_failed_optimize.result
+++ b/mysql-test/r/rpl_failed_optimize.result
@@ -9,6 +9,7 @@ BEGIN;
INSERT INTO t1 VALUES (1);
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 optimize error Lock wait timeout exceeded; try restarting transaction
test.t1 optimize status Operation failed
OPTIMIZE TABLE non_existing;
Table Op Msg_type Msg_text
diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result
index b315ae9a3f5..1b5fa69d713 100644
--- a/mysql-test/r/union.result
+++ b/mysql-test/r/union.result
@@ -1235,6 +1235,20 @@ show columns from t2;
Field Type Null Key Default Extra
a varchar(3) YES NULL
drop table t2, t1;
+CREATE TABLE t1 (a mediumtext);
+CREATE TABLE t2 (b varchar(20));
+INSERT INTO t1 VALUES ('a'),('b');
+SELECT left(a,100000000) FROM t1 UNION SELECT b FROM t2;
+left(a,100000000)
+a
+b
+create table t3 SELECT left(a,100000000) FROM t1 UNION SELECT b FROM t2;
+show create table t3;
+Table Create Table
+t3 CREATE TABLE `t3` (
+ `left(a,100000000)` longtext
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop tables t1,t2,t3;
create table t1 ( id int not null auto_increment, primary key (id), col1 int);
insert into t1 (col1) values (2),(3),(4),(5),(6);
select 99 union all select id from t1 order by 1;
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test
index ce85e530569..c6973b271ad 100644
--- a/mysql-test/t/create.test
+++ b/mysql-test/t/create.test
@@ -460,3 +460,33 @@ insert into t2 values ();
select * from t1;
select * from t2;
drop table t1,t2;
+
+#
+# Bug#10224 - ANALYZE TABLE crashing with simultaneous
+# CREATE ... SELECT statement.
+# This tests two additional possible errors and a hang if
+# an improper fix is present.
+#
+connection default;
+use test;
+create table t1 (a int);
+--error 1093
+create table t1 select * from t1;
+--error 1093
+create table t2 union = (t1) select * from t1;
+flush tables with read lock;
+unlock tables;
+drop table t1;
+
+#
+# Bug#10413: Invalid column name is not rejected
+#
+--error 1103
+create table t1(column.name int);
+--error 1103
+create table t1(test.column.name int);
+--error 1102
+create table t1(xyz.t1.name int);
+create table t1(t1.name int);
+create table t2(test.t2.name int);
+drop table t1,t2;
diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test
index d32c8796075..485e8ba143c 100644
--- a/mysql-test/t/func_gconcat.test
+++ b/mysql-test/t/func_gconcat.test
@@ -292,3 +292,15 @@ create table r2 (a int, b int);
insert into r2 values (1,1), (2,2);
select b x, (select group_concat(x) from r2) from r2;
drop table r2;
+
+#
+# Bug #7405: problems with rollup
+#
+
+create table t1 (d int, a int, b int, c int);
+insert into t1(a,b) values (1,3), (1,4), (1,2), (2,7), (1,1), (1,2), (2,3), (2,3);
+select a, group_concat(b) from t1 group by a with rollup;
+select a, group_concat(distinct b) from t1 group by a with rollup;
+select a, group_concat(b order by b) from t1 group by a with rollup;
+select a, group_concat(distinct b order by b) from t1 group by a with rollup;
+drop table t1;
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test
index 22028437111..a5536f7a0be 100644
--- a/mysql-test/t/func_str.test
+++ b/mysql-test/t/func_str.test
@@ -521,3 +521,9 @@ SELECT t1.id, aes_decrypt(str, 'bar') FROM t1, t2 WHERE t1.id = t2.id
DROP TABLE t1, t2;
+
+#
+# Bug #10944: Mishandling of NULL arguments in FIELD()
+#
+select field(0,NULL,1,0), field("",NULL,"bar",""), field(0.0,NULL,1.0,0.0);
+select field(NULL,1,2,NULL), field(NULL,1,2,0);
diff --git a/mysql-test/t/olap.test b/mysql-test/t/olap.test
index 09ba537bf3b..b9387d15320 100644
--- a/mysql-test/t/olap.test
+++ b/mysql-test/t/olap.test
@@ -208,3 +208,33 @@ SELECT a, SUM(a), SUM(a)+1, CONCAT(SUM(a),'x'), SUM(a)+SUM(a), SUM(a)
DROP TABLE t1;
+#
+# Tests for bug #7894: ROLLUP over expressions on group by attributes
+#
+
+CREATE TABLE t1 (a int(11));
+INSERT INTO t1 VALUES (1),(2);
+
+SELECT a, a+1, SUM(a) FROM t1 GROUP BY a WITH ROLLUP;
+SELECT a+1 FROM t1 GROUP BY a WITH ROLLUP;
+SELECT a+SUM(a) FROM t1 GROUP BY a WITH ROLLUP;
+SELECT a, a+1 as b FROM t1 GROUP BY a WITH ROLLUP HAVING b > 2;
+SELECT a, a+1 as b FROM t1 GROUP BY a WITH ROLLUP HAVING a IS NULL;
+SELECT a, a+1 as b FROM t1 GROUP BY a WITH ROLLUP HAVING b IS NULL;
+SELECT IFNULL(a, 'TEST') FROM t1 GROUP BY a WITH ROLLUP;
+
+CREATE TABLE t2 (a int, b int);
+INSERT INTO t2 VALUES
+ (1,4),
+ (2,2), (2,2),
+ (4,1), (4,1), (4,1), (4,1),
+ (2,1), (2,1);
+
+SELECT a,b,SUM(b) FROM t2 GROUP BY a,b WITH ROLLUP;
+SELECT a,b,SUM(b), a+b as c FROM t2
+ GROUP BY a,b WITH ROLLUP HAVING c IS NULL;
+SELECT IFNULL(a, 'TEST'), COALESCE(b, 'TEST') FROM t2
+ GROUP BY a, b WITH ROLLUP;
+
+DROP TABLE t1,t2;
+
diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test
index ecd98428b5a..3666e3c3127 100644
--- a/mysql-test/t/union.test
+++ b/mysql-test/t/union.test
@@ -743,6 +743,16 @@ create table t2 select a from t1 union select b from t1;
show columns from t2;
drop table t2, t1;
+#
+# correct conversion long string to TEXT (BUG#10025)
+#
+CREATE TABLE t1 (a mediumtext);
+CREATE TABLE t2 (b varchar(20));
+INSERT INTO t1 VALUES ('a'),('b');
+SELECT left(a,100000000) FROM t1 UNION SELECT b FROM t2;
+create table t3 SELECT left(a,100000000) FROM t1 UNION SELECT b FROM t2;
+show create table t3;
+drop tables t1,t2,t3;
#
# Bug #10032 Bug in parsing UNION with ORDER BY when one node does not use FROM
diff --git a/mysys/my_access.c b/mysys/my_access.c
index 6a8887e42a6..28210bdfc7d 100644
--- a/mysys/my_access.c
+++ b/mysys/my_access.c
@@ -15,39 +15,107 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include "mysys_priv.h"
+#include <m_string.h>
#ifdef __WIN__
/*
- * Check a file or path for accessability.
- *
- * SYNOPSIS
- * file_access()
- * pathpath to check
- * amodemode to check
- *
- * DESCRIPTION
- * This function wraps the normal access method because the access
- * available in MSVCRT> +reports that filenames such as LPT1 and
- * COM1 are valid (they are but should not be so for us).
- *
- * RETURN VALUES
- * 0 ok
- * -1 error
- */
+ Check a file or path for accessability.
+
+ SYNOPSIS
+ file_access()
+ path Path to file
+ amode Access method
+
+ DESCRIPTION
+ This function wraps the normal access method because the access
+ available in MSVCRT> +reports that filenames such as LPT1 and
+ COM1 are valid (they are but should not be so for us).
+
+ RETURN VALUES
+ 0 ok
+ -1 error (We use -1 as my_access is mapped to access on other platforms)
+*/
+
int my_access(const char *path, int amode)
{
- WIN32_FILE_ATTRIBUTE_DATA fileinfo;
- BOOL result;
+ WIN32_FILE_ATTRIBUTE_DATA fileinfo;
+ BOOL result;
- result = GetFileAttributesEx(path, GetFileExInfoStandard,
- &fileinfo);
- if (! result)
- return -1;
- if ((fileinfo.dwFileAttributes & FILE_ATTRIBUTE_READONLY) &&
- (amode & 2))
- return -1;
- return 0;
+ result= GetFileAttributesEx(path, GetFileExInfoStandard, &fileinfo);
+ if (! result ||
+ (fileinfo.dwFileAttributes & FILE_ATTRIBUTE_READONLY) && (amode & W_OK))
+ {
+ my_errno= errno= EACCES;
+ return -1;
+ }
+ return 0;
}
+#endif /* __WIN__ */
+
+#if defined(MSDOS) || defined(__WIN__) || defined(__EMX__)
+
+/*
+ List of file names that causes problem on windows
+
+ NOTE that one can also not have file names of type CON.TXT
+*/
+
+static const char *reserved_names[]=
+{
+ "CON", "PRN", "AUX", "NUL", "COM1", "COM2", "COM3", "COM4", "COM5", "COM6",
+ "COM7", "COM8", "COM9", "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6",
+ "LPT7", "LPT8", "LPT9", "CLOCK$",
+ NullS
+};
+
+#define MAX_RESERVED_NAME_LENGTH 6
+
+/*
+ Check if a path will access a reserverd file name that may cause problems
+
+ SYNOPSIS
+ check_if_legal_filename
+ path Path to file
+
+ RETURN
+ 0 ok
+ 1 reserved file name
+*/
+
+int check_if_legal_filename(const char *path)
+{
+ const char *end;
+ const char **reserved_name;
+ DBUG_ENTER("check_if_legal_filename");
+
+ path+= dirname_length(path); /* To start of filename */
+ if (!(end= strchr(path, FN_EXTCHAR)))
+ end= strend(path);
+ if (path == end || (uint) (path - end) > MAX_RESERVED_NAME_LENGTH)
+ DBUG_RETURN(0); /* Simplify inner loop */
+
+ for (reserved_name= reserved_names; *reserved_name; reserved_name++)
+ {
+ const char *name= path;
+ while (name != end)
+ {
+ if (my_toupper(&my_charset_latin1, *path) !=
+ my_toupper(&my_charset_latin1, *name))
+ break;
+ if (name++ == end)
+ DBUG_RETURN(1); /* Found wrong path */
+ }
+ }
+ DBUG_RETURN(0);
+}
#endif
+
+
+#ifdef OS2
+int check_if_legal_filename(const char *path)
+{
+ return 0;
+}
+#endif /* OS2 */
diff --git a/mysys/my_fopen.c b/mysys/my_fopen.c
index 4310250bd0d..3c6f1b15384 100644
--- a/mysys/my_fopen.c
+++ b/mysys/my_fopen.c
@@ -39,13 +39,16 @@ FILE *my_fopen(const char *FileName, int Flags, myf MyFlags)
very well
*/
#ifdef __WIN__
- if (! (Flags & O_CREAT) && my_access(FileName, F_OK))
- fd=0;
+ if (check_if_legal_filename(FileName))
+ {
+ errno= EACCES;
+ fd= 0;
+ }
else
#endif
{
- make_ftype(type,Flags);
- fd = fopen(FileName, type);
+ make_ftype(type,Flags);
+ fd = fopen(FileName, type);
}
if (fd != 0)
diff --git a/mysys/my_open.c b/mysys/my_open.c
index ea4d99c3e8c..7cf40b57403 100644
--- a/mysys/my_open.c
+++ b/mysys/my_open.c
@@ -47,12 +47,15 @@ File my_open(const char *FileName, int Flags, myf MyFlags)
FileName, Flags, MyFlags));
#if defined(MSDOS) || defined(__WIN__) || defined(__EMX__) || defined(OS2)
/*
- if we are not creating, then we need to use my_access to make
- sure the file exists since Windows doesn't handle files like
- "com1.sym" very well
+ Check that we don't try to open or create a file name that may
+ cause problems for us in the future (like PRN)
*/
- if (! (Flags & O_CREAT) && my_access(FileName, F_OK))
- return -1;
+ if (check_if_legal_filename(FileName))
+ {
+ errno= EACCES;
+ DBUG_RETURN(my_register_filename(-1, FileName, FILE_BY_OPEN,
+ EE_FILENOTFOUND, MyFlags));
+ }
if (Flags & O_SHARE)
fd = sopen((my_string) FileName, (Flags & ~O_SHARE) | O_BINARY, SH_DENYNO,
MY_S_IREAD | MY_S_IWRITE);
diff --git a/mysys/raid.cc b/mysys/raid.cc
index 0b688464fb3..20e70d2d102 100644
--- a/mysys/raid.cc
+++ b/mysys/raid.cc
@@ -70,7 +70,9 @@
tonu@mysql.com & monty@mysql.com
*/
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/ndb/src/common/util/File.cpp b/ndb/src/common/util/File.cpp
index 937b8c0fa59..e514ad8e122 100644
--- a/ndb/src/common/util/File.cpp
+++ b/ndb/src/common/util/File.cpp
@@ -28,29 +28,9 @@
bool
File_class::exists(const char* aFileName)
{
- bool rc = true;
-#ifdef USE_MY_STAT_STRUCT
- struct my_stat stmp;
-#else
- struct stat stmp;
-#endif
- if (my_stat(aFileName, &stmp, MYF(0)) != 0)
- {
- rc = false;
- }
-
- /*
- File f;
- if (!f.open(aFileName, "r"))
- {
- rc = (errno == ENOENT ? false : true);
- }
- else
- {
- f.close();
- }
- */
- return rc;
+ MY_STAT stmp;
+
+ return (my_stat(aFileName, &stmp, MYF(0))!=NULL);
}
long
diff --git a/ndb/src/kernel/blocks/dbtux/Dbtux.hpp b/ndb/src/kernel/blocks/dbtux/Dbtux.hpp
index 2c96271eb5d..3d78fccb780 100644
--- a/ndb/src/kernel/blocks/dbtux/Dbtux.hpp
+++ b/ndb/src/kernel/blocks/dbtux/Dbtux.hpp
@@ -342,7 +342,6 @@ private:
* Complete metadata for one index. The array of attributes has
* variable size.
*/
- struct DescEnt;
friend struct DescEnt;
struct DescEnt {
DescHead m_descHead;
diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh
index 46d1b74d2bf..2f49104ad46 100644
--- a/scripts/make_binary_distribution.sh
+++ b/scripts/make_binary_distribution.sh
@@ -76,9 +76,6 @@ if [ $BASE_SYSTEM != "netware" ] ; then
fi
for i in ChangeLog \
- Docs/manual.html \
- Docs/manual.txt \
- Docs/manual_toc.html \
Docs/mysql.info
do
if [ -f $i ]
diff --git a/sql/examples/ha_archive.cc b/sql/examples/ha_archive.cc
index 918d85d705d..e58996d3c01 100644
--- a/sql/examples/ha_archive.cc
+++ b/sql/examples/ha_archive.cc
@@ -14,7 +14,9 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/examples/ha_example.cc b/sql/examples/ha_example.cc
index 35034fc7b28..2592d307e37 100644
--- a/sql/examples/ha_example.cc
+++ b/sql/examples/ha_example.cc
@@ -63,7 +63,9 @@
-Brian
*/
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/examples/ha_tina.cc b/sql/examples/ha_tina.cc
index 637ecde8f81..16e28e5ae85 100644
--- a/sql/examples/ha_tina.cc
+++ b/sql/examples/ha_tina.cc
@@ -38,7 +38,9 @@ TODO:
-Brian
*/
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/field.cc b/sql/field.cc
index d73257a673f..60287d4003b 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -19,7 +19,9 @@
** This file implements classes defined in field.h
*****************************************************************************/
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc
index 626201a38a6..d4adea4a7b4 100644
--- a/sql/ha_berkeley.cc
+++ b/sql/ha_berkeley.cc
@@ -47,7 +47,9 @@
*/
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/ha_blackhole.cc b/sql/ha_blackhole.cc
index c9c94b3a9d7..a5456d54c1b 100644
--- a/sql/ha_blackhole.cc
+++ b/sql/ha_blackhole.cc
@@ -15,7 +15,9 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/ha_heap.cc b/sql/ha_heap.cc
index d8e4b3d5a9f..ef0d0022860 100644
--- a/sql/ha_heap.cc
+++ b/sql/ha_heap.cc
@@ -15,7 +15,9 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index 2d2a8f2c3b4..b3b82df5469 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -28,7 +28,9 @@ have disables the InnoDB inlining in this file. */
in Windows?
*/
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
@@ -5420,7 +5422,8 @@ ha_innobase::store_lock(
if ((lock_type >= TL_WRITE_CONCURRENT_INSERT &&
lock_type <= TL_WRITE) && !thd->in_lock_tables
- && !thd->tablespace_op) {
+ && !thd->tablespace_op
+ && thd->lex->sql_command != SQLCOM_CREATE_TABLE) {
lock_type = TL_WRITE_ALLOW_WRITE;
}
diff --git a/sql/ha_isam.cc b/sql/ha_isam.cc
index 9de532fa7b0..b755c63698f 100644
--- a/sql/ha_isam.cc
+++ b/sql/ha_isam.cc
@@ -15,7 +15,9 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/ha_isammrg.cc b/sql/ha_isammrg.cc
index 367607eef19..7e14ccb43bf 100644
--- a/sql/ha_isammrg.cc
+++ b/sql/ha_isammrg.cc
@@ -15,7 +15,9 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc
index 7ddb7ca25ed..b4ac8cc777f 100644
--- a/sql/ha_myisam.cc
+++ b/sql/ha_myisam.cc
@@ -15,7 +15,9 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/ha_myisammrg.cc b/sql/ha_myisammrg.cc
index 0b160d72aab..3374ee1271a 100644
--- a/sql/ha_myisammrg.cc
+++ b/sql/ha_myisammrg.cc
@@ -15,7 +15,9 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index 53706b4a9ba..516703112dd 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -20,7 +20,9 @@
NDB Cluster
*/
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/handler.cc b/sql/handler.cc
index f174f51514e..d47bb02a58c 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -17,7 +17,9 @@
/* Handler-calling-functions */
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/hash_filo.cc b/sql/hash_filo.cc
index b85f8054f10..34f3cd6b035 100644
--- a/sql/hash_filo.cc
+++ b/sql/hash_filo.cc
@@ -20,7 +20,9 @@
** to usage.
*/
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/hash_filo.h b/sql/hash_filo.h
index d1672e1a60c..fc48c3b1540 100644
--- a/sql/hash_filo.h
+++ b/sql/hash_filo.h
@@ -23,7 +23,7 @@
#ifndef HASH_FILO_H
#define HASH_FILO_H
-#ifdef __GNUC__
+#ifdef USE_PRAGMA_INTERFACE
#pragma interface /* gcc class interface */
#endif
diff --git a/sql/item.cc b/sql/item.cc
index c43421117e5..d32a6581049 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -15,7 +15,9 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
@@ -3100,8 +3102,8 @@ Field *Item_type_holder::make_field_by_type(TABLE *table)
enum_set_typelib, collation.collation);
case MYSQL_TYPE_VAR_STRING:
table->db_create_options|= HA_OPTION_PACK_RECORD;
- return new Field_string(max_length, maybe_null, name, table,
- collation.collation);
+ fld_type= MYSQL_TYPE_STRING;
+ break;
default:
break;
}
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 8498ab4800e..f53dcb43e5c 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -17,7 +17,9 @@
/* This file defines all compare functions */
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 05b76eb1604..598439c60c1 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -17,7 +17,9 @@
/* This file defines all numerical functions */
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
@@ -1488,6 +1490,10 @@ void Item_func_locate::print(String *str)
longlong Item_func_field::val_int()
{
DBUG_ASSERT(fixed == 1);
+
+ if (args[0]->null_value)
+ return 0;
+
if (cmp_type == STRING_RESULT)
{
String *field;
@@ -1505,8 +1511,8 @@ longlong Item_func_field::val_int()
longlong val= args[0]->val_int();
for (uint i=1; i < arg_count ; i++)
{
- if (val == args[i]->val_int())
- return (longlong) (i);
+ if (!args[i]->null_value && val == args[i]->val_int())
+ return (longlong) (i);
}
}
else
@@ -1514,8 +1520,8 @@ longlong Item_func_field::val_int()
double val= args[0]->val();
for (uint i=1; i < arg_count ; i++)
{
- if (val == args[i]->val())
- return (longlong) (i);
+ if (!args[i]->null_value && val == args[i]->val())
+ return (longlong) (i);
}
}
return 0;
diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc
index 2f00416bddf..e907c5a0d45 100644
--- a/sql/item_geofunc.cc
+++ b/sql/item_geofunc.cc
@@ -17,7 +17,9 @@
/* This file defines all spatial functions */
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index baba4d9b786..725712f4e85 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -20,7 +20,9 @@
** (This shouldn't be needed)
*/
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index 23477481472..f7defd96b04 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -22,7 +22,9 @@ SUBSELECT TODO:
(sql_select.h/sql_select.cc)
*/
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index dd4cda4ff91..9c35fb1d427 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -17,7 +17,9 @@
/* Sum functions (COUNT, MIN...) */
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
@@ -1566,7 +1568,6 @@ int group_concat_key_cmp_with_distinct(void* arg, byte* key1,
{
Item_func_group_concat* grp_item= (Item_func_group_concat*)arg;
Item **field_item, **end;
- char *record= (char*) grp_item->table->record[0];
for (field_item= grp_item->args, end= field_item + grp_item->arg_count_field;
field_item < end;
@@ -1581,7 +1582,7 @@ int group_concat_key_cmp_with_distinct(void* arg, byte* key1,
if (field)
{
int res;
- uint offset= (uint) (field->ptr - record);
+ uint offset= field->offset();
if ((res= field->key_cmp(key1 + offset, key2 + offset)))
return res;
}
@@ -1599,7 +1600,6 @@ int group_concat_key_cmp_with_order(void* arg, byte* key1, byte* key2)
{
Item_func_group_concat* grp_item= (Item_func_group_concat*) arg;
ORDER **order_item, **end;
- char *record= (char*) grp_item->table->record[0];
for (order_item= grp_item->order, end=order_item+ grp_item->arg_count_order;
order_item < end;
@@ -1615,7 +1615,7 @@ int group_concat_key_cmp_with_order(void* arg, byte* key1, byte* key2)
if (field)
{
int res;
- uint offset= (uint) (field->ptr - record);
+ uint offset= field->offset();
if ((res= field->key_cmp(key1 + offset, key2 + offset)))
return (*order_item)->asc ? res : -res;
}
@@ -1657,7 +1657,6 @@ int dump_leaf_key(byte* key, uint32 count __attribute__((unused)),
{
char buff[MAX_FIELD_WIDTH];
String tmp((char *)&buff,sizeof(buff),default_charset_info), tmp2;
- char *record= (char*) item->table->record[0];
if (item->result.length())
item->result.append(*item->separator);
@@ -1677,9 +1676,8 @@ int dump_leaf_key(byte* key, uint32 count __attribute__((unused)),
Field *field= show_item->get_tmp_table_field();
String *res;
char *save_ptr= field->ptr;
- uint offset= (uint) (save_ptr - record);
- DBUG_ASSERT(offset < item->table->reclength);
- field->ptr= (char *) key + offset;
+ DBUG_ASSERT(field->offset() < item->table->reclength);
+ field->ptr= (char *) key + field->offset();
res= field->val_str(&tmp,&tmp2);
item->result.append(*res);
field->ptr= save_ptr;
@@ -1852,12 +1850,6 @@ void Item_func_group_concat::clear()
result.copy();
null_value= TRUE;
warning_for_row= FALSE;
- if (table)
- {
- table->file->extra(HA_EXTRA_NO_CACHE);
- table->file->delete_all_rows();
- table->file->extra(HA_EXTRA_WRITE_CACHE);
- }
if (tree_mode)
reset_tree(tree);
}
@@ -1870,19 +1862,13 @@ bool Item_func_group_concat::add()
copy_fields(tmp_table_param);
copy_funcs(tmp_table_param->items_to_copy);
- for (uint i= 0; i < arg_count_field; i++)
+ for (Item **arg= args, **arg_end= args + arg_count_field;
+ arg < arg_end; arg++)
{
- Item *show_item= args[i];
- if (!show_item->const_item())
- {
- /*
- Here we use real_item as we want the original field data that should
- be written to table->record[0]
- */
- Field *f= show_item->real_item()->get_tmp_table_field();
- if (f->is_null())
+ if (!(*arg)->const_item() &&
+ (*arg)->get_tmp_table_field()->is_null_in_record(
+ (const uchar*) table->record[0]))
return 0; // Skip row if it contains null
- }
}
null_value= FALSE;
@@ -1945,10 +1931,6 @@ Item_func_group_concat::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
null_value= 1;
max_length= group_concat_max_len;
thd->allow_sum_func= 1;
- if (!(tmp_table_param= new TMP_TABLE_PARAM))
- return 1;
- /* We'll convert all blobs to varchar fields in the temporary table */
- tmp_table_param->convert_blob_length= group_concat_max_len;
tables_list= tables;
fixed= 1;
return 0;
@@ -1967,6 +1949,11 @@ bool Item_func_group_concat::setup(THD *thd)
if (select_lex->linkage == GLOBAL_OPTIONS_TYPE)
DBUG_RETURN(1);
+ if (!(tmp_table_param= new TMP_TABLE_PARAM))
+ return 1;
+ /* We'll convert all blobs to varchar fields in the temporary table */
+ tmp_table_param->convert_blob_length= group_concat_max_len;
+
/*
push all not constant fields to list and create temp table
*/
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 23cd9c7ced2..9f5cd61f95a 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -17,7 +17,9 @@
/* This file defines all time functions */
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/item_uniq.cc b/sql/item_uniq.cc
index 88e0cbbc0e6..c83373bd8b0 100644
--- a/sql/item_uniq.cc
+++ b/sql/item_uniq.cc
@@ -15,7 +15,10 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* Compability file */
-#ifdef __GNUC__
+
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation
#endif
diff --git a/sql/item_uniq.h b/sql/item_uniq.h
index 5582537bdbb..b7e00f9f080 100644
--- a/sql/item_uniq.h
+++ b/sql/item_uniq.h
@@ -16,7 +16,7 @@
/* Compability file ; This file only contains dummy functions */
-#ifdef __GNUC__
+#ifdef USE_PRAGMA_INTERFACE
#pragma interface
#endif
diff --git a/sql/lock.cc b/sql/lock.cc
index 03541bb0810..4e34f766c61 100644
--- a/sql/lock.cc
+++ b/sql/lock.cc
@@ -82,8 +82,24 @@ static int unlock_external(THD *thd, TABLE **table,uint count);
static void print_lock_error(int error);
-MYSQL_LOCK *mysql_lock_tables(THD *thd, TABLE **tables, uint count,
- bool ignore_global_read_lock)
+/*
+ Lock tables.
+
+ SYNOPSIS
+ mysql_lock_tables()
+ thd The current thread.
+ tables An array of pointers to the tables to lock.
+ count The number of tables to lock.
+ flags Options:
+ MYSQL_LOCK_IGNORE_GLOBAL_READ_LOCK Ignore a global read lock
+ MYSQL_LOCK_IGNORE_FLUSH Ignore a flush tables.
+
+ RETURN
+ A lock structure pointer on success.
+ NULL on error.
+*/
+
+MYSQL_LOCK *mysql_lock_tables(THD *thd, TABLE **tables, uint count, uint flags)
{
MYSQL_LOCK *sql_lock;
TABLE *write_lock_used;
@@ -94,7 +110,8 @@ MYSQL_LOCK *mysql_lock_tables(THD *thd, TABLE **tables, uint count,
if (!(sql_lock = get_lock_data(thd,tables,count, 0,&write_lock_used)))
break;
- if (global_read_lock && write_lock_used && ! ignore_global_read_lock)
+ if (global_read_lock && write_lock_used &&
+ ! (flags & MYSQL_LOCK_IGNORE_GLOBAL_READ_LOCK))
{
/*
Someone has issued LOCK ALL TABLES FOR READ and we want a write lock
@@ -128,7 +145,7 @@ MYSQL_LOCK *mysql_lock_tables(THD *thd, TABLE **tables, uint count,
thd->some_tables_deleted=1; // Try again
sql_lock->lock_count=0; // Locks are alread freed
}
- else if (!thd->some_tables_deleted)
+ else if (!thd->some_tables_deleted || (flags & MYSQL_LOCK_IGNORE_FLUSH))
{
thd->locked=0;
break;
@@ -914,47 +931,3 @@ void make_global_read_lock_block_commit(THD *thd)
}
-/*
- Set protection against global read lock.
-
- SYNOPSIS
- set_protect_against_global_read_lock()
- void
-
- RETURN
- FALSE OK, no global read lock exists.
- TRUE Error, global read lock exists already.
-*/
-
-my_bool set_protect_against_global_read_lock(void)
-{
- my_bool global_read_lock_exists;
-
- pthread_mutex_lock(&LOCK_open);
- if (! (global_read_lock_exists= test(global_read_lock)))
- protect_against_global_read_lock++;
- pthread_mutex_unlock(&LOCK_open);
- return global_read_lock_exists;
-}
-
-
-/*
- Unset protection against global read lock.
-
- SYNOPSIS
- unset_protect_against_global_read_lock()
- void
-
- RETURN
- void
-*/
-
-void unset_protect_against_global_read_lock(void)
-{
- pthread_mutex_lock(&LOCK_open);
- protect_against_global_read_lock--;
- pthread_mutex_unlock(&LOCK_open);
- pthread_cond_broadcast(&COND_refresh);
-}
-
-
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 8a949b81fc1..9701ef2ff00 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -16,7 +16,10 @@
#ifndef MYSQL_CLIENT
-#ifdef __GNUC__
+
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
#include "mysql_priv.h"
diff --git a/sql/log_event.h b/sql/log_event.h
index f848f2ae1b9..7ae4e863fc2 100644
--- a/sql/log_event.h
+++ b/sql/log_event.h
@@ -22,7 +22,7 @@
#undef write // remove pthread.h macro definition, conflict with write() class member
#endif
-#if defined(__GNUC__) && !defined(MYSQL_CLIENT)
+#if defined(USE_PRAGMA_INTERFACE) && !defined(MYSQL_CLIENT)
#pragma interface /* gcc class implementation */
#endif
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index ca282ee2444..5b9e81620ce 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -978,8 +978,11 @@ extern pthread_t signal_thread;
extern struct st_VioSSLAcceptorFd * ssl_acceptor_fd;
#endif /* HAVE_OPENSSL */
-MYSQL_LOCK *mysql_lock_tables(THD *thd, TABLE **table, uint count,
- bool ignore_global_read_lock= FALSE);
+MYSQL_LOCK *mysql_lock_tables(THD *thd, TABLE **table, uint count, uint flags);
+/* mysql_lock_tables() flags bits */
+#define MYSQL_LOCK_IGNORE_GLOBAL_READ_LOCK 0x0001
+#define MYSQL_LOCK_IGNORE_FLUSH 0x0002
+
void mysql_unlock_tables(THD *thd, MYSQL_LOCK *sql_lock);
void mysql_unlock_read_tables(THD *thd, MYSQL_LOCK *sql_lock);
void mysql_unlock_some_tables(THD *thd, TABLE **table,uint count);
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 33223b83894..7b37f0ce4f7 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -23,7 +23,9 @@
*/
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/procedure.cc b/sql/procedure.cc
index 7779f5ce085..10689dd36f6 100644
--- a/sql/procedure.cc
+++ b/sql/procedure.cc
@@ -17,7 +17,9 @@
/* Procedures (functions with changes output of select) */
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/protocol.cc b/sql/protocol.cc
index 91061426f04..835bd986fb8 100644
--- a/sql/protocol.cc
+++ b/sql/protocol.cc
@@ -19,7 +19,9 @@
The actual communction is handled by the net_xxx functions in net_serv.cc
*/
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/protocol_cursor.cc b/sql/protocol_cursor.cc
index 5f35552c562..53a03001544 100644
--- a/sql/protocol_cursor.cc
+++ b/sql/protocol_cursor.cc
@@ -19,7 +19,9 @@
The actual communction is handled by the net_xxx functions in net_serv.cc
*/
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/set_var.cc b/sql/set_var.cc
index 9f63188c28a..b006dde2b4b 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -48,7 +48,9 @@
new attribute.
*/
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 84259b146ad..5e36978b210 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -184,7 +184,7 @@ my_bool acl_init(THD *org_thd, bool dont_read_acl_tables)
ptr[0]= tables[0].table;
ptr[1]= tables[1].table;
ptr[2]= tables[2].table;
- if (!(lock=mysql_lock_tables(thd,ptr,3)))
+ if (! (lock= mysql_lock_tables(thd, ptr, 3, 0)))
{
sql_print_error("Fatal error: Can't lock privilege tables: %s",
thd->net.last_error);
@@ -2658,7 +2658,7 @@ my_bool grant_init(THD *org_thd)
TABLE *ptr[2]; // Lock tables for quick update
ptr[0]= tables[0].table;
ptr[1]= tables[1].table;
- if (!(lock=mysql_lock_tables(thd,ptr,2)))
+ if (! (lock= mysql_lock_tables(thd, ptr, 2, 0)))
goto end;
t_table = tables[0].table; c_table = tables[1].table;
diff --git a/sql/sql_analyse.cc b/sql/sql_analyse.cc
index 7ac9a0866df..678bdbb4588 100644
--- a/sql/sql_analyse.cc
+++ b/sql/sql_analyse.cc
@@ -23,7 +23,9 @@
** - type set is out of optimization yet
*/
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/sql_analyse.h b/sql/sql_analyse.h
index 3d1cffecaef..8523b05a1de 100644
--- a/sql/sql_analyse.h
+++ b/sql/sql_analyse.h
@@ -17,7 +17,7 @@
/* Analyse database */
-#ifdef __GNUC__
+#ifdef USE_PRAGMA_INTERFACE
#pragma interface /* gcc class implementation */
#endif
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index c580842ce06..98ea4e0adf3 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1163,7 +1163,7 @@ bool reopen_tables(THD *thd,bool get_locks,bool in_refresh)
MYSQL_LOCK *lock;
/* We should always get these locks */
thd->some_tables_deleted=0;
- if ((lock=mysql_lock_tables(thd,tables,(uint) (tables_ptr-tables))))
+ if ((lock= mysql_lock_tables(thd, tables, (uint) (tables_ptr-tables), 0)))
{
thd->locked_tables=mysql_lock_merge(thd->locked_tables,lock);
}
@@ -1644,7 +1644,7 @@ TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type lock_type)
{
DBUG_ASSERT(thd->lock == 0); // You must lock everything at once
if ((table->reginfo.lock_type= lock_type) != TL_UNLOCK)
- if (!(thd->lock=mysql_lock_tables(thd,&table_list->table,1)))
+ if (! (thd->lock= mysql_lock_tables(thd, &table_list->table, 1, 0)))
table= 0;
}
}
@@ -1794,7 +1794,7 @@ int lock_tables(THD *thd, TABLE_LIST *tables, uint count)
if (!table->derived)
*(ptr++)= table->table;
}
- if (!(thd->lock=mysql_lock_tables(thd,start, (uint) (ptr - start))))
+ if (! (thd->lock= mysql_lock_tables(thd, start, (uint) (ptr - start), 0)))
return -1; /* purecov: inspected */
}
else
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index c20d5f79277..ff45b164893 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -22,7 +22,9 @@
**
*****************************************************************************/
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/sql_crypt.cc b/sql/sql_crypt.cc
index b0b8050e311..eda7f0f6bbb 100644
--- a/sql/sql_crypt.cc
+++ b/sql/sql_crypt.cc
@@ -23,7 +23,9 @@
needs something like 'ssh'.
*/
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/sql_crypt.h b/sql/sql_crypt.h
index 1b27f0a4d27..25bc2d29e1d 100644
--- a/sql/sql_crypt.h
+++ b/sql/sql_crypt.h
@@ -15,7 +15,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#ifdef __GNUC__
+#ifdef USE_PRAGMA_INTERFACE
#pragma interface /* gcc class implementation */
#endif
diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc
index f250a00eca1..aa791276404 100644
--- a/sql/sql_handler.cc
+++ b/sql/sql_handler.cc
@@ -454,7 +454,7 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
protocol->send_fields(&list,1);
HANDLER_TABLES_HACK(thd);
- lock= mysql_lock_tables(thd, &tables->table, 1);
+ lock= mysql_lock_tables(thd, &tables->table, 1, 0);
HANDLER_TABLES_HACK(thd);
if (!lock)
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 1d7914c9c76..b4021943967 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -882,10 +882,13 @@ static TABLE *delayed_get_table(THD *thd,TABLE_LIST *table_list)
Avoid that a global read lock steps in while we are creating the
new thread. It would block trying to open the table. Hence, the
DI thread and this thread would wait until after the global
- readlock is gone. If the read lock exists already, we leave with
- no table and then switch to non-delayed insert.
+ readlock is gone. Since the insert thread needs to wait for a
+ global read lock anyway, we do it right now. Note that
+ wait_if_global_read_lock() sets a protection against a new
+ global read lock when it succeeds. This needs to be released by
+ start_waiting_global_read_lock().
*/
- if (set_protect_against_global_read_lock())
+ if (wait_if_global_read_lock(thd, 0, 1))
goto err;
if (!(tmp=new delayed_insert()))
{
@@ -927,7 +930,11 @@ static TABLE *delayed_get_table(THD *thd,TABLE_LIST *table_list)
pthread_cond_wait(&tmp->cond_client,&tmp->mutex);
}
pthread_mutex_unlock(&tmp->mutex);
- unset_protect_against_global_read_lock();
+ /*
+ Release the protection against the global read lock and wake
+ everyone, who might want to set a global read lock.
+ */
+ start_waiting_global_read_lock(thd);
thd->proc_info="got old table";
if (tmp->thd.killed)
{
@@ -963,7 +970,11 @@ static TABLE *delayed_get_table(THD *thd,TABLE_LIST *table_list)
err1:
thd->fatal_error();
- unset_protect_against_global_read_lock();
+ /*
+ Release the protection against the global read lock and wake
+ everyone, who might want to set a global read lock.
+ */
+ start_waiting_global_read_lock(thd);
err:
pthread_mutex_unlock(&LOCK_delayed_create);
DBUG_RETURN(0); // Continue with normal insert
@@ -1319,7 +1330,8 @@ extern "C" pthread_handler_decl(handle_delayed_insert,arg)
handler will close the table and finish when the outstanding
inserts are done.
*/
- if (! (thd->lock= mysql_lock_tables(thd, &di->table, 1, TRUE)))
+ if (! (thd->lock= mysql_lock_tables(thd, &di->table, 1,
+ MYSQL_LOCK_IGNORE_GLOBAL_READ_LOCK)))
{
di->dead= 1; // Some fatal error
thd->killed= 1;
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index d6dcd9ce9ae..904b4675c74 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -420,7 +420,7 @@ static const uint signed_longlong_len=19;
static const char *unsigned_longlong_str="18446744073709551615";
static const uint unsigned_longlong_len=20;
-inline static uint int_token(const char *str,uint length)
+static inline uint int_token(const char *str,uint length)
{
if (length < long_len) // quick normal case
return NUM;
diff --git a/sql/sql_list.cc b/sql/sql_list.cc
index c99cfb8c918..485c569f49c 100644
--- a/sql/sql_list.cc
+++ b/sql/sql_list.cc
@@ -15,7 +15,9 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/sql_map.cc b/sql/sql_map.cc
index e7e24f957c6..9baacd1bc4b 100644
--- a/sql/sql_map.cc
+++ b/sql/sql_map.cc
@@ -15,7 +15,9 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/sql_map.h b/sql/sql_map.h
index 632eb6e4f64..bfa6011ac54 100644
--- a/sql/sql_map.h
+++ b/sql/sql_map.h
@@ -17,7 +17,7 @@
/* interface for memory mapped files */
-#ifdef __GNUC__
+#ifdef USE_PRAGMA_INTERFACE
#pragma interface /* gcc class implementation */
#endif
diff --git a/sql/sql_olap.cc b/sql/sql_olap.cc
index 46f1e6c156e..a365cbb0614 100644
--- a/sql/sql_olap.cc
+++ b/sql/sql_olap.cc
@@ -28,7 +28,9 @@
#ifdef DISABLED_UNTIL_REWRITTEN_IN_4_1
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 0d67c25cee5..17133474190 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -2441,6 +2441,24 @@ mysql_execute_command(THD *thd)
lex->create_info.default_table_charset= lex->create_info.table_charset;
lex->create_info.table_charset= 0;
}
+ /*
+ The create-select command will open and read-lock the select table
+ and then create, open and write-lock the new table. If a global
+ read lock steps in, we get a deadlock. The write lock waits for
+ the global read lock, while the global read lock waits for the
+ select table to be closed. So we wait until the global readlock is
+ gone before starting both steps. Note that
+ wait_if_global_read_lock() sets a protection against a new global
+ read lock when it succeeds. This needs to be released by
+ start_waiting_global_read_lock(). We protect the normal CREATE
+ TABLE in the same way. That way we avoid that a new table is
+ created during a gobal read lock.
+ */
+ if (wait_if_global_read_lock(thd, 0, 1))
+ {
+ res= -1;
+ goto unsent_create_error;
+ }
if (select_lex->item_list.elements) // With select
{
select_result *result;
@@ -2491,13 +2509,17 @@ mysql_execute_command(THD *thd)
if (!res)
send_ok(thd);
}
+ /*
+ Release the protection against the global read lock and wake
+ everyone, who might want to set a global read lock.
+ */
+ start_waiting_global_read_lock(thd);
// put tables back for PS rexecuting
tables= lex->link_first_table_back(tables, create_table,
create_table_local);
break;
- res= 1; //error reported
unsent_create_error:
// put tables back for PS rexecuting
tables= lex->link_first_table_back(tables, create_table,
@@ -2821,8 +2843,8 @@ unsent_create_error:
TABLE *table= tables->table;
/* Skip first table, which is the table we are inserting in */
- lex->select_lex.table_list.first= (byte*) first_local_table->next;
- tables= (TABLE_LIST *) lex->select_lex.table_list.first;
+ select_lex->table_list.first= (byte*) first_local_table->next;
+ tables= (TABLE_LIST *) select_lex->table_list.first;
first_local_table->next= 0;
if (!(res= mysql_prepare_insert(thd, tables, first_local_table,
@@ -3670,6 +3692,14 @@ error:
thd->lock= 0;
}
DBUG_VOID_RETURN;
+
+ error1:
+ /*
+ Release the protection against the global read lock and wake
+ everyone, who might want to set a global read lock.
+ */
+ start_waiting_global_read_lock(thd);
+ DBUG_VOID_RETURN;
}
@@ -5392,6 +5422,7 @@ int multi_update_precheck(THD *thd, TABLE_LIST *tables)
1 error (message is sent to user)
-1 error (message is not sent to user)
*/
+
int multi_delete_precheck(THD *thd, TABLE_LIST *tables, uint *table_count)
{
DBUG_ENTER("multi_delete_precheck");
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index 310c2ea03cd..4249c9e1809 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -152,7 +152,8 @@ File open_binlog(IO_CACHE *log, const char *log_file_name,
File file;
DBUG_ENTER("open_binlog");
- if ((file = my_open(log_file_name, O_RDONLY | O_BINARY, MYF(MY_WME))) < 0)
+ if ((file = my_open(log_file_name, O_RDONLY | O_BINARY | O_SHARE,
+ MYF(MY_WME))) < 0)
{
sql_print_error("Failed to open log (\
file '%s', errno %d)", log_file_name, my_errno);
@@ -1338,12 +1339,11 @@ int show_binlogs(THD* thd)
{
IO_CACHE *index_file;
LOG_INFO cur;
- IO_CACHE log;
File file;
- const char *errmsg= 0;
char fname[FN_REFLEN];
List<Item> field_list;
uint length;
+ int cur_dir_len;
Protocol *protocol= thd->protocol;
DBUG_ENTER("show_binlogs");
@@ -1363,34 +1363,35 @@ int show_binlogs(THD* thd)
index_file=mysql_bin_log.get_index_file();
mysql_bin_log.get_current_log(&cur);
- int cur_dir_len = dirname_length(cur.log_file_name);
+ cur_dir_len= dirname_length(cur.log_file_name);
reinit_io_cache(index_file, READ_CACHE, (my_off_t) 0, 0, 0);
/* The file ends with EOF or empty line */
while ((length=my_b_gets(index_file, fname, sizeof(fname))) > 1)
{
- fname[--length] = '\0'; /* remove the newline */
+ int dir_len;
+ ulonglong file_length= 0; // Length if open fails
+ fname[--length] = '\0'; // remove the newline
protocol->prepare_for_resend();
- int dir_len = dirname_length(fname);
- protocol->store(fname + dir_len, length-dir_len, &my_charset_bin);
- if(!(strncmp(fname+dir_len, cur.log_file_name+cur_dir_len, length-dir_len)))
+ dir_len= dirname_length(fname);
+ length-= dir_len;
+ protocol->store(fname + dir_len, length, &my_charset_bin);
+
+ if (!(strncmp(fname+dir_len, cur.log_file_name+cur_dir_len, length)))
+ file_length= cur.pos; /* The active log, use the active position */
+ else
{
- /* this is the active log, use the active position */
- protocol->store((ulonglong) cur.pos);
- } else {
/* this is an old log, open it and find the size */
- if ((file=open_binlog(&log, fname+dir_len, &errmsg)) >= 0)
+ if ((file= my_open(fname+dir_len, O_RDONLY | O_SHARE | O_BINARY,
+ MYF(0))) >= 0)
{
- protocol->store((ulonglong) my_b_filelength(&log));
- end_io_cache(&log);
+ file_length= (ulonglong) my_seek(file, 0L, MY_SEEK_END, MYF(0));
my_close(file, MYF(0));
- } else {
- /* the file wasn't openable, but 0 is an invalid value anyway */
- protocol->store((ulonglong) 0);
}
}
+ protocol->store(file_length);
if (protocol->write())
goto err;
}
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index d53609ceaa5..9661c0c13c9 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -17,7 +17,9 @@
/* mysql_select and join optimization */
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
@@ -9164,6 +9166,76 @@ void free_underlaid_joins(THD *thd, SELECT_LEX *select)
ROLLUP handling
****************************************************************************/
+/*
+ Replace occurences of group by fields in an expression by ref items
+
+ SYNOPSIS
+ change_group_ref()
+ thd reference to the context
+ expr expression to make replacement
+ group_list list of references to group by items
+ changed out: returns 1 if item contains a replaced field item
+
+ DESCRIPTION
+ The function replaces occurrences of group by fields in expr
+ by ref objects for these fields unless they are under aggregate
+ functions.
+
+ IMPLEMENTATION
+ The function recursively traverses the tree of the expr expression,
+ looks for occurrences of the group by fields that are not under
+ aggregate functions and replaces them for the corresponding ref items.
+
+ NOTES
+ This substitution is needed GROUP BY queries with ROLLUP if
+ SELECT list contains expressions over group by attributes.
+
+ EXAMPLES
+ SELECT a+1 FROM t1 GROUP BY a WITH ROLLUP
+ SELECT SUM(a)+a FROM t1 GROUP BY a WITH ROLLUP
+
+ RETURN
+ 0 if ok
+ 1 on error
+*/
+
+static bool change_group_ref(THD *thd, Item_func *expr, ORDER *group_list,
+ bool *changed)
+{
+ if (expr->arg_count)
+ {
+ Item **arg,**arg_end;
+ for (arg= expr->arguments(),
+ arg_end= expr->arguments()+expr->arg_count;
+ arg != arg_end; arg++)
+ {
+ Item *item= *arg;
+ if (item->type() == Item::FIELD_ITEM || item->type() == Item::REF_ITEM)
+ {
+ ORDER *group_tmp;
+ for (group_tmp= group_list; group_tmp; group_tmp= group_tmp->next)
+ {
+ if (item->eq(*group_tmp->item,0))
+ {
+ Item *new_item;
+ if(!(new_item= new Item_ref(group_tmp->item, 0, item->name)))
+ return 1; // fatal_error is set
+ thd->change_item_tree(arg, new_item);
+ *changed= TRUE;
+ }
+ }
+ }
+ else if (item->type() == Item::FUNC_ITEM)
+ {
+ if (change_group_ref(thd, (Item_func *) item, group_list, changed))
+ return 1;
+ }
+ }
+ }
+ return 0;
+}
+
+
/* Allocate memory needed for other rollup functions */
bool JOIN::rollup_init()
@@ -9208,19 +9280,31 @@ bool JOIN::rollup_init()
for (j=0 ; j < fields_list.elements ; j++)
rollup.fields[i].push_back(rollup.null_items[i]);
}
- List_iterator_fast<Item> it(fields_list);
+ List_iterator_fast<Item> it(all_fields);
Item *item;
while ((item= it++))
{
ORDER *group_tmp;
for (group_tmp= group_list; group_tmp; group_tmp= group_tmp->next)
{
- if (*group_tmp->item == item)
+ if (item->eq(*group_tmp->item,0))
item->maybe_null= 1;
}
+ if (item->type() == Item::FUNC_ITEM)
+ {
+ bool changed= 0;
+ if (change_group_ref(thd, (Item_func *) item, group_list, &changed))
+ return 1;
+ /*
+ We have to prevent creation of a field in a temporary table for
+ an expression that contains GROUP BY attributes.
+ Marking the expression item as 'with_sum_func' will ensure this.
+ */
+ if (changed)
+ item->with_sum_func= 1;
+ }
}
return 0;
-
}
@@ -9318,14 +9402,14 @@ bool JOIN::rollup_make_fields(List<Item> &fields_arg, List<Item> &sel_fields,
*(*func)= (Item_sum*) item;
(*func)++;
}
- else if (real_fields)
+ else
{
/* Check if this is something that is part of this group by */
ORDER *group_tmp;
for (group_tmp= start_group, i= pos ;
group_tmp ; group_tmp= group_tmp->next, i++)
{
- if (*group_tmp->item == item)
+ if (item->eq(*group_tmp->item,0))
{
/*
This is an element that is used by the GROUP BY and should be
diff --git a/sql/sql_string.cc b/sql/sql_string.cc
index c1701e7e9bf..e5339782f02 100644
--- a/sql/sql_string.cc
+++ b/sql/sql_string.cc
@@ -16,11 +16,12 @@
/* This file is originally from the mysql distribution. Coded by monty */
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
-#include <my_global.h>
#include <my_sys.h>
#include <m_string.h>
#include <m_ctype.h>
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 67aade519f5..7e80a71beb0 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -40,6 +40,34 @@ static int copy_data_between_tables(TABLE *from,TABLE *to,
uint order_num, ORDER *order,
ha_rows *copied,ha_rows *deleted);
+
+/*
+ Build the path to a file for a table (or the base path that can
+ then have various extensions stuck on to it).
+
+ SYNOPSIS
+ build_table_path()
+ buff Buffer to build the path into
+ bufflen sizeof(buff)
+ db Name of database
+ table Name of table
+ ext Filename extension
+
+ RETURN
+ 0 Error
+ # Size of path
+ */
+
+static uint build_table_path(char *buff, size_t bufflen, const char *db,
+ const char *table, const char *ext)
+{
+ strxnmov(buff, bufflen-1, mysql_data_home, "/", db, "/", table, ext,
+ NullS);
+ return unpack_filename(buff,buff);
+}
+
+
+
/*
delete (drop) tables.
@@ -214,8 +242,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
DBUG_RETURN(-1);
alias= (lower_case_table_names == 2) ? table->alias : table->real_name;
/* remove form file and isam files */
- strxmov(path, mysql_data_home, "/", db, "/", alias, reg_ext, NullS);
- (void) unpack_filename(path,path);
+ build_table_path(path, sizeof(path), db, alias, reg_ext);
}
if (drop_temporary ||
(access(path,F_OK) && ha_create_table_from_engine(thd,db,alias,TRUE)))
@@ -295,13 +322,10 @@ int quick_rm_table(enum db_type base,const char *db,
{
char path[FN_REFLEN];
int error=0;
- my_snprintf(path, sizeof(path), "%s/%s/%s%s",
- mysql_data_home, db, table_name, reg_ext);
- unpack_filename(path,path);
+ build_table_path(path, sizeof(path), db, table_name, reg_ext);
if (my_delete(path,MYF(0)))
error=1; /* purecov: inspected */
- my_snprintf(path, sizeof(path), "%s/%s/%s", mysql_data_home, db, table_name);
- unpack_filename(path,path);
+ build_table_path(path, sizeof(path), db, table_name, "");
return ha_delete_table(base,path) || error;
}
@@ -1299,11 +1323,9 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
if (!create_info->default_table_charset)
{
HA_CREATE_INFO db_info;
- uint length;
char path[FN_REFLEN];
- strxmov(path, mysql_data_home, "/", db, NullS);
- length= unpack_dirname(path,path); // Convert if not unix
- strmov(path+length, MY_DB_OPT_FILE);
+ /* Abuse build_table_path() to build the path to the db.opt file */
+ build_table_path(path, sizeof(path), db, MY_DB_OPT_FILE, "");
load_db_opt(thd, path, &db_info);
create_info->default_table_charset= db_info.default_table_charset;
}
@@ -1317,17 +1339,18 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
/* Check if table exists */
if (create_info->options & HA_LEX_CREATE_TMP_TABLE)
{
- my_snprintf(path, sizeof(path), "%s%s%lx_%lx_%x%s",
- mysql_tmpdir, tmp_file_prefix, current_pid, thd->thread_id,
- thd->tmp_table++, reg_ext);
+ char tmp_table_name[NAME_LEN+1];
+ my_snprintf(tmp_table_name, sizeof(tmp_table_name), "%s%lx_%lx_%x",
+ tmp_file_prefix, current_pid, thd->thread_id,
+ thd->tmp_table++);
if (lower_case_table_names)
- my_casedn_str(files_charset_info, path);
+ my_casedn_str(files_charset_info, tmp_table_name);
create_info->table_options|=HA_CREATE_DELAY_KEY_WRITE;
+ build_table_path(path, sizeof(path), db, tmp_table_name, reg_ext);
}
else
- my_snprintf(path, sizeof(path), "%s/%s/%s%s", mysql_data_home, db,
- alias, reg_ext);
- unpack_filename(path,path);
+ build_table_path(path, sizeof(path), db, alias, reg_ext);
+
/* Check if table already exists */
if ((create_info->options & HA_LEX_CREATE_TMP_TABLE)
&& find_temporary_table(thd,db,table_name))
@@ -1536,7 +1559,7 @@ TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
if (!table)
DBUG_RETURN(0);
table->reginfo.lock_type=TL_WRITE;
- if (!((*lock)=mysql_lock_tables(thd,&table,1)))
+ if (! ((*lock)= mysql_lock_tables(thd, &table, 1, MYSQL_LOCK_IGNORE_FLUSH)))
{
VOID(pthread_mutex_lock(&LOCK_open));
hash_delete(&open_cache,(byte*) table);
@@ -1560,37 +1583,41 @@ mysql_rename_table(enum db_type base,
const char *new_db,
const char *new_name)
{
- char from[FN_REFLEN], to[FN_REFLEN];
- char tmp_from[NAME_LEN+1], tmp_to[NAME_LEN+1];
+ char from[FN_REFLEN], to[FN_REFLEN], lc_from[FN_REFLEN], lc_to[FN_REFLEN];
+ char *from_base= from, *to_base= to;
+ char tmp_name[NAME_LEN+1];
handler *file=get_new_handler((TABLE*) 0, base);
int error=0;
DBUG_ENTER("mysql_rename_table");
+ build_table_path(from, sizeof(from), old_db, old_name, "");
+ build_table_path(to, sizeof(to), new_db, new_name, "");
+
+ /*
+ If lower_case_table_names == 2 (case-preserving but case-insensitive
+ file system) and the storage is not HA_FILE_BASED, we need to provide
+ a lowercase file name, but we leave the .frm in mixed case.
+ */
if (lower_case_table_names == 2 && !(file->table_flags() & HA_FILE_BASED))
{
- /* Table handler expects to get all file names as lower case */
- strmov(tmp_from, old_name);
- my_casedn_str(files_charset_info, tmp_from);
- old_name= tmp_from;
+ strmov(tmp_name, old_name);
+ my_casedn_str(files_charset_info, tmp_name);
+ build_table_path(lc_from, sizeof(lc_from), old_db, tmp_name, "");
+ from_base= lc_from;
- strmov(tmp_to, new_name);
- my_casedn_str(files_charset_info, tmp_to);
- new_name= tmp_to;
+ strmov(tmp_name, new_name);
+ my_casedn_str(files_charset_info, tmp_name);
+ build_table_path(lc_to, sizeof(lc_to), new_db, tmp_name, "");
+ to_base= lc_to;
}
- my_snprintf(from, sizeof(from), "%s/%s/%s",
- mysql_data_home, old_db, old_name);
- my_snprintf(to, sizeof(to), "%s/%s/%s",
- mysql_data_home, new_db, new_name);
- fn_format(from,from,"","",4);
- fn_format(to,to, "","",4);
- if (!(error=file->rename_table((const char*) from,(const char *) to)))
+ if (!(error=file->rename_table(from_base, to_base)))
{
if (rename_file_ext(from,to,reg_ext))
{
error=my_errno;
/* Restore old file name */
- file->rename_table((const char*) to,(const char *) from);
+ file->rename_table(to_base, from_base);
}
}
delete file;
@@ -1768,8 +1795,8 @@ static int prepare_for_repair(THD* thd, TABLE_LIST *table_list,
if (!(table= table_list->table)) /* if open_ltable failed */
{
char name[FN_REFLEN];
- strxmov(name, mysql_data_home, "/", table_list->db, "/",
- table_list->real_name, NullS);
+ build_table_path(name, sizeof(name), table_list->db,
+ table_list->real_name, "");
if (openfrm(name, "", 0, 0, 0, &tmp_table))
DBUG_RETURN(0); // Can't open frm file
table= &tmp_table;
@@ -2052,6 +2079,28 @@ send_result_message:
((result_code= table->table->file->analyze(thd, check_opt)) > 0))
result_code= 0; // analyze went ok
}
+ if (result_code) // either mysql_recreate_table or analyze failed
+ {
+ const char *err_msg;
+ if ((err_msg= thd->net.last_error))
+ {
+ if (!thd->vio_ok())
+ {
+ sql_print_error(err_msg);
+ }
+ else
+ {
+ /* Hijack the row already in-progress. */
+ protocol->store("error", 5, system_charset_info);
+ protocol->store(err_msg, system_charset_info);
+ (void)protocol->write();
+ /* Start off another row for HA_ADMIN_FAILED */
+ protocol->prepare_for_resend();
+ protocol->store(table_name, system_charset_info);
+ protocol->store(operator_name, system_charset_info);
+ }
+ }
+ }
result_code= result_code ? HA_ADMIN_FAILED : HA_ADMIN_OK;
table->next= save_next;
goto send_result_message;
@@ -2570,11 +2619,10 @@ int mysql_create_indexes(THD *thd, TABLE_LIST *table_list, List<Key> &keys)
else
{
if (table->file->add_index(table, key_info_buffer, key_count)||
- (my_snprintf(path, sizeof(path), "%s/%s/%s%s", mysql_data_home,
- table_list->db, (lower_case_table_names == 2) ?
- table_list->alias: table_list->real_name, reg_ext) >=
- (int) sizeof(path)) ||
- ! unpack_filename(path, path) ||
+ build_table_path(path, sizeof(path), table_list->db,
+ (lower_case_table_names == 2) ?
+ table_list->alias : table_list->real_name,
+ reg_ext) != 0 ||
mysql_create_frm(thd, path, &create_info,
fields, key_count, key_info_buffer, table->file))
/* don't need to free((gptr) key_info_buffer);*/
@@ -2672,11 +2720,10 @@ int mysql_drop_indexes(THD *thd, TABLE_LIST *table_list,
keys, /*tmp_table*/ 0, db_options, table->file,
key_info_buffer, key_count,
/*select_field_count*/ 0)||
- (snprintf(path, sizeof(path), "%s/%s/%s%s", mysql_data_home,
- table_list->db, (lower_case_table_names == 2)?
- table_list->alias: table_list->real_name, reg_ext)>=
- (int)sizeof(path))||
- ! unpack_filename(path, path)||
+ build_table_path(path, sizeof(path), table_list->db,
+ (lower_case_table_names == 2) ?
+ table_list->alias : table_list->real_name,
+ reg_ext) != 0 ||
mysql_create_frm(thd, path, &create_info,
fields, key_count, key_info_buffer, table->file))
/*don't need to free((gptr) key_numbers);*/
@@ -3199,9 +3246,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
else
{
char path[FN_REFLEN];
- my_snprintf(path, sizeof(path), "%s/%s/%s", mysql_data_home,
- new_db, tmp_name);
- fn_format(path,path,"","",4);
+ build_table_path(path, sizeof(path), new_db, tmp_name, "");
new_table=open_temporary_table(thd, path, new_db, tmp_name,0);
}
if (!new_table)
@@ -3406,9 +3451,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
shutdown.
*/
char path[FN_REFLEN];
- my_snprintf(path, sizeof(path), "%s/%s/%s", mysql_data_home,
- new_db, table_name);
- fn_format(path,path,"","",4);
+ build_table_path(path, sizeof(path), new_db, table_name, "");
table=open_temporary_table(thd, path, new_db, tmp_name,0);
if (table)
{
diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc
index 126d2e5d894..deed806db2a 100644
--- a/sql/sql_udf.cc
+++ b/sql/sql_udf.cc
@@ -28,7 +28,9 @@
** dynamic functions, so this shouldn't be a real problem.
*/
-#ifdef __GNUC__
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: implement sql_udf.h
#endif
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index d8a2c997bf8..7585f0b10a0 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -5016,7 +5016,31 @@ simple_ident:
field_ident:
ident { $$=$1;}
- | ident '.' ident { $$=$3;} /* Skip schema name in create*/
+ | ident '.' ident '.' ident
+ {
+ TABLE_LIST *table= (TABLE_LIST*) Select->table_list.first;
+ if (my_strcasecmp(table_alias_charset, $1.str, table->db))
+ {
+ net_printf(YYTHD, ER_WRONG_DB_NAME, $1.str);
+ YYABORT;
+ }
+ if (my_strcasecmp(table_alias_charset, $3.str, table->real_name))
+ {
+ net_printf(YYTHD, ER_WRONG_TABLE_NAME, $3.str);
+ YYABORT;
+ }
+ $$=$5;
+ }
+ | ident '.' ident
+ {
+ TABLE_LIST *table= (TABLE_LIST*) Select->table_list.first;
+ if (my_strcasecmp(table_alias_charset, $1.str, table->alias))
+ {
+ net_printf(YYTHD, ER_WRONG_TABLE_NAME, $1.str);
+ YYABORT;
+ }
+ $$=$3;
+ }
| '.' ident { $$=$2;} /* For Delphi */;
table_ident:
diff --git a/sql/tztime.cc b/sql/tztime.cc
index c45271966f9..30ff25f080f 100644
--- a/sql/tztime.cc
+++ b/sql/tztime.cc
@@ -20,18 +20,20 @@
(We will refer to this code as to elsie-code further.)
*/
-#ifdef __GNUC__
-#pragma implementation // gcc: Class implementation
-#endif
-
/*
We should not include mysql_priv.h in mysql_tzinfo_to_sql utility since
it creates unsolved link dependencies on some platforms.
*/
+
+#include <my_global.h>
+
+#ifdef USE_PRAGMA_IMPLEMENTATION
+#pragma implementation // gcc: Class implementation
+#endif
+
#if !defined(TZINFO2SQL) && !defined(TESTTIME)
#include "mysql_priv.h"
#else
-#include <my_global.h>
#include <my_time.h>
#include "tztime.h"
#include <my_sys.h>
diff --git a/support-files/mysql-max.spec.sh b/support-files/mysql-max.spec.sh
deleted file mode 100644
index 5c4b16f0e9d..00000000000
--- a/support-files/mysql-max.spec.sh
+++ /dev/null
@@ -1,263 +0,0 @@
-%define mysql_version @VERSION@
-%define shared_lib_version @SHARED_LIB_VERSION@
-%define release 2
-%define mysqld_user mysql
-
-%define see_base For a description of MySQL see the base MySQL RPM or http://www.mysql.com
-
-Name: MySQL
-Summary: MySQL: a very fast and reliable SQL database engine
-Group: Applications/Databases
-Summary(pt_BR): MySQL: Um servidor SQL rápido e confiável.
-Group(pt_BR): Aplicações/Banco_de_Dados
-Version: @MYSQL_NO_DASH_VERSION@
-Release: %{release}
-Copyright: GPL / LGPL
-Source: http://www.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/mysql-%{mysql_version}.tar.gz
-Icon: mysql.gif
-URL: http://www.mysql.com/
-Packager: David Axmark <david@mysql.com>, Monty <monty@mysql.com>
-Provides: msqlormysql MySQL-server
-Obsoletes: mysql
-
-# Think about what you use here since the first step is to
-# run a rm -rf
-BuildRoot: /var/tmp/mysql-max
-
-# From the manual
-%description
-MySQL is a true multi-user, multi-threaded SQL (Structured Query
-Language) database server. MySQL is a client/server implementation
-that consists of a server daemon (mysqld) and many different client
-programs/libraries.
-
-The main goals of MySQL are speed, robustness and ease of use. MySQL
-was originally developed because we needed a SQL server that could
-handle very big databases with magnitude higher speed than what any
-database vendor could offer to us. And since we did not need all the
-features that made their server slow we made our own. We have now been
-using MySQL since 1996 in a environment with more than 40 databases,
-10,000 tables, of which more than 500 have more than 7 million
-rows. This is about 200G of data.
-
-The base upon which MySQL is built is a set of routines that have been
-used in a highly demanding production environment for many
-years. While MySQL is still in development, it already offers a rich
-and highly useful function set.
-
-The MySQL-max version differs from the normal MySQL server distribution
-in that the BDB and Innobase table handlers are enabled by default.
-You can use any normal MySQL client with the MySQL-max server.
-
-See the documentation for more information.
-
-%description -l pt_BR
-O MySQL é um servidor de banco de dados SQL realmente multiusuário e\
-multi-tarefa. A linguagem SQL é a mais popular linguagem para banco de\
-dados no mundo. O MySQL é uma implementação cliente/servidor que\
-consiste de um servidor chamado mysqld e diversos\
-programas/bibliotecas clientes. Os principais objetivos do MySQL são:\
-velocidade, robustez e facilidade de uso. O MySQL foi originalmente\
-desenvolvido porque nós na Tcx precisávamos de um servidor SQL que\
-pudesse lidar com grandes bases de dados e com uma velocidade muito\
-maior do que a que qualquer vendedor podia nos oferecer. Estamos\
-usando\
-o MySQL desde 1996 em um ambiente com mais de 40 bases de dados com 10.000\
-tabelas, das quais mais de 500 têm mais de 7 milhões de linhas. Isto é o\
-equivalente a aproximadamente 50G de dados críticos. A base da construção do\
-MySQL é uma série de rotinas que foram usadas em um ambiente de produção com\
-alta demanda por muitos anos. Mesmo o MySQL estando ainda em desenvolvimento,\
-ele já oferece um conjunto de funções muito ricas e úteis. Veja a documentação\
-para maiores informações.
-
-%prep
-%setup -n mysql-max-%{mysql_version}
-# %setup -T -D -a 1 -n mysql-max-%{mysql_version}
-
-%build
-# The all-static flag is to make the RPM work on different
-# distributions. This version tries to put shared mysqlclient libraries
-# in a separate package.
-
-BuildMySQL() {
-# The --enable-assembler simply does nothing on systems that does not
-# support assembler speedups.
-sh -c "PATH=\"${MYSQL_BUILD_PATH:-/bin:/usr/bin}\" \
- CC=\"${MYSQL_BUILD_CC:-egcs}\" \
- CFLAGS=\"${MYSQL_BUILD_CFLAGS:- -O6 -fno-omit-frame-pointer}\" \
- CXX=\"${MYSQL_BUILD_CXX:-egcs}\" \
- CXXFLAGS=\"${MYSQL_BUILD_CXXFLAGS:- -O6 \
- -felide-constructors -fno-exceptions -fno-rtti \
- -fno-omit-frame-pointer}\" \
- ./configure \
- $* \
- --enable-assembler \
- --with-mysqld-user=%{mysqld_user} \
- --with-unix-socket-path=/var/lib/mysql/mysql.sock \
- --prefix=/ \
- --with-extra-charsets=complex \
- --exec-prefix=/usr \
- --libexecdir=/usr/sbin \
- --sysconfdir=/etc \
- --datadir=/usr/share \
- --localstatedir=/var/lib/mysql \
- --infodir=/usr/info \
- --includedir=/usr/include \
- --mandir=/usr/man \
- --with-berkeley-db \
- --with-innodb \
- --with-comment=\"Official MySQL-Max RPM\";
- # Add this for more debugging support
- # --with-debug
- # Add this for MyISAM RAID support:
- # --with-raid
- "
- make
-}
-
-# Use the build root for temporary storage of the shared libraries.
-
-RBR=$RPM_BUILD_ROOT
-MBD=$RPM_BUILD_DIR/mysql-max-%{mysql_version}
-if test -z "$RBR" -o "$RBR" = "/"
-then
- echo "RPM_BUILD_ROOT has stupid value"
- exit 1
-fi
-rm -rf $RBR
-mkdir -p $RBR
-
-#cd $MBD/db-%{db_version}/dist
-#./configure --prefix=$RBR/usr/BDB
-#make install
-#
-#echo $RBR $MBD
-#cd $MBD
-
-BuildMySQL "--disable-shared" \
- "--with-mysqld-ldflags='-all-static'" \
- "--with-client-ldflags='-all-static'"
-
-%install -n mysql-max-%{mysql_version}
-RBR=$RPM_BUILD_ROOT
-MBD=$RPM_BUILD_DIR/mysql-max-%{mysql_version}
-# Ensure that needed directories exists
-install -d $RBR/etc/{logrotate.d,rc.d/init.d}
-install -d $RBR/var/lib/mysql/mysql
-install -d $RBR/usr/share/sql-bench
-install -d $RBR/usr/share/mysql-test
-install -d $RBR/usr/{sbin,share,man,include}
-install -d $RBR/usr/doc/MySQL-%{mysql_version}
-install -d $RBR/usr/lib
-# Make install
-make install DESTDIR=$RBR benchdir_root=/usr/share/
-
-# Install logrotate and autostart
-install -m644 $MBD/support-files/mysql-log-rotate $RBR/etc/logrotate.d/mysql
-install -m755 $MBD/support-files/mysql.server $RBR/etc/rc.d/init.d/mysql
-
-# Install docs
-install -m644 $RPM_BUILD_DIR/mysql-max-%{mysql_version}/Docs/mysql.info \
- $RBR/usr/info/mysql.info
-for file in README COPYING COPYING.LIB Docs/manual_toc.html Docs/manual.html \
- Docs/manual.txt Docs/manual.texi Docs/manual.ps \
- support-files/my-huge.cnf support-files/my-large.cnf \
- support-files/my-medium.cnf support-files/my-small.cnf
-do
- b=`basename $file`
- install -m644 $MBD/$file $RBR/usr/doc/MySQL-%{mysql_version}/$b
-done
-
-%pre
-if test -x /etc/rc.d/init.d/mysql
-then
- /etc/rc.d/init.d/mysql stop > /dev/null 2>&1
- echo "Giving mysqld a couple of seconds to exit nicely"
- sleep 5
-fi
-
-%post
-mysql_datadir=/var/lib/mysql
-
-# Create data directory if needed
-if test ! -d $mysql_datadir; then mkdir $mysql_datadir; fi
-if test ! -d $mysql_datadir/mysql; then mkdir $mysql_datadir/mysql; fi
-if test ! -d $mysql_datadir/test; then mkdir $mysql_datadir/test; fi
-
-# Make MySQL start/shutdown automatically when the machine does it.
-/sbin/chkconfig --add mysql
-
-# Create a MySQL user. Do not report any problems if it already
-# exists. This is redhat specific and should be handled more portable
-useradd -M -r -d $mysql_datadir -s /bin/bash -c "MySQL server" mysql 2> /dev/null || true
-
-# Change permissions so that the user that will run the MySQL daemon
-# owns all database files.
-chown -R mysql $mysql_datadir
-
-# Initiate databases
-mysql_install_db -IN-RPM
-
-# Change permissions again to fix any new files.
-chown -R mysql $mysql_datadir
-
-# Fix permissions for the permission database so that only the user
-# can read them.
-chmod -R og-rw $mysql_datadir/mysql
-
-# Restart in the same way that mysqld will be started normally.
-/etc/rc.d/init.d/mysql start
-
-# Allow mysqld_safe to start mysqld and print a message before we exit
-sleep 2
-
-%preun
-if test -x /etc/rc.d/init.d/mysql
-then
- /etc/rc.d/init.d/mysql stop > /dev/null
-fi
-# Remove autostart of mysql
-if test $1 = 0
-then
- /sbin/chkconfig --del mysql
-fi
-# We do not remove the mysql user since it may still own a lot of
-# database files.
-
-%files
-%attr(-, root, root) %doc /usr/doc/MySQL-%{mysql_version}/
-
-%attr(755, root, root) /usr/bin/isamchk
-%attr(755, root, root) /usr/bin/isamlog
-%attr(755, root, root) /usr/bin/pack_isam
-%attr(755, root, root) /usr/bin/myisamchk
-%attr(755, root, root) /usr/bin/myisamlog
-%attr(755, root, root) /usr/bin/myisampack
-%attr(755, root, root) /usr/bin/mysql_fix_privilege_tables
-%attr(755, root, root) /usr/bin/mysql_convert_table_format
-%attr(755, root, root) /usr/bin/mysql_install_db
-%attr(755, root, root) /usr/bin/mysql_setpermission
-%attr(755, root, root) /usr/bin/mysql_zap
-%attr(755, root, root) /usr/bin/mysqlbug
-%attr(755, root, root) /usr/bin/mysqltest
-%attr(755, root, root) /usr/bin/mysqlhotcopy
-%attr(755, root, root) /usr/bin/perror
-%attr(755, root, root) /usr/bin/replace
-%attr(755, root, root) /usr/bin/resolveip
-%attr(755, root, root) /usr/bin/mysqld_safe
-%attr(755, root, root) /usr/bin/mysqld_multi
-%attr(755, root, root) /usr/bin/my_print_defaults
-
-%attr(644, root, root) /usr/info/mysql.info*
-
-%attr(755, root, root) /usr/sbin/mysqld
-
-%attr(644, root, root) /etc/logrotate.d/mysql
-%attr(755, root, root) /etc/rc.d/init.d/mysql
-
-%attr(755, root, root) /usr/share/mysql/
-
-%changelog
-
-* Fri Apr 13 2001 Monty
- First version of mysql-max.spec.sh based on mysql.spec.sh
diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh
index 1de315b6458..d023dfa980a 100644
--- a/support-files/mysql.spec.sh
+++ b/support-files/mysql.spec.sh
@@ -16,8 +16,8 @@
Name: MySQL
Summary: MySQL: a very fast and reliable SQL database server
Group: Applications/Databases
-Summary(pt_BR): MySQL: Um servidor SQL rápido e confiável.
-Group(pt_BR): Aplicações/Banco_de_Dados
+Summary(pt_BR): MySQL: Um servidor SQL rápido e confiável.
+Group(pt_BR): Aplicações/Banco_de_Dados
Version: @MYSQL_NO_DASH_VERSION@
Release: %{release}
License: GPL
@@ -57,8 +57,8 @@ documentation and the manual for more information.
Release: %{release}
Summary: MySQL: a very fast and reliable SQL database server
Group: Applications/Databases
-Summary(pt_BR): MySQL: Um servidor SQL rápido e confiável.
-Group(pt_BR): Aplicações/Banco_de_Dados
+Summary(pt_BR): MySQL: Um servidor SQL rápido e confiável.
+Group(pt_BR): Aplicações/Banco_de_Dados
Requires: fileutils sh-utils
Provides: msqlormysql mysql-server mysql MySQL
Obsoletes: MySQL mysql mysql-server
@@ -92,7 +92,7 @@ Release: %{release}
Summary: MySQL - Client
Group: Applications/Databases
Summary(pt_BR): MySQL - Cliente
-Group(pt_BR): Aplicações/Banco_de_Dados
+Group(pt_BR): Aplicações/Banco_de_Dados
Obsoletes: mysql-client
Provides: mysql-client
@@ -102,7 +102,7 @@ This package contains the standard MySQL clients and administration tools.
%{see_base}
%description client -l pt_BR
-Este pacote contém os clientes padrão para o MySQL.
+Este pacote contém os clientes padrão para o MySQL.
%package ndb-storage
Release: %{release}
@@ -156,8 +156,8 @@ Release: %{release}
Requires: %{name}-client perl-DBI perl
Summary: MySQL - Benchmarks and test system
Group: Applications/Databases
-Summary(pt_BR): MySQL - Medições de desempenho
-Group(pt_BR): Aplicações/Banco_de_Dados
+Summary(pt_BR): MySQL - Medições de desempenho
+Group(pt_BR): Aplicações/Banco_de_Dados
Provides: mysql-bench
Obsoletes: mysql-bench
@@ -167,14 +167,14 @@ This package contains MySQL benchmark scripts and data.
%{see_base}
%description bench -l pt_BR
-Este pacote contém medições de desempenho de scripts e dados do MySQL.
+Este pacote contém medições de desempenho de scripts e dados do MySQL.
%package devel
Release: %{release}
Summary: MySQL - Development header files and libraries
Group: Applications/Databases
-Summary(pt_BR): MySQL - Medições de desempenho
-Group(pt_BR): Aplicações/Banco_de_Dados
+Summary(pt_BR): MySQL - Medições de desempenho
+Group(pt_BR): Aplicações/Banco_de_Dados
Provides: mysql-devel
Obsoletes: mysql-devel
@@ -185,8 +185,8 @@ necessary to develop MySQL client applications.
%{see_base}
%description devel -l pt_BR
-Este pacote contém os arquivos de cabeçalho (header files) e bibliotecas
-necessárias para desenvolver aplicações clientes do MySQL.
+Este pacote contém os arquivos de cabeçalho (header files) e bibliotecas
+necessárias para desenvolver aplicações clientes do MySQL.
%package shared
Release: %{release}
@@ -226,8 +226,8 @@ Release: %{release}
Requires: %{name}-devel
Summary: MySQL - embedded library
Group: Applications/Databases
-Summary(pt_BR): MySQL - Medições de desempenho
-Group(pt_BR): Aplicações/Banco_de_Dados
+Summary(pt_BR): MySQL - Medições de desempenho
+Group(pt_BR): Aplicações/Banco_de_Dados
Obsoletes: mysql-embedded
%description embedded
@@ -364,6 +364,9 @@ fi
(cd libmysql/.libs; tar cf $RBR/shared-libs.tar *.so*)
(cd libmysql_r/.libs; tar rf $RBR/shared-libs.tar *.so*)
+# Now clean up
+make clean
+
#
# Only link statically on our i386 build host (which has a specially
# patched static glibc installed) - ia64 and x86_64 run glibc-2.3 (unpatched)
@@ -689,6 +692,10 @@ fi
# itself - note that they must be ordered by date (important when
# merging BK trees)
%changelog
+* Wed May 25 2005 Joerg Bruehe <joerg@mysql.com>
+
+- Added a "make clean" between separate calls to "BuildMySQL".
+
* Wed Apr 20 2005 Lenz Grimmer <lenz@mysql.com>
- Enabled the "blackhole" storage engine for the Max RPM
diff --git a/vio/viossl.c b/vio/viossl.c
index 773d444063b..043d23f0238 100644
--- a/vio/viossl.c
+++ b/vio/viossl.c
@@ -128,26 +128,32 @@ int vio_ssl_write(Vio * vio, const gptr buf, int size)
int vio_ssl_fastsend(Vio * vio __attribute__((unused)))
{
- int r= 0;
+ int r=0;
DBUG_ENTER("vio_ssl_fastsend");
-#ifdef IPTOS_THROUGHPUT
+#if defined(IPTOS_THROUGHPUT) && !defined(__EMX__)
{
-#ifndef __EMX__
- int tos = IPTOS_THROUGHPUT;
- if (!setsockopt(vio->sd, IPPROTO_IP, IP_TOS, (void *) &tos, sizeof(tos)))
-#endif /* !__EMX__ */
- {
- int nodelay = 1;
- if (setsockopt(vio->sd, IPPROTO_TCP, TCP_NODELAY, (void *) &nodelay,
- sizeof(nodelay))) {
- DBUG_PRINT("warning",
- ("Couldn't set socket option for fast send"));
- r= -1;
- }
- }
+ int tos= IPTOS_THROUGHPUT;
+ r= setsockopt(vio->sd, IPPROTO_IP, IP_TOS, (void *) &tos, sizeof(tos));
+ }
+#endif /* IPTOS_THROUGHPUT && !__EMX__ */
+ if (!r)
+ {
+#ifdef __WIN__
+ BOOL nodelay= 1;
+ r= setsockopt(vio->sd, IPPROTO_TCP, TCP_NODELAY, (const char*) &nodelay,
+ sizeof(nodelay));
+#else
+ int nodelay= 1;
+ r= setsockopt(vio->sd, IPPROTO_TCP, TCP_NODELAY, (void*) &nodelay,
+ sizeof(nodelay));
+#endif /* __WIN__ */
+ }
+ if (r)
+ {
+ DBUG_PRINT("warning", ("Couldn't set socket option for fast send"));
+ r= -1;
}
-#endif /* IPTOS_THROUGHPUT */
DBUG_PRINT("exit", ("%d", r));
DBUG_RETURN(r);
}
@@ -424,6 +430,11 @@ void vio_ssl_timeout(Vio *vio __attribute__((unused)),
uint which __attribute__((unused)),
uint timeout __attribute__((unused)))
{
- /* Not yet implemented (non critical) */
+#ifdef __WIN__
+ ulong wait_timeout= (ulong) timeout * 1000;
+ (void) setsockopt(vio->sd, SOL_SOCKET,
+ which ? SO_SNDTIMEO : SO_RCVTIMEO, (char*) &wait_timeout,
+ sizeof(wait_timeout));
+#endif /* __WIN__ */
}
#endif /* HAVE_OPENSSL */