Subject Re: [firebird-support] Re: How to get_lock() in firebird
Author Doru Constantin
>
>
> --- In firebird-support@yahoogroups.com, Doru Constantin<doru.constantin@...> wrote:
>>
>> Hi, all
>>
>> MySQL has a feature / function called: GET_LOCK(). Here is the link on
>> mysql manual:
>> http://dev.mysql.com/doc/refman/5.1/en/miscellaneous-functions.html#function_get-lock
>> This GET_LOCK() function has nothing to do with blocking records.It's
>> like a "flag".
>> How to simulate this functionality in Firebird.
>>
>> Thank you for your time.
>>
>> ./doru
>>
>
> In the docu from your link, there is written the purpose of this feature:
> "This function can be used to implement application locks or to simulate record locks."
>
> Why do want do implement application locks with the database server? I think that should be done by the operating system.
> Why do you want to simulate record locks, if real record locking is present?
>
> It looks like it would be the more successive way to change the application logic than to reimplement a incomplete simulation of existing features!
>
> Good luck
> Christian
>

Hi Christian,

Yes it *can be used* to implement application locks or to simulate
record locks, but this is not what I'm looking for.

Actually I'm looking for global variables (at database level) which can
be accessed by all users who are connected to the database. These
variables can be released only by one who created it or automatically by
the server when the user who created them is no longer connected to the
database (for whatever reason, forced or by choice)

More like RDB$SET_CONTEXT() and RDB$GET_CONTEXT() but with "DATABASE"
namespace

Thanks

./doru