diff --git a/source/dbconnection.pas b/source/dbconnection.pas index 112789cc..6c09c164 100644 --- a/source/dbconnection.pas +++ b/source/dbconnection.pas @@ -1701,7 +1701,7 @@ begin FAllDatabases := GetCol('SHOW DATABASES'); except on E:EDatabaseError do try - FAllDatabases := GetCol('SELECT '+QuoteIdent('SCHEMA_NAME')+' FROM '+QuoteIdent(DBNAME_INFORMATION_SCHEMA)+'.'+QuoteIdent('SCHEMATA')+' ORDER BY '+QuoteIdent('SCHEMA_NAME')); + FAllDatabases := GetCol('SELECT '+QuoteIdent('SCHEMA_NAME')+' FROM '+QuoteIdent('information_schema')+'.'+QuoteIdent('SCHEMATA')+' ORDER BY '+QuoteIdent('SCHEMA_NAME')); except on E:EDatabaseError do begin FAllDatabases := TStringList.Create; diff --git a/source/main.pas b/source/main.pas index 55a9a9a4..0af977ee 100644 --- a/source/main.pas +++ b/source/main.pas @@ -7831,7 +7831,7 @@ begin if Conn <> nil then begin try if Conn.InformationSchemaObjects.IndexOf('SCHEMATA') > -1 then - AllDatabasesDetails := Conn.GetResults('SELECT * FROM '+Conn.QuoteIdent(DBNAME_INFORMATION_SCHEMA)+'.'+Conn.QuoteIdent('SCHEMATA')); + AllDatabasesDetails := Conn.GetResults('SELECT * FROM '+Conn.QuoteIdent('information_schema')+'.'+Conn.QuoteIdent('SCHEMATA')); except on E:EDatabaseError do LogSQL(E.Message, lcError); @@ -8109,7 +8109,7 @@ begin // Minimize network traffic on newer servers by fetching only first KB of SQL query in "Info" column Results := Conn.GetResults('SELECT '+Conn.QuoteIdent('ID')+', '+Conn.QuoteIdent('USER')+', '+Conn.QuoteIdent('HOST')+', '+Conn.QuoteIdent('DB')+', ' + Conn.QuoteIdent('COMMAND')+', '+Conn.QuoteIdent('TIME')+', '+Conn.QuoteIdent('STATE')+', LEFT('+Conn.QuoteIdent('INFO')+', '+IntToStr(InfoLen)+') AS '+Conn.QuoteIdent('Info') - + ' FROM '+Conn.QuoteIdent(DBNAME_INFORMATION_SCHEMA)+'.'+Conn.QuoteIdent('PROCESSLIST')); + + ' FROM '+Conn.QuoteIdent('information_schema')+'.'+Conn.QuoteIdent('PROCESSLIST')); end else begin // Older servers fetch the whole query length, but at least we cut them off below, so a high memory usage is just a peak Results := Conn.GetResults('SHOW FULL PROCESSLIST'); diff --git a/source/routine_editor.pas b/source/routine_editor.pas index 0efec8fc..2b0beb2b 100644 --- a/source/routine_editor.pas +++ b/source/routine_editor.pas @@ -442,7 +442,7 @@ begin if DBObject.Name <> '' then begin // Create temp name i := 0; - allRoutineNames := DBObject.Connection.GetCol('SELECT ROUTINE_NAME FROM '+DBObject.Connection.QuoteIdent(DBNAME_INFORMATION_SCHEMA)+'.'+DBObject.Connection.QuoteIdent('ROUTINES')+ + allRoutineNames := DBObject.Connection.GetCol('SELECT ROUTINE_NAME FROM '+DBObject.Connection.QuoteIdent('information_schema')+'.'+DBObject.Connection.QuoteIdent('ROUTINES')+ ' WHERE ROUTINE_SCHEMA = '+esc(Mainform.ActiveDatabase)+ ' AND ROUTINE_TYPE = '+esc(ProcOrFunc) );