aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authormltownsend <mltownsend@gmail.com>2010-05-23 06:48:25 +0000
committermltownsend <mltownsend@gmail.com>2010-05-23 06:48:25 +0000
commite3d950291ae9c74ca49f14e560bf96384a263489 (patch)
tree9942cd51cff894f64c7aca6efdd0c5e8c832ec93 /Source
parent76633d986085d3b9d05f73db8d51aefdf1f68dfb (diff)
downloadsequelpro-e3d950291ae9c74ca49f14e560bf96384a263489.tar.gz
sequelpro-e3d950291ae9c74ca49f14e560bf96384a263489.tar.bz2
sequelpro-e3d950291ae9c74ca49f14e560bf96384a263489.zip
Fix for issue#699
Diffstat (limited to 'Source')
-rw-r--r--Source/SPUserManager.m10
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],