diff options
-rw-r--r-- | .bzr-mysql/default.conf | 6 | ||||
-rw-r--r-- | configure.in | 4 | ||||
-rw-r--r-- | include/Makefile.am | 2 | ||||
-rwxr-xr-x | scripts/dheadgen.pl | 12 | ||||
-rwxr-xr-x | storage/innobase/CMakeLists.txt | 35 | ||||
-rw-r--r-- | storage/innobase/include/os0sync.ic | 4 | ||||
-rw-r--r-- | storage/innobase/srv/srv0srv.c | 22 | ||||
-rw-r--r-- | storage/innobase/win_atomics32_test.c | 28 | ||||
-rw-r--r-- | storage/innobase/win_atomics64_test.c | 29 | ||||
-rw-r--r-- | support-files/my-innodb-heavy-4G.cnf.sh | 5 |
10 files changed, 76 insertions, 71 deletions
diff --git a/.bzr-mysql/default.conf b/.bzr-mysql/default.conf index 45a6c66a4c1..39ebdda8d7a 100644 --- a/.bzr-mysql/default.conf +++ b/.bzr-mysql/default.conf @@ -1,4 +1,4 @@ [MYSQL] -post_commit_to = False #"commits@lists.mysql.com" -post_push_to = False #"commits@lists.mysql.com" -tree_name = "mysql-5.1" +post_commit_to = "commits@lists.mysql.com" +post_push_to = "commits@lists.mysql.com" +tree_name = "mysql-5.4" diff --git a/configure.in b/configure.in index 0dffffda66e..ec9774d05c6 100644 --- a/configure.in +++ b/configure.in @@ -9,8 +9,8 @@ AC_CANONICAL_SYSTEM # remember to also update version.c in ndb # # When changing major version number please also check switch statement -# in mysqlbinlog::check_master_version(). -AM_INIT_AUTOMAKE(mysql, 5.4.1-beta) +# in client/mysqlbinlog.cc:check_master_version(). +AM_INIT_AUTOMAKE(mysql, 5.4.2-beta) AM_CONFIG_HEADER([include/config.h:config.h.in]) PROTOCOL_VERSION=10 diff --git a/include/Makefile.am b/include/Makefile.am index 214ef8862e9..dd6f53f7ca2 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -87,7 +87,7 @@ probes_mysql_dtrace.h: $(DTRACEPROVIDER) endif probes_mysql_nodtrace.h: $(DTRACEPROVIDER) - $(top_srcdir)/scripts/dheadgen.pl -f $(DTRACEPROVIDER) > $@ + @PERL@ $(top_srcdir)/scripts/dheadgen.pl -f $(DTRACEPROVIDER) > $@ # Don't update the files from bitkeeper %::SCCS/s.% diff --git a/scripts/dheadgen.pl b/scripts/dheadgen.pl index 5ead0f90a31..374b232a04e 100755 --- a/scripts/dheadgen.pl +++ b/scripts/dheadgen.pl @@ -267,23 +267,23 @@ usage() if ($infile !~ /(.+)\.d$/); # If the system has native support for DTrace, we'll use that binary instead. # if (-x '/usr/sbin/dtrace' && !$force) { - open(my $dt, '-|', "/usr/sbin/dtrace -C -h -s $infile -o /dev/stdout") + open(DTRACE, "-| /usr/sbin/dtrace -C -h -s $infile -o /dev/stdout") or die "can't invoke dtrace(1M)"; - while (<$dt>) { + while (<DTRACE>) { emit_dtrace($_); } - close($dt); + close(DTRACE); exit(0); } emit_prologue($infile); -open(my $d, '<', $infile) or die "couldn't open $infile"; -@lines = <$d>; -close($d); +open(D, "< $infile") or die "couldn't open $infile"; +@lines = <D>; +close(D); while (1) { my $nl = 0; diff --git a/storage/innobase/CMakeLists.txt b/storage/innobase/CMakeLists.txt index ca46e1fb145..249a600834d 100755 --- a/storage/innobase/CMakeLists.txt +++ b/storage/innobase/CMakeLists.txt @@ -25,25 +25,28 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studio" AND CMAKE_SIZEOF_VOID_P MATCHES 8) PROPERTIES COMPILE_FLAGS -Od) ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio" AND CMAKE_SIZEOF_VOID_P MATCHES 8) -IF (NOT WITHOUT_ATOMICS) +IF (WIN32) + IF (NOT WITHOUT_ATOMICS) # Check if this Windows version supports atomic instructions - IF (CMAKE_SIZEOF_VOID_P MATCHES 8) + IF (CMAKE_SIZEOF_VOID_P MATCHES 8) # Check for 64 bit atomics - TRY_RUN(RUN_RES COMPILE_RES ${CMAKE_BINARY_DIR} - ${CMAKE_SOURCE_DIR}/storage/innobase/win_atomics64_test.c) - IF (RUN_RES) - ADD_DEFINITIONS(-DWIN_ATOMICS64) - ENDIF (RUN_RES) - ELSE (CMAKE_SIZEOF_VOID_P MATCHES 8) + TRY_RUN(RUN_RES COMPILE_RES ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/storage/innobase/win_atomics64_test.c) + IF (COMPILE_RES AND NOT RUN_RES) + MESSAGE("Adding support for Win64 atomics") + ADD_DEFINITIONS(-DWIN_ATOMICS64) + ENDIF (COMPILE_RES AND NOT RUN_RES) + ELSE (CMAKE_SIZEOF_VOID_P MATCHES 8) # Check for 32 bit atomics - TRY_RUN(RUN_RES COMPILE_RES ${CMAKE_BINARY_DIR} - ${CMAKE_SOURCE_DIR}/storage/innobase/win_atomics32_test.c) - IF (RUN_RES) - ADD_DEFINITIONS(-DWIN_ATOMICS32) - ENDIF (RUN_RES) - ENDIF (CMAKE_SIZEOF_VOID_P MATCHES 8) -ENDIF (NOT WITHOUT_ATOMICS) - + TRY_RUN(RUN_RES COMPILE_RES ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/storage/innobase/win_atomics32_test.c) + IF (COMPILE_RES AND NOT RUN_RES) + MESSAGE("Adding support for Win32 atomics") + ADD_DEFINITIONS(-DWIN_ATOMICS32) + ENDIF (COMPILE_RES AND NOT RUN_RES) + ENDIF (CMAKE_SIZEOF_VOID_P MATCHES 8) + ENDIF (NOT WITHOUT_ATOMICS) +ENDIF (WIN32) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib ${CMAKE_SOURCE_DIR}/storage/innobase/include ${CMAKE_SOURCE_DIR}/storage/innobase/handler diff --git a/storage/innobase/include/os0sync.ic b/storage/innobase/include/os0sync.ic index 5c1b473ad6d..d1307134172 100644 --- a/storage/innobase/include/os0sync.ic +++ b/storage/innobase/include/os0sync.ic @@ -142,9 +142,9 @@ os_atomic_increment( #elif HAVE_SOLARIS_ATOMIC return ((lint)atomic_add_long_nv((volatile ulong_t *)ptr, amount)); #elif WIN_ATOMICS32 - return ((lint)InterlockedExchangeAdd(ptr, amount)); + return ((lint)InterlockedExchangeAdd(ptr, amount) + amount); #elif WIN_ATOMICS64 - return ((lint)InterlockedExchangeAdd64(ptr, amount)); + return ((lint)InterlockedExchangeAdd64(ptr, amount) + amount); #else #error "Need support for atomic ops" #endif diff --git a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c index 958c48ca91c..8e5838db519 100644 --- a/storage/innobase/srv/srv0srv.c +++ b/storage/innobase/srv/srv0srv.c @@ -428,28 +428,28 @@ FILE* srv_misc_tmpfile; ulint srv_main_thread_process_no = 0; ulint srv_main_thread_id = 0; -// The following count work done by srv_master_thread. +/* The following count work done by srv_master_thread. */ -// Iterations by the 'once per second' loop. +/* Iterations by the 'once per second' loop */ ulint srv_main_1_second_loops = 0; -// Calls to sleep by the 'once per second' loop. +/* Calls to sleep by the 'once per second' loop */ ulint srv_main_sleeps = 0; -// Iterations by the 'once per 10 seconds' loop. +/* Iterations by the 'once per 10 seconds' loop */ ulint srv_main_10_second_loops = 0; -// Iterations of the loop bounded by the 'background_loop' label. +/* Iterations of the loop bounded by the 'background_loop' label */ ulint srv_main_background_loops = 0; -// Iterations of the loop bounded by the 'flush_loop' label. +/* Iterations of the loop bounded by the 'flush_loop' label */ ulint srv_main_flush_loops = 0; -// Calls to log_buffer_flush_to_disk. +/* Calls to log_buffer_flush_to_disk */ ulint srv_sync_flush = 0; -// Calls to log_buffer_flush_maybe_sync. +/* Calls to log_buffer_flush_maybe_sync */ ulint srv_async_flush = 0; -// Number of microseconds threads wait because of -// innodb_thread_concurrency +/* Number of microseconds threads wait because of +innodb_thread_concurrency */ static ib_longlong srv_thread_wait_mics = 0; -// Number of microseconds for spinlock delay +/* Number of microseconds for spinlock delay */ static ib_longlong srv_timed_spin_delay = 0; /* diff --git a/storage/innobase/win_atomics32_test.c b/storage/innobase/win_atomics32_test.c index 28b1754f6db..fcb88d6b54e 100644 --- a/storage/innobase/win_atomics32_test.c +++ b/storage/innobase/win_atomics32_test.c @@ -1,17 +1,17 @@ -# Copyright (C) 2009 Sun Microsystems AB -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +/* Copyright (C) 2009 Sun Microsystems AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include <windows.h> diff --git a/storage/innobase/win_atomics64_test.c b/storage/innobase/win_atomics64_test.c index 9114776e121..123cb6d98cf 100644 --- a/storage/innobase/win_atomics64_test.c +++ b/storage/innobase/win_atomics64_test.c @@ -1,17 +1,18 @@ -# Copyright (C) 2009 Sun Microsystems AB -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +/* Copyright (C) 2009 Sun Microsystems AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ + #include <windows.h> int main() diff --git a/support-files/my-innodb-heavy-4G.cnf.sh b/support-files/my-innodb-heavy-4G.cnf.sh index e9390a5b9e8..15e8d895667 100644 --- a/support-files/my-innodb-heavy-4G.cnf.sh +++ b/support-files/my-innodb-heavy-4G.cnf.sh @@ -385,9 +385,10 @@ innodb_data_file_path = ibdata1:10M:autoextend #innodb_data_home_dir = <directory> # Number of IO threads to use for async IO operations. This value is -# hardcoded to 4 on Unix, but on Windows disk I/O may benefit from a +# hardcoded to 8 on Unix, but on Windows disk I/O may benefit from a # larger number. -innodb_file_io_threads = 4 +innodb_write_io_threads = 8 +innodb_read_io_threads = 8 # If you run into InnoDB tablespace corruption, setting this to a nonzero # value will likely help you to dump your tables. Start from value 1 and |