mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
Merge 10.3 into 10.4
This commit is contained in:
commit
72b2489621
14 changed files with 114 additions and 19 deletions
|
@ -1,4 +1,4 @@
|
|||
if(JAVA_AWT_LIBRARY)
|
||||
if(JAVA_AWT_LIBRARY AND JAVA_INCLUDE_PATH)
|
||||
set(JNI_FOUND TRUE)
|
||||
return()
|
||||
endif()
|
||||
|
|
4
debian/mariadb-plugin-connect.install
vendored
4
debian/mariadb-plugin-connect.install
vendored
|
@ -1,6 +1,2 @@
|
|||
etc/mysql/conf.d/connect.cnf etc/mysql/mariadb.conf.d
|
||||
usr/lib/mysql/plugin/ha_connect.so
|
||||
usr/share/mysql/Mongo2.jar
|
||||
usr/share/mysql/Mongo3.jar
|
||||
usr/share/mysql/JavaWrappers.jar
|
||||
usr/share/mysql/JdbcInterface.jar
|
||||
|
|
|
@ -10631,6 +10631,45 @@ m
|
|||
7
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-25635: pushdown into grouping view using aggregate functions
|
||||
# with constant arguments via a mergeable derived table
|
||||
#
|
||||
create table t1 (a int);
|
||||
insert into t1 values (3), (7), (1), (3), (7), (7), (3);
|
||||
create view v1 as select a, sum(1) as f, sum(1) as g from t1 group by a;
|
||||
select * from v1;
|
||||
a f g
|
||||
1 1 1
|
||||
3 3 3
|
||||
7 3 3
|
||||
select * from (select * from v1) as dt where a=f and a=g;
|
||||
a f g
|
||||
1 1 1
|
||||
3 3 3
|
||||
explain extended select * from (select * from v1) as dt where a=f and a=g;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY <derived3> ALL NULL NULL NULL NULL 7 100.00 Using where
|
||||
3 DERIVED t1 ALL NULL NULL NULL NULL 7 100.00 Using temporary; Using filesort
|
||||
Warnings:
|
||||
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`
|
||||
create view v2 as select a, min(1) as f, min(1) as g from t1 group by a;
|
||||
select * from v2;
|
||||
a f g
|
||||
1 1 1
|
||||
3 1 1
|
||||
7 1 1
|
||||
select * from (select * from v2) as dt where a=f and a=g;
|
||||
a f g
|
||||
1 1 1
|
||||
explain extended select * from (select * from v2) as dt where a=f and a=g;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY <derived3> ALL NULL NULL NULL NULL 7 100.00 Using where
|
||||
3 DERIVED t1 ALL NULL NULL NULL NULL 7 100.00 Using temporary; Using filesort
|
||||
Warnings:
|
||||
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`
|
||||
drop view v1,v2;
|
||||
drop table t1;
|
||||
# End of 10.2 tests
|
||||
#
|
||||
# MDEV-14579: pushdown conditions into materialized views/derived tables
|
||||
|
|
|
@ -2213,6 +2213,31 @@ select * from v1 where m > 0;
|
|||
drop view v1;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-25635: pushdown into grouping view using aggregate functions
|
||||
--echo # with constant arguments via a mergeable derived table
|
||||
--echo #
|
||||
|
||||
create table t1 (a int);
|
||||
insert into t1 values (3), (7), (1), (3), (7), (7), (3);
|
||||
|
||||
create view v1 as select a, sum(1) as f, sum(1) as g from t1 group by a;
|
||||
select * from v1;
|
||||
let $q1=
|
||||
select * from (select * from v1) as dt where a=f and a=g;
|
||||
eval $q1;
|
||||
eval explain extended $q1;
|
||||
|
||||
create view v2 as select a, min(1) as f, min(1) as g from t1 group by a;
|
||||
select * from v2;
|
||||
let $q2=
|
||||
select * from (select * from v2) as dt where a=f and a=g;
|
||||
eval $q2;
|
||||
eval explain extended $q2;
|
||||
|
||||
drop view v1,v2;
|
||||
drop table t1;
|
||||
|
||||
--echo # End of 10.2 tests
|
||||
|
||||
--echo #
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
drop table if exists t1;
|
||||
set @OLD_SQL_MODE=@@SESSION.SQL_MODE;
|
||||
create table t1 (a int, b int generated always as (a+1));
|
||||
show create table t1;
|
||||
|
@ -88,3 +87,13 @@ create table t1 (x int, y int default test2.t1.x);
|
|||
ERROR 42S22: Unknown column '`test2`.`t1`.`x`' in 'DEFAULT'
|
||||
create table t1 (x int, check (test2.t1.x > 0));
|
||||
ERROR 42S22: Unknown column '`test2`.`t1`.`x`' in 'CHECK'
|
||||
#
|
||||
# MDEV-25672 table alias from previous statement interferes later commands
|
||||
#
|
||||
create table t1 (a int, v_a int generated always as (a));
|
||||
update t1 as x set a = 1;
|
||||
alter table t1 force;
|
||||
drop table t1;
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
#
|
||||
# test syntax
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
set @OLD_SQL_MODE=@@SESSION.SQL_MODE;
|
||||
create table t1 (a int, b int generated always as (a+1));
|
||||
show create table t1;
|
||||
|
@ -72,3 +68,16 @@ create table t1 (x int, y int check (y > test2.t1.x));
|
|||
create table t1 (x int, y int default test2.t1.x);
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
create table t1 (x int, check (test2.t1.x > 0));
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-25672 table alias from previous statement interferes later commands
|
||||
--echo #
|
||||
create table t1 (a int, v_a int generated always as (a));
|
||||
update t1 as x set a = 1;
|
||||
alter table t1 force;
|
||||
drop table t1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.2 tests
|
||||
--echo #
|
||||
|
|
|
@ -3521,7 +3521,7 @@ public:
|
|||
bool check_table_name_processor(void *arg)
|
||||
{
|
||||
Check_table_name_prm &p= *(Check_table_name_prm *) arg;
|
||||
if (p.table_name.length && table_name)
|
||||
if (!field && p.table_name.length && table_name)
|
||||
{
|
||||
DBUG_ASSERT(p.db.length);
|
||||
if ((db_name &&
|
||||
|
@ -5857,7 +5857,10 @@ public:
|
|||
table_map used_tables() const;
|
||||
void update_used_tables();
|
||||
table_map not_null_tables() const;
|
||||
bool const_item() const { return used_tables() == 0; }
|
||||
bool const_item() const
|
||||
{
|
||||
return (*ref)->const_item() && (null_ref_table == NO_NULL_TABLE);
|
||||
}
|
||||
TABLE *get_null_ref_table() const { return null_ref_table; }
|
||||
bool walk(Item_processor processor, bool walk_subquery, void *arg)
|
||||
{
|
||||
|
|
|
@ -281,6 +281,8 @@ bool Item_subselect::fix_fields(THD *thd_param, Item **ref)
|
|||
res= TRUE;
|
||||
goto end;
|
||||
}
|
||||
if (sl == unit->first_select() && !sl->next_select())
|
||||
unit->fake_select_lex= 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27159,7 +27159,7 @@ bool mysql_explain_union(THD *thd, SELECT_LEX_UNIT *unit, select_result *result)
|
|||
sl->options|= SELECT_DESCRIBE;
|
||||
}
|
||||
|
||||
if (unit->is_unit_op())
|
||||
if (unit->is_unit_op() || unit->fake_select_lex)
|
||||
{
|
||||
if (unit->union_needs_tmp_table() && unit->fake_select_lex)
|
||||
{
|
||||
|
|
|
@ -13,6 +13,10 @@
|
|||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
|
||||
|
||||
IF(WITHOUT_DYNAMIC_PLUGINS OR WITH_NONE OR ("${PLUGIN_CONNECT}" STREQUAL "NO"))
|
||||
RETURN()
|
||||
ENDIF()
|
||||
|
||||
SET(CONNECT_PLUGIN_STATIC "connect")
|
||||
SET(CONNECT_PLUGIN_DYNAMIC "connect")
|
||||
|
||||
|
|
|
@ -423,7 +423,7 @@ int ha_heap::reset_auto_increment(ulonglong value)
|
|||
|
||||
int ha_heap::external_lock(THD *thd, int lock_type)
|
||||
{
|
||||
#ifndef DBUG_OFF
|
||||
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
|
||||
if (lock_type == F_UNLCK && file->s->changed && heap_check_heap(file, 0))
|
||||
return HA_ERR_CRASHED;
|
||||
#endif
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2015, 2020, MariaDB Corporation.
|
||||
Copyright (c) 2015, 2021, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
|
@ -772,13 +772,18 @@ tablespace_deleted:
|
|||
continue;
|
||||
}
|
||||
|
||||
if (UNIV_UNLIKELY(page_nos[i] >= space->size)) {
|
||||
ulint size = space->size;
|
||||
if (!size) {
|
||||
size = fil_space_get_size(space->id);
|
||||
}
|
||||
|
||||
if (UNIV_UNLIKELY(page_nos[i] >= size)) {
|
||||
do {
|
||||
ibuf_delete_recs(page_id_t(space_ids[i],
|
||||
page_nos[i]));
|
||||
} while (++i < n_stored
|
||||
&& space_ids[i - 1] == space_ids[i]
|
||||
&& page_nos[i] >= space->size);
|
||||
&& page_nos[i] >= size);
|
||||
i--;
|
||||
next:
|
||||
space->release();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
SET(HEIDISQL_BASE_NAME "HeidiSQL_11.2_32_Portable")
|
||||
SET(HEIDISQL_BASE_NAME "HeidiSQL_11.3_32_Portable")
|
||||
SET(HEIDISQL_ZIP "${HEIDISQL_BASE_NAME}.zip")
|
||||
SET(HEIDISQL_URL "http://www.heidisql.com/downloads/releases/${HEIDISQL_ZIP}")
|
||||
SET(HEIDISQL_DOWNLOAD_DIR ${THIRD_PARTY_DOWNLOAD_LOCATION}/${HEIDISQL_BASE_NAME})
|
||||
|
|
|
@ -367,7 +367,10 @@ void CUpgradeDlg::UpgradeOneService(const string& servicename)
|
|||
ErrorExit("Stdout SetHandleInformation");
|
||||
|
||||
string commandline("mysql_upgrade_service.exe --service=");
|
||||
commandline += "\"";
|
||||
commandline += servicename;
|
||||
commandline += "\"";
|
||||
|
||||
si.cb = sizeof(si);
|
||||
si.hStdInput= GetStdHandle(STD_INPUT_HANDLE);
|
||||
si.hStdOutput= hPipeWrite;
|
||||
|
@ -397,7 +400,7 @@ void CUpgradeDlg::UpgradeOneService(const string& servicename)
|
|||
else
|
||||
{
|
||||
/*
|
||||
Creating a process with CREATE_BREAKAWAY_FROM_JOB, reset this flag
|
||||
Creating a process with CREATE_BREAKAWAY_FROM_JOB failed, reset this flag
|
||||
and retry.
|
||||
*/
|
||||
if (!CreateProcess(NULL, (LPSTR)commandline.c_str(), NULL, NULL, TRUE,
|
||||
|
|
Loading…
Reference in a new issue