Skip to content

Commit

Permalink
Merge 10.11 into 11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Jan 13, 2023
2 parents 944beb9 + bb3a639 commit d6d85c9
Show file tree
Hide file tree
Showing 87 changed files with 1,868 additions and 696 deletions.
2 changes: 1 addition & 1 deletion debian/autobake-deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ in
replace_uring_with_aio
disable_libfmt
;&
impish|jammy|kinetic)
impish|jammy|kinetic|lunar)
# mariadb-plugin-rocksdb s390x not supported by us (yet)
# ubuntu doesn't support mips64el yet, so keep this just
# in case something changes.
Expand Down
18 changes: 18 additions & 0 deletions mysql-test/main/cache_temporal_4265.result
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,21 @@ select (select max(m2.ut) from t1 m2 where m1.id <> 0) from t1 m1;
2001-01-01 00:00:00.200000
2001-01-01 00:00:00.200000
drop table t1;
#
# MDEV-30345 DML does not find rows it is supposed to
#
CREATE TABLE t1 (f timestamp);
INSERT INTO t1 VALUES ('2022-01-01 00:00:00'),('2022-12-12 12:12:12');
CREATE TABLE t2 (f timestamp);
INSERT INTO t2 VALUES ('2022-01-01 00:00:00'),('2022-12-12 12:12:12');
SELECT * FROM t2 WHERE f IN ( SELECT f FROM t1 ) ;
f
2022-01-01 00:00:00
2022-12-12 12:12:12
DELETE FROM t2 WHERE f IN ( SELECT f FROM t1 ) ;
SELECT * FROM t2 WHERE f IN ( SELECT f FROM t1 ) ;
f
DROP TABLE t1,t2;
#
# End of 10.4 tests
#
18 changes: 18 additions & 0 deletions mysql-test/main/cache_temporal_4265.test
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,21 @@ select * from t1;
select (select max(m2.ut) from t1 m2 where m1.id <> 0) from t1 m1;
drop table t1;

--echo #
--echo # MDEV-30345 DML does not find rows it is supposed to
--echo #

CREATE TABLE t1 (f timestamp);
INSERT INTO t1 VALUES ('2022-01-01 00:00:00'),('2022-12-12 12:12:12');

CREATE TABLE t2 (f timestamp);
INSERT INTO t2 VALUES ('2022-01-01 00:00:00'),('2022-12-12 12:12:12');

SELECT * FROM t2 WHERE f IN ( SELECT f FROM t1 ) ;
DELETE FROM t2 WHERE f IN ( SELECT f FROM t1 ) ;
SELECT * FROM t2 WHERE f IN ( SELECT f FROM t1 ) ;
DROP TABLE t1,t2;

--echo #
--echo # End of 10.4 tests
--echo #
11 changes: 11 additions & 0 deletions mysql-test/main/create.result
Original file line number Diff line number Diff line change
Expand Up @@ -2028,6 +2028,17 @@ Warnings:
Warning 1280 Name 'foo' ignored for PRIMARY key.
DROP TABLE t1;
#
# MDEV-30342 Wrong "Truncated incorrect DECIMAL value" warning/error
#
create table t1(c1 varchar(1));
insert into t1(c1) values('#');
select @@sql_mode like '%strict_all_tables%';
@@sql_mode like '%strict_all_tables%'
0
create table t2 as select if(c1 = '#', c1 = 0, c1) as c1 from t1;
ERROR 22007: Truncated incorrect DECIMAL value: '#'
drop table t1;
#
# End of 10.3 tests
#
#
Expand Down
13 changes: 13 additions & 0 deletions mysql-test/main/create.test
Original file line number Diff line number Diff line change
Expand Up @@ -1892,6 +1892,19 @@ create table t1 (c int(10) unsigned) engine=memory transactional=0;
CREATE TABLE t1 ( id1 INT, id2 INT, CONSTRAINT `foo` PRIMARY KEY (id1), CONSTRAINT `bar` UNIQUE KEY(id2));
DROP TABLE t1;

