Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

bk commit into 6.0 tree (jas:1.2670)

From: U-ROWVWADEjas <jas(at)rowvwade.ibphoenix.com>
Date: Wed Oct 31 2007 - 16:06:26 EDT


Below is the list of changes that have just been committed into a local 6.0 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@1.2670, 2007-10-31 16:06:07-04:00, jas@rowvwade. +3 -0   Put is some debugging code to isolate an apparent gcc bug.

  storage/falcon/Sync.cpp@1.5, 2007-10-31 16:05:59-04:00, jas@rowvwade. +11 -0     Put is some debugging code to isolate an apparent gcc bug.

  storage/falcon/Sync.h@1.3, 2007-10-31 16:05:59-04:00, jas@rowvwade. +11 -8     Put is some debugging code to isolate an apparent gcc bug.

  storage/falcon/Table.cpp@1.20, 2007-10-31 16:06:00-04:00, jas@rowvwade. +36 -3     Stylistic edit for consistency.

diff -Nrup a/storage/falcon/Sync.cpp b/storage/falcon/Sync.cpp
--- a/storage/falcon/Sync.cpp	2007-10-27 14:36:57 -04:00
+++ b/storage/falcon/Sync.cpp	2007-10-31 16:05:59 -04:00

@@ -39,10 +39,14 @@ Sync::Sync(SynchronizationObject *obj, c
syncObject = obj; where = fromWhere; prior = NULL; + marked = NULL;

 }  

 Sync::~Sync()
 {

+	if (marked)
+		Log::log("Sync::~Sync: %s\n", marked);
+		
 	if (syncObject && state != None)
 		syncObject->unlock(this, state);

 }
@@ -107,4 +111,11 @@ void Sync::print(const char *label)
 {
 	LOG_DEBUG ("%s %s state %d (%d) syncObject %p\n", 
 			   label, where, state, request, syncObject);
+}
+
+void Sync::mark(const char* text)
+{
+	marked = text;
+	
+	Log::debug("Sync::mark %s\n", marked);
 }
diff -Nrup a/storage/falcon/Sync.h b/storage/falcon/Sync.h
--- a/storage/falcon/Sync.h	2007-10-26 15:55:30 -04:00
+++ b/storage/falcon/Sync.h	2007-10-31 16:05:59 -04:00

@@ -31,22 +31,25 @@ class LinkedList;

 class Sync
 {
 public:
-	void print (const char* label);
-	void findLocks (LinkedList &threads, LinkedList& syncObjects);
-	//void lock (LockType type, const char *fromWhere);
-	//void print(int level);
-	void setObject (SynchronizationObject *obj);
-	void unlock();
-	void lock (LockType type);
 	Sync(SynchronizationObject *obj, const char *where);
 	virtual ~Sync();
 
+	void	print (const char* label);
+	void	findLocks (LinkedList &threads, LinkedList& syncObjects);
+	//void	lock (LockType type, const char *fromWhere);
+	//void	print(int level);
+	void	setObject (SynchronizationObject *obj);
+	void	unlock();
+	void	lock (LockType type);
+	void	lock(LockType type, int timeout);
+
 	SynchronizationObject	*syncObject;
 	LockType	state;
 	LockType	request;
 	Sync		*prior;
 	const char	*where;
-	void lock(LockType type, int timeout);
+	const char	*marked;
+	void mark(const char* text);

 };  

 #endif // !defined(AFX_SYNC_H__59333A55_BC53_11D2_AB5E_0000C01D2301__INCLUDED_)

diff -Nrup a/storage/falcon/Table.cpp b/storage/falcon/Table.cpp
--- a/storage/falcon/Table.cpp	2007-10-31 13:44:16 -04:00
+++ b/storage/falcon/Table.cpp	2007-10-31 16:06:00 -04:00
Do you need help?X

