Only the InnoDB storage engine fully supports transactions. It also implements Oracle/PostgreSQL-style MVCC that prevents implicit row locks from blocking reads. To get Read-Uncommitted in InnoDB, issue a SET TRANSACTION LEVEL READ UNCOMMITTED
before issuing the query.
The syntax for doing so in PHP would look something like this:
$dbh->exec('SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED');
$dbh->beginTransaction();
This sets the isolation level until the next COMMIT
or ROLLBACK
. To make the level change persist for the duration of the session, use
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
instead.
As for overriding a non-sharing read lock on a table or row, I'm not sure that's possible, nor can I think of a situation where it would be desirable. Non-sharing locks are usually non-sharing for a reason.