Skip to content

Commit 6f741eb

Browse files
committed
Merge branch '10.2' into 10.3
2 parents 0db27ef + a5dc12e commit 6f741eb

31 files changed

+648
-112
lines changed

debian/mariadb-server-10.3.postrm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
1111
# do it himself. No database directories should be removed while the server
1212
# is running!
1313
stop_server() {
14+
# Return immediately if there are no mysql processes running
15+
# as there is no point in trying to shutdown in that case.
16+
# Compatibility with versions that ran 'mariadbd'
17+
if ! pgrep -x --nslist pid --ns $$ "mysqld|mariadbd" > /dev/null; then return; fi
18+
1419
set +e
1520
if [ -x /usr/sbin/invoke-rc.d ]; then
1621
invoke-rc.d mysql stop

debian/mariadb-server-10.3.preinst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ mysql_upgradedir=/var/lib/mysql-upgrade
2222
# is running! Another mysqld in e.g. a different chroot is fine for us.
2323
stop_server() {
2424
if [ ! -x /etc/init.d/mysql ]; then return; fi
25-
26-
# Return immediately if there are no mysql processes running
25+
# Return immediately if there are no mysql processes running on a host
26+
# (leave containerized processes with the same name in other namespaces)
2727
# as there is no point in trying to shutdown in that case.
28-
if ! pgrep --ns $$ mysqld > /dev/null; then return; fi
28+
# Compatibility with versions that ran 'mariadbd'
29+
if ! pgrep -x --nslist pid --ns $$ "mysqld|mariadbd" > /dev/null; then return; fi
2930

3031
set +e
3132
if [ -x /usr/sbin/invoke-rc.d ]; then

mysql-test/main/default.result

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3406,6 +3406,24 @@ SELECT 1 FROM t1 GROUP BY DEFAULT(pk);
34063406
1
34073407
1
34083408
DROP TABLE t1;
3409+
#
3410+
# MDEV-28402: ASAN heap-use-after-free in create_tmp_table,
3411+
# Assertion `l_offset >= 0 && table->s->rec_buff_length - l_offset > 0'
3412+
#
3413+
CREATE TABLE t (a INT, KEY (a));
3414+
INSERT INTO t VALUES (1),(2);
3415+
SELECT DISTINCT DEFAULT(a), CASE a WHEN 0 THEN 1 ELSE 2 END FROM t GROUP BY a WITH ROLLUP;
3416+
DEFAULT(a) CASE a WHEN 0 THEN 1 ELSE 2 END
3417+
NULL 2
3418+
DROP TABLE t;
3419+
CREATE TABLE t (a INT, KEY (a));
3420+
INSERT INTO t VALUES (1),(2);
3421+
CREATE ALGORITHM=TEMPTABLE VIEW v AS SELECT * FROM t;
3422+
SELECT DISTINCT DEFAULT(a), CASE a WHEN 0 THEN 1 ELSE 2 END FROM v GROUP BY a WITH ROLLUP;
3423+
DEFAULT(a) CASE a WHEN 0 THEN 1 ELSE 2 END
3424+
NULL 2
3425+
DROP TABLE t;
3426+
DROP VIEW v;
34093427
# end of 10.2 test
34103428
#
34113429
# MDEV-22703 DEFAULT() on a BLOB column can overwrite the default

mysql-test/main/default.test

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2125,6 +2125,23 @@ CREATE TABLE t1 (pk varchar(36) DEFAULT uuid());
21252125
INSERT INTO t1 VALUES (),();
21262126
SELECT 1 FROM t1 GROUP BY DEFAULT(pk);
21272127
DROP TABLE t1;
2128+
2129+
2130+
--echo #
2131+
--echo # MDEV-28402: ASAN heap-use-after-free in create_tmp_table,
2132+
--echo # Assertion `l_offset >= 0 && table->s->rec_buff_length - l_offset > 0'
2133+
--echo #
2134+
CREATE TABLE t (a INT, KEY (a));
2135+
INSERT INTO t VALUES (1),(2);
2136+
SELECT DISTINCT DEFAULT(a), CASE a WHEN 0 THEN 1 ELSE 2 END FROM t GROUP BY a WITH ROLLUP;
2137+
DROP TABLE t;
2138+
2139+
CREATE TABLE t (a INT, KEY (a));
2140+
INSERT INTO t VALUES (1),(2);
2141+
CREATE ALGORITHM=TEMPTABLE VIEW v AS SELECT * FROM t;
2142+
SELECT DISTINCT DEFAULT(a), CASE a WHEN 0 THEN 1 ELSE 2 END FROM v GROUP BY a WITH ROLLUP;
2143+
DROP TABLE t;
2144+
DROP VIEW v;
21282145
--echo # end of 10.2 test
21292146

21302147
--echo #

mysql-test/main/subselect_innodb.result

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,3 +661,14 @@ group by (select a),(select 1)
661661
);
662662
1
663663
drop table t1;
664+
#
665+
# MDEV-28437: Assertion `!eliminated' failed in Item_subselect::exec
666+
#
667+
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
668+
INSERT INTO t1 VALUES (1),(2);
669+
CREATE TABLE t2 (b INT PRIMARY KEY) ENGINE=InnoDB;
670+
INSERT INTO t1 VALUES (3),(4);
671+
SELECT 1 IN (SELECT a FROM t1 LEFT JOIN t2 ON (a = b AND EXISTS (SELECT * FROM t1)));
672+
1 IN (SELECT a FROM t1 LEFT JOIN t2 ON (a = b AND EXISTS (SELECT * FROM t1)))
673+
1
674+
drop table t1,t2;

mysql-test/main/subselect_innodb.test

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,3 +655,17 @@ select 1 from t1 where not exists
655655
--enable_warnings
656656
drop table t1;
657657

658+
--echo #
659+
--echo # MDEV-28437: Assertion `!eliminated' failed in Item_subselect::exec
660+
--echo #
661+
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
662+
INSERT INTO t1 VALUES (1),(2);
663+
CREATE TABLE t2 (b INT PRIMARY KEY) ENGINE=InnoDB;
664+
INSERT INTO t1 VALUES (3),(4);
665+
666+
SELECT 1 IN (SELECT a FROM t1 LEFT JOIN t2 ON (a = b AND EXISTS (SELECT * FROM t1)));
667+
668+
drop table t1,t2;
669+
670+
# End of 10.2 tests
671+

mysql-test/main/win.result

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4238,6 +4238,48 @@ SELECT 1 UNION SELECT a FROM t1 ORDER BY (row_number() over ());
42384238
ERROR HY000: Expression #1 of ORDER BY contains aggregate function and applies to a UNION
42394239
DROP TABLE t1;
42404240
#
4241+
# MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM &&
4242+
# item2->type() == Item::FIELD_ITEM' failed in compare_order_elements
4243+
#
4244+
CREATE TABLE t1 ( id varchar(10));
4245+
INSERT INTO t1 values (1),(2),(3);
4246+
SELECT
4247+
dense_rank() over (ORDER BY avg(1)+3),
4248+
rank() over (ORDER BY avg(1))
4249+
FROM t1
4250+
GROUP BY nullif(id, 15532);
4251+
dense_rank() over (ORDER BY avg(1)+3) rank() over (ORDER BY avg(1))
4252+
1 1
4253+
1 1
4254+
1 1
4255+
SELECT
4256+
dense_rank() over (ORDER BY avg(1)),
4257+
rank() over (ORDER BY avg(1))
4258+
FROM t1
4259+
GROUP BY nullif(id, 15532);
4260+
dense_rank() over (ORDER BY avg(1)) rank() over (ORDER BY avg(1))
4261+
1 1
4262+
1 1
4263+
1 1
4264+
drop table t1;
4265+
CREATE TABLE t1 ( a char(25), b text);
4266+
INSERT INTO t1 VALUES ('foo','bar');
4267+
SELECT
4268+
SUM(b) OVER (PARTITION BY a),
4269+
ROW_NUMBER() OVER (PARTITION BY b)
4270+
FROM t1
4271+
GROUP BY
4272+
LEFT((SYSDATE()), 'foo')
4273+
WITH ROLLUP;
4274+
SUM(b) OVER (PARTITION BY a) ROW_NUMBER() OVER (PARTITION BY b)
4275+
NULL 1
4276+
NULL 1
4277+
Warnings:
4278+
Warning 1292 Truncated incorrect INTEGER value: 'foo'
4279+
Warning 1292 Truncated incorrect INTEGER value: 'foo'
4280+
drop table t1;
4281+
#
4282+
#
42414283
# End of 10.2 tests
42424284
#
42434285
#

mysql-test/main/win.test

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2740,6 +2740,39 @@ INSERT INTO t1 VALUES (1),(1),(1),(1),(1),(2),(2),(2),(2),(2),(2);
27402740
SELECT 1 UNION SELECT a FROM t1 ORDER BY (row_number() over ());
27412741
DROP TABLE t1;
27422742

2743+
--echo #
2744+
--echo # MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM &&
2745+
--echo # item2->type() == Item::FIELD_ITEM' failed in compare_order_elements
2746+
--echo #
2747+
CREATE TABLE t1 ( id varchar(10));
2748+
INSERT INTO t1 values (1),(2),(3);
2749+
2750+
SELECT
2751+
dense_rank() over (ORDER BY avg(1)+3),
2752+
rank() over (ORDER BY avg(1))
2753+
FROM t1
2754+
GROUP BY nullif(id, 15532);
2755+
2756+
SELECT
2757+
dense_rank() over (ORDER BY avg(1)),
2758+
rank() over (ORDER BY avg(1))
2759+
FROM t1
2760+
GROUP BY nullif(id, 15532);
2761+
drop table t1;
2762+
2763+
CREATE TABLE t1 ( a char(25), b text);
2764+
INSERT INTO t1 VALUES ('foo','bar');
2765+
2766+
SELECT
2767+
SUM(b) OVER (PARTITION BY a),
2768+
ROW_NUMBER() OVER (PARTITION BY b)
2769+
FROM t1
2770+
GROUP BY
2771+
LEFT((SYSDATE()), 'foo')
2772+
WITH ROLLUP;
2773+
drop table t1;
2774+
2775+
--echo #
27432776
--echo #
27442777
--echo # End of 10.2 tests
27452778
--echo #

mysql-test/suite/encryption/r/tempfiles_encrypted.result

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4244,6 +4244,48 @@ SELECT 1 UNION SELECT a FROM t1 ORDER BY (row_number() over ());
42444244
ERROR HY000: Expression #1 of ORDER BY contains aggregate function and applies to a UNION
42454245
DROP TABLE t1;
42464246
#
4247+
# MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM &&
4248+
# item2->type() == Item::FIELD_ITEM' failed in compare_order_elements
4249+
#
4250+
CREATE TABLE t1 ( id varchar(10));
4251+
INSERT INTO t1 values (1),(2),(3);
4252+
SELECT
4253+
dense_rank() over (ORDER BY avg(1)+3),
4254+
rank() over (ORDER BY avg(1))
4255+
FROM t1
4256+
GROUP BY nullif(id, 15532);
4257+
dense_rank() over (ORDER BY avg(1)+3) rank() over (ORDER BY avg(1))
4258+
1 1
4259+
1 1
4260+
1 1
4261+
SELECT
4262+
dense_rank() over (ORDER BY avg(1)),
4263+
rank() over (ORDER BY avg(1))
4264+
FROM t1
4265+
GROUP BY nullif(id, 15532);
4266+
dense_rank() over (ORDER BY avg(1)) rank() over (ORDER BY avg(1))
4267+
1 1
4268+
1 1
4269+
1 1
4270+
drop table t1;
4271+
CREATE TABLE t1 ( a char(25), b text);
4272+
INSERT INTO t1 VALUES ('foo','bar');
4273+
SELECT
4274+
SUM(b) OVER (PARTITION BY a),
4275+
ROW_NUMBER() OVER (PARTITION BY b)
4276+
FROM t1
4277+
GROUP BY
4278+
LEFT((SYSDATE()), 'foo')
4279+
WITH ROLLUP;
4280+
SUM(b) OVER (PARTITION BY a) ROW_NUMBER() OVER (PARTITION BY b)
4281+
NULL 1
4282+
NULL 1
4283+
Warnings:
4284+
Warning 1292 Truncated incorrect INTEGER value: 'foo'
4285+
Warning 1292 Truncated incorrect INTEGER value: 'foo'
4286+
drop table t1;
4287+
#
4288+
#
42474289
# End of 10.2 tests
42484290
#
42494291
#

mysql-test/suite/innodb_gis/r/rtree_split.result

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,3 @@ select count(*) from t1 where MBRWithin(t1.c2, @g1);
6161
count(*)
6262
57344
6363
drop table t1;
64-
#
65-
# MDEV-27417 Spatial index tries to update
66-
# change buffer bookkeeping page
67-
#
68-
CREATE TEMPORARY TABLE t1 (c POINT NOT NULL, SPATIAL(c)) ENGINE=InnoDB;
69-
INSERT INTO t1 SELECT PointFromText('POINT(0 0)') FROM seq_1_to_366;
70-
DROP TABLE t1;

0 commit comments

Comments
 (0)