diff --git a/CMakeLists.txt b/CMakeLists.txt index d64ea3df488..7107a112f19 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,18 +108,18 @@ SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -DDBUG_OFF") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4800 /wd4805") -IF(CMAKE_GENERATOR MATCHES "Visual Studio 8") +# Disable warnings in Visual Studio 8 and above +IF(MSVC AND NOT CMAKE_GENERATOR MATCHES "Visual Studio 7") SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /wd4996") SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /wd4996") SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /wd4996") SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /wd4996") SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /wd4996") SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /wd4996") -ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 8") - -IF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR - CMAKE_GENERATOR MATCHES "Visual Studio 8") +ENDIF(MSVC AND NOT CMAKE_GENERATOR MATCHES "Visual Studio 7") +# Settings for Visual Studio 7 and above. +IF(MSVC) # replace /MDd with /MTd STRING(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE}) STRING(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO}) @@ -149,9 +149,7 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR IF(NOT tmp_manifest) SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO") ENDIF(NOT tmp_manifest) - -ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR - CMAKE_GENERATOR MATCHES "Visual Studio 8") +ENDIF(MSVC) IF(WIN32) ADD_DEFINITIONS("-D_WINDOWS -D__WIN__ -D_CRT_SECURE_NO_DEPRECATE") diff --git a/configure.in b/configure.in index 7365ddd9b66..7190965aebc 100644 --- a/configure.in +++ b/configure.in @@ -10,7 +10,7 @@ AC_CANONICAL_SYSTEM # # When changing major version number please also check switch statement # in mysqlbinlog::check_master_version(). -AM_INIT_AUTOMAKE(mysql, 5.1.29) +AM_INIT_AUTOMAKE(mysql, 5.1.30) AM_CONFIG_HEADER([include/config.h:config.h.in]) PROTOCOL_VERSION=10 diff --git a/extra/yassl/Makefile.am b/extra/yassl/Makefile.am index 1c0e13c511a..ddd57d60a99 100644 --- a/extra/yassl/Makefile.am +++ b/extra/yassl/Makefile.am @@ -1,6 +1,5 @@ SUBDIRS = taocrypt src testsuite -EXTRA_DIST = yassl.dsp yassl.dsw yassl.vcproj \ - CMakeLists.txt +EXTRA_DIST = CMakeLists.txt # Don't update the files from bitkeeper %::SCCS/s.% diff --git a/extra/yassl/taocrypt/Makefile.am b/extra/yassl/taocrypt/Makefile.am index ac56cfdcf09..11fea2064f0 100644 --- a/extra/yassl/taocrypt/Makefile.am +++ b/extra/yassl/taocrypt/Makefile.am @@ -1,5 +1,5 @@ SUBDIRS = src test benchmark -EXTRA_DIST = taocrypt.dsw taocrypt.dsp taocrypt.vcproj CMakeLists.txt $(wildcard mySTL/*.hpp) +EXTRA_DIST = CMakeLists.txt $(wildcard mySTL/*.hpp) # Don't update the files from bitkeeper %::SCCS/s.% diff --git a/extra/yassl/taocrypt/taocrypt.vcproj b/extra/yassl/taocrypt/taocrypt.vcproj deleted file mode 100755 index bcbc0f82192..00000000000 --- a/extra/yassl/taocrypt/taocrypt.vcproj +++ /dev/null @@ -1,268 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extra/yassl/yassl.vcproj b/extra/yassl/yassl.vcproj deleted file mode 100755 index bc020747096..00000000000 --- a/extra/yassl/yassl.vcproj +++ /dev/null @@ -1,211 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/libmysql/dll.c b/libmysql/dll.c index 7aa3b5bf96f..8fcf41c792c 100644 --- a/libmysql/dll.c +++ b/libmysql/dll.c @@ -89,9 +89,20 @@ BOOL APIENTRY LibMain(HANDLE hInst,DWORD ul_reason_being_called, UNREFERENCED_PARAMETER(lpReserved); } /* LibMain */ + +static BOOL do_libmain; int __stdcall DllMain(HANDLE hInst,DWORD ul_reason_being_called,LPVOID lpReserved) { - return LibMain(hInst,ul_reason_being_called,lpReserved); + /* + Unless environment variable LIBMYSQL_DLLINIT is set, do nothing. + The environment variable is checked once, during the first call to DllMain() + (in DLL_PROCESS_ATTACH hook). + */ + if (ul_reason_being_called == DLL_PROCESS_ATTACH) + do_libmain = (getenv("LIBMYSQL_DLLINIT") != NULL); + if (do_libmain) + return LibMain(hInst,ul_reason_being_called,lpReserved); + return TRUE; } #elif defined(WINDOWS) diff --git a/mysql-test/extra/rpl_tests/rpl_ddl.test b/mysql-test/extra/rpl_tests/rpl_ddl.test index e40532f005f..f1064dc268f 100644 --- a/mysql-test/extra/rpl_tests/rpl_ddl.test +++ b/mysql-test/extra/rpl_tests/rpl_ddl.test @@ -151,6 +151,20 @@ DROP DATABASE IF EXISTS mysqltest3; CREATE DATABASE mysqltest1; CREATE DATABASE mysqltest2; eval CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE=$engine_type; +# Prevent Bug#26687 rpl_ddl test fails if run with --innodb option +# The testscript (suite/rpl/rpl_ddl.test) + the expected result need that the +# slave uses MyISAM for the table mysqltest.t1. +# This is not valid in case of suite/rpl_ndb/rpl_ndb_ddl.test which sources +# also this script. +sync_slave_with_master; +connection slave; +if (`SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES + WHERE TABLE_SCHEMA = 'mysqltest1' AND TABLE_NAME = 't1' + AND ENGINE <> 'MyISAM' AND '$engine_type' <> 'NDB'`) +{ + skip This test needs on slave side: InnoDB disabled, default engine: MyISAM; +} +connection master; INSERT INTO mysqltest1.t1 SET f1= 0; eval CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE=$engine_type; eval CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE=$engine_type; diff --git a/mysql-test/extra/rpl_tests/rpl_log.test b/mysql-test/extra/rpl_tests/rpl_log.test index 078d3d4557d..60ffab316cf 100644 --- a/mysql-test/extra/rpl_tests/rpl_log.test +++ b/mysql-test/extra/rpl_tests/rpl_log.test @@ -13,22 +13,15 @@ save_master_pos; connection slave; sync_with_master; stop slave; +--source include/wait_for_slave_to_stop.inc reset master; reset slave; -# We are going to read the slave's binlog which contains file_id (for some LOAD -# DATA INFILE); to make it repeatable (not influenced by other tests), we need -# to stop and start the slave, to be sure file_id will start from 1. -# This can be done with 'server_stop slave', but -# this would require the manager, so most of the time the test will be skipped -# :( -# To workaround this, I (Guilhem) add a (empty) rpl_log-slave.opt (because when -# mysql-test-run finds such a file it restarts the slave before doing the -# test). That's not very elegant but I could find no better way, sorry. +start slave; +--source include/wait_for_slave_to_start.inc let $VERSION=`select version()`; connection master; -reset master; eval create table t1(n int not null auto_increment primary key)ENGINE=$engine_type; insert into t1 values (NULL); drop table t1; @@ -79,7 +72,6 @@ connection slave; # Note that the above 'slave start' will cause a 3rd rotate event (a fake one) # to go into the relay log (the master always sends a fake one when replication # starts). -start slave; let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%'; --source include/wait_slave_status.inc sync_with_master; @@ -87,6 +79,7 @@ sync_with_master; select * from t1 order by 1 asc; flush logs; stop slave; +--source include/wait_for_slave_to_stop.inc connection master; # Create some entries for second log @@ -95,6 +88,7 @@ eval create table t2 (n int)ENGINE=$engine_type; insert into t2 values (1); source include/show_binlog_events.inc; --replace_result $VERSION VERSION +--replace_regex /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/ /infile '.+'/infile 'words.dat'/ --replace_column 2 # 5 # --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ show binlog events in 'master-bin.000002'; @@ -102,10 +96,12 @@ show binary logs; save_master_pos; connection slave; start slave; +--source include/wait_for_slave_to_start.inc sync_with_master; show binary logs; --replace_result $MASTER_MYPORT MASTER_PORT $VERSION VERSION --replace_column 2 # 5 # +--replace_regex /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/ /INFILE '.+'/INFILE 'words.dat'/ --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ show binlog events in 'slave-bin.000001' from 4; --replace_result $MASTER_MYPORT MASTER_PORT $VERSION VERSION diff --git a/mysql-test/include/wait_for_slave_sql_error_and_skip.inc b/mysql-test/include/wait_for_slave_sql_error_and_skip.inc index ef17ffed12f..4b4776d2923 100644 --- a/mysql-test/include/wait_for_slave_sql_error_and_skip.inc +++ b/mysql-test/include/wait_for_slave_sql_error_and_skip.inc @@ -17,6 +17,9 @@ if ($show_sql_error) echo Last_SQL_Error = $error; } +# wait for SQL thread to stop after the error +source include/wait_for_slave_sql_to_stop.inc; + # skip the erroneous statement set global sql_slave_skip_counter=1; start slave; diff --git a/mysql-test/r/skip_log_bin.result b/mysql-test/r/skip_log_bin.result new file mode 100644 index 00000000000..2fdd88ff526 --- /dev/null +++ b/mysql-test/r/skip_log_bin.result @@ -0,0 +1,6 @@ +DROP TABLE IF EXISTS t1, t2; +set @@session.binlog_format=row; +create table t1 (a int); +insert into t1 values (1); +create table t2 select * from t1; +drop table t1, t2; diff --git a/mysql-test/suite/funcs_1/datadict/processlist_priv.inc b/mysql-test/suite/funcs_1/datadict/processlist_priv.inc index 66c43c750fd..d8e1b398bfc 100644 --- a/mysql-test/suite/funcs_1/datadict/processlist_priv.inc +++ b/mysql-test/suite/funcs_1/datadict/processlist_priv.inc @@ -16,7 +16,7 @@ # That means our SHOW PROCESSLIST can come too early. # # Solution: # # Close the connections at the end of the test. # -# Example2: # +# Example2 (2008-08-14 again observed): # # 1. connection X: SHOW PROCESSLIST/GRANT ... etc. # # 2. Switch to connection Y # # 3. SHOW PROCESSLIST might present a record like # @@ -53,9 +53,11 @@ # WL#3982 Test information_schema.processlist # # # # Last update: # -# 2008-04-14 pcrews replace HOST to account for Windows' use of # -# localhost (host: causing diffs on Windows # -# test runs # +# 2008-08-14 mleich Bug#38270 Test "processlist_priv_ps" fails on # +# varying "processlist" output # +# - Replace one sleep by a poll routines # +# - Remove or disable superfluous sleeps # +# # ######################################################################## # The following variables are used in "datadict_priv.inc" and here. @@ -87,15 +89,28 @@ USE information_schema; --echo 1 Prepare test. --echo connection default (user=root) --echo #################################################################################### +if (`SELECT COUNT(*) <> 1 FROM processlist`) +{ + --echo This test expects one connection to the server. + --echo Expectation: USER HOST DB COMMAND STATE INFO + --echo Expectation: root localhost information_schema Query executing SELECT USER,HOST,DB,COMMAND,STATE,INFO FROM processlist ORDER BY ID + --echo But we found in the moment: + SELECT USER,HOST,DB,COMMAND,STATE,INFO FROM processlist ORDER BY ID; + --echo Maybe + --echo - the base configuration (no of parallel auxiliary sessions) of the server has changed + --echo - a parallel test intended for another server accidently connected to our current one + --echo We cannot proceed in this situation. Abort + exit; +} --echo #################################################################################### --echo 1.1 Create two user --echo #################################################################################### # access to info tables as normal user ---disable_abort_on_error +--error 0, ER_CANNOT_USER DROP USER ddicttestuser1@'localhost'; +--error 0, ER_CANNOT_USER DROP USER ddicttestuser2@'localhost'; ---enable_abort_on_error CREATE USER ddicttestuser1@'localhost'; CREATE USER ddicttestuser2@'localhost'; SET PASSWORD FOR ddicttestuser1@'localhost' = PASSWORD('ddictpass'); @@ -112,6 +127,14 @@ connect (con100,localhost,ddicttestuser1,ddictpass,information_schema); --echo SHOW/SELECT shows all processes/threads. --echo #################################################################################### connection default; +# Avoid Bug#38270 Test "processlist_priv_ps" fails on varying "processlist" output +# This subtest expects that the connection con100 is in state 'Sleep'. +# Poll till the connection con100 is in state COMMAND = 'Sleep'. +let $wait_timeout= 10; +let $wait_condition= +SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST +WHERE DB = 'information_schema' AND COMMAND = 'Sleep' AND USER = 'ddicttestuser1'; +--source include/wait_condition.inc eval SHOW CREATE TABLE $table; --replace_column 1 ID 3 HOST_NAME 6 TIME eval SHOW $table; @@ -120,7 +143,6 @@ eval SELECT * FROM $table $select_where ORDER BY id; --replace_column 1 ID 3 HOST_NAME 6 TIME eval SELECT $columns FROM $table $select_where ORDER BY id; --source suite/funcs_1/datadict/datadict_priv.inc ---real_sleep 0.3 --echo #################################################################################### @@ -128,6 +150,9 @@ eval SELECT $columns FROM $table $select_where ORDER BY id; connection con100; --echo SHOW/SELECT shows only the processes (1) of the user. --echo #################################################################################### +# No need for poll routine here. +# The current state of the default session might depend on load of testing box +# but "ddicttestuser1" must not see anything of the root session. eval SHOW CREATE TABLE $table; --replace_column 1 ID 3 HOST_NAME 6 TIME eval SHOW $table; @@ -219,7 +244,7 @@ SELECT * FROM information_schema.processlist; --echo #################################################################################### ---echo 7 Revoke PROCESS privilege from anonymous user + disconnect ddicttestuser1 +--echo 7 Revoke PROCESS privilege from anonymous user --echo connection default (user=root) --echo #################################################################################### connection default; diff --git a/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result b/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result index e24dae61f17..d862b7424e0 100644 --- a/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result +++ b/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result @@ -7,9 +7,7 @@ connection default (user=root) 1.1 Create two user #################################################################################### DROP USER ddicttestuser1@'localhost'; -ERROR HY000: Operation DROP USER failed for 'ddicttestuser1'@'localhost' DROP USER ddicttestuser2@'localhost'; -ERROR HY000: Operation DROP USER failed for 'ddicttestuser2'@'localhost' CREATE USER ddicttestuser1@'localhost'; CREATE USER ddicttestuser2@'localhost'; SET PASSWORD FOR ddicttestuser1@'localhost' = PASSWORD('ddictpass'); @@ -240,7 +238,7 @@ ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FRO ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL #################################################################################### -7 Revoke PROCESS privilege from anonymous user + disconnect ddicttestuser1 +7 Revoke PROCESS privilege from anonymous user connection default (user=root) #################################################################################### REVOKE PROCESS ON *.* FROM ''@'localhost'; diff --git a/mysql-test/suite/funcs_1/r/processlist_priv_ps.result b/mysql-test/suite/funcs_1/r/processlist_priv_ps.result index 8ec9fad75e1..56230a0f806 100644 --- a/mysql-test/suite/funcs_1/r/processlist_priv_ps.result +++ b/mysql-test/suite/funcs_1/r/processlist_priv_ps.result @@ -7,9 +7,7 @@ connection default (user=root) 1.1 Create two user #################################################################################### DROP USER ddicttestuser1@'localhost'; -ERROR HY000: Operation DROP USER failed for 'ddicttestuser1'@'localhost' DROP USER ddicttestuser2@'localhost'; -ERROR HY000: Operation DROP USER failed for 'ddicttestuser2'@'localhost' CREATE USER ddicttestuser1@'localhost'; CREATE USER ddicttestuser2@'localhost'; SET PASSWORD FOR ddicttestuser1@'localhost' = PASSWORD('ddictpass'); @@ -240,7 +238,7 @@ ID ddicttestuser1 HOST_NAME information_schema Execute TIME executing SELECT * F ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL #################################################################################### -7 Revoke PROCESS privilege from anonymous user + disconnect ddicttestuser1 +7 Revoke PROCESS privilege from anonymous user connection default (user=root) #################################################################################### REVOKE PROCESS ON *.* FROM ''@'localhost'; diff --git a/mysql-test/suite/rpl/r/rpl_row_log.result b/mysql-test/suite/rpl/r/rpl_row_log.result index af46d6af9c1..c0d70bb0cdd 100644 --- a/mysql-test/suite/rpl/r/rpl_row_log.result +++ b/mysql-test/suite/rpl/r/rpl_row_log.result @@ -7,7 +7,7 @@ start slave; stop slave; reset master; reset slave; -reset master; +start slave; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM; insert into t1 values (NULL); drop table t1; @@ -113,7 +113,6 @@ Aberdeen Abernathy aberrant aberration -start slave; let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%' ; diff --git a/mysql-test/suite/rpl/r/rpl_row_log_innodb.result b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result index dc0f9545bc4..790038799c0 100644 --- a/mysql-test/suite/rpl/r/rpl_row_log_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result @@ -7,7 +7,7 @@ start slave; stop slave; reset master; reset slave; -reset master; +start slave; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB; insert into t1 values (NULL); drop table t1; @@ -113,7 +113,6 @@ Aberdeen Abernathy aberrant aberration -start slave; let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%' ; diff --git a/mysql-test/suite/rpl/r/rpl_stm_log.result b/mysql-test/suite/rpl/r/rpl_stm_log.result index d29b4c92590..20f8e04afe7 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_log.result +++ b/mysql-test/suite/rpl/r/rpl_stm_log.result @@ -7,7 +7,7 @@ start slave; stop slave; reset master; reset slave; -reset master; +start slave; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM; insert into t1 values (NULL); drop table t1; @@ -109,7 +109,6 @@ Aberdeen Abernathy aberrant aberration -start slave; let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%' ; diff --git a/mysql-test/suite/rpl/t/rpl_stm_log-slave.opt b/mysql-test/suite/rpl/t/rpl_stm_log-slave.opt index 8b137891791..203fc2287ec 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_log-slave.opt +++ b/mysql-test/suite/rpl/t/rpl_stm_log-slave.opt @@ -1 +1 @@ - +--log-slave-updates diff --git a/mysql-test/suite/rpl/t/rpl_view-slave.opt b/mysql-test/suite/rpl/t/rpl_view-slave.opt deleted file mode 100644 index 79b3bf6174b..00000000000 --- a/mysql-test/suite/rpl/t/rpl_view-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-ignore-table=test.foo diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result index 3bf5ea108ae..18558c57140 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result @@ -7,7 +7,7 @@ start slave; stop slave; reset master; reset slave; -reset master; +start slave; create table t1(n int not null auto_increment primary key)ENGINE=NDB; insert into t1 values (NULL); drop table t1; @@ -117,7 +117,6 @@ Aberdeen Abernathy aberrant aberration -start slave; let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%' ; diff --git a/mysql-test/t/partition_not_windows.test b/mysql-test/t/partition_not_windows.test index d7108d5af98..4814828c9b9 100644 --- a/mysql-test/t/partition_not_windows.test +++ b/mysql-test/t/partition_not_windows.test @@ -3,6 +3,8 @@ --source include/have_partition.inc # DATA DIRECTORY/INDEX DIRECTORY require symbolic link support --source include/have_symlink.inc +# realpath is not compiled in when building with valgrind +--source include/not_valgrind.inc # The test for Bug 20770 is disabled on Windows due to BUG#19107; it # should be moved into partition.test once the bug has been resolved. diff --git a/mysql-test/t/skip_log_bin-master.opt b/mysql-test/t/skip_log_bin-master.opt new file mode 100644 index 00000000000..9ebccecc95e --- /dev/null +++ b/mysql-test/t/skip_log_bin-master.opt @@ -0,0 +1 @@ +--loose-skip-log-bin diff --git a/mysql-test/t/skip_log_bin.test b/mysql-test/t/skip_log_bin.test new file mode 100644 index 00000000000..6175b2cf7d3 --- /dev/null +++ b/mysql-test/t/skip_log_bin.test @@ -0,0 +1,25 @@ +# +# binlog_off.test purpose is to verify that the --skip-log-bin flag +# works correctly +# + +--disable_warnings +DROP TABLE IF EXISTS t1, t2; +--enable_warnings + +# +# Bug #38798 Assertion mysql_bin_log.is_open() failed in +# binlog_trans_log_savepos() +# Testing that there is no crash. +# Before BUG#38798, the code for CREATE...SELECT called an internal function to +# binlog the statement, even with --skip-log-bin. This caused an assertion +# to be thrown since the binlog was not open. + +set @@session.binlog_format=row; + +create table t1 (a int); +insert into t1 values (1); +create table t2 select * from t1; + +# clean-up +drop table t1, t2; diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh index 4e5ca7305f8..5a2409eeb6f 100644 --- a/scripts/mysql_install_db.sh +++ b/scripts/mysql_install_db.sh @@ -339,6 +339,7 @@ mysqld_bootstrap="${MYSQLD_BOOTSTRAP-$mysqld}" mysqld_install_cmd_line="$mysqld_bootstrap $defaults $mysqld_opt --bootstrap \ --basedir=$basedir --datadir=$ldata --log-warnings=0 --loose-skip-innodb \ --loose-skip-ndbcluster $args --max_allowed_packet=8M \ + --default-storage-engine=myisam \ --net_buffer_length=16K" # Create the system and help tables by passing them to "mysqld --bootstrap" diff --git a/server-tools/instance-manager/mysqlmanager.vcproj b/server-tools/instance-manager/mysqlmanager.vcproj deleted file mode 100644 index a38565fc1f3..00000000000 --- a/server-tools/instance-manager/mysqlmanager.vcproj +++ /dev/null @@ -1,382 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 30f01f9a078..04a8db5edf0 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -3524,7 +3524,8 @@ select_create::prepare(List &values, SELECT_LEX_UNIT *u) temporary table, we need to start a statement transaction. */ if ((thd->lex->create_info.options & HA_LEX_CREATE_TMP_TABLE) == 0 && - thd->current_stmt_binlog_row_based) + thd->current_stmt_binlog_row_based && + mysql_bin_log.is_open()) { thd->binlog_start_trans_and_stmt(); } @@ -3620,10 +3621,11 @@ select_create::binlog_show_create_table(TABLE **tables, uint count) result= store_create_info(thd, &tmp_table_list, &query, create_info); DBUG_ASSERT(result == 0); /* store_create_info() always return 0 */ - thd->binlog_query(THD::STMT_QUERY_TYPE, - query.ptr(), query.length(), - /* is_trans */ TRUE, - /* suppress_use */ FALSE); + if (mysql_bin_log.is_open()) + thd->binlog_query(THD::STMT_QUERY_TYPE, + query.ptr(), query.length(), + /* is_trans */ TRUE, + /* suppress_use */ FALSE); } void select_create::store_values(List &values) diff --git a/win/build-vs9.bat b/win/build-vs9.bat new file mode 100644 index 00000000000..09f1e343013 --- /dev/null +++ b/win/build-vs9.bat @@ -0,0 +1,18 @@ +@echo off + +REM Copyright (C) 2006 MySQL AB +REM +REM This program is free software; you can redistribute it and/or modify +REM it under the terms of the GNU General Public License as published by +REM the Free Software Foundation; version 2 of the License. +REM +REM This program is distributed in the hope that it will be useful, +REM but WITHOUT ANY WARRANTY; without even the implied warranty of +REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +REM GNU General Public License for more details. +REM +REM You should have received a copy of the GNU General Public License +REM along with this program; if not, write to the Free Software +REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +cmake -G "Visual Studio 9 2008" + diff --git a/win/build-vs9_x64.bat b/win/build-vs9_x64.bat new file mode 100644 index 00000000000..61c7253132d --- /dev/null +++ b/win/build-vs9_x64.bat @@ -0,0 +1,18 @@ +@echo off + +REM Copyright (C) 2006 MySQL AB +REM +REM This program is free software; you can redistribute it and/or modify +REM it under the terms of the GNU General Public License as published by +REM the Free Software Foundation; version 2 of the License. +REM +REM This program is distributed in the hope that it will be useful, +REM but WITHOUT ANY WARRANTY; without even the implied warranty of +REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +REM GNU General Public License for more details. +REM +REM You should have received a copy of the GNU General Public License +REM along with this program; if not, write to the Free Software +REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +cmake -G "Visual Studio 9 2008 Win64" + diff --git a/zlib/zutil.h b/zlib/zutil.h index b7d5eff81b6..4482957d6ac 100644 --- a/zlib/zutil.h +++ b/zlib/zutil.h @@ -194,7 +194,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ # ifdef __TURBOC__ # define NO_vsnprintf # endif -# ifdef WIN32 +# if defined(WIN32) && (!defined(_MSC_VER) || _MSC_VER < 1500) /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */ # if !defined(vsnprintf) && !defined(NO_vsnprintf) # define vsnprintf _vsnprintf