List:Commits« Previous MessageNext Message »
From:U-ROWVWADEjas Date:August 24 2007 2:23pm
Subject:bk commit into 6.0-falcon tree (jas:1.2698)
View as plain text  
Below is the list of changes that have just been committed into a local
6.0-falcon repository of . When  does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-08-24 10:22:48-04:00, jas@rowvwade. +3 -0
  Work around various flavors of "new" for debugging and pool based
  allocation.  Things work, but the code is a tad ugly.

  storage/falcon/MemoryManager.h@stripped, 2007-08-24 10:22:39-04:00, jas@rowvwade. +12 -2
    Work around various flavors of "new" for debugging and pool based
    allocation.  Things work, but the code is a tad ugly.

  storage/falcon/Record.cpp@stripped, 2007-08-24 10:22:40-04:00, jas@rowvwade. +3 -1
    Work around various flavors of "new" for debugging and pool based
    allocation.  Things work, but the code is a tad ugly.

  storage/falcon/Table.cpp@stripped, 2007-08-24 10:22:40-04:00, jas@rowvwade. +10 -2
    Work around various flavors of "new" for debugging and pool based
    allocation.  Things work, but the code is a tad ugly.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jas
# Host:	rowvwade.
# Root:	D:/MySQL/mysql-5.1-falcon

--- 1.13/storage/falcon/MemoryManager.h	2007-08-24 10:23:17 -04:00
+++ 1.14/storage/falcon/MemoryManager.h	2007-08-24 10:23:17 -04:00
@@ -46,12 +46,16 @@
 	
 	WINSTATIC ALWAYS_INLINE void* operator new(size_t s) THROWS_BAD_ALLOC
 		{ return MemMgrAllocateDebug ((unsigned int) s, __FILE__, __LINE__); }
+		
 	WINSTATIC ALWAYS_INLINE void* operator new(size_t s, const int  &n) 
 		{ return MemMgrAllocateDebug ((unsigned int) s, __FILE__, __LINE__); }
+		
 	WINSTATIC ALWAYS_INLINE void* operator new(size_t s, const char *file, int line) 
 		{ return MemMgrAllocateDebug ((unsigned int) s, file, line); }
+		
 	WINSTATIC ALWAYS_INLINE void* operator new[](size_t s) THROWS_BAD_ALLOC
 		{ return MemMgrAllocateDebug ((unsigned int) s, __FILE__, __LINE__); }
+		
 	WINSTATIC ALWAYS_INLINE void* operator new[](size_t s, const char *file, int line) THROWS_BAD_ALLOC
 		{ return MemMgrAllocateDebug ((unsigned int) s, file, line); }
 
@@ -67,9 +71,9 @@
 	WINSTATIC ALWAYS_INLINE void* operator new[](size_t s, MemMgr *pool, const char *file, int line) 
 		{ return MemMgrPoolAllocateDebug (pool, (unsigned int) s, file, line); }
 
-#undef new
-#define new(arg) new(arg, THIS_FILE, __LINE__)
+#define POOL_NEW(arg) new(arg, THIS_FILE, __LINE__)
 #define NEW	new (THIS_FILE, __LINE__)
+
 #ifndef new
 #define new NEW
 #endif
@@ -92,6 +96,8 @@
 
 	WINSTATIC ALWAYS_INLINE void* operator new[](size_t s) THROWS_BAD_ALLOC
 		{ return ::MemMgrAllocate (s); }
+		
+#define POOL_NEW(arg) new(arg)
 #define NEW new
 #endif
 
@@ -119,15 +125,19 @@
 
 WINSTATIC ALWAYS_INLINE void operator delete(void *object) THROWS_NOTHING
 	{ MemMgrRelease (object); }
+	
 WINSTATIC ALWAYS_INLINE void operator delete(void *object, const char *file, int line)
 	{ MemMgrRelease (object); }
+	
 WINSTATIC ALWAYS_INLINE void operator delete[](void *object) THROWS_NOTHING
 	{ MemMgrRelease (object); }
+	
 WINSTATIC ALWAYS_INLINE void operator delete[](void *object, const char *file, int line)
 	{ MemMgrRelease (object); }
 
 WINSTATIC ALWAYS_INLINE void operator delete(void *object, MemMgr *pool) THROWS_NOTHING
 	{ MemMgrRelease (object); }
+	
 WINSTATIC ALWAYS_INLINE void operator delete(void *object, MemMgr *pool, const char *file, int line)
 	{ MemMgrRelease (object); }
 

--- 1.52/storage/falcon/Record.cpp	2007-08-24 10:23:17 -04:00
+++ 1.53/storage/falcon/Record.cpp	2007-08-24 10:23:17 -04:00
@@ -929,7 +929,9 @@
 	for (int n = 0;; ++n)
 		try
 			{
-			return new(table->database->recordDataPool) char[length];
+#undef new
+			return POOL_NEW(table->database->recordDataPool) char[length];
+#define new NEW
 			}
 		catch (SQLException& exception)
 			{

--- 1.135/storage/falcon/Table.cpp	2007-08-24 10:23:17 -04:00
+++ 1.136/storage/falcon/Table.cpp	2007-08-24 10:23:17 -04:00
@@ -3170,12 +3170,16 @@
 	return true;
 }
 
+#undef new
+
 RecordVersion* Table::allocRecordVersion(Format* format, Transaction* transaction, Record* priorVersion)
 {
 	for (int n = 0;; ++n)
 		try
 			{
-			return new(database->recordObjectPool) RecordVersion(this, format, transaction, priorVersion);
+#undef new
+			return POOL_NEW(database->recordObjectPool) RecordVersion(this, format, transaction, priorVersion);
+#define new NEW
 			}
 		catch (SQLException& exception)
 			{
@@ -3193,7 +3197,9 @@
 	for (int n = 0;; ++n)
 		try
 			{
-			return new(database->recordObjectPool) Record (this, recordNumber, stream);
+#undef new
+			return POOL_NEW(database->recordObjectPool) Record (this, recordNumber, stream);
+#define new NEW
 			}
 		catch (SQLException& exception)
 			{
@@ -3205,3 +3211,5 @@
 	
 	return NULL;
 }
+
+#define new NEW
Thread
bk commit into 6.0-falcon tree (jas:1.2698)U-ROWVWADEjas24 Aug