mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-14 10:02:10 +08:00
Accidentally forgotten files for r3849
This commit is contained in:
@ -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;
|
||||||
|
@ -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');
|
||||||
|
@ -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)
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user