mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Issue #350: Roll back modifications I made for supporting ProxySQL Admin interface. There would be too many more issues.
This commit is contained in:
@ -277,7 +277,6 @@ type
|
|||||||
function IsAzure: Boolean;
|
function IsAzure: Boolean;
|
||||||
function IsMemSQL: Boolean;
|
function IsMemSQL: Boolean;
|
||||||
function IsRedshift: Boolean;
|
function IsRedshift: Boolean;
|
||||||
function IsProxySQL: Boolean;
|
|
||||||
property ImageIndex: Integer read GetImageIndex;
|
property ImageIndex: Integer read GetImageIndex;
|
||||||
function GetLibraries: TStringList;
|
function GetLibraries: TStringList;
|
||||||
function DefaultLibrary: String;
|
function DefaultLibrary: String;
|
||||||
@ -1590,12 +1589,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function TConnectionParameters.IsProxySQL: Boolean;
|
|
||||||
begin
|
|
||||||
Result := IsAnyMySQL and (Pos('proxysql admin module', LowerCase(ServerVersion)) > 0);
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
function TConnectionParameters.GetImageIndex: Integer;
|
function TConnectionParameters.GetImageIndex: Integer;
|
||||||
begin
|
begin
|
||||||
if IsFolder then
|
if IsFolder then
|
||||||
@ -2133,7 +2126,7 @@ begin
|
|||||||
// Try to fire the very first query against the server, which probably run into the following error:
|
// Try to fire the very first query against the server, which probably run into the following error:
|
||||||
// "Error 1820: You must SET PASSWORD before executing this statement"
|
// "Error 1820: You must SET PASSWORD before executing this statement"
|
||||||
try
|
try
|
||||||
Query('SELECT 1');
|
ThreadId;
|
||||||
except
|
except
|
||||||
on E:EDbError do begin
|
on E:EDbError do begin
|
||||||
if GetLastErrorCode = 1820 then begin
|
if GetLastErrorCode = 1820 then begin
|
||||||
@ -2166,22 +2159,16 @@ begin
|
|||||||
Log(lcInfo, _('Characterset')+': '+GetCharacterSet);
|
Log(lcInfo, _('Characterset')+': '+GetCharacterSet);
|
||||||
FConnectionStarted := GetTickCount div 1000;
|
FConnectionStarted := GetTickCount div 1000;
|
||||||
FServerUptime := -1;
|
FServerUptime := -1;
|
||||||
try
|
Status := GetResults('SHOW STATUS');
|
||||||
// This gives an SQL error on ProxySQL Admin Module
|
while not Status.Eof do begin
|
||||||
Status := GetResults('SHOW STATUS');
|
StatusName := LowerCase(Status.Col(0));
|
||||||
while not Status.Eof do begin
|
if StatusName = 'uptime' then
|
||||||
StatusName := LowerCase(Status.Col(0));
|
FServerUptime := StrToIntDef(Status.Col(1), FServerUptime)
|
||||||
if StatusName = 'uptime' then
|
else if StatusName = 'ssl_cipher' then
|
||||||
FServerUptime := StrToIntDef(Status.Col(1), FServerUptime)
|
FIsSSL := Status.Col(1) <> '';
|
||||||
else if StatusName = 'ssl_cipher' then
|
Status.Next;
|
||||||
FIsSSL := Status.Col(1) <> '';
|
|
||||||
Status.Next;
|
|
||||||
end;
|
|
||||||
except
|
|
||||||
on E:EDbError do
|
|
||||||
Log(lcError, E.Message);
|
|
||||||
end;
|
end;
|
||||||
FServerDateTimeOnStartup := GetVar('SELECT CURRENT_TIMESTAMP');
|
FServerDateTimeOnStartup := GetVar('SELECT NOW()');
|
||||||
FServerOS := GetSessionVariable('version_compile_os');
|
FServerOS := GetSessionVariable('version_compile_os');
|
||||||
FRealHostname := GetSessionVariable('hostname');
|
FRealHostname := GetSessionVariable('hostname');
|
||||||
FServerVersionUntouched := GetSessionVariable('version') + ' - ' + GetSessionVariable('version_comment');
|
FServerVersionUntouched := GetSessionVariable('version') + ' - ' + GetSessionVariable('version_comment');
|
||||||
@ -3659,12 +3646,8 @@ function TMySQLConnection.GetThreadId: Int64;
|
|||||||
begin
|
begin
|
||||||
if FThreadId = 0 then begin
|
if FThreadId = 0 then begin
|
||||||
Ping(False);
|
Ping(False);
|
||||||
if FActive then begin
|
if FActive then
|
||||||
if Parameters.IsProxySQL then
|
FThreadID := StrToInt64Def(GetVar('SELECT CONNECTION_ID()'), 0);
|
||||||
FThreadID := -1
|
|
||||||
else
|
|
||||||
FThreadID := StrToInt64Def(GetVar('SELECT CONNECTION_ID()'), 0);
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
Result := FThreadID;
|
Result := FThreadID;
|
||||||
end;
|
end;
|
||||||
|
Reference in New Issue
Block a user