MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Ingo Struewing Date:February 22 2009 4:19pm
Subject:bzr commit into mysql-6.0-backup branch (ingo.struewing:2765) Bug#43090
View as plain text  
#At file:///home2/mydev/bzrroot/mysql-6.0-wl4534-8/ based on revid:ingo.struewing@stripped

 2765 Ingo Struewing	2009-02-22
      Bug#43090 - ARCHIVE engine related warnings on Windows debug build
      
      A windows debug build created warnings in the error log.
      In a windows debug build, we do not define SAFEMALLOC and SAFE_MUTEX.
      But the ARCHIVE engine explicitly defined them in CMakeLists.txt.
      Ha_archive.cc uses my_multi_malloc(). This is part of mysys, which,
      like most parts of the server, are compiled without SAFEMALLOC.
      So my_multi_malloc() calls my_malloc() directly and is not
      redirected to the SAFEMALLOC function _mymalloc(). But since
      ha_archive.cc frees the allocated memory with my_free(), which
      is redefined to _myfree(), SAFEMALLOC complains about a free, for
      which it didn't see an allocation.
      
      Fixed by not explicitly defining SAFEMALLOC and SAFE_MUTEX in
      ARCHIVE's CMakeLists.txt.
     @ storage/archive/CMakeLists.txt
        Bug#43090 - ARCHIVE engine related warnings on Windows debug build
        Disabled explicit definition of SAFEMALLOC and SAFE_MUTEX.

    modified:
      storage/archive/CMakeLists.txt
=== modified file 'storage/archive/CMakeLists.txt'
--- a/storage/archive/CMakeLists.txt	2008-01-30 02:58:57 +0000
+++ b/storage/archive/CMakeLists.txt	2009-02-22 16:19:27 +0000
@@ -13,8 +13,14 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
-SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
+#
+# NOTE: The use of my_multi_malloc() in ha_archive.cc excludes the
+# definition of SAFEMALLOC and SAFE_MUTEX here, as long as it is not
+# defined in the top-level CMakeList.txt. So do not define it here
+# explicitly, but inherit from the top-level file. See Bug#43090.
+#
+#SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
+#SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
 
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib
                     ${CMAKE_SOURCE_DIR}/sql


Attachment: [text/bzr-bundle] bzr/ingo.struewing@sun.com-20090222161927-a3nqx5r9e8ythjcf.bundle
Thread
bzr commit into mysql-6.0-backup branch (ingo.struewing:2765) Bug#43090Ingo Struewing22 Feb