--echo #
--echo # MDEV-30342 Wrong "Truncated incorrect DECIMAL value" warning/error
--echo #

create table t1(c1 varchar(1));
insert into t1(c1) values('#');

select @@sql_mode like '%strict_all_tables%';
--error ER_TRUNCATED_WRONG_VALUE
create table t2 as select if(c1 = '#', c1 = 0, c1) as c1 from t1;

drop table t1;

--echo #
--echo # End of 10.3 tests
--echo #
Expand Down
21 changes: 21 additions & 0 deletions mysql-test/main/default.result
Original file line number Diff line number Diff line change
Expand Up @@ -3463,5 +3463,26 @@ SELECT 1 FROM t1 GROUP BY DEFAULT(pk);
1
DROP TABLE t1;
#
# MDEV-29890 Update with inner join false row count result
#
create table t1 (a int not null);
select column_name, column_default, column_default is not null as 'has_default', is_nullable from information_schema.columns where table_schema='test' and table_name='t1';
column_name column_default has_default is_nullable
a NULL 0 NO
create or replace view v1 as select * from t1;
select column_name, column_default, column_default is not null as 'has_default', is_nullable from information_schema.columns where table_schema='test' and table_name='v1';
column_name column_default has_default is_nullable
a NULL 0 NO
create or replace view v1 as select * from t1 group by a;
select column_name, column_default, column_default is not null as 'has_default', is_nullable from information_schema.columns where table_schema='test' and table_name='v1';
column_name column_default has_default is_nullable
a NULL 0 NO
create or replace view v1 as select * from t1 group by a with rollup;
select column_name, column_default, column_default is not null as 'has_default', is_nullable from information_schema.columns where table_schema='test' and table_name='v1';
column_name column_default has_default is_nullable
a NULL 1 YES
drop view v1;
drop table t1;
#
# End of 10.4 test
#
14 changes: 14 additions & 0 deletions mysql-test/main/default.test
Original file line number Diff line number Diff line change
Expand Up @@ -2169,6 +2169,20 @@ INSERT INTO t1 VALUES (),();
SELECT 1 FROM t1 GROUP BY DEFAULT(pk);
DROP TABLE t1;

--echo #
--echo # MDEV-29890 Update with inner join false row count result
--echo #
create table t1 (a int not null);
select column_name, column_default, column_default is not null as 'has_default', is_nullable from information_schema.columns where table_schema='test' and table_name='t1';
create or replace view v1 as select * from t1;
select column_name, column_default, column_default is not null as 'has_default', is_nullable from information_schema.columns where table_schema='test' and table_name='v1';
create or replace view v1 as select * from t1 group by a;
select column_name, column_default, column_default is not null as 'has_default', is_nullable from information_schema.columns where table_schema='test' and table_name='v1';
create or replace view v1 as select * from t1 group by a with rollup;
select column_name, column_default, column_default is not null as 'has_default', is_nullable from information_schema.columns where table_schema='test' and table_name='v1';
drop view v1;
drop table t1;

