Debian Codegraph @

mysql-test/suite/ndb/t/ndb_sql_allow_batching.test

raw
1 -- source include/have_ndb.inc
2
3 # bug#36341
4
5 --disable_warnings
6 DROP TABLE IF EXISTS t1;
7 --enable_warnings
8
9 create table t1 (a int key, b int) engine ndb;
10 create table t2 (a int key, b int) engine ndb;
11
12 insert into t1 values (0,0),(1,1),(2,2);
13 insert into t2 select * from t1;
14
15 --source suite/ndb/include/ndb_init_execute_count.inc
16 begin;
17 set transaction_allow_batching=1;
18 update t1 set b=0 where a=2;
19 commit;
20 --source suite/ndb/include/ndb_execute_count.inc
21 select * from t1 order by a;
22
23 --echo
24 --echo With batching only 1 roundtrip
25 --echo
26 --source suite/ndb/include/ndb_init_execute_count.inc
27 begin;
28 set transaction_allow_batching=1;
29 insert into t1 values (10,10);
30 insert into t2 values (10,10);
31 commit;
32 --source suite/ndb/include/ndb_execute_count.inc
33 select * from t1 order by a;
34
35 --echo
36 --echo Without batching only 3 roundtrips
37 --echo
38 --source suite/ndb/include/ndb_init_execute_count.inc
39 begin;
40 set transaction_allow_batching=0;
41 insert into t1 values (11,11);
42 insert into t2 values (11,11);
43 commit;
44 --source suite/ndb/include/ndb_execute_count.inc
45 select * from t1 order by a;
46
47 # cleanup
48 drop table t1, t2;