Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register


0
(click on this box to dismiss)

Session level locking in CUBRID. Table locking.

Greetings,

Is there any support to lock a table using SQL statement? For instance, I would like to lock a table for writing from PHP to prevent other connections to write. I've read the manual here http://www.cubrid.org/transaction_and_lock and seem the lock is global at the transaction level, is this correct?

If I am not in the context of a transaction, I cannot lock a table. Is this correct?

Note: Btw, I think I found a mistake in this picture: http://www.cubrid.org/files/attach/images/49/891/003/transaction-lock.png - should read "Transaction 2" on the right, also some minor characters below, such as?

Regards,

Cristian.

link comment (1) accepted answer
asked 2 years ago
cristiroma
3
Thanks for the typo notice. We'll fix it. - [Level:8]CUBRID 2 years ago
64 Answers
1

No. There is no way to lock the table using SQL statement unless you are in the transaction. Almost same question has been asked at How to lock the table? Please see the answer under that question.

link comment (0)
answered 2 years ago
dba
558
0

Thanks for the answer and pointing the similar question.


Off-topic: Allow me to raise few issues I found with this q&a interface, because I posted two questions which were duplicates, and I start wondering why ?? Usually, I do my research before posting ...

1. I just noticed that there is a separate search box below, which does the actual searching inside Q&A section. Why below, it's beyond my understanding level of web usability. Just go here: http://www.cubrid.org/questions and try to find the search facility at the bottom of the long list of questions which I am not interested in.


2. The big red search button on the top of the page, doesn't search in the actual Q&A section, but rather entire website, without giving any boost to the Q&A section questions which seem to be more relevant, given the fact that I am here. Thus if you type in "lock table" goes to the cubrid manuals (http://www.cubrid.org/?act=IS&search_target=title_content&is_keyword=lock+table) which starts throwing at me a set of 3600 results (yikes!!!) duplicate articles on transaction locking with first article being relevant while others are just a repeatable pattern...


3. While I found the article on Cubrid transaction and locking highly technical and informational, there is no clear answer for the poor soul to this simple question.


4. Btw, are duplicate questions being erased? Why not marked as duplicate and referenced to parent questions? Seems my other duplicate question went poof! Or I cannot find it anymore ...


Just my two cents ....

link comment (1)
answered 2 years ago
cristiroma
3




You are either using a very old browser or a browser that is not supported.
In order to browse cubrid.org you need to have one of the following browsers:



Internet Explorer: Mozilla Firefox: Google Chrome: