| 1 |
--source include/galera_cluster.inc |
| 2 |
--source include/have_innodb.inc |
| 3 |
|
| 4 |
--connection node_1 |
| 5 |
CREATE TABLE t1 ( |
| 6 |
id int primary key |
| 7 |
); |
| 8 |
|
| 9 |
CREATE TABLE t2 ( |
| 10 |
id int primary key , |
| 11 |
f_id int DEFAULT NULL, FOREIGN KEY(f_id) REFERENCES t1 (id) |
| 12 |
); |
| 13 |
|
| 14 |
insert into t1 select 1; |
| 15 |
|
| 16 |
--disable_query_log |
| 17 |
--let $count=200 |
| 18 |
--echo #Running 200 insert in t2 table |
| 19 |
while($count) |
| 20 |
{ |
| 21 |
#Repeatedly execute the following SQL until you generate thousands of data |
| 22 |
--eval insert into t2 values ($count, 1); |
| 23 |
--dec $count |
| 24 |
} |
| 25 |
--enable_query_log |
| 26 |
|
| 27 |
select count(*) from t2; |
| 28 |
delete from t2; |
| 29 |
delete from t1; |
| 30 |
drop table t2,t1; |