diff options
author | mltownsend <mltownsend@gmail.com> | 2010-05-23 06:48:25 +0000 |
---|---|---|
committer | mltownsend <mltownsend@gmail.com> | 2010-05-23 06:48:25 +0000 |
commit | e3d950291ae9c74ca49f14e560bf96384a263489 (patch) | |
tree | 9942cd51cff894f64c7aca6efdd0c5e8c832ec93 | |
parent | 76633d986085d3b9d05f73db8d51aefdf1f68dfb (diff) | |
download | sequelpro-e3d950291ae9c74ca49f14e560bf96384a263489.tar.gz sequelpro-e3d950291ae9c74ca49f14e560bf96384a263489.tar.bz2 sequelpro-e3d950291ae9c74ca49f14e560bf96384a263489.zip |
Fix for issue#699
-rw-r--r-- | Source/SPUserManager.m | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/SPUserManager.m b/Source/SPUserManager.m index f666f01c..4ed2675e 100644 --- a/Source/SPUserManager.m +++ b/Source/SPUserManager.m @@ -753,8 +753,12 @@ return; } } - // Remove any selections. - [treeController removeSelectionIndexPaths:[treeController selectionIndexPaths]]; + NSSet *registeredObjects = [managedObjectContext registeredObjects]; + for (NSManagedObject *registeredObject in registeredObjects) + { + [self.managedObjectContext refreshObject:registeredObject mergeChanges:NO]; + } + [self.managedObjectContext reset]; [grantedSchemaPrivs removeAllObjects]; [grantedTableView reloadData]; @@ -1051,7 +1055,7 @@ NSMutableArray *revokePrivileges = [NSMutableArray array]; NSString *dbName = [schemaPriv valueForKey:@"db"]; - + dbName = [dbName stringByReplacingOccurrencesOfString:@"_" withString:@"\\_"]; NSString *statement = [NSString stringWithFormat:@"SELECT USER,HOST FROM `mysql`.`db` WHERE USER=%@ AND HOST=%@ AND DB=%@", [[schemaPriv valueForKeyPath:@"user.parent.user"] tickQuotedString], [[schemaPriv valueForKeyPath:@"user.host"] tickQuotedString], |