List:Commits« Previous MessageNext Message »
From:U-ROWVWADEjas Date:May 16 2007 8:37pm
Subject:bk commit into 6.0-falcon tree (jas:1.2528)
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-05-16 16:37:35-04:00, jas@rowvwade. +2 -0
  Moved "current statement" string cleanup from Transaction
  to Connection.

  storage/falcon/Connection.cpp@stripped, 2007-05-16 16:37:28-04:00, jas@rowvwade. +25 -0
    Moved "current statement" string cleanup from Transaction
    to Connection.

  storage/falcon/Transaction.cpp@stripped, 2007-05-16 16:37:28-04:00, jas@rowvwade. +5 -19
    Moved "current statement" string cleanup from Transaction
    to Connection.

# 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/Connection.cpp	2007-05-16 16:37:56 -04:00
+++ 1.14/storage/falcon/Connection.cpp	2007-05-16 16:37:56 -04:00
@@ -1809,3 +1809,28 @@
 {
 	currentStatement = text;
 }
+
+char* Connection::getCurrentStatement(char* buffer, uint bufferLength)
+{
+	char *q = buffer;
+	char *end = buffer + bufferLength - 2;
+	
+	if (currentStatement)
+		for (const char *p = currentStatement; *p;)
+			{
+			char c = *p++;
+			
+			if (c == '\r')
+				continue;
+			
+			if (c == '\n')
+				c = ' ';
+			
+			if (q < end)
+				*q++ = c;
+			}
+		
+	*q = 0;
+	
+	return buffer;
+}

--- 1.85/storage/falcon/Transaction.cpp	2007-05-16 16:37:56 -04:00
+++ 1.86/storage/falcon/Transaction.cpp	2007-05-16 16:37:56 -04:00
@@ -963,27 +963,13 @@
 	infoTable->putInt(n++, records != NULL);
 	infoTable->putInt(n++, (waitingFor) ? waitingFor->transactionId : 0);
 	
-	const char *currentStatement = (connection) ? connection->currentStatement : NULL;
 	char buffer[512];
-	char *q = buffer;
-	char *end = buffer + sizeof(buffer) - 2;
 	
-	if (currentStatement)
-		for (const char *p = currentStatement; *p;)
-			{
-			char c = *p++;
-			
-			if (c == '\r')
-				continue;
-			
-			if (c == '\n')
-				c = ' ';
-			
-			if (q < end)
-				*q++ = c;
-			}
-		
-	*q = 0;
+	if (connection)
+		connection->getCurrentStatement(buffer, sizeof(buffer));
+	else
+		buffer[0] = 0;
+
 	infoTable->putString(n++, buffer);
 	infoTable->putRecord();
 }
Thread
bk commit into 6.0-falcon tree (jas:1.2528)U-ROWVWADEjas16 May