List:Commits« Previous MessageNext Message »
From:marko.makela Date:December 2 2010 8:16am
Subject:bzr commit into mysql-5.5-innodb branch (marko.makela:3251) Bug#58226
View as plain text  
#At file:///home/marko/innobase/dev/mysql2a/5.5-innodb/ based on revid:marko.makela@stripped4ufii06or4oe

 3251 Marko Mäkelä	2010-12-02
      Fix UNIV_MEM_DEBUG compilation failure caused by Bug#58226 fix.
      
      To fix Bug#58226 (speed up UNIV_DEBUG), among other things we no longer
      disable the inlining of the functions that are defined in InnoDB .ic files.
      Inside UNIV_MEM_DEBUG, there was an implicit type conversion from void*
      that is all right in C, but not in C++. Now that inlining was enabled,
      the C++ compiler would see the code and complain.

    modified:
      storage/innobase/include/mem0mem.ic
=== modified file 'storage/innobase/include/mem0mem.ic'
--- a/storage/innobase/include/mem0mem.ic	revid:marko.makela@stripped201130902-q0g54ufii06or4oe
+++ b/storage/innobase/include/mem0mem.ic	revid:marko.makela@strippedc16tackvg7vbqvi0
@@ -350,7 +350,7 @@ mem_heap_get_top(
 	ulint		n)	/*!< in: size of the topmost element */
 {
 	mem_block_t*	block;
-	void*		buf;
+	byte*		buf;
 
 	ut_ad(mem_heap_check(heap));
 
@@ -359,12 +359,12 @@ mem_heap_get_top(
 	buf = (byte*)block + mem_block_get_free(block) - MEM_SPACE_NEEDED(n);
 
 #ifdef UNIV_MEM_DEBUG
-	ut_ad(mem_block_get_start(block) <=(ulint)((byte*)buf - (byte*)block));
+	ut_ad(mem_block_get_start(block) <=(ulint)(buf - (byte*)block));
 
 	/* In the debug version, advance buf to point at the storage which
 	was given to the caller in the allocation*/
 
-	buf = (byte*)buf + MEM_FIELD_HEADER_SIZE;
+	buf += MEM_FIELD_HEADER_SIZE;
 
 	/* Check that the field lengths agree */
 	ut_ad(n == (ulint)mem_field_header_get_len(buf));

Attachment: [text/bzr-bundle] bzr/marko.makela@oracle.com-20101202081606-c16tackvg7vbqvi0.bundle
Thread
bzr commit into mysql-5.5-innodb branch (marko.makela:3251) Bug#58226marko.makela2 Dec