Subject | Re: [firebird-support] select with lock |
---|---|
Author | Hans Hoogstraat |
Post date | 2003-07-24T22:30:38Z |
For now in IB_Parse.pas, comenting the line SuffStrings out, seems to work
for me as a temp patch
procedure SetSQLForUpdate ( var SQL: string; const SQLForUpdate: string );
var
BegPos, EndPos: longint;
begin
FindSQLForUpdate( SQL, BegPos, EndPos );
if BegPos <> ParseLineInvalid then begin
// StuffStrings( SQL, SQLForUpdate, BegPos, EndPos );
end else begin
SQL := SQL + #13#10 + SQLForUpdate;
end;
end;
----------------------------------------------------------------------------
for me as a temp patch
procedure SetSQLForUpdate ( var SQL: string; const SQLForUpdate: string );
var
BegPos, EndPos: longint;
begin
FindSQLForUpdate( SQL, BegPos, EndPos );
if BegPos <> ParseLineInvalid then begin
// StuffStrings( SQL, SQLForUpdate, BegPos, EndPos );
end else begin
SQL := SQL + #13#10 + SQLForUpdate;
end;
end;
----------------------------------------------------------------------------
----- Original Message -----
From: "Nando Dessena" <nandod@...>
To: "FBsupport" <firebird-support@yahoogroups.com>
Sent: Thursday, July 24, 2003 1:27 AM
Subject: Re: [firebird-support] select with lock
| Leon,
|
| L> 1.is it a kind of record locking (if your where clause collects only 1
| L> record ) ?
|
| actually it locks all the records retrieved (if it can) as it fetches
| them; usually you'll want to use it on a single-record select, but that's
not
| mandatory.
|
| L> 2.does it lock all fields in the where clause or complete records
|
| it locks the record; Firebird (nor any other RDBMS that I know) cannot
| lock single columns.
|
| L> 2.how long are records locked ? until post or until commit ?
|
| I think locks are released upon transaction end (commit or rollback).
|
| L> 3.is it an alternative for thoe old recordlocking ?
|
| If you mean "dummy updates", then yes, with the additional benefits of
| greater efficiency and update triggers not firing twice.
|
| The behaviour of this feature varies with the transaction isolation
| level and flags (like wait/no_wait) you use; see the release notes and
| the archives of the firebird-devel list to know more.
|
| Ciao
| --
| Nando mailto:nandod@...
|
|
|
| To unsubscribe from this group, send an email to:
| firebird-support-unsubscribe@yahoogroups.com
|
|
|
| Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|
|
|