I'm working on a new series of queries that share a temporary table.
I've tried using both "create temporary table .... select" and "create
temp table" then "insert into t ... select from y". Both seem to
create a lock that (if the select portion runs long enough) causes a
deadlock with the replication thread on that box (it's a slave).

When the select portion runs more than innodb_lock_wait_timeout
seconds the slave replication thread dies with the errors:

041119 16:54:06 [ERROR] Slave: Error 'Lock wait timeout exceeded; try
restarting transaction' on query. ........., Error_code: 1205
041119 16:54:06 [ERROR] Error running query, slave SQL thread aborted.
Fix the problem, and restart the slave SQL thread with "SLAVE START".
We stopped at log 'db-bin.000081' position 65976472

Am I missing something here or is the only way to avoid potential
problems with the slave replication thread is to increase
innodb_lock_wait_timeout to a large enough value that it will be
longer than any potential select for the temporary table?

All innodb tables, MySQL 4.1.7 for both master and slaves.

Thanks.

Mike

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

Reply via email to