Accidentally forgotten files for r3849

This commit is contained in:
Ansgar Becker
2011-05-28 21:25:56 +00:00
parent a329844e9f
commit 0b49dfc4b8
3 changed files with 4 additions and 4 deletions

View File

@ -1701,7 +1701,7 @@ begin
FAllDatabases := GetCol('SHOW DATABASES'); FAllDatabases := GetCol('SHOW DATABASES');
except on E:EDatabaseError do except on E:EDatabaseError do
try 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 except
on E:EDatabaseError do begin on E:EDatabaseError do begin
FAllDatabases := TStringList.Create; FAllDatabases := TStringList.Create;

View File

@ -7831,7 +7831,7 @@ begin
if Conn <> nil then begin if Conn <> nil then begin
try try
if Conn.InformationSchemaObjects.IndexOf('SCHEMATA') > -1 then 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 except
on E:EDatabaseError do on E:EDatabaseError do
LogSQL(E.Message, lcError); 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 // 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')+', ' 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') + 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 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 // 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'); Results := Conn.GetResults('SHOW FULL PROCESSLIST');

View File

@ -442,7 +442,7 @@ begin
if DBObject.Name <> '' then begin if DBObject.Name <> '' then begin
// Create temp name // Create temp name
i := 0; 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)+ ' WHERE ROUTINE_SCHEMA = '+esc(Mainform.ActiveDatabase)+
' AND ROUTINE_TYPE = '+esc(ProcOrFunc) ' AND ROUTINE_TYPE = '+esc(ProcOrFunc)
); );