use strict; use DBI; my $connstr = 'dbi:mysql:port=9306;host=127.0.0.1'; my $user = 'root'; { my $dbh1 = DBI->connect($connstr, $user); $dbh1->do("CREATE DATABASE IF NOT EXISTS test"); $dbh1->do("USE test"); $dbh1->do("DROP TABLE IF EXISTS t1"); $dbh1->do("DROP VIEW IF EXISTS v1"); $dbh1->do("CREATE TABLE t1 (i integer, primary key (i)) ENGINE = Falcon;"); $dbh1->do("CREATE VIEW v1 AS SELECT * FROM t1"); $dbh1->disconnect(); } fork(); fork(); use strict; use DBI; my $dbh2 = DBI->connect($connstr, $user); $dbh2->do("USE test"); foreach my $i (1..10) { $dbh2->do("INSERT IGNORE INTO t1 (i) VALUES (1);"); $dbh2->do("update v1 set i=i+20;"); } $dbh2->disconnect();