@@ -951,12 +951,15 @@ int32 Table::getBlobId(Value * value, in
case ClobPtr: { Clob* clob = value->getClob(); + if (clob->isBlobReference()) { - id = getIndirectId (clob, transaction); + id = getIndirectId(clob, transaction); clob->release(); + return id; } + clob->release(); } break;
@@ -964,12 +967,15 @@ int32 Table::getBlobId(Value * value, in
case BlobPtr: { Blob* blob = value->getBlob(); + if (blob->isBlobReference()) { - id = getIndirectId (blob, transaction); + id = getIndirectId(blob, transaction); blob->release(); + return id; } + blob->release(); } break;
@@ -1018,6 +1024,7 @@ void Table::makeSearchable(Field * field
for (int32 next = 0; (record = fetchNext(next));) { next = record->recordNumber + 1; + for (Record *version = record; version; version = version->getPriorVersion()) if (version->hasRecord()) {
@@ -1026,9 +1033,11 @@ void Table::makeSearchable(Field * field
Filter stream(tableId, field->id, version->recordNumber, &value); words += database->addInversion(&stream, transaction); ++records; + if (records % 100 == 0) Log::debug("%d records inverted with %d words\n", records, words); } + record->release(); }
@@ -1045,6 +1054,7 @@ void Table::makeNotSearchable(Field *fie
for (int32 next = 0; (record = fetchNext(next));) { next = record->recordNumber + 1; + for (Record *version = record; version; version = version->getPriorVersion()) if (version->hasRecord()) {
@@ -1053,6 +1063,7 @@ void Table::makeNotSearchable(Field *fie
Filter stream(tableId, field->id, version->recordNumber, &value); database->removeFromInversion(&stream, transaction); } + record->release(); }
@@ -1193,6 +1204,7 @@ void Table::reIndexInversion(Transaction
for (int32 next = 0; (record = fetchNext(next));) { next = record->recordNumber + 1; + for (Record *version = record; version; version = version->getPriorVersion()) if (version->hasRecord()) FOR_FIELDS(field, this)
@@ -1205,6 +1217,7 @@ void Table::reIndexInversion(Transaction
database->addInversion(&stream, transaction); } END_FOR;
Do you need more help?X
+ record->release(); }

 }
@@ -1244,6 +1257,7 @@ ForeignKey* Table::findForeignKey(Field
 	for (ForeignKey *key = foreignKeys; key; key = key->next)
 		{
 		key->bind(database);
+		
 		if (key->isMember(field, foreign))
 			return key;
 		}

@@ -1260,9 +1274,11 @@ bool Table::indexExists(ForeignKey * for
if (index->numberFields == foreignKey->numberFields) { int n; + for (n = 0; n < index->numberFields; ++n) if (index->fields [n] != foreignKey->foreignFields [n]) break; + if (n == index->numberFields) return true; }
@@ -1911,6 +1927,7 @@ void Table::fireTriggers(Transaction *tr
{ if ((trigger->mask & operation) && trigger->isEnabled(transaction->connection)) trigger->fireTrigger(transaction, operation, before, after); + if (trigger->mask & (PreCommit | PostCommit)) transaction->commitTriggers = true; }
@@ -2072,6 +2089,7 @@ void Table::reIndex(Transaction *transac
FOR_INDEXES(index, this); index->insert(version, transaction); END_FOR; + record->release(); }

 }
@@ -2198,6 +2216,7 @@ bool Table::checkUniqueIndexes(Transacti
 			(!oldRecord || index->changed(record, oldRecord)))
 			{
 			bool noConflict = checkUniqueIndex(index, transaction, record, sync);
+			
 			if (!noConflict)
 				return false;
 			}

@@ -2223,8 +2242,10 @@ bool Table::checkUniqueIndex(Index *inde
for (int32 recordNumber = 0; (recordNumber = bitmap.nextSet(recordNumber)) >= 0; ++recordNumber) { int rc = checkUniqueRecordVersion(recordNumber, index, transaction, record, sync); + if (rc == checkUniqueWaited) return false; // restart the search with a new lock + if (rc == checkUniqueIsDone) return true; // No need to search any more record versions. // else rc == checkUniqueNext
@@ -2272,8 +2293,10 @@ int Table::checkUniqueRecordVersion(int3
if (state == WasActive) { rec->release(); + if (activeTransaction) activeTransaction->release(); + return checkUniqueWaited; }
@@ -2295,15 +2318,17 @@ int Table::checkUniqueRecordVersion(int3
case Us: // No conflict with a visible deleted record. rec->release(); + if (activeTransaction) activeTransaction->release(); + return checkUniqueNext; // Check next record number.
Can we help you?X
case CommittedInvisible: // This state only happens for consistent read ASSERT(IS_CONSISTENT_READ(transaction->isolationLevel)); - foundFirstCommitted = true; + continue; // Next record version. case Active:

@@ -2313,6 +2338,7 @@ int Table::checkUniqueRecordVersion(int3
 
 					activeTransaction = dup->getTransaction();
 					activeTransaction->addRef();
+					
 					continue;
 
 				default:

@@ -2340,6 +2366,7 @@ int Table::checkUniqueRecordVersion(int3
                                         
 				state = transaction->getRelativeState(dup, WAIT_IF_ACTIVE);
 				rec->release();
+				
 				if (activeTransaction)
 					activeTransaction->release();
 				

@@ -2362,6 +2389,7 @@ int Table::checkUniqueRecordVersion(int3
// Found a duplicate conflict. rec->release(); + if (activeTransaction) activeTransaction->release();
@@ -2406,8 +2434,10 @@ int Table::checkUniqueRecordVersion(int3
if (state == Us) { rec->release(); + if (activeTransaction) activeTransaction->release(); + return checkUniqueNext; // Check next record number. }
@@ -2417,14 +2447,17 @@ int Table::checkUniqueRecordVersion(int3
if (state == CommittedVisible) { rec->release(); + if (activeTransaction) activeTransaction->release(); + return checkUniqueNext; // Check next record number } } // for each record version... if (rec) rec->release(); + if (activeTransaction) activeTransaction->release();
-- 
MySQL Code Commits Mailing List
For list archives: 
http://lists.mysql.com/commits
To unsubscribe:    
http://lists.mysql.com/commits?unsub=lists@pantek.com
Received on Wed Oct 31 16:06:57 2007

This archive was generated by hypermail 2.1.8 : Thu Jul 03 2008 - 11:14:09 EDT

Can't find what you're looking for?X

Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library