Can someone perhaps tell me why the following pseudo-code blocks at time 4,
when transaction isolation is set to READ_COMMITTED. Table A is a BDB table,
records 1 and 400 both exist. To me it seems that both updates don't have
anything to do with eachother. Does this perhaps has anything to do with,
and i quote from the MYSQL manual:

"MYSQL will issue an internal multiple-write lock on the table to ensure
that the table will be properly locked if another thread issues a table
lock." ??.

If so, then i think this is a strange approach, because then concurrent
reads/writes aren't allowed at all. Or is it perhaps the page locking
mechanism which is used in the BDB tables that causes this behavior?

time  statement
----------------------------------------------------------------------------
-
1: | thread1.SQL("BEGIN")
2: | thread2.SQL("BEGIN")
3: | thread1.SQL("update record 1 in table A")
4: | thread2.SQL("update record 400 in table A")
5: | thread1.SQL("COMMIT")
6: | thread2.SQL("COMMIT")

N.B:
Suppose i want to switch to InnoDB tables, then what exactly is the meaning
of setting the transaction isolation. The locking mechanism actually used is
determined by the special InnoDB select statements according to the MYSQL
manual. I quote:

`SELECT ... FROM ... FOR UPDATE' : sets exclusive next-key locks on all
index records the read encounters.

In fact is the meaning of setting the transaction isolation even defined for
BDB tables??




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to