Skip to content

Commit ed4b2b3

Browse files
committed
Merge 10.5 into 10.6
2 parents b813828 + 4725792 commit ed4b2b3

30 files changed

+597
-238
lines changed

CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,7 @@ ADD_CUSTOM_TARGET(INFO_BIN ALL
525525
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
526526
)
527527

528-
INSTALL_DOCUMENTATION(README.md CREDITS COPYING THIRDPARTY
529-
EXCEPTIONS-CLIENT COMPONENT Readme)
528+
INSTALL_DOCUMENTATION(README.md CREDITS COPYING THIRDPARTY COMPONENT Readme)
530529

531530
# MDEV-6526 these files are not installed anymore
532531
#INSTALL_DOCUMENTATION(${CMAKE_BINARY_DIR}/Docs/INFO_SRC

EXCEPTIONS-CLIENT

Lines changed: 0 additions & 136 deletions
This file was deleted.

cmake/maintainer.cmake

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

17-
IF(MYSQL_MAINTAINER_MODE STREQUAL "NO")
17+
IF(MSVC OR MYSQL_MAINTAINER_MODE STREQUAL "NO")
18+
# Windows support is in cmake/os/Windows.cmake, not here
1819
RETURN()
1920
ENDIF()
2021

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

43-
IF(CMAKE_SYSTEM_NAME MATCHES AIX)
44-
SET(MY_ERROR_FLAGS "")
45-
ELSE()
46-
SET(MY_ERROR_FLAGS -Werror)
47-
ENDIF()
44+
SET(MY_ERROR_FLAGS -Werror)
4845

4946
IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_LESS "6.0.0")
5047
SET(MY_ERROR_FLAGS ${MY_ERROR_FLAGS} -Wno-error=maybe-uninitialized)

cmake/os/AIX.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,6 @@ ELSE()
3333
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -maix64 -pthread -mcmodel=large")
3434
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -maix64 -pthread -mcmodel=large")
3535
ENDIF()
36+
37+
# make it WARN by default, not AUTO (that implies -Werror)
38+
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)")

mysql-test/main/grant_slave_monitor.result

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,23 @@ ERROR 42000: Access denied; you need (at least one of) the SLAVE MONITOR privile
5353
disconnect con1;
5454
connection default;
5555
DROP USER user1@localhost;
56+
#
57+
# MDEV-25030 Upgrade to 10.5.9 breaks root's ability to grant
58+
#
59+
insert mysql.global_priv values ('bar', 'foo7', '{"access":274877906943,"version_id":100507,"plugin":"mysql_native_password","authentication_string":""}'),
60+
('bar', 'foo8', '{"access":274877906943,"version_id":100508,"plugin":"mysql_native_password","authentication_string":""}'),
61+
('bar', 'foo9', '{"access":274877906943,"version_id":100509,"plugin":"mysql_native_password","authentication_string":""}');
62+
flush privileges;
63+
show grants for foo7@bar;
64+
Grants for foo7@bar
65+
GRANT ALL PRIVILEGES ON *.* TO `foo7`@`bar` WITH GRANT OPTION
66+
show grants for foo8@bar;
67+
Grants for foo8@bar
68+
GRANT ALL PRIVILEGES ON *.* TO `foo8`@`bar` WITH GRANT OPTION
69+
show grants for foo9@bar;
70+
Grants for foo9@bar
71+
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
72+
drop user foo7@bar, foo8@bar, foo9@bar;
73+
#
74+
# End of 10.5 tests
75+
#

mysql-test/main/grant_slave_monitor.test

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,19 @@ SHOW RELAYLOG EVENTS;
9999

