Debian Codegraph @

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

raw
1 source include/have_ndb.inc;
2
3 # Test for Bug#34776970.
4 # Need query threads.
5 # When a scan request defined with ~20KB to ~30KB of data was sent to a query
6 # thread on another node using V_QUERY block address it was likely to fail.
7
8 # Turn off READ_BACKUP for table to force TC to send SCAN_FRAGREQ to another
9 # node.
10 create table t (a int primary key,
11 b varchar(8000) charset ascii,
12 c varchar(8000) charset ascii)
13 engine ndbcluster
14 comment "NDB_TABLE=READ_BACKUP=0";
15
16 disable_query_log;
17 let $i=1000;
18 while ($i)
19 {
20 eval insert into t values ($i,'o','k');
21 dec $i;
22 }
23 enable_query_log;
24
25 # SCAN_FRAGREQ smaller than ~20KB are sent successfully as a whole potentially
26 # using V_QUERY
27 select * from t where ( b between REPEAT('@',5458) and REPEAT('B',5458) or c between REPEAT('K',5458) and REPEAT('M',5458));
28
29 # SCAN_FRAGREQ bigger than ~30KB are sent successfully as a fragmented signal
30 # to DBLQH blocks.
31 select * from t where ( b between REPEAT('@',7367) and REPEAT('B',7367) or c between REPEAT('K',7367) and REPEAT('M',7367));
32
33 # SCAN_FRAGREQ with size between ~20KB and ~30KB were wrongly sent as
34 # fragmented signal potentially to query threads using V_QUERY which would
35 # likely fail. Now they will be sent successfully as a single signal
36 # potentially using V_QUERY.
37 select * from t where ( b between REPEAT('@',5459) and REPEAT('B',5459) or c between REPEAT('K',5459) and REPEAT('M',5459));
38 select * from t where ( b between REPEAT('@',7366) and REPEAT('B',7366) or c between REPEAT('K',7366) and REPEAT('M',7366));
39
40 drop tables t;