-- source include/have_ndb.inc -- source include/not_embedded.inc use test; --disable_warnings drop table if exists t1; --enable_warnings CREATE TABLE t1 ( PK int NOT NULL PRIMARY KEY, A int, INDEX I1(A) ) engine=ndbcluster; CREATE TABLE t2 ( PK int NOT NULL PRIMARY KEY, B int, INDEX I2(B) ) engine=ndbcluster; delimiter |; create procedure populate_t1(x int) begin while x > 0 do set x = x-1; insert into test.t1 values (x, x); end while; end; | create procedure populate_t2(x int) begin while x > 0 do set x = x-1; insert into test.t2 values (x, x); end while; end; | delimiter ;| call populate_t1(10); call populate_t2(5); select t1.pk from t1 use index (I1), t2 use index (I2) where t1.A = t2.B; delete from t1; -- Bug #12394 --error 1296 delete from t2; delete from t2; call populate_t1(10); call populate_t2(5); select t1.pk from t1 use index (I1), t2 use index (I2) where t1.A = t2.B; select t1.pk from t1 use index (I1), t2 use index (I2) where t1.A = t2.B; --disable_warnings drop procedure populate_t1; drop procedure populate_t2; drop table t1,t2; --enable_warnings