--echo #
--echo # End of 10.4 test
--echo #
28 changes: 5 additions & 23 deletions mysql-test/main/desc_index_range.result
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ select json_detailed(json_extract(trace, '$**.range_access_plan.ranges'))
from information_schema.optimizer_trace;
json_detailed(json_extract(trace, '$**.range_access_plan.ranges'))
[

[
"(6) <= (a DESC) <= (6)",
"(4) <= (a DESC) <= (4)",
Expand Down Expand Up @@ -43,10 +42,7 @@ select json_detailed(json_extract(trace, '$**.range_access_plan.ranges'))
from information_schema.optimizer_trace;
json_detailed(json_extract(trace, '$**.range_access_plan.ranges'))
[

[
"(8) <= (a)"
]
["(8) <= (a)"]
]
explain select * from t1 force index(ab) where a>=8 and b<=50;
id select_type table type possible_keys key key_len ref rows Extra
Expand All @@ -55,10 +51,7 @@ select json_detailed(json_extract(trace, '$**.range_access_plan.ranges'))
from information_schema.optimizer_trace;
json_detailed(json_extract(trace, '$**.range_access_plan.ranges'))
[

[
"(8,50) <= (a,b DESC)"
]
["(8,50) <= (a,b DESC)"]
]
select * from t1 force index(ab) where a>=8 and b<=50;
a b
Expand Down Expand Up @@ -102,10 +95,7 @@ select json_detailed(json_extract(trace, '$**.range_access_plan.ranges'))
from information_schema.optimizer_trace;
json_detailed(json_extract(trace, '$**.range_access_plan.ranges'))
[

[
"(2,80) <= (a,b DESC) <= (4,50)"
]
["(2,80) <= (a,b DESC) <= (4,50)"]
]
select * from t1 where a between 2 and 4 and b between 50 and 80;
a b
Expand Down Expand Up @@ -136,10 +126,7 @@ select json_detailed(json_extract(trace, '$**.range_access_plan.ranges'))
from information_schema.optimizer_trace;
json_detailed(json_extract(trace, '$**.range_access_plan.ranges'))
[

[
"(4) <= (a DESC) <= (2)"
]
["(4) <= (a DESC) <= (2)"]
]
explain
select * from t2 where a between 2 and 4 and b between 50 and 80;
Expand All @@ -149,10 +136,7 @@ select json_detailed(json_extract(trace, '$**.range_access_plan.ranges'))
from information_schema.optimizer_trace;
json_detailed(json_extract(trace, '$**.range_access_plan.ranges'))
[

[
"(4,80) <= (a DESC,b DESC) <= (2,50)"
]
["(4,80) <= (a DESC,b DESC) <= (2,50)"]
]
drop table t2;
#
Expand All @@ -167,9 +151,7 @@ select json_detailed(json_extract(trace, '$**.potential_group_range_indexes'))
from information_schema.optimizer_trace;
json_detailed(json_extract(trace, '$**.potential_group_range_indexes'))
[

[

{
"index": "PRIMARY",
"usable": false,
Expand Down
11 changes: 10 additions & 1 deletion mysql-test/main/func_group.result
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
drop table if exists t1,t2,t3,t4,t5,t6;
set @sav_dpi= @@div_precision_increment;
set div_precision_increment= 5;
show variables like 'div_precision_increment';
Expand Down Expand Up @@ -2567,5 +2566,15 @@ stddev_samp(i) stddev_pop(i) stddev(i) std(i)
drop view v1;
drop table t1;
#
# MDEV-29988: Major performance regression with 10.6.11
#
create table t1 (a varchar(10) charset utf8mb4, b int, c int);
insert t1 values (1,2,3),(4,5,6),(1,7,8);
select concat(a,":",group_concat(b)) from t1 group by a;
concat(a,":",group_concat(b))
1:2,7
4:5
drop table t1;
#
# End of 10.3 tests
#
12 changes: 8 additions & 4 deletions mysql-test/main/func_group.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ if (`SELECT $PS_PROTOCOL != 0`)
--skip Test temporarily disabled for ps-protocol
}

--disable_warnings
drop table if exists t1,t2,t3,t4,t5,t6;
--enable_warnings

set @sav_dpi= @@div_precision_increment;
set div_precision_increment= 5;
show variables like 'div_precision_increment';
Expand Down Expand Up @@ -1807,6 +1803,14 @@ select * from v1;
drop view v1;
drop table t1;

--echo #
--echo # MDEV-29988: Major performance regression with 10.6.11
--echo #
create table t1 (a varchar(10) charset utf8mb4, b int, c int);
insert t1 values (1,2,3),(4,5,6),(1,7,8);
select concat(a,":",group_concat(b)) from t1 group by a;
drop table t1;

--echo #
--echo # End of 10.3 tests
--echo #
Loading

0 comments on commit d6d85c9

Please sign in to comment.