View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002266||VALENTINA SERVER||API||public||2007-03-22 09:54||2019-11-06 12:04|
|Reporter||Stan Busk||Assigned To|
|Target Version||TODO_FEATURES||Fixed in Version|
|Summary||0002266: Possibillity to block a whole Database on Server|
|Description||It would be really handy to be able to lock access to a whole database from Embedded Server. For example I want to allow first client to connect and if some maintenance has to be performed lock access to all other clients until the maintenance is done. I have seen a similar behavior in 4D. I just need to be able to send a given error to all the other clients trying to connect so they can wait until the lock is released. Something like 'Maintenance on the way, please wait' dialog.|
API: VDatabase.Lock( kReadWrite )
SQL: "LOCK DATABASE db_name READWRITE"
|Additional Information||and why not also at Table level (by Ruslan):|
API: VTable.Lock( kReadWrite )
SQL:"LOCK TABLE tbl_name READWRITE"
|Tags||No tags attached.|
Personally I think it is not good idea to operate with locks manually.
Who can guarantee releasing that locks? The next idea comes to mind - some timeouts for locks or similar techniques. It is task for transaction mechanic which is hopefully will be implemented soon.
So you would be able to start transaction and depending on its isolation level get such effects.
If you need it right now - why just not use some table as "mutex"?
I mean (just as an idea):
Create Table t1 ( mutexID ulong )
Insert into t1 values(1)
Do some work
Select mutexID from t1
if mutecID != 2
1) As Stan have to mention he have see this in 4D. And I have see DB and TABLE locks in mySQL 3.x.
2) I can agree that may be it is too danger give this weapon into hands of developer ...
and may be this was important for before-transaction mySQL.
> Ivan: Who can guarantee releasing that locks?
well, at least with VSERVER, this lock can die with ClientHandler...
4) I will move this issue to VSERVER project.
|2007-03-22 09:54||Stan Busk||New Issue|
|2007-04-28 03:46||Ivan Smahin||Note Added: 0002109|
|2007-04-28 03:50||Ivan Smahin||Note Added: 0002110|
|2009-11-08 16:30||Ruslan Zasukhin||Note Added: 0004857|
|2009-11-08 16:30||Ruslan Zasukhin||Project||ADK-Xojo-V4RB => VALENTINA SERVER|
|2009-11-08 20:49||Ruslan Zasukhin||Category||Client => API|
|2009-11-08 20:49||Ruslan Zasukhin||Summary||Possibillity to bock a whole Database on Server => Possibillity to block a whole Database on Server|
|2014-02-14 10:40||Ruslan Zasukhin||Target Version||=> 7.0|
|2014-08-05 11:32||Ruslan Zasukhin||Target Version||7.0 => TODO_BUGS|
|2019-11-06 12:04||Ruslan Zasukhin||Target Version||TODO_BUGS => TODO_FEATURES|