mORMot and Open Source friends
Check-in [30a48e5b16]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:{5234} fixed TSQLDBConnectionPropertiesThreadSafe.CurrentThreadConnectionIndex
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 30a48e5b16af594e0ca0b48e7d163d66e3e7eca0
User & Date: ab 2019-06-12 09:29:12
Context
2019-06-12
13:56
{5235} try to circumvent Delphi 5 compilation issues - with no success yet check-in: aff7fc6b62 user: ab tags: trunk
09:29
{5234} fixed TSQLDBConnectionPropertiesThreadSafe.CurrentThreadConnectionIndex check-in: 30a48e5b16 user: ab tags: trunk
2019-05-29
11:32
{5233} let TSQLDBStatement.FetchAllToBinary handle ftUnknown results (e.g. from SQLite3 computed fields) check-in: 41e834407b user: ab tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to SynCommons.pas.

45504
45505
45506
45507
45508
45509
45510
45511
45512
45513
45514
45515
45516
45517
45518
45519
45520
45521
45522
45523
45524
45525
45526
45527
45528
45529
45530
45531
45532
45533
  ndx := SearchItemByProp(aPropName,aPropValue,aPropValueCaseSensitive);
  if ndx<0 then
    result := false else
    result := Delete(ndx);
end;

function TDocVariantData.DeleteByValue(const aValue: Variant;
  CaseInsensitive: boolean=false): integer;
var ndx: integer;
begin
  result := 0;
  if VarIsEmptyOrNull(aValue) then begin
    for ndx := VCount-1 downto 0 do
    if VarDataIsEmptyOrNull(@VValue[ndx]) then begin
      Delete(ndx);
      inc(result);
    end;
  end else
    for ndx := VCount-1 downto 0 do
    if SortDynArrayVariantComp(TVarData(VValue[ndx]),TVarData(aValue),CaseInsensitive)=0 then begin
      Delete(ndx);
      inc(result);
    end;
end;

function TDocVariantData.DeleteByStartName(aStartName: PUTF8Char; aStartNameLen: integer): integer;
var ndx: integer;
    upname: array[byte] of AnsiChar;
begin
  result := 0;






|





|
|
|
|


|
|
|
|







45504
45505
45506
45507
45508
45509
45510
45511
45512
45513
45514
45515
45516
45517
45518
45519
45520
45521
45522
45523
45524
45525
45526
45527
45528
45529
45530
45531
45532
45533
  ndx := SearchItemByProp(aPropName,aPropValue,aPropValueCaseSensitive);
  if ndx<0 then
    result := false else
    result := Delete(ndx);
end;

function TDocVariantData.DeleteByValue(const aValue: Variant;
  CaseInsensitive: boolean): integer;
var ndx: integer;
begin
  result := 0;
  if VarIsEmptyOrNull(aValue) then begin
    for ndx := VCount-1 downto 0 do
      if VarDataIsEmptyOrNull(@VValue[ndx]) then begin
        Delete(ndx);
        inc(result);
      end;
  end else
    for ndx := VCount-1 downto 0 do
      if SortDynArrayVariantComp(TVarData(VValue[ndx]),TVarData(aValue),CaseInsensitive)=0 then begin
        Delete(ndx);
        inc(result);
      end;
end;

function TDocVariantData.DeleteByStartName(aStartName: PUTF8Char; aStartNameLen: integer): integer;
var ndx: integer;
    upname: array[byte] of AnsiChar;
begin
  result := 0;

Changes to SynDB.pas.

6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
    result := fLatestConnectionRetrievedInPool;
    if result>=0 then begin
      conn := fConnectionPool.List[result];
      if (conn.fThreadID=id) and not conn.IsOutdated(tix) then
        exit;
    end;
    result := 0;
    while result<fConnectionPool.Count-1 do begin
      conn := TSQLDBConnectionThreadSafe(fConnectionPool.List[result]);
      if conn.IsOutdated(tix) then // to guarantee reconnection
        fConnectionPool.Delete(result) else begin
        if conn.fThreadID=id then begin
          fLatestConnectionRetrievedInPool := result;
          exit;
        end;






|







6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
    result := fLatestConnectionRetrievedInPool;
    if result>=0 then begin
      conn := fConnectionPool.List[result];
      if (conn.fThreadID=id) and not conn.IsOutdated(tix) then
        exit;
    end;
    result := 0;
    while result<fConnectionPool.Count do begin
      conn := TSQLDBConnectionThreadSafe(fConnectionPool.List[result]);
      if conn.IsOutdated(tix) then // to guarantee reconnection
        fConnectionPool.Delete(result) else begin
        if conn.fThreadID=id then begin
          fLatestConnectionRetrievedInPool := result;
          exit;
        end;

Changes to SynopseCommit.inc.

1
'1.18.5233'
|
1
'1.18.5234'