100100
--connection default
101101
DROP USER user1@localhost;
102+
103+
--echo #
104+
--echo # MDEV-25030 Upgrade to 10.5.9 breaks root's ability to grant
105+
--echo #
106+
insert mysql.global_priv values ('bar', 'foo7', '{"access":274877906943,"version_id":100507,"plugin":"mysql_native_password","authentication_string":""}'),
107+
('bar', 'foo8', '{"access":274877906943,"version_id":100508,"plugin":"mysql_native_password","authentication_string":""}'),
108+
('bar', 'foo9', '{"access":274877906943,"version_id":100509,"plugin":"mysql_native_password","authentication_string":""}');
109+
flush privileges;
110+
show grants for foo7@bar;
111+
show grants for foo8@bar;
112+
show grants for foo9@bar;
113+
drop user foo7@bar, foo8@bar, foo9@bar;
114+
115+
--echo #
116+
--echo # End of 10.5 tests
117+
--echo #

mysql-test/main/multi_update.result

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -982,6 +982,59 @@ drop function f1;
982982
#
983983
# end of 5.5 tests
984984
#
985+
#
986+
# MDEV-24823: Invalid multi-table update of view within SP
987+
#
988+
create table t1 (id int) engine=myisam;
989+
insert into t1 values (1),(2),(1);
990+
create table t2 (pk int, c0 int) engine=myisam;
991+
insert into t2 values (1,1), (2,3);
992+
create view v2 as select * from t2;
993+
create view v3 as select * from t2 where c0 < 3;
994+
create procedure sp0() update t1, v2 set v2.pk = 1 where v2.c0 = t1.c1;
995+
call sp0();
996+
ERROR 42S22: Unknown column 't1.c1' in 'where clause'
997+
call sp0();
998+
ERROR 42S22: Unknown column 't1.c1' in 'where clause'
999+
create procedure sp1() update (t1 join v2 on v2.c0 = t1.c1) set v2.pk = 1;
1000+
call sp1();
1001+
ERROR 42S22: Unknown column 't1.c1' in 'on clause'
1002+
call sp1();
1003+
ERROR 42S22: Unknown column 't1.c1' in 'on clause'
1004+
create procedure sp2() update (t1 join v3 on v3.c0 = t1.c1) set v3.pk = 1;
1005+
call sp2();
1006+
ERROR 42S22: Unknown column 't1.c1' in 'on clause'
1007+
call sp2();
1008+
ERROR 42S22: Unknown column 't1.c1' in 'on clause'
1009+
create procedure sp3()
1010+
update (t1 join v2 on v2.c0 = t1.id) set v2.c0 = v2.c0+1;
1011+
select * from t2;
1012+
pk c0
1013+
1 1
1014+
2 3
1015+
call sp3();
1016+
select * from t2;
1017+
pk c0
1018+
1 2
1019+
2 3
1020+
call sp3();
1021+
select * from t2;
1022+
pk c0
1023+
1 3
1024+
2 3
1025+
create procedure sp4() delete t1 from t1 join v2 on v2.c0 = t1.c1;
1026+
call sp4();
1027+
ERROR 42S22: Unknown column 't1.c1' in 'on clause'
1028+
call sp4();
1029+
ERROR 42S22: Unknown column 't1.c1' in 'on clause'
1030+
drop procedure sp0;
1031+
drop procedure sp1;
1032+
drop procedure sp2;
1033+
drop procedure sp3;
1034+
drop procedure sp4;
1035+
drop view v2,v3;
1036+
drop table t1,t2;
1037+
# End of 10.2 tests
9851038
create table t1 (c1 int, c3 int);
9861039
insert t1(c3) values (1), (2), (3), (4), (5), (6), (7), (8);
9871040
create table t2 select * from t1;

mysql-test/main/multi_update.test

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -958,6 +958,59 @@ drop function f1;
958958
--echo # end of 5.5 tests
959959
--echo #
960960

