Skip to content

Commit 6e9642b

Browse files
committed
Merge 10.2 into 10.3
2 parents 8149e4d + dfa2d0b commit 6e9642b

File tree

11 files changed

+110
-17
lines changed

11 files changed

+110
-17
lines changed

cmake/FindJNI.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if(JAVA_AWT_LIBRARY)
1+
if(JAVA_AWT_LIBRARY AND JAVA_INCLUDE_PATH)
22
set(JNI_FOUND TRUE)
33
return()
44
endif()

debian/mariadb-plugin-connect.install

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
11
etc/mysql/conf.d/connect.cnf etc/mysql/mariadb.conf.d
22
usr/lib/mysql/plugin/ha_connect.so
3-
usr/share/mysql/Mongo2.jar
4-
usr/share/mysql/Mongo3.jar
5-
usr/share/mysql/JavaWrappers.jar
6-
usr/share/mysql/JdbcInterface.jar

mysql-test/main/derived_cond_pushdown.result

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10651,6 +10651,45 @@ m
1065110651
7
1065210652
drop view v1;
1065310653
drop table t1;
10654+
#
10655+
# MDEV-25635: pushdown into grouping view using aggregate functions
10656+
# with constant arguments via a mergeable derived table
10657+
#
10658+
create table t1 (a int);
10659+
insert into t1 values (3), (7), (1), (3), (7), (7), (3);
10660+
create view v1 as select a, sum(1) as f, sum(1) as g from t1 group by a;
10661+
select * from v1;
10662+
a f g
10663+
1 1 1
10664+
3 3 3
10665+
7 3 3
10666+
select * from (select * from v1) as dt where a=f and a=g;
10667+
a f g
10668+
1 1 1
10669+
3 3 3
10670+
explain extended select * from (select * from v1) as dt where a=f and a=g;
10671+
id select_type table type possible_keys key key_len ref rows filtered Extra
10672+
1 PRIMARY <derived3> ALL NULL NULL NULL NULL 7 100.00 Using where
10673+
3 DERIVED t1 ALL NULL NULL NULL NULL 7 100.00 Using temporary; Using filesort
10674+
Warnings:
10675+
Note 1003 /* select#1 */ select `v1`.`a` AS `a`,`v1`.`f` AS `f`,`v1`.`g` AS `g` from `test`.`v1` where `v1`.`a` = `v1`.`f` and `v1`.`a` = `v1`.`g`
10676+
create view v2 as select a, min(1) as f, min(1) as g from t1 group by a;
10677+
select * from v2;
10678+
a f g
10679+
1 1 1
10680+
3 1 1
10681+
7 1 1
10682+
select * from (select * from v2) as dt where a=f and a=g;
10683+
a f g
10684+
1 1 1
10685+
explain extended select * from (select * from v2) as dt where a=f and a=g;
10686+
id select_type table type possible_keys key key_len ref rows filtered Extra
10687+
1 PRIMARY <derived3> ALL NULL NULL NULL NULL 7 100.00 Using where
10688+
3 DERIVED t1 ALL NULL NULL NULL NULL 7 100.00 Using temporary; Using filesort
10689+
Warnings:
10690+
Note 1003 /* select#1 */ select `v2`.`a` AS `a`,`v2`.`f` AS `f`,`v2`.`g` AS `g` from `test`.`v2` where `v2`.`a` = `v2`.`f` and `v2`.`a` = `v2`.`g`
10691+
drop view v1,v2;
10692+
drop table t1;
1065410693
# End of 10.2 tests
1065510694
#
1065610695
# MDEV-14579: pushdown conditions into materialized views/derived tables

mysql-test/main/derived_cond_pushdown.test

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2213,6 +2213,31 @@ select * from v1 where m > 0;
22132213
drop view v1;
22142214
drop table t1;
22152215

2216+
--echo #
2217+
--echo # MDEV-25635: pushdown into grouping view using aggregate functions
2218+
--echo # with constant arguments via a mergeable derived table
2219+
--echo #
2220+
2221+
create table t1 (a int);
2222+
insert into t1 values (3), (7), (1), (3), (7), (7), (3);
2223+
2224+
create view v1 as select a, sum(1) as f, sum(1) as g from t1 group by a;
2225+
select * from v1;
2226+
let $q1=
2227+
select * from (select * from v1) as dt where a=f and a=g;
2228+
eval $q1;
2229+
eval explain extended $q1;
2230+
2231+
create view v2 as select a, min(1) as f, min(1) as g from t1 group by a;
2232+
select * from v2;
2233+
let $q2=
2234+
select * from (select * from v2) as dt where a=f and a=g;
2235+
eval $q2;
2236+
eval explain extended $q2;
2237+
2238+
drop view v1,v2;
2239+
drop table t1;
2240+
22162241
--echo # End of 10.2 tests
22172242

22182243
--echo #

