diff --git a/source/dbconnection.pas b/source/dbconnection.pas index 35177922..585c4b5a 100644 --- a/source/dbconnection.pas +++ b/source/dbconnection.pas @@ -821,10 +821,10 @@ begin // Build plink.exe command line // plink bob@domain.com -pw myPassw0rd1 -P 22 -i "keyfile.pem" -L 55555:localhost:3306 PlinkCmd := FConnection.Parameters.SSHPlinkExe + ' -ssh '; - if FConnection.Parameters.SSHUser <> '' then - PlinkCmd := PlinkCmd + FConnection.Parameters.SSHUser + '@'; - if FConnection.Parameters.SSHHost <> '' then - PlinkCmd := PlinkCmd + FConnection.Parameters.SSHHost + if FConnection.Parameters.SSHUser.Trim <> '' then + PlinkCmd := PlinkCmd + FConnection.Parameters.SSHUser.Trim + '@'; + if FConnection.Parameters.SSHHost.Trim <> '' then + PlinkCmd := PlinkCmd + FConnection.Parameters.SSHHost.Trim else PlinkCmd := PlinkCmd + FConnection.Parameters.Hostname; if FConnection.Parameters.SSHPassword <> '' then begin @@ -1922,7 +1922,6 @@ begin ntMSSQL_VINES: NetLib := 'DBMSVINN'; ntMSSQL_RPC: NetLib := 'DBMSRPCN'; end; - //fadohandle.Properties.Item['Initial Catalog'] := ''; DataSource := Parameters.Hostname; if (Parameters.NetType = ntMSSQL_TCPIP) and (Parameters.Port <> 0) then @@ -2730,10 +2729,6 @@ begin Result := GetCreateViewCode(Obj.Database, Obj.Name) else Result := GetVar('SHOW CREATE '+UpperCase(Obj.ObjType)+' '+QuoteIdent(Obj.Database)+'.'+QuoteIdent(Obj.Name), Column); - //if UpperCase(Obj.ObjType)='TABLE' then begin - // Result := Result + ' `compression`=''tokudb_zlib'''; - //Log(lcinfo, Result); - //end; TmpObj.Free; end; @@ -3170,7 +3165,6 @@ begin end else s := QuoteIdent(Value); Query(Format(GetSQLSpecifity(spUSEQuery), [s]), False); - //TAdoDBConnection(self).fadohandle.ConnectionObject.Properties.Item['Initial Catalog'] := Value; end; if Assigned(FOnObjectnamesChanged) then FOnObjectnamesChanged(Self, FDatabase); @@ -3371,7 +3365,6 @@ end; function TPgConnection.GetLastErrorMsg: String; begin - // https://support.microsoft.com/en-us/help/3179560/update-for-visual-c-2013-and-visual-c-redistributable-package Result := DecodeAPIString(FLib.PQerrorMessage(FHandle)); Result := Trim(Result); end; @@ -4391,14 +4384,6 @@ var i: Integer; begin // Send EXPLAIN output to MariaDB.org - - // Mimimum structure of what seems compatible: - //+ - //|id|select_type|table|type|possible_keys|key|key_len|ref|rows|Extra| - //+ - //|1|SIMPLE|t1|ALL|NULL|NULL|NULL|NULL|3|| - //|1|SIMPLE|t1|ALL|NULL|NULL|NULL|NULL|3|| - Result := True; Database := DatabaseName; Results := GetResults('EXPLAIN '+SQL); @@ -5114,7 +5099,6 @@ begin ColSpec := Copy(CreateTable, rx.MatchPos[0], SIZE_MB); ColSpec := Copy(ColSpec, 1, Pos(#10, ColSpec)); ColSpec := Trim(ColSpec); - //Log(lcInfo, '>> '+ColSpec); Col := TTableColumn.Create(Self); Columns.Add(Col); @@ -5238,7 +5222,6 @@ begin end; Delete(ColSpec, 1, rxCol.MatchLen[1]); ColSpec := Trim(ColSpec); - //Log(lcInfo, ' Detected DefaultText: "'+Col.DefaultText+'" Detected DefaultType: '+Integer(Col.DefaultType).ToString); // Do the same for a potentially existing ON UPDATE clause if ColSpec.StartsWith('ON UPDATE ', True) then begin @@ -5250,7 +5233,6 @@ begin Col.OnUpdateText := Col.OnUpdateText.TrimRight([',']); Col.OnUpdateType := cdtExpression; Delete(ColSpec, 1, rxCol.MatchPos[1]); - //Log(lcInfo, ' Detected OnUpdateText: "'+Col.OnUpdateText+'" Detected OnUpdateType: '+Integer(Col.OnUpdateType).ToString); end; end; @@ -5726,7 +5708,6 @@ begin FColumnNames.Clear; FColumnOrgNames.Clear; for i:=0 to NumFields-1 do begin - //Field := FConnection.Lib.mysql_fetch_field_direct(LastResult, i); Field := FConnection.Lib.mysql_fetch_field_direct(LastResult, i); FColumnNames.Add(Connection.DecodeAPIString(Field.name)); if Connection.ServerVersionInt >= 40100 then @@ -5737,7 +5718,6 @@ begin FColumnTypes[i] := FConnection.Datatypes[0]; if (Field.flags and AUTO_INCREMENT_FLAG) = AUTO_INCREMENT_FLAG then FAutoIncrementColumn := i; - //FConnection.Log(lcDebug, 'Field._type: '+Field._type.ToString); for j:=0 to High(FConnection.Datatypes) do begin if (Field.flags and ENUM_FLAG) = ENUM_FLAG then begin if FConnection.Datatypes[j].Index = dtEnum then @@ -7101,10 +7081,8 @@ begin Result := Connection.GetKeyColumns(FColumns, FKeys); if Result.Count = 0 then begin // No good key found. Just expect all columns to be present. - // .. at least of it's not MemSQL, who does not support a later added LIMIT - // SQL Error (1749): Feature 'UPDATE...LIMIT must be constrained to a single partition' is not supported by MemSQL Distributed - for i:=0 to FColumns.Count-1 do - Result.Add(FColumns[i].Name); + for i:=0 to FColumns.Count-1 do + Result.Add(FColumns[i].Name); end; end;