aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/SPDatabaseStructure.m18
-rw-r--r--Source/SPNavigatorController.m14
2 files changed, 16 insertions, 16 deletions
diff --git a/Source/SPDatabaseStructure.m b/Source/SPDatabaseStructure.m
index c342e2cb..399fe3f7 100644
--- a/Source/SPDatabaseStructure.m
+++ b/Source/SPDatabaseStructure.m
@@ -480,19 +480,19 @@
return;
}
- // Retrieve the column details
- theResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SELECT * FROM `information_schema`.`ROUTINES` WHERE `information_schema`.`ROUTINES`.`ROUTINE_SCHEMA` = '%@'", [currentDatabase stringByReplacingOccurrencesOfString:@"'" withString:@"\\'"]]];
+ // Retrieve the column details (only those we need so we don't fetch the whole function body which might be huge)
+ theResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SELECT SPECIFIC_NAME, ROUTINE_TYPE, DTD_IDENTIFIER, IS_DETERMINISTIC, SQL_DATA_ACCESS, SECURITY_TYPE, DEFINER FROM `information_schema`.`ROUTINES` WHERE `ROUTINE_SCHEMA` = %@", [currentDatabase tickQuotedString]]];
[theResult setDefaultRowReturnType:SPMySQLResultRowAsArray];
// Loop through the rows and extract the function details
for (NSArray *row in theResult) {
- NSString *fname = [row objectAtIndex:0];
- NSString *type = ([[row objectAtIndex:4] isEqualToString:@"FUNCTION"]) ? @"3" : @"2";
- NSString *dtd = [row objectAtIndex:5];
- NSString *det = [row objectAtIndex:11];
- NSString *dataaccess = [row objectAtIndex:12];
- NSString *security_type = [row objectAtIndex:14];
- NSString *definer = [row objectAtIndex:19];
+ NSString *fname = [row objectAtIndex:0];
+ NSString *type = ([[row objectAtIndex:1] isEqualToString:@"FUNCTION"]) ? @"3" : @"2";
+ NSString *dtd = [row objectAtIndex:2];
+ NSString *det = [row objectAtIndex:3];
+ NSString *dataaccess = [row objectAtIndex:4];
+ NSString *security_type = [row objectAtIndex:5];
+ NSString *definer = [row objectAtIndex:6];
// Generate "table" and "field" names and add to structure key store
NSString *table_id = [NSString stringWithFormat:@"%@%@%@", db_id, SPUniqueSchemaDelimiter, fname];
diff --git a/Source/SPNavigatorController.m b/Source/SPNavigatorController.m
index 0e041cd4..f3896f45 100644
--- a/Source/SPNavigatorController.m
+++ b/Source/SPNavigatorController.m
@@ -1250,28 +1250,28 @@ static NSComparisonResult compareStrings(NSString *s1, NSString *s2, void* conte
if(type == 2) // PROCEDURE
switch(anIndex) {
case 0:
- return @"DTD Identifier";
+ return NSLocalizedString(@"DTD Identifier",@"dtd identifier label (Navigator)");
case 1:
- return @"SQL Data Access";
+ return NSLocalizedString(@"SQL Data Access",@"sql data access label (Navigator)");
case 2:
- return @"Is Deterministic";
+ return NSLocalizedString(@"Is Deterministic",@"is deterministic label (Navigator)");
case 3:
return NSLocalizedString(@"Execution Privilege", @"execution privilege label (Navigator)");
case 4:
- return @"Definer";
+ return NSLocalizedString(@"Definer",@"definer label (Navigator)");
}
if(type == 3) // FUNCTION
switch(anIndex) {
case 0:
return NSLocalizedString(@"Return Type", @"return type label (Navigator)");
case 1:
- return @"SQL Data Access";
+ return NSLocalizedString(@"SQL Data Access",@"sql data access label (Navigator)");
case 2:
- return @"Is Deterministic";
+ return NSLocalizedString(@"Is Deterministic",@"is deterministic label (Navigator)");
case 3:
return NSLocalizedString(@"Execution Privilege", @"execution privilege label (Navigator)");
case 4:
- return @"Definer";
+ return NSLocalizedString(@"Definer",@"definer label (Navigator)");
}
return @"";
}