Re: Will UPDATE block on SELECT?

2006-07-25 Thread Chris

Ratheesh K J wrote:
I would like to know whether a SELECT query would block an Update on the 
same table. The table is of InnoDB type.
Since InnoDB tables apply row level locks should the Update queries be 
blocked until the select query completes?


I experienced such a scenario wherein an update query had to wait until the 
select query completed.
Also how different is the locking when there is a CREATE TEMPORARY TABLE 
tblname AS SELECT * FROM TBL_TEST and an Update on the table TBL_TEST 
simultaneously?


http://dev.mysql.com/doc/refman/5.1/en/innodb-transaction-model.html

and

http://dev.mysql.com/doc/refman/5.1/en/innodb-locks-set.html

might give you some ideas about what's going on.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Will UPDATE block on SELECT?

2006-07-24 Thread Ratheesh K J
I would like to know whether a SELECT query would block an Update on the 
same table. The table is of InnoDB type.
Since InnoDB tables apply row level locks should the Update queries be 
blocked until the select query completes?

I experienced such a scenario wherein an update query had to wait until the 
select query completed.
Also how different is the locking when there is a CREATE TEMPORARY TABLE 
tblname AS SELECT * FROM TBL_TEST and an Update on the table TBL_TEST 
simultaneously?

Pls Note: We are not using transactions. Currently all our tables have been 
converted to InnoDB type. Very soon we are planning to use transactions.

Thanks,

Ratheesh K J