All pastes #614831 Raw Edit

Mine

public text v1 · immutable
#614831 ·published 2007-07-11 20:12 UTC
rendered paste body
DROP TABLE IF EXISTS `la1`;
CREATE TABLE la1 (
  `la1_id` int(8) unsigned NOT NULL default '0'
) ENGINE=MEMORY;
INSERT INTO `lal` (lal_id) 
SELECT DISTINCT a_id as la1_id
       FROM ruwiki_p.pagelinks,
            articles
       WHERE pl_from in
       (
        SELECT lkr_id 
               FROM linkers
       ) and
       pl_namespace=0 and
       pl_title=a_title and
       pl_from!=a_id;

The result is in 50% ok, and in 50% is: 'ERROR 1213 (40001) at line 359: Deadlock found when trying to get lock; try restarting transaction'