Debian Codegraph @

mysql-test/suite/ndb/r/ndb_partition_hash.result

raw
1 Warnings:
2 Warning 1287 '@@new' is deprecated and will be removed in a future release.
3 drop table if exists t1;
4 CREATE TABLE t1 (
5 ol_o_id int NOT NULL,
6 ol_d_id int NOT NULL,
7 ol_w_id int NOT NULL,
8 ol_number int NOT NULL,
9 ol_tmp int,
10 PRIMARY KEY (ol_w_id, ol_d_id, ol_o_id, ol_number)
11 ) ENGINE=NDB
12 PARTITION BY HASH (ol_w_id);
13 insert into t1 values (1,0,0,0,0),(1,0,0,1,0),(1,0,0,2,0),(1,1,0,0,0),(1,1,0,1,0);
14 insert into t1 values (2,0,0,0,0),(4,0,0,0,0),(4,0,0,1,0);
15 insert into t1 values (0,1,1,4,0),(0,1,1,5,0);
16 UPDATE t1 force index (primary) SET ol_tmp = 1
17 WHERE ol_o_id = 0 AND ol_d_id = 1 AND ol_w_id = 1;
18 ndb_scan_count
19 1
20 ndb_pruned_scan_count
21 1
22 SELECT * FROM t1 WHERE ol_w_id = 1 AND ol_d_id = 1 AND ol_o_id = 0;
23 ol_o_id ol_d_id ol_w_id ol_number ol_tmp
24 0 1 1 4 1
25 0 1 1 5 1
26 ndb_scan_count
27 1
28 ndb_pruned_scan_count
29 1
30 SELECT SUM(ol_number) FROM t1 WHERE ol_o_id = 0 AND ol_w_id = 1 AND ol_d_id = 1;
31 SUM(ol_number)
32 9
33 ndb_scan_count
34 1
35 ndb_pruned_scan_count
36 1
37 drop table t1;