961+
--echo #
962+
--echo # MDEV-24823: Invalid multi-table update of view within SP
963+
--echo #
964+
965+
create table t1 (id int) engine=myisam;
966+
insert into t1 values (1),(2),(1);
967+
create table t2 (pk int, c0 int) engine=myisam;
968+
insert into t2 values (1,1), (2,3);
969+
create view v2 as select * from t2;
970+
create view v3 as select * from t2 where c0 < 3;
971+
972+
create procedure sp0() update t1, v2 set v2.pk = 1 where v2.c0 = t1.c1;
973+
--error ER_BAD_FIELD_ERROR
974+
call sp0();
975+
--error ER_BAD_FIELD_ERROR
976+
call sp0();
977+
978+
create procedure sp1() update (t1 join v2 on v2.c0 = t1.c1) set v2.pk = 1;
979+
--error ER_BAD_FIELD_ERROR
980+
call sp1();
981+
--error ER_BAD_FIELD_ERROR
982+
call sp1();
983+
984+
create procedure sp2() update (t1 join v3 on v3.c0 = t1.c1) set v3.pk = 1;
985+
--error ER_BAD_FIELD_ERROR
986+
call sp2();
987+
--error ER_BAD_FIELD_ERROR
988+
call sp2();
989+
990+
create procedure sp3()
991+
update (t1 join v2 on v2.c0 = t1.id) set v2.c0 = v2.c0+1;
992+
select * from t2;
993+
call sp3();
994+
select * from t2;
995+
call sp3();
996+
select * from t2;
997+
998+
create procedure sp4() delete t1 from t1 join v2 on v2.c0 = t1.c1;
999+
--error ER_BAD_FIELD_ERROR
1000+
call sp4();
1001+
--error ER_BAD_FIELD_ERROR
1002+
call sp4();
1003+
1004+
drop procedure sp0;
1005+
drop procedure sp1;
1006+
drop procedure sp2;
1007+
drop procedure sp3;
1008+
drop procedure sp4;
1009+
drop view v2,v3;
1010+
drop table t1,t2;
1011+
1012+
--echo # End of 10.2 tests
1013+
9611014
#
9621015
# MDEV-13911 Support ORDER BY and LIMIT in multi-table update
9631016
#

mysql-test/suite/innodb/r/foreign_key.result

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,17 @@ ERROR 23000: Duplicate entry '10' for key 'ind9'
797797
SET FOREIGN_KEY_CHECKS= 0;
798798
ALTER TABLE t1 ADD FOREIGN KEY (a) REFERENCES t1 (pk);
799799
DROP TABLE t1;
800+
SET FOREIGN_KEY_CHECKS= 1;
801+
#
802+
# MDEV-23455 Hangs + Sig11 in unknown location(s) due to single complex FK query
803+
#
804+
Parsing foreign keys 1...
805+
ERROR HY000: Can't create table `test`.`t0` (errno: 150 "Foreign key constraint is incorrectly formed")
806+
Parsing foreign keys 2...
807+
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
808+
Parsing foreign keys 3...
809+
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
810+
Parsing foreign keys 4...
800811
# End of 10.2 tests
801812
CREATE TABLE t1 (a GEOMETRY, INDEX(a(8)),
802813
FOREIGN KEY (a) REFERENCES x (xx)) ENGINE=InnoDB;
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#
2+
# MDEV-25459 MVCC read from index on CHAR or VARCHAR wrongly omits rows
3+
#
4+
CREATE TABLE t1 (
5+
pk int PRIMARY KEY, c varchar(255) UNIQUE,
6+
d char(255), e varchar(255), f char(255), g char(255)
7+
) ENGINE=InnoDB ROW_FORMAT=DYNAMIC DEFAULT CHARACTER SET ucs2;
8+
INSERT INTO t1 VALUES
9+
(1,REPEAT('c',248),REPEAT('a',106),REPEAT('b',220),REPEAT('x',14),'');
10+
BEGIN;
11+
UPDATE t1 SET c=REPEAT('d',170);
12+
connect con1,localhost,root,,;
13+
SELECT pk FROM t1 FORCE INDEX (c);
14+
pk
15+
1
16+
connection default;
17+
COMMIT;
18+
connection con1;
19+
SELECT pk FROM t1 FORCE INDEX (c);
20+
pk
21+
1
22+
disconnect con1;
23+
connection default;
24+
DROP TABLE t1;

0 commit comments

Comments
 (0)