From cdc6128ce0ba10b15ec735dc1191705c8b75a19c Mon Sep 17 00:00:00 2001 From: Bibiko Date: Thu, 3 Sep 2009 17:40:02 +0000 Subject: =?UTF-8?q?=E2=80=A2=20fixed=20(hopefully)=20:=20While=20adding=20?= =?UTF-8?q?all=20procedures=20and=20functions=20do=20check=20for=20mysql?= =?UTF-8?q?=20errors=20-=20if=20information=5Fschema=20is=20not=20accessib?= =?UTF-8?q?le=20for=20some=20reasons=20omit=20adding=20procedures=20and=20?= =?UTF-8?q?functions=20silently?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/TablesList.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Source') 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]]; -- cgit v1.2.3