Shared cache table locking works for threads within a single process. You have 
two distinct processes and they synchronize on the database (file locking) 
level.

-----Ursprüngliche Nachricht-----
Von: nskim [mailto:k...@kangwon.ac.kr]
Gesendet: Donnerstag, 23. Jänner 2014 09:43
An: sqlite-users@sqlite.org
Betreff: [sqlite] How do i set up a table locking mode???

Dear sqlite family

hi, how are you~??



I want to set up a table locing mode.



So.. I put sqlite3_enable_shared_cache(1) on main function code of shell.c , 
then compiled , then excuted two sqlite shell processor.



First shell processor set write_transaction

(ex, begin; insert into table1 values('1','2'); .... no commit, continuous 
transaction statt)



and then one other shell processor tried write_transaction.

(ex, insert into table2 values('1','2'); )



However, result is error massage "database is locked".



Exactly, table locking mode is usable in shared cache mode, with sqlite 
document ( http://www.sqlite.org/sharedcache.html )



What is the problem??



What i'm not enough for setting locking mode??



Please, answer my question.



Thanks~ be happy!!



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


--------------------------------------------------------------------------
 Gunter Hick
Software Engineer
Scientific Games International GmbH
Klitschgasse 2 – 4, A - 1130 Vienna, Austria
FN 157284 a, HG Wien
Tel: +43 1 80100 0
E-Mail: h...@scigames.at

This e-mail is confidential and may well also be legally privileged. If you 
have received it in error, you are on notice as to its status and accordingly 
please notify us immediately by reply e-mail and then delete this message from 
your system. Please do not copy it or use it for any purposes, or disclose its 
contents to any person as to do so could be a breach of confidence. Thank you 
for your cooperation.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to