Skip to content

Commit

Permalink
Merge 10.5 into 10.6
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Apr 26, 2021
2 parents b813828 + 4725792 commit ed4b2b3
Show file tree
Hide file tree
Showing 30 changed files with 597 additions and 238 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Expand Up @@ -525,8 +525,7 @@ ADD_CUSTOM_TARGET(INFO_BIN ALL
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)

INSTALL_DOCUMENTATION(README.md CREDITS COPYING THIRDPARTY
EXCEPTIONS-CLIENT COMPONENT Readme)
INSTALL_DOCUMENTATION(README.md CREDITS COPYING THIRDPARTY COMPONENT Readme)

# MDEV-6526 these files are not installed anymore
#INSTALL_DOCUMENTATION(${CMAKE_BINARY_DIR}/Docs/INFO_SRC
Expand Down
136 changes: 0 additions & 136 deletions EXCEPTIONS-CLIENT

This file was deleted.

9 changes: 3 additions & 6 deletions cmake/maintainer.cmake
Expand Up @@ -14,7 +14,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA

IF(MYSQL_MAINTAINER_MODE STREQUAL "NO")
IF(MSVC OR MYSQL_MAINTAINER_MODE STREQUAL "NO")
# Windows support is in cmake/os/Windows.cmake, not here
RETURN()
ENDIF()

Expand All @@ -40,11 +41,7 @@ FOREACH(F ${MY_WARNING_FLAGS})
MY_CHECK_AND_SET_COMPILER_FLAG(${F} DEBUG RELWITHDEBINFO)
ENDFOREACH()

IF(CMAKE_SYSTEM_NAME MATCHES AIX)
SET(MY_ERROR_FLAGS "")
ELSE()
SET(MY_ERROR_FLAGS -Werror)
ENDIF()
SET(MY_ERROR_FLAGS -Werror)

IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_LESS "6.0.0")
SET(MY_ERROR_FLAGS ${MY_ERROR_FLAGS} -Wno-error=maybe-uninitialized)
Expand Down
3 changes: 3 additions & 0 deletions cmake/os/AIX.cmake
Expand Up @@ -33,3 +33,6 @@ ELSE()
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -maix64 -pthread -mcmodel=large")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -maix64 -pthread -mcmodel=large")
ENDIF()

# make it WARN by default, not AUTO (that implies -Werror)
SET(MYSQL_MAINTAINER_MODE "WARN" CACHE STRING "Enable MariaDB maintainer-specific warnings. One of: NO (warnings are disabled) WARN (warnings are enabled) ERR (warnings are errors) AUTO (warnings are errors in Debug only)")
20 changes: 20 additions & 0 deletions mysql-test/main/grant_slave_monitor.result
Expand Up @@ -53,3 +53,23 @@ ERROR 42000: Access denied; you need (at least one of) the SLAVE MONITOR privile
disconnect con1;
connection default;
DROP USER user1@localhost;
#
# MDEV-25030 Upgrade to 10.5.9 breaks root's ability to grant
#
insert mysql.global_priv values ('bar', 'foo7', '{"access":274877906943,"version_id":100507,"plugin":"mysql_native_password","authentication_string":""}'),
('bar', 'foo8', '{"access":274877906943,"version_id":100508,"plugin":"mysql_native_password","authentication_string":""}'),
('bar', 'foo9', '{"access":274877906943,"version_id":100509,"plugin":"mysql_native_password","authentication_string":""}');
flush privileges;
show grants for foo7@bar;
Grants for foo7@bar
GRANT ALL PRIVILEGES ON *.* TO `foo7`@`bar` WITH GRANT OPTION
show grants for foo8@bar;
Grants for foo8@bar
GRANT ALL PRIVILEGES ON *.* TO `foo8`@`bar` WITH GRANT OPTION
show grants for foo9@bar;
Grants for foo9@bar
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY ON *.* TO `foo9`@`bar` WITH GRANT OPTION
drop user foo7@bar, foo8@bar, foo9@bar;
#
# End of 10.5 tests
#
16 changes: 16 additions & 0 deletions mysql-test/main/grant_slave_monitor.test
Expand Up @@ -99,3 +99,19 @@ SHOW RELAYLOG EVENTS;

--connection default
DROP USER user1@localhost;

--echo #
--echo # MDEV-25030 Upgrade to 10.5.9 breaks root's ability to grant
--echo #
insert mysql.global_priv values ('bar', 'foo7', '{"access":274877906943,"version_id":100507,"plugin":"mysql_native_password","authentication_string":""}'),
('bar', 'foo8', '{"access":274877906943,"version_id":100508,"plugin":"mysql_native_password","authentication_string":""}'),
('bar', 'foo9', '{"access":274877906943,"version_id":100509,"plugin":"mysql_native_password","authentication_string":""}');
flush privileges;
show grants for foo7@bar;
show grants for foo8@bar;
show grants for foo9@bar;
drop user foo7@bar, foo8@bar, foo9@bar;

