aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableSource.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-01-03 13:37:54 +0000
committerrowanbeentje <rowan@beent.je>2010-01-03 13:37:54 +0000
commit44cdc2f18931a6d5a7571b2dc485120a73b33b57 (patch)
tree6b7b49f0c7efb80f1fe42b6ab37656660f5c2884 /Source/TableSource.m
parente42f000e98e9ff33a91a86a3e2a0cf04c6778102 (diff)
downloadsequelpro-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/TableSource.m')
-rw-r--r--Source/TableSource.m3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/TableSource.m b/Source/TableSource.m
index 6f73e9a5..bf431326 100644
--- a/Source/TableSource.m
+++ b/Source/TableSource.m
@@ -98,6 +98,7 @@ loads aTable, put it in an array, update the tableViewColumns and reload the tab
//perform queries and load results in array (each row as a dictionary)
tableSourceResult = [[mySQLConnection queryString:[NSString stringWithFormat:@"SHOW COLUMNS FROM %@", [selectedTable backtickQuotedString]]] retain];
+ [tableSourceResult setReturnDataAsStrings:YES];
// listFieldsFromTable is broken in the current version of the framework (no back-ticks for table name)!
// tableSourceResult = [[mySQLConnection listFieldsFromTable:selectedTable] retain];
@@ -106,6 +107,7 @@ loads aTable, put it in an array, update the tableViewColumns and reload the tab
[tableSourceResult release];
indexResult = [[mySQLConnection queryString:[NSString stringWithFormat:@"SHOW INDEX FROM %@", [selectedTable backtickQuotedString]]] retain];
+ [indexResult setReturnDataAsStrings:YES];
// [indexes setArray:[[self fetchResultAsArray:indexResult] retain]];
[indexes setArray:[self fetchResultAsArray:indexResult]];
[indexResult release];
@@ -972,6 +974,7 @@ returns a dictionary containing enum/set field names as key and possible values
int i;
queryResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SHOW COLUMNS FROM %@", [selectedTable backtickQuotedString]]];
+ [queryResult setReturnDataAsStrings:YES];
if ([queryResult numOfRows]) [queryResult dataSeek:0];
[tempResult addObject:[queryResult fetchFieldNames]];