source include/have_log_bin.inc; let $con_number= 10; connect (c0, localhost, root,,); SET GLOBAL binlog_format = 'STATEMENT'; SET GLOBAL event_scheduler = OFF; connection c0; drop database if exists systest1; create database systest1; use systest1; create table tb1_logs ( i1 int NOT NULL auto_increment, primary key (i1), dt1 datetime NOT NULL, entry_dsc char(100), f4 int ) engine=MyISAM; create table tb1_eng1 ( i1 int NOT NULL auto_increment, primary key (i1), f1 int, f2 char (15), f3 decimal (5,3), f4 datetime ) engine=MyISAM PARTITION BY HASH(i1) PARTITIONS 1; delimiter //; Create trigger tb1_eng1_ins after insert on tb1_eng1 for each row BEGIN insert into tb1_logs (dt1, entry_dsc, f4) values (new.f4, concat('Insert row ', new.f1,' ', new.f2, ' ', sleep(1.0), ' (tb1_eng1)'), new.f1); END// delimiter ;// let $cont= $con_number; while ($cont) { eval SET @cont=$cont; let $contname = `SELECT CONCAT( 'c', @cont )`; connect ($contname, localhost, root,,,); dec $cont; } let $cont= $con_number; while ($cont) { eval SET @cont=$cont; let $contname = `SELECT CONCAT( 'c', @cont )`; connection $contname; send INSERT INTO systest1.tb1_eng1 (f1,f2,f3,f4) SELECT 1, 'INSERT3', 0.5, '2009-03-04 11:11:11'; connection c0; dec $cont; } connection c0;