From 3f619478f796eddbba6e39502fe941b285dd97b1 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 20:00:34 +0200 Subject: Adding upstream version 1:10.11.6. Signed-off-by: Daniel Baumann --- .../suite/federated/federated_partition.result | 91 ++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 mysql-test/suite/federated/federated_partition.result (limited to 'mysql-test/suite/federated/federated_partition.result') diff --git a/mysql-test/suite/federated/federated_partition.result b/mysql-test/suite/federated/federated_partition.result new file mode 100644 index 00000000..7b2b03d5 --- /dev/null +++ b/mysql-test/suite/federated/federated_partition.result @@ -0,0 +1,91 @@ +connect master,127.0.0.1,root,,test,$MASTER_MYPORT,; +connect slave,127.0.0.1,root,,test,$SLAVE_MYPORT,; +connection master; +CREATE DATABASE federated; +connection slave; +CREATE DATABASE federated; +drop table if exists t1; +connection slave; +create table federated.t1_1 (s1 int primary key) engine=myisam; +create table federated.t1_2 (s1 int primary key) engine=innodb; +connection master; +create table t1 (s1 int primary key) engine=federated +CONNECTION="remember_this" + partition by list (s1) +(partition p1 values in (1,3) +connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1_1', +partition p2 values in (2,4) +connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1_2'); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `s1` int(11) NOT NULL, + PRIMARY KEY (`s1`) +) ENGINE=FEDERATED DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci CONNECTION='remember_this' + PARTITION BY LIST (`s1`) +(PARTITION `p1` VALUES IN (1,3) CONNECTION = 'mysql://root@127.0.0.1:SLAVE_PORT/federated/t1_1' ENGINE = FEDERATED, + PARTITION `p2` VALUES IN (2,4) CONNECTION = 'mysql://root@127.0.0.1:SLAVE_PORT/federated/t1_2' ENGINE = FEDERATED) +insert into t1 values (1), (2), (3), (4); +select * from t1; +s1 +1 +3 +2 +4 +connection slave; +select * from federated.t1_1; +s1 +1 +3 +select * from federated.t1_2; +s1 +2 +4 +connection master; +drop table t1; +connection slave; +drop table federated.t1_1; +drop table federated.t1_2; +End of 5.1 tests +# +# MDEV-18734 ASAN heap-use-after-free upon sorting by blob column from partitioned table +# +connection slave; +use federated; +create table t1_1 (x int, b text, key(x)); +create table t1_2 (x int, b text, key(x)); +connection master; +create table t1 (x int, b text, key(x)) engine=federated +partition by range columns (x) ( +partition p1 values less than (40) connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1_1', +partition pn values less than (maxvalue) connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1_2' +); +insert t1 values (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8); +insert t1 select x + 8, x + 8 from t1; +insert t1 select x + 16, x + 16 from t1; +insert t1 select x + 49, repeat(x + 49, 100) from t1; +flush tables; +# This produces wrong result before MDEV-17573 +select x, left(b, 10) from t1 where x > 30 and x < 60 order by b; +x left(b, 10) +31 31 +32 32 +50 5050505050 +51 5151515151 +52 5252525252 +53 5353535353 +54 5454545454 +55 5555555555 +56 5656565656 +57 5757575757 +58 5858585858 +59 5959595959 +drop table t1; +connection slave; +drop table t1_1, t1_2; +connection master; +DROP TABLE IF EXISTS federated.t1; +DROP DATABASE IF EXISTS federated; +connection slave; +DROP TABLE IF EXISTS federated.t1; +DROP DATABASE IF EXISTS federated; -- cgit v1.2.3