Hy guys,
is it useful to manually lock and unlock my tables into my code before doing any operation? Does it truly work? I made some tests and noticed that if I have a
LOCK TABLES tb1 WRITE, tb2 READ, tb3 READ
for i = 0 to 3000
insert into tb1....etc...
next
UNLOCK TABLES
and at the same time I run my application I also do some INSERT directly from shell, it seams my table is not lock, I mean, I'm able to insert from shell not after my "FOR" is finished but in the meantime. It's just an impression and Mysql lock my tables well or in the real world is not worth using lock, unlock as my book sais??! What about rollback?