Current Path : /usr/opt/mysql57/mysql-test/suite/parts/r/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //usr/opt/mysql57/mysql-test/suite/parts/r/partition-dml-1-1-myisam-modes.result |
set @save_sqlmode= @@global.sql_mode; # Additional tests for WL#5217 by QA, testplan 1.1 CREATE TABLE t1 (a INT NOT NULL, b varchar (64), INDEX ind_t1 (b,a), PRIMARY KEY (a)) ENGINE = MyISAM PARTITION BY RANGE (a) SUBPARTITION BY HASH (a) SUBPARTITIONS 3 (PARTITION pNeg VALUES LESS THAN (0) (SUBPARTITION subp0 , SUBPARTITION subp1 , SUBPARTITION subp2 ), PARTITION `p0-29` VALUES LESS THAN (30) (SUBPARTITION subp3 , SUBPARTITION subp4 , SUBPARTITION subp5 ), PARTITION `p30-299` VALUES LESS THAN (300) (SUBPARTITION subp6 , SUBPARTITION subp7 , SUBPARTITION subp8 ), PARTITION `p300-2999` VALUES LESS THAN (3000) (SUBPARTITION subp9 , SUBPARTITION subp10 , SUBPARTITION subp11 ), PARTITION `p3000-299999` VALUES LESS THAN (300000) (SUBPARTITION subp12 , SUBPARTITION subp13 , SUBPARTITION subp14 )); Warnings: Warning 1287 The partition engine, used by table 'test.t1', is deprecated and will be removed in a future release. Please use native partitioning instead. INSERT INTO t1 PARTITION (pNeg, subp0) VALUES (-4, '(pNeg-)subp0'); Warnings: Warning 1287 The partition engine, used by table 'test.t1', is deprecated and will be removed in a future release. Please use native partitioning instead. INSERT INTO t1 PARTITION (pNeg, subp0) VALUES (-3, '(pNeg-)subp0'); INSERT INTO t1 PARTITION (pNeg, subp0) VALUES (-2, '(pNeg-)subp0'); INSERT INTO t1 PARTITION (pNeg, subp0) VALUES (-1, '(pNeg-)subp0'); INSERT INTO t1 PARTITION (`p0-29`, subp3) VALUES (4, '(p0-29-)subp3'); INSERT INTO t1 PARTITION (`p0-29`, subp3) VALUES (3, '(p0-29-)subp3'); INSERT INTO t1 PARTITION (`p0-29`, subp3) VALUES (2, '(p0-29-)subp3'); INSERT INTO t1 PARTITION (`p0-29`, subp3) VALUES (1, '(p0-29-)subp3'); INSERT INTO t1 PARTITION (`p0-29`, subp5) VALUES (24, '(p0-29-)subp5'); INSERT INTO t1 PARTITION (`p0-29`, subp5) VALUES (23, '(p0-29-)subp5'); INSERT INTO t1 PARTITION (`p0-29`, subp5) VALUES (22, '(p0-29-)subp5'); INSERT INTO t1 PARTITION (`p0-29`, subp5) VALUES (21, '(p0-29-)subp5'); INSERT INTO t1 PARTITION (`p30-299`, subp9) VALUES (34, '(p30-299-)subp6'); INSERT INTO t1 PARTITION (`p30-299`, subp9) VALUES (33, '(p30-299-)subp6'); INSERT INTO t1 PARTITION (`p30-299`, subp9) VALUES (32, '(p30-299-)subp6'); INSERT INTO t1 PARTITION (`p30-299`, subp9) VALUES (31, '(p30-299-)subp6'); INSERT INTO t1 PARTITION (`p30-299`, subp8) VALUES (234, '(p30-299-)subp8'); INSERT INTO t1 PARTITION (`p30-299`, subp8) VALUES (233, '(p30-299-)subp8'); INSERT INTO t1 PARTITION (`p30-299`, subp8) VALUES (232, '(p30-299-)subp8'); INSERT INTO t1 PARTITION (`p30-299`, subp8) VALUES (231, '(p30-299-)subp8'); INSERT INTO t1 PARTITION (`p300-2999`, subp8) VALUES (304, '(p300-2999-)subp8'); INSERT INTO t1 PARTITION (`p300-2999`, subp8) VALUES (303, '(p300-2999-)subp8'); INSERT INTO t1 PARTITION (`p300-2999`, subp8) VALUES (302, '(p300-2999-)subp8'); INSERT INTO t1 PARTITION (`p300-2999`, subp8) VALUES (301, '(p300-2999-)subp8'); INSERT INTO t1 PARTITION (`p3000-299999`, subp12) VALUES (3004, '(p3000-299999-)subp12'); INSERT INTO t1 PARTITION (`p3000-299999`, subp12) VALUES (3003, '(p3000-299999-)subp12'); INSERT INTO t1 PARTITION (`p3000-299999`, subp12) VALUES (3002, '(p3000-299999-)subp12'); INSERT INTO t1 PARTITION (`p3000-299999`, subp12) VALUES (3001, '(p3000-299999-)subp12'); INSERT INTO t1 PARTITION (`p3000-299999`, subp14) VALUES (299996, '(p3000-299999-)subp14'); INSERT INTO t1 PARTITION (`p3000-299999`, subp14) VALUES (299997, '(p3000-299999-)subp14'); INSERT INTO t1 PARTITION (`p3000-299999`, subp14) VALUES (299998, '(p3000-299999-)subp14'); INSERT INTO t1 PARTITION (`p3000-299999`, subp14) VALUES (299999, '(p3000-299999-)subp14'); CREATE USER test_user_1 IDENTIFIED BY 'testpw'; CREATE USER test_user_2 IDENTIFIED BY 'testpw'; GRANT ALL PRIVILEGES ON test.* TO test_user_1 ; GRANT ALL PRIVILEGES ON test.* TO test_user_2 ; # Run in empty mode set @@global.sql_mode= ''; Warnings: Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release. ####################################################### # UPDATE without partition selection connect session1, localhost, test_user_1,'testpw',test; SELECT * FROM t1 PARTITION (`p0-29`); a b 3 (p0-29-)subp3 21 (p0-29-)subp5 24 (p0-29-)subp5 1 (p0-29-)subp3 4 (p0-29-)subp3 22 (p0-29-)subp5 2 (p0-29-)subp3 23 (p0-29-)subp5 send UPDATE t1 SET b='table-upd-1' WHERE a BETWEEN 0 AND 9; connect session2, localhost, test_user_2,'testpw',test; UPDATE t1 SET b='table-upd-2' WHERE a BETWEEN 0 AND 9; SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 3 table-upd-2 22 (p0-29-)subp5 1 table-upd-2 4 table-upd-2 23 (p0-29-)subp5 2 table-upd-2 INSERT INTO t1 VALUES (11, 'table-ins'); INSERT INTO t1 VALUES (12, 'table-ins'); SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 12 table-ins 3 table-upd-2 22 (p0-29-)subp5 1 table-upd-2 4 table-upd-2 23 (p0-29-)subp5 11 table-ins 2 table-upd-2 DELETE FROM t1 WHERE b= 'table-ins'; SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 3 table-upd-2 22 (p0-29-)subp5 1 table-upd-2 4 table-upd-2 23 (p0-29-)subp5 2 table-upd-2 connection session1; reap SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 3 table-upd-2 22 (p0-29-)subp5 1 table-upd-2 4 table-upd-2 23 (p0-29-)subp5 2 table-upd-2 connection session2; SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 3 table-upd-2 22 (p0-29-)subp5 1 table-upd-2 4 table-upd-2 23 (p0-29-)subp5 2 table-upd-2 ####################################################### # UPDATE with partition selection connection session1; SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 3 table-upd-2 22 (p0-29-)subp5 1 table-upd-2 4 table-upd-2 23 (p0-29-)subp5 2 table-upd-2 send UPDATE t1 PARTITION (`p0-29`) SET b='p0-29-upd-1' WHERE a BETWEEN 0 AND 9; connection session2; UPDATE t1 PARTITION (`p0-29`) SET b='p0-29-upd-2' WHERE a BETWEEN 0 AND 9; SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 3 p0-29-upd-2 22 (p0-29-)subp5 1 p0-29-upd-2 4 p0-29-upd-2 23 (p0-29-)subp5 2 p0-29-upd-2 INSERT INTO t1 PARTITION (`p0-29`, subp4) VALUES (11, '(p0-29-)ins'); INSERT INTO t1 PARTITION (`p0-29`, subp4) VALUES (12, '(p0-29-)ins'); SELECT * FROM t1 PARTITION (`p0-29`); a b 12 (p0-29-)ins 21 (p0-29-)subp5 24 (p0-29-)subp5 3 p0-29-upd-2 22 (p0-29-)subp5 1 p0-29-upd-2 4 p0-29-upd-2 11 (p0-29-)ins 23 (p0-29-)subp5 2 p0-29-upd-2 DELETE FROM t1 PARTITION (`p0-29`,subp5) WHERE b= '(p0-29-)ins'; SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 3 p0-29-upd-2 22 (p0-29-)subp5 1 p0-29-upd-2 4 p0-29-upd-2 23 (p0-29-)subp5 2 p0-29-upd-2 connection session1; reap SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 3 p0-29-upd-2 22 (p0-29-)subp5 1 p0-29-upd-2 4 p0-29-upd-2 23 (p0-29-)subp5 2 p0-29-upd-2 connection session2; SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 3 p0-29-upd-2 22 (p0-29-)subp5 1 p0-29-upd-2 4 p0-29-upd-2 23 (p0-29-)subp5 2 p0-29-upd-2 disconnect session1; disconnect session2; connection default; DROP TABLE t1; CREATE TABLE t1 (a INT NOT NULL, b varchar (64), INDEX ind_t1 (b,a), PRIMARY KEY (a)) ENGINE = MyISAM PARTITION BY RANGE (a) SUBPARTITION BY HASH (a) SUBPARTITIONS 3 (PARTITION pNeg VALUES LESS THAN (0) (SUBPARTITION subp0 , SUBPARTITION subp1 , SUBPARTITION subp2 ), PARTITION `p0-29` VALUES LESS THAN (30) (SUBPARTITION subp3 , SUBPARTITION subp4 , SUBPARTITION subp5 ), PARTITION `p30-299` VALUES LESS THAN (300) (SUBPARTITION subp6 , SUBPARTITION subp7 , SUBPARTITION subp8 ), PARTITION `p300-2999` VALUES LESS THAN (3000) (SUBPARTITION subp9 , SUBPARTITION subp10 , SUBPARTITION subp11 ), PARTITION `p3000-299999` VALUES LESS THAN (300000) (SUBPARTITION subp12 , SUBPARTITION subp13 , SUBPARTITION subp14 )); Warnings: Warning 1287 The partition engine, used by table 'test.t1', is deprecated and will be removed in a future release. Please use native partitioning instead. INSERT INTO t1 PARTITION (pNeg, subp0) VALUES (-4, '(pNeg-)subp0'); Warnings: Warning 1287 The partition engine, used by table 'test.t1', is deprecated and will be removed in a future release. Please use native partitioning instead. INSERT INTO t1 PARTITION (pNeg, subp0) VALUES (-3, '(pNeg-)subp0'); INSERT INTO t1 PARTITION (pNeg, subp0) VALUES (-2, '(pNeg-)subp0'); INSERT INTO t1 PARTITION (pNeg, subp0) VALUES (-1, '(pNeg-)subp0'); INSERT INTO t1 PARTITION (`p0-29`, subp3) VALUES (4, '(p0-29-)subp3'); INSERT INTO t1 PARTITION (`p0-29`, subp3) VALUES (3, '(p0-29-)subp3'); INSERT INTO t1 PARTITION (`p0-29`, subp3) VALUES (2, '(p0-29-)subp3'); INSERT INTO t1 PARTITION (`p0-29`, subp3) VALUES (1, '(p0-29-)subp3'); INSERT INTO t1 PARTITION (`p0-29`, subp5) VALUES (24, '(p0-29-)subp5'); INSERT INTO t1 PARTITION (`p0-29`, subp5) VALUES (23, '(p0-29-)subp5'); INSERT INTO t1 PARTITION (`p0-29`, subp5) VALUES (22, '(p0-29-)subp5'); INSERT INTO t1 PARTITION (`p0-29`, subp5) VALUES (21, '(p0-29-)subp5'); INSERT INTO t1 PARTITION (`p30-299`, subp9) VALUES (34, '(p30-299-)subp6'); INSERT INTO t1 PARTITION (`p30-299`, subp9) VALUES (33, '(p30-299-)subp6'); INSERT INTO t1 PARTITION (`p30-299`, subp9) VALUES (32, '(p30-299-)subp6'); INSERT INTO t1 PARTITION (`p30-299`, subp9) VALUES (31, '(p30-299-)subp6'); INSERT INTO t1 PARTITION (`p30-299`, subp8) VALUES (234, '(p30-299-)subp8'); INSERT INTO t1 PARTITION (`p30-299`, subp8) VALUES (233, '(p30-299-)subp8'); INSERT INTO t1 PARTITION (`p30-299`, subp8) VALUES (232, '(p30-299-)subp8'); INSERT INTO t1 PARTITION (`p30-299`, subp8) VALUES (231, '(p30-299-)subp8'); INSERT INTO t1 PARTITION (`p300-2999`, subp8) VALUES (304, '(p300-2999-)subp8'); INSERT INTO t1 PARTITION (`p300-2999`, subp8) VALUES (303, '(p300-2999-)subp8'); INSERT INTO t1 PARTITION (`p300-2999`, subp8) VALUES (302, '(p300-2999-)subp8'); INSERT INTO t1 PARTITION (`p300-2999`, subp8) VALUES (301, '(p300-2999-)subp8'); INSERT INTO t1 PARTITION (`p3000-299999`, subp12) VALUES (3004, '(p3000-299999-)subp12'); INSERT INTO t1 PARTITION (`p3000-299999`, subp12) VALUES (3003, '(p3000-299999-)subp12'); INSERT INTO t1 PARTITION (`p3000-299999`, subp12) VALUES (3002, '(p3000-299999-)subp12'); INSERT INTO t1 PARTITION (`p3000-299999`, subp12) VALUES (3001, '(p3000-299999-)subp12'); INSERT INTO t1 PARTITION (`p3000-299999`, subp14) VALUES (299996, '(p3000-299999-)subp14'); INSERT INTO t1 PARTITION (`p3000-299999`, subp14) VALUES (299997, '(p3000-299999-)subp14'); INSERT INTO t1 PARTITION (`p3000-299999`, subp14) VALUES (299998, '(p3000-299999-)subp14'); INSERT INTO t1 PARTITION (`p3000-299999`, subp14) VALUES (299999, '(p3000-299999-)subp14'); # Run in ANSI mode set @@global.sql_mode= ansi; Warnings: Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release. ####################################################### # UPDATE without partition selection connect session1, localhost, test_user_1,'testpw',test; SELECT * FROM t1 PARTITION (`p0-29`); a b 3 (p0-29-)subp3 21 (p0-29-)subp5 24 (p0-29-)subp5 1 (p0-29-)subp3 4 (p0-29-)subp3 22 (p0-29-)subp5 2 (p0-29-)subp3 23 (p0-29-)subp5 send UPDATE t1 SET b='table-upd-1' WHERE a BETWEEN 0 AND 9; connect session2, localhost, test_user_2,'testpw',test; UPDATE t1 SET b='table-upd-2' WHERE a BETWEEN 0 AND 9; SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 3 table-upd-2 22 (p0-29-)subp5 1 table-upd-2 4 table-upd-2 23 (p0-29-)subp5 2 table-upd-2 INSERT INTO t1 VALUES (11, 'table-ins'); INSERT INTO t1 VALUES (12, 'table-ins'); SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 12 table-ins 3 table-upd-2 22 (p0-29-)subp5 1 table-upd-2 4 table-upd-2 23 (p0-29-)subp5 11 table-ins 2 table-upd-2 DELETE FROM t1 WHERE b= 'table-ins'; SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 3 table-upd-2 22 (p0-29-)subp5 1 table-upd-2 4 table-upd-2 23 (p0-29-)subp5 2 table-upd-2 connection session1; reap SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 3 table-upd-2 22 (p0-29-)subp5 1 table-upd-2 4 table-upd-2 23 (p0-29-)subp5 2 table-upd-2 connection session2; SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 3 table-upd-2 22 (p0-29-)subp5 1 table-upd-2 4 table-upd-2 23 (p0-29-)subp5 2 table-upd-2 ####################################################### # UPDATE with partition selection connection session1; SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 3 table-upd-2 22 (p0-29-)subp5 1 table-upd-2 4 table-upd-2 23 (p0-29-)subp5 2 table-upd-2 send UPDATE t1 PARTITION (`p0-29`) SET b='p0-29-upd-1' WHERE a BETWEEN 0 AND 9; connection session2; UPDATE t1 PARTITION (`p0-29`) SET b='p0-29-upd-2' WHERE a BETWEEN 0 AND 9; SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 3 p0-29-upd-2 22 (p0-29-)subp5 1 p0-29-upd-2 4 p0-29-upd-2 23 (p0-29-)subp5 2 p0-29-upd-2 INSERT INTO t1 PARTITION (`p0-29`, subp4) VALUES (11, '(p0-29-)ins'); INSERT INTO t1 PARTITION (`p0-29`, subp4) VALUES (12, '(p0-29-)ins'); SELECT * FROM t1 PARTITION (`p0-29`); a b 12 (p0-29-)ins 21 (p0-29-)subp5 24 (p0-29-)subp5 3 p0-29-upd-2 22 (p0-29-)subp5 1 p0-29-upd-2 4 p0-29-upd-2 11 (p0-29-)ins 23 (p0-29-)subp5 2 p0-29-upd-2 DELETE FROM t1 PARTITION (`p0-29`,subp5) WHERE b= '(p0-29-)ins'; SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 3 p0-29-upd-2 22 (p0-29-)subp5 1 p0-29-upd-2 4 p0-29-upd-2 23 (p0-29-)subp5 2 p0-29-upd-2 connection session1; reap SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 3 p0-29-upd-2 22 (p0-29-)subp5 1 p0-29-upd-2 4 p0-29-upd-2 23 (p0-29-)subp5 2 p0-29-upd-2 connection session2; SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 3 p0-29-upd-2 22 (p0-29-)subp5 1 p0-29-upd-2 4 p0-29-upd-2 23 (p0-29-)subp5 2 p0-29-upd-2 disconnect session1; disconnect session2; connection default; DROP TABLE t1; CREATE TABLE t1 (a INT NOT NULL, b varchar (64), INDEX ind_t1 (b,a), PRIMARY KEY (a)) ENGINE = MyISAM PARTITION BY RANGE (a) SUBPARTITION BY HASH (a) SUBPARTITIONS 3 (PARTITION pNeg VALUES LESS THAN (0) (SUBPARTITION subp0 , SUBPARTITION subp1 , SUBPARTITION subp2 ), PARTITION `p0-29` VALUES LESS THAN (30) (SUBPARTITION subp3 , SUBPARTITION subp4 , SUBPARTITION subp5 ), PARTITION `p30-299` VALUES LESS THAN (300) (SUBPARTITION subp6 , SUBPARTITION subp7 , SUBPARTITION subp8 ), PARTITION `p300-2999` VALUES LESS THAN (3000) (SUBPARTITION subp9 , SUBPARTITION subp10 , SUBPARTITION subp11 ), PARTITION `p3000-299999` VALUES LESS THAN (300000) (SUBPARTITION subp12 , SUBPARTITION subp13 , SUBPARTITION subp14 )); Warnings: Warning 1287 The partition engine, used by table 'test.t1', is deprecated and will be removed in a future release. Please use native partitioning instead. INSERT INTO t1 PARTITION (pNeg, subp0) VALUES (-4, '(pNeg-)subp0'); Warnings: Warning 1287 The partition engine, used by table 'test.t1', is deprecated and will be removed in a future release. Please use native partitioning instead. INSERT INTO t1 PARTITION (pNeg, subp0) VALUES (-3, '(pNeg-)subp0'); INSERT INTO t1 PARTITION (pNeg, subp0) VALUES (-2, '(pNeg-)subp0'); INSERT INTO t1 PARTITION (pNeg, subp0) VALUES (-1, '(pNeg-)subp0'); INSERT INTO t1 PARTITION (`p0-29`, subp3) VALUES (4, '(p0-29-)subp3'); INSERT INTO t1 PARTITION (`p0-29`, subp3) VALUES (3, '(p0-29-)subp3'); INSERT INTO t1 PARTITION (`p0-29`, subp3) VALUES (2, '(p0-29-)subp3'); INSERT INTO t1 PARTITION (`p0-29`, subp3) VALUES (1, '(p0-29-)subp3'); INSERT INTO t1 PARTITION (`p0-29`, subp5) VALUES (24, '(p0-29-)subp5'); INSERT INTO t1 PARTITION (`p0-29`, subp5) VALUES (23, '(p0-29-)subp5'); INSERT INTO t1 PARTITION (`p0-29`, subp5) VALUES (22, '(p0-29-)subp5'); INSERT INTO t1 PARTITION (`p0-29`, subp5) VALUES (21, '(p0-29-)subp5'); INSERT INTO t1 PARTITION (`p30-299`, subp9) VALUES (34, '(p30-299-)subp6'); INSERT INTO t1 PARTITION (`p30-299`, subp9) VALUES (33, '(p30-299-)subp6'); INSERT INTO t1 PARTITION (`p30-299`, subp9) VALUES (32, '(p30-299-)subp6'); INSERT INTO t1 PARTITION (`p30-299`, subp9) VALUES (31, '(p30-299-)subp6'); INSERT INTO t1 PARTITION (`p30-299`, subp8) VALUES (234, '(p30-299-)subp8'); INSERT INTO t1 PARTITION (`p30-299`, subp8) VALUES (233, '(p30-299-)subp8'); INSERT INTO t1 PARTITION (`p30-299`, subp8) VALUES (232, '(p30-299-)subp8'); INSERT INTO t1 PARTITION (`p30-299`, subp8) VALUES (231, '(p30-299-)subp8'); INSERT INTO t1 PARTITION (`p300-2999`, subp8) VALUES (304, '(p300-2999-)subp8'); INSERT INTO t1 PARTITION (`p300-2999`, subp8) VALUES (303, '(p300-2999-)subp8'); INSERT INTO t1 PARTITION (`p300-2999`, subp8) VALUES (302, '(p300-2999-)subp8'); INSERT INTO t1 PARTITION (`p300-2999`, subp8) VALUES (301, '(p300-2999-)subp8'); INSERT INTO t1 PARTITION (`p3000-299999`, subp12) VALUES (3004, '(p3000-299999-)subp12'); INSERT INTO t1 PARTITION (`p3000-299999`, subp12) VALUES (3003, '(p3000-299999-)subp12'); INSERT INTO t1 PARTITION (`p3000-299999`, subp12) VALUES (3002, '(p3000-299999-)subp12'); INSERT INTO t1 PARTITION (`p3000-299999`, subp12) VALUES (3001, '(p3000-299999-)subp12'); INSERT INTO t1 PARTITION (`p3000-299999`, subp14) VALUES (299996, '(p3000-299999-)subp14'); INSERT INTO t1 PARTITION (`p3000-299999`, subp14) VALUES (299997, '(p3000-299999-)subp14'); INSERT INTO t1 PARTITION (`p3000-299999`, subp14) VALUES (299998, '(p3000-299999-)subp14'); INSERT INTO t1 PARTITION (`p3000-299999`, subp14) VALUES (299999, '(p3000-299999-)subp14'); # Run in traditional mode set @@global.sql_mode= traditional; ####################################################### # UPDATE without partition selection connect session1, localhost, test_user_1,'testpw',test; SELECT * FROM t1 PARTITION (`p0-29`); a b 3 (p0-29-)subp3 21 (p0-29-)subp5 24 (p0-29-)subp5 1 (p0-29-)subp3 4 (p0-29-)subp3 22 (p0-29-)subp5 2 (p0-29-)subp3 23 (p0-29-)subp5 send UPDATE t1 SET b='table-upd-1' WHERE a BETWEEN 0 AND 9; connect session2, localhost, test_user_2,'testpw',test; UPDATE t1 SET b='table-upd-2' WHERE a BETWEEN 0 AND 9; SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 3 table-upd-2 22 (p0-29-)subp5 1 table-upd-2 4 table-upd-2 23 (p0-29-)subp5 2 table-upd-2 INSERT INTO t1 VALUES (11, 'table-ins'); INSERT INTO t1 VALUES (12, 'table-ins'); SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 12 table-ins 3 table-upd-2 22 (p0-29-)subp5 1 table-upd-2 4 table-upd-2 23 (p0-29-)subp5 11 table-ins 2 table-upd-2 DELETE FROM t1 WHERE b= 'table-ins'; SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 3 table-upd-2 22 (p0-29-)subp5 1 table-upd-2 4 table-upd-2 23 (p0-29-)subp5 2 table-upd-2 connection session1; reap SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 3 table-upd-2 22 (p0-29-)subp5 1 table-upd-2 4 table-upd-2 23 (p0-29-)subp5 2 table-upd-2 connection session2; SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 3 table-upd-2 22 (p0-29-)subp5 1 table-upd-2 4 table-upd-2 23 (p0-29-)subp5 2 table-upd-2 ####################################################### # UPDATE with partition selection connection session1; SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 3 table-upd-2 22 (p0-29-)subp5 1 table-upd-2 4 table-upd-2 23 (p0-29-)subp5 2 table-upd-2 send UPDATE t1 PARTITION (`p0-29`) SET b='p0-29-upd-1' WHERE a BETWEEN 0 AND 9; connection session2; UPDATE t1 PARTITION (`p0-29`) SET b='p0-29-upd-2' WHERE a BETWEEN 0 AND 9; SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 3 p0-29-upd-2 22 (p0-29-)subp5 1 p0-29-upd-2 4 p0-29-upd-2 23 (p0-29-)subp5 2 p0-29-upd-2 INSERT INTO t1 PARTITION (`p0-29`, subp4) VALUES (11, '(p0-29-)ins'); INSERT INTO t1 PARTITION (`p0-29`, subp4) VALUES (12, '(p0-29-)ins'); SELECT * FROM t1 PARTITION (`p0-29`); a b 12 (p0-29-)ins 21 (p0-29-)subp5 24 (p0-29-)subp5 3 p0-29-upd-2 22 (p0-29-)subp5 1 p0-29-upd-2 4 p0-29-upd-2 11 (p0-29-)ins 23 (p0-29-)subp5 2 p0-29-upd-2 DELETE FROM t1 PARTITION (`p0-29`,subp5) WHERE b= '(p0-29-)ins'; SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 3 p0-29-upd-2 22 (p0-29-)subp5 1 p0-29-upd-2 4 p0-29-upd-2 23 (p0-29-)subp5 2 p0-29-upd-2 connection session1; reap SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 3 p0-29-upd-2 22 (p0-29-)subp5 1 p0-29-upd-2 4 p0-29-upd-2 23 (p0-29-)subp5 2 p0-29-upd-2 connection session2; SELECT * FROM t1 PARTITION (`p0-29`); a b 21 (p0-29-)subp5 24 (p0-29-)subp5 3 p0-29-upd-2 22 (p0-29-)subp5 1 p0-29-upd-2 4 p0-29-upd-2 23 (p0-29-)subp5 2 p0-29-upd-2 disconnect session1; disconnect session2; connection default; DROP TABLE t1; DROP USER test_user_1; DROP USER test_user_2; set @@global.sql_mode= @save_sqlmode;