aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-09-03 17:40:02 +0000
committerBibiko <bibiko@eva.mpg.de>2009-09-03 17:40:02 +0000
commitcdc6128ce0ba10b15ec735dc1191705c8b75a19c (patch)
treefd883f885575fdb2d5d63d700121568571eedc06
parenta7e61c61e5ceb8f5d9a7a4d2cfa7b83df95e55bb (diff)
downloadsequelpro-cdc6128ce0ba10b15ec735dc1191705c8b75a19c.tar.gz
sequelpro-cdc6128ce0ba10b15ec735dc1191705c8b75a19c.tar.bz2
sequelpro-cdc6128ce0ba10b15ec735dc1191705c8b75a19c.zip
• fixed (hopefully) : While adding all procedures and functions do check for mysql errors - if information_schema is not accessible for some reasons omit adding procedures and functions silently
-rw-r--r--Source/TablesList.m4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/TablesList.m b/Source/TablesList.m
index ef5a48a8..48a885f8 100644
--- a/Source/TablesList.m
+++ b/Source/TablesList.m
@@ -116,7 +116,9 @@
NSString *pQuery = [NSString stringWithFormat:@"SELECT * FROM information_schema.routines WHERE routine_schema = '%@' ORDER BY routine_name",[tableDocumentInstance database]];
theResult = [mySQLConnection queryString:pQuery];
- if( [theResult numOfRows] ) {
+ // Check for mysql errors - if information_schema is not accessible for some reasons
+ // omit adding procedures and functions
+ if([[mySQLConnection getLastErrorMessage] isEqualToString:@""] && theResult != nil && [theResult numOfRows] ) {
// add the header row
[tables addObject:NSLocalizedString(@"PROCS & FUNCS",@"header for procs & funcs list")];
[tableTypes addObject:[NSNumber numberWithInt:SP_TABLETYPE_NONE]];