mysql-test/suite/vcol/r/vcol_syntax.result

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
drop table if exists t1;
21
set @OLD_SQL_MODE=@@SESSION.SQL_MODE;
32
create table t1 (a int, b int generated always as (a+1));
43
show create table t1;
@@ -88,3 +87,13 @@ create table t1 (x int, y int default test2.t1.x);
8887
ERROR 42S22: Unknown column '`test2`.`t1`.`x`' in 'DEFAULT'
8988
create table t1 (x int, check (test2.t1.x > 0));
9089
ERROR 42S22: Unknown column '`test2`.`t1`.`x`' in 'CHECK'
90+
#
91+
# MDEV-25672 table alias from previous statement interferes later commands
92+
#
93+
create table t1 (a int, v_a int generated always as (a));
94+
update t1 as x set a = 1;
95+
alter table t1 force;
96+
drop table t1;
97+
#
98+
# End of 10.2 tests
99+
#

mysql-test/suite/vcol/t/vcol_syntax.test

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#
22
# test syntax
33
#
4-
--disable_warnings
5-
drop table if exists t1;
6-
--enable_warnings
7-
84
set @OLD_SQL_MODE=@@SESSION.SQL_MODE;
95
create table t1 (a int, b int generated always as (a+1));
106
show create table t1;
@@ -72,3 +68,16 @@ create table t1 (x int, y int check (y > test2.t1.x));
7268
create table t1 (x int, y int default test2.t1.x);
7369
--error ER_BAD_FIELD_ERROR
7470
create table t1 (x int, check (test2.t1.x > 0));
71+
72+
--echo #
73+
--echo # MDEV-25672 table alias from previous statement interferes later commands
74+
--echo #
75+
create table t1 (a int, v_a int generated always as (a));
76+
update t1 as x set a = 1;
77+
alter table t1 force;
78+
drop table t1;
79+
80+
81+
--echo #
82+
--echo # End of 10.2 tests
83+
--echo #

sql/item.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3198,7 +3198,7 @@ class Item_field :public Item_ident,
31983198
bool check_table_name_processor(void *arg)
31993199
{
32003200
Check_table_name_prm &p= *(Check_table_name_prm *) arg;
3201-
if (p.table_name.length && table_name)
3201+
if (!field && p.table_name.length && table_name)
32023202
{
32033203
DBUG_ASSERT(p.db.length);
32043204
if ((db_name &&
@@ -5383,7 +5383,10 @@ class Item_direct_view_ref :public Item_direct_ref
53835383
table_map used_tables() const;
53845384
void update_used_tables();
53855385
table_map not_null_tables() const;
5386-
bool const_item() const { return used_tables() == 0; }
5386+
bool const_item() const
5387+
{
5388+
return (*ref)->const_item() && (null_ref_table == NO_NULL_TABLE);
5389+
}
53875390
TABLE *get_null_ref_table() const { return null_ref_table; }
53885391
bool walk(Item_processor processor, bool walk_subquery, void *arg)
53895392
{

storage/connect/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
# along with this program; if not, write to the Free Software
1414
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
1515

16+
IF(WITHOUT_DYNAMIC_PLUGINS OR WITH_NONE OR ("${PLUGIN_CONNECT}" STREQUAL "NO"))
17+
RETURN()
18+
ENDIF()
19+
1620
SET(CONNECT_PLUGIN_STATIC "connect")
1721
SET(CONNECT_PLUGIN_DYNAMIC "connect")
1822

storage/innobase/buf/buf0rea.cc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*****************************************************************************
22
33
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
4-
Copyright (c) 2015, 2020, MariaDB Corporation.
4+
Copyright (c) 2015, 2021, MariaDB Corporation.
55
66
This program is free software; you can redistribute it and/or modify it under
77
the terms of the GNU General Public License as published by the Free Software
@@ -806,13 +806,18 @@ buf_read_ibuf_merge_pages(
806806
continue;
807807
}
808808

809-
if (UNIV_UNLIKELY(page_nos[i] >= space->size)) {
809+
ulint size = space->size;
810+
if (!size) {
811+
size = fil_space_get_size(space->id);
812+
}
813+
814+
if (UNIV_UNLIKELY(page_nos[i] >= size)) {
810815
do {
811816
ibuf_delete_recs(page_id_t(space_ids[i],
812817
page_nos[i]));
813818
} while (++i < n_stored
814819
&& space_ids[i - 1] == space_ids[i]
815-
&& page_nos[i] >= space->size);
820+
&& page_nos[i] >= size);
816821
i--;
817822
next:
818823
space->release();

win/packaging/heidisql.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SET(HEIDISQL_BASE_NAME "HeidiSQL_11.2_32_Portable")
1+
SET(HEIDISQL_BASE_NAME "HeidiSQL_11.3_32_Portable")
22
SET(HEIDISQL_ZIP "${HEIDISQL_BASE_NAME}.zip")
33
SET(HEIDISQL_URL "http://www.heidisql.com/downloads/releases/${HEIDISQL_ZIP}")
44
SET(HEIDISQL_DOWNLOAD_DIR ${THIRD_PARTY_DOWNLOAD_LOCATION}/${HEIDISQL_BASE_NAME})

0 commit comments

Comments
 (0)