diff options
author | rowanbeentje <rowan@beent.je> | 2010-01-03 13:37:54 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2010-01-03 13:37:54 +0000 |
commit | 44cdc2f18931a6d5a7571b2dc485120a73b33b57 (patch) | |
tree | 6b7b49f0c7efb80f1fe42b6ab37656660f5c2884 /Source/SPUserManager.m | |
parent | e42f000e98e9ff33a91a86a3e2a0cf04c6778102 (diff) | |
download | sequelpro-44cdc2f18931a6d5a7571b2dc485120a73b33b57.tar.gz sequelpro-44cdc2f18931a6d5a7571b2dc485120a73b33b57.tar.bz2 sequelpro-44cdc2f18931a6d5a7571b2dc485120a73b33b57.zip |
- Ensure all results for server variable requests are returned as strings, to avoid binary-mode result issues with certain versions of MySQL (including 4.1.14). This should address Issue #509.
- TableDocument now requests the server version string from MCPConnection, aiding caching
Diffstat (limited to 'Source/SPUserManager.m')
-rw-r--r-- | Source/SPUserManager.m | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/SPUserManager.m b/Source/SPUserManager.m index 811e353e..83ffa52d 100644 --- a/Source/SPUserManager.m +++ b/Source/SPUserManager.m @@ -148,6 +148,7 @@ // Attempt to use SHOW PRIVILEGES syntax - supported since 4.1.0 result = [self.mySqlConnection queryString:@"SHOW PRIVILEGES"]; + [result setReturnDataAsStrings:YES]; if ([result numOfRows]) { while (privRow = [result fetchRowAsArray]) { privKey = [NSMutableString stringWithString:[[privRow objectAtIndex:0] lowercaseString]]; @@ -159,6 +160,7 @@ // If that fails, base privilege support on the mysql.users columns } else { result = [self.mySqlConnection queryString:@"SHOW COLUMNS FROM `mysql`.`user`"]; + [result setReturnDataAsStrings:YES]; while (privRow = [result fetchRowAsArray]) { privKey = [NSMutableString stringWithString:[privRow objectAtIndex:0]]; if (![privKey hasSuffix:@"_priv"]) continue; |