Skip to content

Commit 30bba8e

Browse files
committed
Merge branch 'github/bb-10.9-release' into bb-10.10-release
2 parents 91b31ce + 33fd519 commit 30bba8e

34 files changed

+546
-226
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
MYSQL_VERSION_MAJOR=10
22
MYSQL_VERSION_MINOR=10
3-
MYSQL_VERSION_PATCH=4
3+
MYSQL_VERSION_PATCH=5
44
SERVER_MATURITY=stable

debian/mariadb-server.mariadb.init

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ sanity_checks() {
8686
datadir=`mariadbd_get_param datadir`
8787
# As preset blocksize of GNU df is 1024 then available bytes is $df_available_blocks * 1024
8888
# 4096 blocks is then lower than 4 MB
89-
df_available_blocks=`LC_ALL=C BLOCKSIZE= df --output=avail "$datadir" | tail -n 1`
89+
df_available_blocks="$(LC_ALL=C BLOCKSIZE='' df --output=avail "$datadir" | tail -n 1)"
9090
if [ "$df_available_blocks" -lt "4096" ]; then
9191
log_failure_msg "$0: ERROR: The partition with $datadir is too full!"
9292
echo "ERROR: The partition with $datadir is too full!" | $ERR_LOGGER

debian/mariadb-server.preinst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ fi
210210

211211
# As preset blocksize of GNU df is 1024 then available bytes is $df_available_blocks * 1024
212212
# 4096 blocks is then lower than 4 MB
213-
df_available_blocks=`LC_ALL=C BLOCKSIZE= df --output=avail "$datadir" | tail -n 1`
213+
df_available_blocks="$(LC_ALL=C BLOCKSIZE='' df --output=avail "$mysql_datadir" | tail -n 1)"
214214
if [ "$df_available_blocks" -lt "4096" ]; then
215215
echo "ERROR: There's not enough space in $mysql_datadir/" 1>&2
216216
db_stop

mysql-test/main/derived_cond_pushdown.result

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20787,6 +20787,100 @@ a
2078720787
deallocate prepare stmt;
2078820788
drop view v1;
2078920789
drop table t1;
20790+
#
20791+
# MDEV-31240: condition pushed into splittable derived has reference to
20792+
# outer column and does not refer to any column of embedding
20793+
# select
20794+
#
20795+
create table t1 (a int);
20796+
insert into t1 select seq from seq_1_to_1000;
20797+
create table t2 (a int, b int, key (a));
20798+
insert into t2 select mod(seq,100), rand(13) * mod(seq,500) from seq_1_to_1000;
20799+
create table t3 (a int);
20800+
insert into t3 values (3), (1);
20801+
analyze table t1, t2, t3 persistent for all;
20802+
Table Op Msg_type Msg_text
20803+
test.t1 analyze status Engine-independent statistics collected
20804+
test.t1 analyze status OK
20805+
test.t2 analyze status Engine-independent statistics collected
20806+
test.t2 analyze status Table is already up to date
20807+
test.t3 analyze status Engine-independent statistics collected
20808+
test.t3 analyze status OK
20809+
explain select
20810+
a,
20811+
( select concat(t3.a,'=',dt.s)
20812+
from
20813+
(select a, sum(b) as s from t2 group by a) as dt,
20814+
t3
20815+
where dt.a=t1.a and t3.a < 3
20816+
)
20817+
from t1 limit 5;
20818+
id select_type table type possible_keys key key_len ref rows Extra
20819+
1 PRIMARY t1 ALL NULL NULL NULL NULL 1000
20820+
2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 2 Using where
20821+
2 DEPENDENT SUBQUERY <derived3> ref key0 key0 5 test.t1.a 2
20822+
3 LATERAL DERIVED t2 ref a a 5 test.t1.a 10
20823+
select
20824+
a,
20825+
( select concat(t3.a,'=',dt.s)
20826+
from
20827+
(select a, sum(b) as s from t2 group by a) as dt,
20828+
t3
20829+
where dt.a=t1.a and t3.a < 3
20830+
)
20831+
from t1 limit 5;
20832+
a ( select concat(t3.a,'=',dt.s)
20833+
from
20834+
(select a, sum(b) as s from t2 group by a) as dt,
20835+
t3
20836+
where dt.a=t1.a and t3.a < 3
20837+
)
20838+
1 1=804
20839+
2 1=1056
20840+
3 1=846
20841+
4 1=947
20842+
5 1=973
20843+
truncate table t2;
20844+
insert into t2 select mod(seq,10), rand(15) * mod(seq,500) from seq_1_to_1000;
20845+
analyze table t2 persistent for all;
20846+
Table Op Msg_type Msg_text
20847+
test.t2 analyze status Engine-independent statistics collected
20848+
test.t2 analyze status Table is already up to date
20849+
explain select
20850+
a,
20851+
( select concat(t3.a,'=',dt.s)
20852+
from
20853+
(select a, sum(b) as s from t2 group by a) as dt,
20854+
t3
20855+
where dt.a=t1.a and t3.a < 3
20856+
)
20857+
from t1 limit 5;
20858+
id select_type table type possible_keys key key_len ref rows Extra
20859+
1 PRIMARY t1 ALL NULL NULL NULL NULL 1000
20860+
2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 2 Using where
20861+
2 DEPENDENT SUBQUERY <derived3> ref key0 key0 5 test.t1.a 100
20862+
3 DERIVED t2 ALL a NULL NULL NULL 1000 Using temporary; Using filesort
20863+
select
20864+
a,
20865+
( select concat(t3.a,'=',dt.s)
20866+
from
20867+
(select a, sum(b) as s from t2 group by a) as dt,
20868+
t3
20869+
where dt.a=t1.a and t3.a < 3
20870+
)
20871+
from t1 limit 5;
20872+
a ( select concat(t3.a,'=',dt.s)
20873+
from
20874+
(select a, sum(b) as s from t2 group by a) as dt,
20875+
t3
20876+
where dt.a=t1.a and t3.a < 3
20877+
)
20878+
1 1=11858
20879+
2 1=11380
20880+
3 1=11588
20881+
4 1=11373
20882+
5 1=11612
20883+
drop table t1,t2,t3;
2079020884
# End of 10.4 tests
2079120885
#
2079220886
# MDEV-28958: condition pushable into view after simplification

mysql-test/main/derived_cond_pushdown.test

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3973,6 +3973,47 @@ deallocate prepare stmt;
39733973
drop view v1;
39743974
drop table t1;
39753975

3976+
--echo #
3977+
--echo # MDEV-31240: condition pushed into splittable derived has reference to
3978+
--echo # outer column and does not refer to any column of embedding
3979+
--echo # select
3980+
--echo #
3981+
3982+
create table t1 (a int);
3983+
insert into t1 select seq from seq_1_to_1000;
3984+
3985+
create table t2 (a int, b int, key (a));
3986+
insert into t2 select mod(seq,100), rand(13) * mod(seq,500) from seq_1_to_1000;
3987+
3988+
create table t3 (a int);
3989+
insert into t3 values (3), (1);
3990+
3991+
analyze table t1, t2, t3 persistent for all;
3992+
3993+
let $q=
3994+
select
3995+
a,
3996+
( select concat(t3.a,'=',dt.s)
3997+
from
3998+
(select a, sum(b) as s from t2 group by a) as dt,
3999+
t3
4000+
where dt.a=t1.a and t3.a < 3
4001+
)
4002+
from t1 limit 5;
4003+
4004+
eval explain $q;
4005+
eval $q;
4006+
4007+
truncate table t2;
4008+
insert into t2 select mod(seq,10), rand(15) * mod(seq,500) from seq_1_to_1000;
4009+
4010+
analyze table t2 persistent for all;
4011+
4012+
eval explain $q;
4013+
eval $q;
4014+
4015+
drop table t1,t2,t3;
4016+
39764017
--echo # End of 10.4 tests
39774018

39784019
--echo #

mysql-test/main/derived_split_innodb.result

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,5 +839,20 @@ SELECT t1.* FROM t1 JOIN (SELECT id, COUNT(*) FROM t2 GROUP BY id) sq ON sq.id=
839839
a
840840
set optimizer_switch= @tmp1, join_cache_level= @tmp2;
841841
DROP TABLE t1, t2;
842+
#
843+
# MDEV-31403: Server crashes in st_join_table::choose_best_splitting (still)
844+
#
845+
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
846+
INSERT INTO t1 VALUES
847+
(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15);
848+
CREATE TABLE t2 (b INT) ENGINE=InnoDB;
849+
INSERT INTO t2 VALUES (100),(200);
850+
CREATE TABLE t3 (c INT, d INT, KEY(c)) ENGINE=InnoDB;
851+
INSERT INTO t3 VALUES (1,1),(2,2);
852+
CREATE VIEW v AS SELECT c, d FROM t3 GROUP BY c, d;
853+
SELECT * FROM t1 JOIN t2 WHERE (t1.a, t2.b) IN (SELECT * FROM v);
854+
a b
855+
DROP VIEW v;
856+
DROP TABLE t1, t2, t3;
842857
# End of 10.4 tests
843858
SET GLOBAL innodb_stats_persistent=@save_innodb_stats_persistent;

mysql-test/main/derived_split_innodb.test

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,27 @@ set optimizer_switch= @tmp1, join_cache_level= @tmp2;
466466
# Cleanup
467467
DROP TABLE t1, t2;
468468

469+
--echo #
470+
--echo # MDEV-31403: Server crashes in st_join_table::choose_best_splitting (still)
471+
--echo #
472+
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
473+
INSERT INTO t1 VALUES
474+
(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15);
475+
476+
CREATE TABLE t2 (b INT) ENGINE=InnoDB;
477+
INSERT INTO t2 VALUES (100),(200);
478+
479+
CREATE TABLE t3 (c INT, d INT, KEY(c)) ENGINE=InnoDB;
480+
INSERT INTO t3 VALUES (1,1),(2,2);
481+
482+
CREATE VIEW v AS SELECT c, d FROM t3 GROUP BY c, d;
483+
484+
SELECT * FROM t1 JOIN t2 WHERE (t1.a, t2.b) IN (SELECT * FROM v);
485+
486+
# Cleanup
487+
DROP VIEW v;
488+
DROP TABLE t1, t2, t3;
489+
469490
--echo # End of 10.4 tests
470491

471492
SET GLOBAL innodb_stats_persistent=@save_innodb_stats_persistent;

mysql-test/main/explain_non_select.result

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,3 +277,22 @@ EXECUTE stmt;
277277
id select_type table type possible_keys key key_len ref rows Extra
278278
1 SIMPLE t2 ALL NULL NULL NULL NULL 2
279279
drop table t1,t2;
280+
#
281+
# MDEV-31224: EXPLAIN EXTENDED for multi-table update of system table
282+
#
283+
CREATE TABLE t1 (a INT);
284+
INSERT INTO t1 VALUES (1),(2);
285+
CREATE TABLE t2 (b INT) ENGINE=MyISAM;
286+
INSERT INTO t2 VALUES (3);
287+
EXPLAIN EXTENDED UPDATE t1, t2 SET b = 4 WHERE a IN (6,2);
288+
id select_type table type possible_keys key key_len ref rows filtered Extra
289+
1 SIMPLE t2 system NULL NULL NULL NULL 1 100.00
290+
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
291+
Warnings:
292+
Note 1003 update `test`.`t1` set `test`.`t2`.`b` = 4 where `test`.`t1`.`a` in (6,2)
293+
UPDATE t1, t2 SET b = 4 WHERE a IN (6,2);
294+
SELECT * from t2;
295+
b
296+
4
297+
DROP TABLE t1, t2;
298+
# End of 10.4 tests

mysql-test/main/explain_non_select.test

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,3 +250,23 @@ PREPARE stmt FROM 'EXPLAIN INSERT INTO t1 SELECT * FROM t2';
250250
EXECUTE stmt;
251251
drop table t1,t2;
252252

253+
--echo #
254+
--echo # MDEV-31224: EXPLAIN EXTENDED for multi-table update of system table
255+
--echo #
256+
257+
CREATE TABLE t1 (a INT);
258+
INSERT INTO t1 VALUES (1),(2);
259+
260+
CREATE TABLE t2 (b INT) ENGINE=MyISAM;
261+
INSERT INTO t2 VALUES (3);
262+
263+
let $q=
264+
UPDATE t1, t2 SET b = 4 WHERE a IN (6,2);
265+
266+
eval EXPLAIN EXTENDED $q;
267+
eval $q;
268+
SELECT * from t2;
269+
270+
DROP TABLE t1, t2;
271+
272+
--echo # End of 10.4 tests

mysql-test/main/myisam_explain_non_select_all.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2689,7 +2689,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
26892689
1 SIMPLE t2 system NULL NULL NULL NULL 0 0.00 Const row not found
26902690
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00
26912691
Warnings:
2692-
Note 1003 update `test`.`t1` set NULL = 10
2692+
Note 1003 update `test`.`t1` set `test`.`t2`.`c2` = 10
26932693
# Status of EXPLAIN EXTENDED query
26942694
Variable_name Value
26952695
Handler_read_key 7
@@ -2734,7 +2734,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
27342734
1 SIMPLE t2 system NULL NULL NULL NULL 0 0.00 Const row not found
27352735
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
27362736
Warnings:
2737-
Note 1003 update `test`.`t1` set NULL = 10 where `test`.`t1`.`c3` = 10
2737+
Note 1003 update `test`.`t1` set `test`.`t2`.`c2` = 10 where `test`.`t1`.`c3` = 10
27382738
# Status of EXPLAIN EXTENDED query
27392739
Variable_name Value
27402740
Handler_read_key 7

0 commit comments

Comments
 (0)