--echo #
--echo # End of 10.5 tests
--echo #
53 changes: 53 additions & 0 deletions mysql-test/main/multi_update.result
Expand Up @@ -982,6 +982,59 @@ drop function f1;
#
# end of 5.5 tests
#
#
# MDEV-24823: Invalid multi-table update of view within SP
#
create table t1 (id int) engine=myisam;
insert into t1 values (1),(2),(1);
create table t2 (pk int, c0 int) engine=myisam;
insert into t2 values (1,1), (2,3);
create view v2 as select * from t2;
create view v3 as select * from t2 where c0 < 3;
create procedure sp0() update t1, v2 set v2.pk = 1 where v2.c0 = t1.c1;
call sp0();
ERROR 42S22: Unknown column 't1.c1' in 'where clause'
call sp0();
ERROR 42S22: Unknown column 't1.c1' in 'where clause'
create procedure sp1() update (t1 join v2 on v2.c0 = t1.c1) set v2.pk = 1;
call sp1();
ERROR 42S22: Unknown column 't1.c1' in 'on clause'
call sp1();
ERROR 42S22: Unknown column 't1.c1' in 'on clause'
create procedure sp2() update (t1 join v3 on v3.c0 = t1.c1) set v3.pk = 1;
call sp2();
ERROR 42S22: Unknown column 't1.c1' in 'on clause'
call sp2();
ERROR 42S22: Unknown column 't1.c1' in 'on clause'
create procedure sp3()
update (t1 join v2 on v2.c0 = t1.id) set v2.c0 = v2.c0+1;
select * from t2;
pk c0
1 1
2 3
call sp3();
select * from t2;
pk c0
1 2
2 3
call sp3();
select * from t2;
pk c0
1 3
2 3
create procedure sp4() delete t1 from t1 join v2 on v2.c0 = t1.c1;
call sp4();
ERROR 42S22: Unknown column 't1.c1' in 'on clause'
call sp4();
ERROR 42S22: Unknown column 't1.c1' in 'on clause'
drop procedure sp0;
drop procedure sp1;
drop procedure sp2;
drop procedure sp3;
drop procedure sp4;
drop view v2,v3;
drop table t1,t2;
# End of 10.2 tests
create table t1 (c1 int, c3 int);
insert t1(c3) values (1), (2), (3), (4), (5), (6), (7), (8);
create table t2 select * from t1;
Expand Down
53 changes: 53 additions & 0 deletions mysql-test/main/multi_update.test
Expand Up @@ -958,6 +958,59 @@ drop function f1;
--echo # end of 5.5 tests
--echo #

--echo #
--echo # MDEV-24823: Invalid multi-table update of view within SP
--echo #

create table t1 (id int) engine=myisam;
insert into t1 values (1),(2),(1);
create table t2 (pk int, c0 int) engine=myisam;
insert into t2 values (1,1), (2,3);
create view v2 as select * from t2;
create view v3 as select * from t2 where c0 < 3;

create procedure sp0() update t1, v2 set v2.pk = 1 where v2.c0 = t1.c1;
--error ER_BAD_FIELD_ERROR
call sp0();
--error ER_BAD_FIELD_ERROR
call sp0();

create procedure sp1() update (t1 join v2 on v2.c0 = t1.c1) set v2.pk = 1;
--error ER_BAD_FIELD_ERROR
call sp1();
--error ER_BAD_FIELD_ERROR
call sp1();

create procedure sp2() update (t1 join v3 on v3.c0 = t1.c1) set v3.pk = 1;
--error ER_BAD_FIELD_ERROR
call sp2();
--error ER_BAD_FIELD_ERROR
call sp2();

create procedure sp3()
update (t1 join v2 on v2.c0 = t1.id) set v2.c0 = v2.c0+1;
select * from t2;
call sp3();
select * from t2;
call sp3();
select * from t2;

create procedure sp4() delete t1 from t1 join v2 on v2.c0 = t1.c1;
--error ER_BAD_FIELD_ERROR
call sp4();
--error ER_BAD_FIELD_ERROR
call sp4();

drop procedure sp0;
drop procedure sp1;
drop procedure sp2;
drop procedure sp3;
drop procedure sp4;
drop view v2,v3;
drop table t1,t2;

--echo # End of 10.2 tests

#
# MDEV-13911 Support ORDER BY and LIMIT in multi-table update
#
Expand Down
11 changes: 11 additions & 0 deletions mysql-test/suite/innodb/r/foreign_key.result
Expand Up @@ -797,6 +797,17 @@ ERROR 23000: Duplicate entry '10' for key 'ind9'
SET FOREIGN_KEY_CHECKS= 0;
ALTER TABLE t1 ADD FOREIGN KEY (a) REFERENCES t1 (pk);
DROP TABLE t1;
SET FOREIGN_KEY_CHECKS= 1;
#
# MDEV-23455 Hangs + Sig11 in unknown location(s) due to single complex FK query
#
Parsing foreign keys 1...
ERROR HY000: Can't create table `test`.`t0` (errno: 150 "Foreign key constraint is incorrectly formed")
Parsing foreign keys 2...
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
Parsing foreign keys 3...
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
Parsing foreign keys 4...
# End of 10.2 tests
CREATE TABLE t1 (a GEOMETRY, INDEX(a(8)),
FOREIGN KEY (a) REFERENCES x (xx)) ENGINE=InnoDB;
Expand Down
24 changes: 24 additions & 0 deletions mysql-test/suite/innodb/r/mvcc_secondary.result
@@ -0,0 +1,24 @@
#
# MDEV-25459 MVCC read from index on CHAR or VARCHAR wrongly omits rows
#
CREATE TABLE t1 (
pk int PRIMARY KEY, c varchar(255) UNIQUE,
d char(255), e varchar(255), f char(255), g char(255)
) ENGINE=InnoDB ROW_FORMAT=DYNAMIC DEFAULT CHARACTER SET ucs2;
INSERT INTO t1 VALUES
(1,REPEAT('c',248),REPEAT('a',106),REPEAT('b',220),REPEAT('x',14),'');
BEGIN;
UPDATE t1 SET c=REPEAT('d',170);
connect con1,localhost,root,,;
SELECT pk FROM t1 FORCE INDEX (c);
pk
1
connection default;
COMMIT;
connection con1;
SELECT pk FROM t1 FORCE INDEX (c);
pk
1
disconnect con1;
connection default;
DROP TABLE t1;

0 comments on commit ed4b2b3

Please sign in to comment.