From 452e5fb8e8fd1f22be98b26ece0010af09fb3d7d Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Sat, 24 Apr 2010 17:10:55 +0000 Subject: Bunch of improvements to the serve processes panel, including: - MCPKit's listProcesses (mysql_list_processes) method is now used, instead of running the query ourselves. - The ability to set whether or not the list is auto refreshed. - The ability to set the autorefresh interval, either via the presets or by entering a custom value (the interface for this might need updating). - Get the process list is now performed on a background thread. This completes the implementation of issue #607. --- Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Frameworks/MCPKit') diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m index 4b5ac737..5fd3a9a2 100644 --- a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m +++ b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m @@ -2407,23 +2407,23 @@ void performThreadedKeepAlive(void *ptr) */ - (MCPResult *)listProcesses { - MCPResult *theResult = nil; + MCPResult *result = nil; MYSQL_RES *theResPtr; [self lockConnection]; + if (theResPtr = mysql_list_processes(mConnection)) { - theResult = [[MCPResult alloc] initWithResPtr:theResPtr encoding:mEncoding timeZone:mTimeZone]; + result = [[MCPResult alloc] initWithResPtr:theResPtr encoding:mEncoding timeZone:mTimeZone]; } else { - theResult = [[MCPResult alloc] init]; + result = [[MCPResult alloc] init]; } + [self unlockConnection]; - if (theResult) { - [theResult autorelease]; - } + if (result) [result autorelease]; - return theResult; + return result; } /** -- cgit v1.2.3