Preventing InnoDB table locks

I’ve been trying to prevent table locks for the following query, but it doesn’t seem to be working:

SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
START TRANSACTION;

INSERT INTO site_traffic_stats_daily (site_id, date, unique_visitors)
SELECT site_id, date, COUNT(ip)
FROM site_hits_unique
WHERE date = CURDATE() - INTERVAL 1 DAY
GROUP BY site_id;

COMMIT;

Setting the transaction isolation level is supposed to be preventing table locks. Any tips? Thanks.

P.S. If it matters, I’m testing this query in phpMyAdmin.

But is it the right isolation level?

I figured it out after reading http://www.mysqlperformanceblog.com/2006/07/12/insert-into-select-performance-with-innodb-tables/ and some other things online.

InnoDB executes a table lock for INSERT … SELECT statements to preserve replication by avoiding phantom reads. You can disable this locking behavior by setting innodb_locks_unsafe_for_binlog=1 in your mysql ini. Changing this variable has significant implications so make sure you understand what you’re doing first: http://dev.mysql.com/doc/refman/5.1/en/innodb-parameters.html#sysvar_innodb_locks_unsafe_for_binlog