3 --source include/have_partition.inc
5 --echo # Additional tests
for WL#5217 by QA, testplan 1.1
8 --source suite/parts/inc/partition-dml_cr_tab.inc
9 --source suite/parts/inc/partition-dml_ins_tab.inc
11 --source suite/parts/inc/partition-dml_cr_tab.inc
18 DECLARE c12,c22 varchar(64);
19 DECLARE cur1
CURSOR FOR SELECT * FROM t1 PARTITION (pneg,`p0-29`,`p30-299`,`p300-2999`,`p3000-299999`)
ORDER BY a,b;
20 DECLARE cur2
CURSOR FOR SELECT * FROM t1
ORDER BY a,b;
21 DECLARE CONTINUE HANDLER FOR NOT FOUND SET @done = 1;
25 FETCH cur1 INTO c11,c12;
26 FETCH cur2 INTO c21,c22;
27 IF !((c11=c21) AND (c12=c22)) THEN
28 SELECT c11,c12,c21,c22;
39 CREATE PROCEDURE p2 ()
41 UPDATE t1 PARTITION (`p0-29`) SET b='p0-29-upd' WHERE a BETWEEN 3 AND 10;
44 CREATE PROCEDURE p3 ()
46 DELETE FROM t1 PARTITION (`p0-29`) WHERE b= 'p0-29-upd';
49 CREATE TRIGGER tr1 AFTER INSERT ON t2
51 UPDATE t1 PARTITION (`p30-299`) SET b='p30-299-upd-trigger' WHERE a BETWEEN 30 AND 40;
60 SELECT * FROM t1 PARTITION (`p0-29`) WHERE a BETWEEN 3 AND 10
ORDER BY a,b ;
61 SELECT * FROM t1 WHERE a BETWEEN 3 AND 10
ORDER BY a,b ;
63 SELECT * FROM t1 PARTITION (`p0-29`) WHERE a BETWEEN 3 AND 10
ORDER BY a,b ;
65 INSERT INTO t2 PARTITION (`p0-29`, subp3) VALUES (4, '(p0-29-)subp3');
66 SELECT * FROM t2 PARTITION (`p0-29`) WHERE a BETWEEN 3 AND 10
ORDER BY a,b ;
67 SELECT * FROM t1 PARTITION (`p30-299`) WHERE a BETWEEN 30 AND 40
ORDER BY a,b ;
69 DELETE FROM t1 PARTITION (pneg, `p30-299`);
70 SELECT * FROM t1
ORDER BY a,b;
72 --echo
########## Empty table t1 #########