List:Commits« Previous MessageNext Message »
From:kevin.lewis Date:January 21 2011 4:15pm
Subject:bzr push into mysql-trunk-innodb branch (kevin.lewis:3448 to 3449) Bug#58629
View as plain text  
 3449 kevin.lewis@stripped	2011-01-21
      Bug#58629 - Disable UNIV_MUST_NOT_INLINE
      InnoDB disables inlining of code for all platforms that are not Linux and Sun;
      
      # if !defined(__GNUC__) && !(defined(__SUNPRO_C) || defined(__SUNPRO_CC))
      #  undef  UNIV_MUST_NOT_INLINE
      #  define UNIV_MUST_NOT_INLINE
      # endif
      
      This patch and bug fix enables inlining of code on all other platforms.
      It removes all references to UNIV_MUST_NOT_INLINE in the build files,
      but keeps the #ifdef UNIV_MUST_NOT_INLINE in univ.i and the UNIV_NONINL
      in various files. This is because we may want to disable the inlining of .ic files
      to troubleshoot some future problem.
      
      RB://538  Approved by Marko Mäkelä

    modified:
      BUILD/SETUP.sh
      BUILD/build_mccge.sh
      scripts/mysql_config.pl.in
      scripts/mysql_config.sh
      storage/innobase/CMakeLists.txt
      storage/innobase/include/univ.i
 3448 kevin.lewis@stripped	2011-01-20
      This is a fix for the Windows vs2008 compile problem that was introduced by rev 3423 (rb://563) of mysql-trunk-innodb.  The additional use of os_increment_counter_by_amount() and os_decrement_counter_by_amount() in ha_innodb.cc was rejected in vs2008 since the value being changed is a ulint while the Windows atomics function uses LONG or __int64 depending on whether the OS is 32 or 64 bit.  The type ulint is either unsigned __int64 or unsigned long int depending on the OS as well.   Since the definition of os_(in/de)crement_counter_by_amount did not have a typedef on the value being changed, it did not compile.  
      
      This same error was encountered by RB://538 at one point when similar Windows defines became inline for the first time.  
      
      This change is a comprehensive fix for all windows atomic calls so that they are type casted correctly within a UNIV_INLINE function.  Type-casting in an inline function is better than typecasting in a macro because the input types are checked by the compiler.

    modified:
      storage/innobase/include/os0sync.h
      storage/innobase/include/os0sync.ic
      storage/innobase/include/os0thread.h
=== modified file 'BUILD/SETUP.sh'
--- a/BUILD/SETUP.sh	revid:kevin.lewis@stripped042226-qv80tfh40uxc7x1f
+++ b/BUILD/SETUP.sh	revid:kevin.lewis@stripped
@@ -142,7 +142,7 @@ valgrind_flags="$valgrind_flags -DMYSQL_
 valgrind_configs="--with-valgrind"
 #
 # Used in -debug builds
-debug_cflags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS "
+debug_cflags="-DEXTRA_DEBUG -DFORCE_INIT_OF_VARS "
 debug_cflags="$debug_cflags -DSAFE_MUTEX"
 error_inject="--with-error-inject "
 #

=== modified file 'BUILD/build_mccge.sh'
--- a/BUILD/build_mccge.sh	revid:kevin.lewis@stripped
+++ b/BUILD/build_mccge.sh	revid:kevin.lewis@stripped20110121161447-gbo8livav47cyvvt
@@ -1178,7 +1178,7 @@ set_with_debug_flags()
 {
   if test "x$with_debug_flag" = "xyes" ; then
     if test "x$developer_flag" = "xyes" ; then
-      loc_debug_flags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS "
+      loc_debug_flags="-DEXTRA_DEBUG -DFORCE_INIT_OF_VARS "
       compiler_flags="$compiler_flags $loc_debug_flags"
     fi
     compiler_flags="$compiler_flags $extra_debug_flags"

=== modified file 'scripts/mysql_config.pl.in'
--- a/scripts/mysql_config.pl.in	revid:kevin.lewis@stripped0tfh40uxc7x1f
+++ b/scripts/mysql_config.pl.in	revid:kevin.lewis@stripped
@@ -42,7 +42,7 @@ use Cwd;
 use strict;
 
 my @exclude_cflags =
-  qw/DDBUG_OFF DSAFE_MUTEX DUNIV_MUST_NOT_INLINE DFORCE_INIT_OF_VARS
+  qw/DDBUG_OFF DSAFE_MUTEX DFORCE_INIT_OF_VARS
      DEXTRA_DEBUG DHAVE_purify O O[0-9] xO[0-9] W[-A-Za-z]*
      Xa xstrconst xc99=none
      unroll2 ip mp restrict/;

=== modified file 'scripts/mysql_config.sh'
--- a/scripts/mysql_config.sh	revid:kevin.lewis@strippedm-20110121042226-qv80tfh40uxc7x1f
+++ b/scripts/mysql_config.sh	revid:kevin.lewis@strippedvav47cyvvt
@@ -133,7 +133,7 @@ include="-I$pkgincludedir"
 #       and -xstrconst to make --cflags usable for Sun Forte C++
 # FIXME until we have a --cxxflags, we need to remove -AC99
 #       to make --cflags usable for HP C++ (aCC)
-for remove in DDBUG_OFF DSAFE_MUTEX DUNIV_MUST_NOT_INLINE DFORCE_INIT_OF_VARS \
+for remove in DDBUG_OFF DSAFE_MUTEX DFORCE_INIT_OF_VARS \
               DEXTRA_DEBUG DHAVE_purify O 'O[0-9]' 'xO[0-9]' 'W[-A-Za-z]*' \
               'mtune=[-A-Za-z0-9]*' 'mcpu=[-A-Za-z0-9]*' 'march=[-A-Za-z0-9]*' \
               Xa xstrconst "xc99=none" AC99 \

=== modified file 'storage/innobase/CMakeLists.txt'
--- a/storage/innobase/CMakeLists.txt	revid:kevin.lewis@stripped
+++ b/storage/innobase/CMakeLists.txt	revid:kevin.lewis@strippedom-20110121161447-gbo8livav47cyvvt
@@ -30,13 +30,11 @@ IF(UNIX)
       LINK_LIBRARIES(aio)
     ENDIF()
   ELSEIF(CMAKE_SYSTEM_NAME MATCHES "HP*")
-    ADD_DEFINITIONS("-DUNIV_HPUX -DUNIV_MUST_NOT_INLINE")
+    ADD_DEFINITIONS("-DUNIV_HPUX")
   ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "AIX")
-    ADD_DEFINITIONS("-DUNIV_AIX -DUNIX_MUST_NOT_INLINE")
+    ADD_DEFINITIONS("-DUNIV_AIX")
   ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
     ADD_DEFINITIONS("-DUNIV_SOLARIS")
-  ELSE()
-   ADD_DEFINITIONS("-DUNIV_MUST_NOT_INLINE")
   ENDIF()
 ENDIF()
 

=== modified file 'storage/innobase/include/univ.i'
--- a/storage/innobase/include/univ.i	revid:kevin.lewis@stripped40uxc7x1f
+++ b/storage/innobase/include/univ.i	revid:kevin.lewis@stripped
@@ -123,11 +123,6 @@ if we are compiling on Windows. */
 /* We only try to do explicit inlining of functions with gcc and
 Sun Studio */
 
-# if !defined(__GNUC__) && !(defined(__SUNPRO_C) || defined(__SUNPRO_CC))
-#  undef  UNIV_MUST_NOT_INLINE			/* Remove compiler warning */
-#  define UNIV_MUST_NOT_INLINE
-# endif
-
 # ifdef HAVE_PREAD
 #  define HAVE_PWRITE
 # endif

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-innodb branch (kevin.lewis:3448 to 3449) Bug#58629kevin.lewis21 Jan