From cb1b7b0c21b9ddb70ff4558acad9634afbd18f3f Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Thu, 29 Oct 2009 22:18:26 +0000 Subject: [PATCH] Silence exception on old servers for users which don't have access to information_schema, where MySQL should say "Unknown database". Fixes issue #1421. --- source/main.pas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/main.pas b/source/main.pas index 371fa009..87853a0d 100644 --- a/source/main.pas +++ b/source/main.pas @@ -3591,8 +3591,11 @@ begin Screen.Cursor := crHourGlass; ShowStatus('Fetching tables from "' + db + '" ...'); try - if not Assigned(InformationSchemaTables) then + if not Assigned(InformationSchemaTables) then try InformationSchemaTables := Connection.GetCol('SHOW TABLES FROM '+mask(DBNAME_INFORMATION_SCHEMA)); + except + InformationSchemaTables := TWideStringlist.Create; + end; if InformationSchemaTables.IndexOf('TABLES') > -1 then begin Unions := TWideStringlist.Create;