ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/runtime/IBSQLMonitor.pas
(Generate patch)

Comparing ibx/trunk/runtime/IBSQLMonitor.pas (file contents):
Revision 33 by tony, Sat Jul 18 12:30:52 2015 UTC vs.
Revision 139 by tony, Wed Jan 24 16:16:29 2018 UTC

# Line 41 | Line 41 | unit IBSQLMonitor;
41  
42   {$Mode Delphi}
43  
44 + {$codepage UTF8}
45 +
46   interface
47  
48   uses
49 <  IB, IBUtils, IBSQL, IBCustomDataSet, IBDatabase, IBServices, IBXConst,SysUtils,
49 >  IB, IBUtils, IBSQL, IBCustomDataSet, IBDatabase, IBServices, IBTypes ,SysUtils,
50    Classes,
51   {$IFDEF WINDOWS }
52    Windows
# Line 142 | Line 144 | function MonitoringEnabled: Boolean;
144   implementation
145  
146   uses
147 <   contnrs, syncobjs, CustApp
147 >   contnrs, syncobjs, CustApp, FBMessages
148     {$IFDEF USE_SV5_IPC}
149     ,ipc, Errors, baseunix
148   {$IF FPC_FULLVERSION <= 20402 } , initc {$ENDIF}
150     {$ENDIF};
151  
151   {$IF FPC_FULLVERSION < 20600 }{$STATIC ON} {$ENDIF}
152  
153   const
154    cMonitorHookSize = 1024;
# Line 530 | Line 530 | begin
530      else
531        st := qry.Name;
532      st := st + ': [Execute] ' + qry.SQL.Text; {do not localize}
533 <    if qry.Params.Count > 0 then begin
534 <      for i := 0 to qry.Params.Count - 1 do begin
533 >    if qry.Params.GetCount > 0 then begin
534 >      for i := 0 to qry.Params.GetCount - 1 do begin
535          st := st + CRLF + '  ' + qry.Params[i].Name + ' = ';
536          try
537            if qry.Params[i].IsNull then
# Line 724 | Line 724 | begin
724    FMsgs := TObjectList.Create(true);
725    FCriticalSection := TCriticalSection.Create;
726    FMsgAvailable := TEventObject.Create(FGlobalInterface.Sa,true,false,cWriteMessageAvailable);
727 <  Resume;
727 >  Start;
728   end;
729  
730   destructor TWriterThread.Destroy;
# Line 981 | Line 981 | begin
981    FCriticalSection := TCriticalSection.Create;
982    {$IFDEF DEBUG}writeln('Reader Thread Created');{$ENDIF}
983    FGlobalInterface.ReadReadyEvent.Lock;           { Initialise Read Ready}
984 <  Resume;
984 >  Start;
985   end;
986  
987   destructor TReaderThread.Destroy;
# Line 1099 | Line 1099 | initialization
1099    FReaderThread := nil;
1100    bDone := False;
1101   {$IFDEF USE_SV5_IPC}
1102 <  if FpGetEnv('FBSQL_IPCFILENAME') <> nil then
1103 <    IPCFileName := strpas(FpGetEnv('FBSQL_IPCFILENAME'))
1102 >  if GetEnvironmentVariable('FBSQL_IPCFILENAME') <> '' then
1103 >    IPCFileName := GetEnvironmentVariable('FBSQL_IPCFILENAME')
1104    else
1105 <    IPCFileName := '/tmp/' + IPCFileName + '.' + strpas(FpGetEnv('USER'));
1105 >    IPCFileName := GetTempDir(true) + IPCFileName + '.' + GetEnvironmentVariable('USER');
1106   {$ENDIF}
1107  
1108   finalization

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines