diff --git a/res/icons/server-clickhouse.png b/res/icons/server-clickhouse.png deleted file mode 100644 index 97ba0367..00000000 Binary files a/res/icons/server-clickhouse.png and /dev/null differ diff --git a/source/connections.pas b/source/connections.pas index 6a3a6f29..38cf9dff 100644 --- a/source/connections.pas +++ b/source/connections.pas @@ -1430,7 +1430,7 @@ begin editUsername.Enabled := lblUsername.Enabled; lblPassword.Enabled := lblUsername.Enabled; editPassword.Enabled := lblUsername.Enabled; - lblPort.Enabled := Params.NetType in [ntMySQL_TCPIP, ntMySQL_SSHtunnel, ntMySQL_ProxySQLAdmin, ntMySQL_ClickHouse, ntMSSQL_TCPIP, ntPgSQL_TCPIP, ntPgSQL_SSHtunnel]; + lblPort.Enabled := Params.NetType in [ntMySQL_TCPIP, ntMySQL_SSHtunnel, ntMySQL_ProxySQLAdmin, ntMSSQL_TCPIP, ntPgSQL_TCPIP, ntPgSQL_SSHtunnel]; editPort.Enabled := lblPort.Enabled; updownPort.Enabled := lblPort.Enabled; chkCompressed.Enabled := Params.IsAnyMySQL; @@ -1440,7 +1440,7 @@ begin // SSH tunnel tab: tabSSHtunnel.TabVisible := Params.NetType in [ntMySQL_SSHtunnel, ntPgSQL_SSHtunnel]; // Advanced tab: - chkWantSSL.Enabled := Params.NetType in [ntMySQL_TCPIP, ntMySQL_SSHtunnel, ntMySQL_ProxySQLAdmin, ntMySQL_ClickHouse, ntPgSQL_TCPIP, ntPgSQL_SSHtunnel]; + chkWantSSL.Enabled := Params.NetType in [ntMySQL_TCPIP, ntMySQL_SSHtunnel, ntMySQL_ProxySQLAdmin, ntPgSQL_TCPIP, ntPgSQL_SSHtunnel]; lblSSLPrivateKey.Enabled := Params.WantSSL; editSSLPrivateKey.Enabled := Params.WantSSL; lblSSLCACertificate.Enabled := Params.WantSSL; diff --git a/source/dbconnection.pas b/source/dbconnection.pas index 0ab1196f..ab684705 100644 --- a/source/dbconnection.pas +++ b/source/dbconnection.pas @@ -272,8 +272,7 @@ type ntPgSQL_TCPIP, ntPgSQL_SSHtunnel, ntSQLite, - ntMySQL_ProxySQLAdmin, - ntMySQL_ClickHouse + ntMySQL_ProxySQLAdmin ); TNetTypeGroup = (ngMySQL, ngMSSQL, ngPgSQL, ngSQLite); TNetGroupLibs = TDictionary; @@ -316,7 +315,6 @@ type function IsInfiniDB: Boolean; function IsInfobright: Boolean; function IsProxySQLAdmin: Boolean; - function IsClickHouse: Boolean; function IsAzure: Boolean; function IsMemSQL: Boolean; function IsRedshift: Boolean; @@ -1474,7 +1472,6 @@ function TConnectionParameters.NetTypeName(LongFormat: Boolean): String; const PrefixMysql = 'MariaDB or MySQL'; PrefixProxysql = 'ProxySQL Admin'; - PrefixClickhouse = 'ClickHouse MySQL'; PrefixMssql = 'Microsoft SQL Server'; PrefixPostgres = 'PostgreSQL'; PrefixRedshift = 'Redshift PG'; @@ -1489,7 +1486,6 @@ begin ntMySQL_NamedPipe: Result := PrefixMysql+' (named pipe)'; ntMySQL_SSHtunnel: Result := PrefixMysql+' (SSH tunnel)'; ntMySQL_ProxySQLAdmin: Result := PrefixProxysql+' (Experimental)'; - ntMySQL_ClickHouse: Result := PrefixClickhouse+' (Experimental)'; ntMSSQL_NamedPipe: Result := PrefixMssql+' (named pipe)'; ntMSSQL_TCPIP: Result := PrefixMssql+' (TCP/IP)'; ntMSSQL_SPX: Result := PrefixMssql+' (SPX/IPX)'; @@ -1510,7 +1506,6 @@ begin else if IsInfobright then Result := 'Infobright' else if IsMemSQL then Result := 'MemSQL' else if IsProxySQLAdmin then Result := 'ProxySQL Admin' - else if IsClickHouse then Result := 'ClickHouse MySQL' else if IsMySQL(True) then Result := 'MySQL' else Result := PrefixMysql; end; @@ -1535,7 +1530,7 @@ end; function TConnectionParameters.GetNetTypeGroup: TNetTypeGroup; begin case FNetType of - ntMySQL_TCPIP, ntMySQL_NamedPipe, ntMySQL_SSHtunnel, ntMySQL_ProxySQLAdmin, ntMySQL_ClickHouse: + ntMySQL_TCPIP, ntMySQL_NamedPipe, ntMySQL_SSHtunnel, ntMySQL_ProxySQLAdmin: Result := ngMySQL; ntMSSQL_NamedPipe, ntMSSQL_TCPIP, ntMSSQL_SPX, ntMSSQL_VINES, ntMSSQL_RPC: Result := ngMSSQL; @@ -1595,7 +1590,6 @@ begin and (not IsInfiniDB) and (not IsInfobright) and (not IsProxySQLAdmin) - and (not IsClickHouse) and (not IsMemSQL); end; end; @@ -1631,12 +1625,6 @@ begin end; -function TConnectionParameters.IsClickHouse: Boolean; -begin - Result := NetType = ntMySQL_ClickHouse; -end; - - function TConnectionParameters.IsAzure: Boolean; begin Result := IsAnyMSSQL and (Pos('azure', LowerCase(ServerVersion)) > 0); @@ -1668,8 +1656,7 @@ begin else if IsInfiniDB then Result := 172 else if IsInfobright then Result := 173 else if IsMemSQL then Result := 194 - else if IsProxySQLAdmin then Result := 197 - else if IsClickHouse then Result := 203; + else if IsProxySQLAdmin then Result := 197; end; ngMSSQL: begin Result := 123; @@ -1693,8 +1680,6 @@ begin ngMySQL: begin if IsProxySQLAdmin then Result := 6032 - else if IsClickHouse then - Result := 8123 // todo: is that correct? else Result := 3306; end; @@ -2116,7 +2101,7 @@ begin end; case FParameters.NetType of - ntMySQL_TCPIP, ntMySQL_ProxySQLAdmin, ntMySQL_ClickHouse: begin + ntMySQL_TCPIP, ntMySQL_ProxySQLAdmin: begin end; ntMySQL_NamedPipe: begin @@ -2687,17 +2672,17 @@ begin FSQLSpecifities[spLikeCompare] := '%s LIKE %s'; FSQLSpecifities[spAddColumn] := 'ADD COLUMN %s'; FSQLSpecifities[spChangeColumn] := 'CHANGE COLUMN %s %s'; - FSQLSpecifities[spGlobalStatus] := 'SHOW /*!50002 GLOBAL */ STATUS'; - if Parameters.IsProxySQLAdmin then - FSQLSpecifities[spGlobalStatus] := 'SELECT * FROM stats_mysql_global'; - if Parameters.IsClickHouse then - FSQLSpecifities[spGlobalStatus] := 'SELECT * FROM system.metrics'; - FSQLSpecifities[spCommandsCounters] := 'SHOW /*!50002 GLOBAL */ STATUS LIKE ''Com\_%'''; - if Parameters.IsProxySQLAdmin then - FSQLSpecifities[spCommandsCounters] := 'SELECT * FROM stats_mysql_commands_counters'; + FSQLSpecifities[spGlobalStatus] := IfThen( + Parameters.IsProxySQLAdmin, + 'SELECT * FROM stats_mysql_global', + 'SHOW /*!50002 GLOBAL */ STATUS' + ); + FSQLSpecifities[spCommandsCounters] := IfThen( + Parameters.IsProxySQLAdmin, + 'SELECT * FROM stats_mysql_commands_counters', + 'SHOW /*!50002 GLOBAL */ STATUS LIKE ''Com\_%''' + ); FSQLSpecifities[spSessionVariables] := 'SHOW VARIABLES'; - if Parameters.IsClickHouse then - FSQLSpecifities[spSessionVariables] := 'SELECT * FROM system.settings'; FSQLSpecifities[spGlobalVariables] := 'SHOW GLOBAL VARIABLES'; FSQLSpecifities[spISSchemaCol] := '%s_SCHEMA'; FSQLSpecifities[spUSEQuery] := 'USE %s'; @@ -2902,7 +2887,7 @@ begin except // silently fail if IS does not exist, on super old servers end; - if (ServerVersionInt >= 50124) and (not Parameters.IsProxySQLAdmin) and (not Parameters.IsClickHouse) then + if (ServerVersionInt >= 50124) and (not Parameters.IsProxySQLAdmin) then FSQLSpecifities[spLockedTables] := 'SHOW OPEN TABLES FROM %s WHERE '+QuoteIdent('in_use')+'!=0'; end; @@ -3801,7 +3786,7 @@ begin if FThreadId = 0 then begin Ping(False); if FActive then begin - if Parameters.IsProxySQLAdmin or Parameters.IsClickHouse then + if Parameters.IsProxySQLAdmin then FThreadID := FLib.mysql_thread_id(FHandle) else FThreadID := StrToInt64Def(GetVar('SELECT CONNECTION_ID()'), 0); diff --git a/source/main.dfm b/source/main.dfm index 143b0216..3d13a5aa 100644 --- a/source/main.dfm +++ b/source/main.dfm @@ -16870,32 +16870,6 @@ object MainForm: TMainForm 518BC562B1582C168BC562B1582C168BC562B1582C168BC562B1582C168BC562 891891FF012639FDF74190BB900000000049454E44AE426082} end> - end - item - Name = 'server-clickhouse' - SourceImages = < - item - Image.Data = { - 89504E470D0A1A0A0000000D494844520000006400000064080600000070E295 - 54000000017352474200AECE1CE90000000467414D410000B18F0BFC61050000 - 00097048597300000EC300000EC301C76FA864000001E749444154785EEDDC31 - 2E445114C6F173995A6B190A0A85C226A814347A16424DA36711140AC5CC0AAC - C00A34E4B9312F9148CCDC77E324FFE2FF939BF79E6A3227DF775E356598C710 - 6DDEA3C44ED98DD7F1F94FC34BCCEADF63BD3D58FE67ADE3B2170FE3FD4AC322 - AEEA27BE181F572B715D3FEFE5F8B452FD1E8EEAE57EF9B4D6737CC461D98FCF - F1F9DF6C8C57413810180702E34060B206D2FAA2A05FB20652C6AB26B2B260AC - 2C181302E340605CEA30EE10181302E30E81B1B2604C088C3B04C684C0B84360 - AC2C1813026342605CEA3056168C09817187C058593056168C95056365C19810 - 181302634260B206A24E56168C95056342604C088C09813121C986456C0DF338 - A9E7B4E598907CDBF5DCD673D772B206A24E56168C95056342604C088C4B1DC6 - 81C03810180702933510DFB23A650DC4B7AC4E56168C95056365C19810181302 - 634260B206A21F6FF59CD773D672B27EFB7D3366F1546FFDEDF789AC2C18973A - 8C09813121302604C684C0640D449DAC2C182B0BC684C0981018973A8C038171 - 20300E04266B20BE6575CA1A886F599DAC2C182B0BC6CA823121302604C684C0 - 640D449DAC2C182B0B66E3FB776AA69C3626A4D3B481DCD4D3C684747287C0B8 - 43604C084CD640D4C9CA82B1B2604C088C098171A9C3381018078212F1058BDE - 7DE51C4B5BF00000000049454E44AE426082} - end> end> Left = 593 Top = 339 @@ -24665,32 +24639,6 @@ object MainForm: TMainForm 518BC562B1582C168BC562B1582C168BC562B1582C168BC562B1582C168BC562 891891FF012639FDF74190BB900000000049454E44AE426082} end> - end - item - Name = 'server-clickhouse' - SourceImages = < - item - Image.Data = { - 89504E470D0A1A0A0000000D494844520000006400000064080600000070E295 - 54000000017352474200AECE1CE90000000467414D410000B18F0BFC61050000 - 00097048597300000EC300000EC301C76FA864000001E749444154785EEDDC31 - 2E445114C6F173995A6B190A0A85C226A814347A16424DA36711140AC5CC0AAC - C00A34E4B9312F9148CCDC77E324FFE2FF939BF79E6A3227DF775E356598C710 - 6DDEA3C44ED98DD7F1F94FC34BCCEADF63BD3D58FE67ADE3B2170FE3FD4AC322 - AEEA27BE181F572B715D3FEFE5F8B452FD1E8EEAE57EF9B4D6737CC461D98FCF - F1F9DF6C8C57413810180702E34060B206D2FAA2A05FB20652C6AB26B2B260AC - 2C181302E340605CEA30EE10181302E30E81B1B2604C088C3B04C684C0B84360 - AC2C1813026342605CEA3056168C09817187C058593056168C95056365C19810 - 181302634260B206A24E56168C95056342604C088C09813121C986456C0DF338 - A9E7B4E598907CDBF5DCD673D772B206A24E56168C95056342604C088C4B1DC6 - 81C03810180702933510DFB23A650DC4B7AC4E56168C95056365C19810181302 - 634260B206A21F6FF59CD773D672B27EFB7D3366F1546FFDEDF789AC2C18973A - 8C09813121302604C684C0640D449DAC2C182B0BC684C0981018973A8C038171 - 20300E04266B20BE6575CA1A886F599DAC2C182B0BC6CA823121302604C684C0 - 640D449DAC2C182B0B66E3FB776AA69C3626A4D3B481DCD4D3C684747287C0B8 - 43604C084CD640D4C9CA82B1B2604C088C098171A9C3381018078212F1058BDE - 7DE51C4B5BF00000000049454E44AE426082} - end> end> Left = 689 Top = 339