Skip to content

Commit e71aca8

Browse files
committed
Merge 10.9 into 10.10
2 parents 259050f + 50d6966 commit e71aca8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1150
-358
lines changed

extra/mariabackup/backup_mysql.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ check_server_version(ulong version_number, const char *version_string)
305305
}
306306

307307
/*********************************************************************//**
308-
Receive options important for XtraBackup from MySQL server.
308+
Receive options important for XtraBackup from server.
309309
@return true on success. */
310310
bool get_mysql_vars(MYSQL *connection)
311311
{
@@ -1773,8 +1773,8 @@ static std::string make_local_paths(const char *data_file_path)
17731773
bool write_backup_config_file()
17741774
{
17751775
int rc= backup_file_printf("backup-my.cnf",
1776-
"# This MySQL options file was generated by innobackupex.\n\n"
1777-
"# The MySQL server\n"
1776+
"# This options file was generated by innobackupex.\n\n"
1777+
"# The server\n"
17781778
"[mysqld]\n"
17791779
"innodb_checksum_algorithm=%s\n"
17801780
"innodb_data_file_path=%s\n"
@@ -1859,7 +1859,7 @@ flush_changed_page_bitmaps()
18591859

18601860

18611861
/*********************************************************************//**
1862-
Deallocate memory, disconnect from MySQL server, etc.
1862+
Deallocate memory, disconnect from server, etc.
18631863
@return true on success. */
18641864
void
18651865
backup_cleanup()

extra/mariabackup/xtrabackup.cc

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6227,22 +6227,28 @@ static bool check_all_privileges()
62276227
}
62286228

62296229
/* KILL ... */
6230-
if ((!opt_no_lock && (opt_kill_long_queries_timeout || opt_lock_ddl_per_table))
6231-
/* START SLAVE SQL_THREAD */
6232-
/* STOP SLAVE SQL_THREAD */
6233-
|| opt_safe_slave_backup) {
6230+
if (!opt_no_lock && (opt_kill_long_queries_timeout || opt_kill_long_query_type)) {
62346231
check_result |= check_privilege(
62356232
granted_privileges,
6236-
"SUPER", "*", "*",
6233+
"CONNECTION ADMIN", "*", "*",
6234+
PRIVILEGE_WARNING);
6235+
}
6236+
6237+
/* START SLAVE SQL_THREAD */
6238+
/* STOP SLAVE SQL_THREAD */
6239+
if (opt_safe_slave_backup) {
6240+
check_result |= check_privilege(
6241+
granted_privileges,
6242+
"REPLICATION SLAVE ADMIN", "*", "*",
62376243
PRIVILEGE_WARNING);
62386244
}
62396245

62406246
/* SHOW MASTER STATUS */
62416247
/* SHOW SLAVE STATUS */
62426248
if (opt_galera_info || opt_slave_info
6243-
|| (opt_no_lock && opt_safe_slave_backup)) {
6249+
|| opt_safe_slave_backup) {
62446250
check_result |= check_privilege(granted_privileges,
6245-
"REPLICATION CLIENT", "*", "*",
6251+
"SLAVE MONITOR", "*", "*",
62466252
PRIVILEGE_WARNING);
62476253
}
62486254

mysql-test/include/mtr_warnings.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ INSERT INTO global_suppressions VALUES
173173

174174
/* Added 2009-08-XX after fixing Bug #42408 */
175175

176-
("Although a path was specified for the .* option, log tables are used"),
176+
("Although a .* file was specified, log tables are used. To enable logging to files "),
177177
("Backup: Operation aborted"),
178178
("Restore: Operation aborted"),
179179
("Restore: The grant .* was skipped because the user does not exist"),

mysql-test/main/sp-vars.result

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,11 +1026,11 @@ BEGIN
10261026
SELECT arg;
10271027
END|
10281028
CALL p1((1, 2));
1029-
ERROR 21000: Operand should contain 1 column(s)
1029+
ERROR HY000: Cannot cast 'row' as 'tinyint' in assignment of `arg`
10301030
CALL p1((SELECT * FROM t1 LIMIT 1));
1031-
ERROR 21000: Operand should contain 1 column(s)
1031+
ERROR HY000: Cannot cast 'row' as 'tinyint' in assignment of `arg`
10321032
CALL p1((SELECT col1, col2 FROM t1 LIMIT 1));
1033-
ERROR 21000: Operand should contain 1 column(s)
1033+
ERROR HY000: Cannot cast 'row' as 'tinyint' in assignment of `arg`
10341034
DROP PROCEDURE p1;
10351035
DROP TABLE t1;
10361036

mysql-test/main/sp-vars.test

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,13 +1221,13 @@ BEGIN
12211221
END|
12221222
delimiter ;|
12231223

1224-
--error ER_OPERAND_COLUMNS
1224+
--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
12251225
CALL p1((1, 2));
12261226

1227-
--error ER_OPERAND_COLUMNS
1227+
--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
12281228
CALL p1((SELECT * FROM t1 LIMIT 1));
12291229

1230-
--error ER_OPERAND_COLUMNS
1230+
--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
12311231
CALL p1((SELECT col1, col2 FROM t1 LIMIT 1));
12321232

12331233
#

mysql-test/main/subselect4.result

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3054,6 +3054,122 @@ a
30543054
3
30553055
2
30563056
drop table t1,t2,t3;
3057+
#
3058+
# MDEV-29139: Redundant IN/ALL/ANY predicand in GROUP BY clause of
3059+
# IN/ALL/ANY/EXISTS subquery
3060+
#
3061+
create table t1 (a int);
3062+
create table t2 (b int);
3063+
create table t3 (c int);
3064+
create table t4 (d int);
3065+
insert into t1 values (3), (1);
3066+
insert into t2 values (3), (2);
3067+
insert into t3 values (4), (2);
3068+
insert into t4 values (1), (7);
3069+
explain extended select b from t2
3070+
where exists (select c from t3
3071+
group by (select a from t1 where a = 1) in (select d from t4));
3072+
id select_type table type possible_keys key key_len ref rows filtered Extra
3073+
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00
3074+
2 SUBQUERY t3 ALL NULL NULL NULL NULL 2 100.00
3075+
Warnings:
3076+
Note 1003 /* select#1 */ select `test`.`t2`.`b` AS `b` from `test`.`t2` where 1
3077+
select b from t2
3078+
where exists (select c from t3
3079+
group by (select a from t1 where a = 1) in (select d from t4));
3080+
b
3081+
3
3082+
2
3083+
prepare stmt from "select b from t2
3084+
where exists (select c from t3
3085+
group by (select a from t1 where a = 1) in (select d from t4))";
3086+
execute stmt;
3087+
b
3088+
3
3089+
2
3090+
execute stmt;
3091+
b
3092+
3
3093+
2
3094+
deallocate prepare stmt;
3095+
explain extended select b from t2
3096+
where exists (select c from t3
3097+
group by (select a from t1 where a = 1) >=
3098+
any (select d from t4));
3099+
id select_type table type possible_keys key key_len ref rows filtered Extra
3100+
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00
3101+
2 SUBQUERY t3 ALL NULL NULL NULL NULL 2 100.00
3102+
Warnings:
3103+
Note 1003 /* select#1 */ select `test`.`t2`.`b` AS `b` from `test`.`t2` where 1
3104+
select b from t2
3105+
where exists (select c from t3
3106+
group by (select a from t1 where a = 1) >=
3107+
any (select d from t4));
3108+
b
3109+
3
3110+
2
3111+
explain extended select b from t2
3112+
where exists (select c from t3
3113+
group by (select a from t1 where a = 1) <
3114+
all (select d from t4));
3115+
id select_type table type possible_keys key key_len ref rows filtered Extra
3116+
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00
3117+
2 SUBQUERY t3 ALL NULL NULL NULL NULL 2 100.00
3118+
Warnings:
3119+
Note 1003 /* select#1 */ select `test`.`t2`.`b` AS `b` from `test`.`t2` where 1
3120+
select b from t2
3121+
where exists (select c from t3
3122+
group by (select a from t1 where a = 1) <
3123+
all (select d from t4));
3124+
b
3125+
3
3126+
2
3127+
explain extended select b from t2
3128+
where b in (select c from t3
3129+
group by (select a from t1 where a = 1) in (select d from t4));
3130+
id select_type table type possible_keys key key_len ref rows filtered Extra
3131+
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00
3132+
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00
3133+
2 MATERIALIZED t3 ALL NULL NULL NULL NULL 2 100.00
3134+
Warnings:
3135+
Note 1003 select `test`.`t2`.`b` AS `b` from `test`.`t2` semi join (`test`.`t3`) where 1
3136+
select b from t2
3137+
where b in (select c from t3
3138+
group by (select a from t1 where a = 1) in (select d from t4));
3139+
b
3140+
2
3141+
explain extended select b from t2
3142+
where b >= any (select c from t3
3143+
group by (select a from t1 where a = 1) in
3144+
(select d from t4));
3145+
id select_type table type possible_keys key key_len ref rows filtered Extra
3146+
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00 Using where
3147+
2 SUBQUERY t3 ALL NULL NULL NULL NULL 2 100.00
3148+
Warnings:
3149+
Note 1003 /* select#1 */ select `test`.`t2`.`b` AS `b` from `test`.`t2` where <nop>(<in_optimizer>(`test`.`t2`.`b`,(/* select#2 */ select min(`test`.`t3`.`c`) from `test`.`t3`) <= <cache>(`test`.`t2`.`b`)))
3150+
select b from t2
3151+
where b >= any (select c from t3
3152+
group by (select a from t1 where a = 1) in
3153+
(select d from t4));
3154+
b
3155+
3
3156+
2
3157+
explain extended select b from t2
3158+
where b <= all (select c from t3
3159+
group by (select a from t1 where a = 1) in
3160+
(select d from t4));
3161+
id select_type table type possible_keys key key_len ref rows filtered Extra
3162+
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00 Using where
3163+
2 SUBQUERY t3 ALL NULL NULL NULL NULL 2 100.00
3164+
Warnings:
3165+
Note 1003 /* select#1 */ select `test`.`t2`.`b` AS `b` from `test`.`t2` where <not>(<in_optimizer>(`test`.`t2`.`b`,<min>(/* select#2 */ select `test`.`t3`.`c` from `test`.`t3`) < <cache>(`test`.`t2`.`b`)))
3166+
select b from t2
3167+
where b <= all (select c from t3
3168+
group by (select a from t1 where a = 1) in
3169+
(select d from t4));
3170+
b
3171+
2
3172+
drop table t1,t2,t3,t4;
30573173
# End of 10.3 tests
30583174
#
30593175
# MDEV-19134: EXISTS() slower if ORDER BY is defined

mysql-test/main/subselect4.test

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2481,6 +2481,80 @@ eval $q3;
24812481

24822482
drop table t1,t2,t3;
24832483

2484+
--echo #
2485+
--echo # MDEV-29139: Redundant IN/ALL/ANY predicand in GROUP BY clause of
2486+
--echo # IN/ALL/ANY/EXISTS subquery
2487+
--echo #
2488+
2489+
create table t1 (a int);
2490+
create table t2 (b int);
2491+
create table t3 (c int);
2492+
create table t4 (d int);
2493+
2494+
insert into t1 values (3), (1);
2495+
insert into t2 values (3), (2);
2496+
insert into t3 values (4), (2);
2497+
insert into t4 values (1), (7);
2498+
2499+
let $q1=
2500+
select b from t2
2501+
where exists (select c from t3
2502+
group by (select a from t1 where a = 1) in (select d from t4));
2503+
2504+
eval explain extended $q1;
2505+
eval $q1;
2506+
2507+
eval prepare stmt from "$q1";
2508+
execute stmt;
2509+
execute stmt;
2510+
deallocate prepare stmt;
2511+
2512+
let $q2=
2513+
select b from t2
2514+
where exists (select c from t3
2515+
group by (select a from t1 where a = 1) >=
2516+
any (select d from t4));
2517+
2518+
eval explain extended $q2;
2519+
eval $q2;
2520+
2521+
let $q3=
2522+
select b from t2
2523+
where exists (select c from t3
2524+
group by (select a from t1 where a = 1) <
2525+
all (select d from t4));
2526+
2527+
eval explain extended $q3;
2528+
eval $q3;
2529+
2530+
let $q4=
2531+
select b from t2
2532+
where b in (select c from t3
2533+
group by (select a from t1 where a = 1) in (select d from t4));
2534+
2535+
eval explain extended $q4;
2536+
eval $q4;
2537+
2538+
let $q5=
2539+
select b from t2
2540+
where b >= any (select c from t3
2541+
group by (select a from t1 where a = 1) in
2542+
(select d from t4));
2543+
2544+
eval explain extended $q5;
2545+
eval $q5;
2546+
2547+
let $q6=
2548+
select b from t2
2549+
where b <= all (select c from t3
2550+
group by (select a from t1 where a = 1) in
2551+
(select d from t4));
2552+
2553+
eval explain extended $q6;
2554+
eval $q6;
2555+
2556+
drop table t1,t2,t3,t4;
2557+
24842558
--echo # End of 10.3 tests
24852559

24862560
--echo #

mysql-test/main/type_row.result

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,26 @@ ERROR HY000: Illegal parameter data types row and int for operation 'MOD'
4949
#
5050
# End of 10.5 tests
5151
#
52+
#
53+
# Start of 10.7 tests
54+
#
55+
#
56+
# MDEV-29356 Assertion `0' failed in Type_handler_row::Item_save_in_field on INSERT
57+
#
58+
SET sql_mode='';
59+
CREATE TABLE t1 (c1 INT,c2 INT);
60+
CREATE TRIGGER t BEFORE INSERT ON t1 FOR EACH ROW SET NEW.c1=(SELECT * FROM t1);
61+
INSERT INTO t1 VALUES (0,0);
62+
ERROR HY000: Cannot cast 'row' as 'int' in assignment of `test`.`t1`.`c1`
63+
DROP TABLE t1;
64+
SET sql_mode=DEFAULT;
65+
SET sql_mode='';
66+
CREATE TABLE t1 (c1 INT,c2 INT) ENGINE=MyISAM;
67+
CREATE TRIGGER t BEFORE INSERT ON t1 FOR EACH ROW SET NEW.c1=ROW(1,1);
68+
INSERT INTO t1 VALUES (0,0);
69+
ERROR HY000: Cannot cast 'row' as 'int' in assignment of `test`.`t1`.`c1`
70+
DROP TABLE t1;
71+
SET sql_mode=DEFAULT;
72+
#
73+
# End of 10.7 tests
74+
#

mysql-test/main/type_row.test

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,31 @@ SELECT ROW(1,1) % 1;
6060
--echo #
6161
--echo # End of 10.5 tests
6262
--echo #
63+
64+
--echo #
65+
--echo # Start of 10.7 tests
66+
--echo #
67+
68+
--echo #
69+
--echo # MDEV-29356 Assertion `0' failed in Type_handler_row::Item_save_in_field on INSERT
70+
--echo #
71+
72+
SET sql_mode='';
73+
CREATE TABLE t1 (c1 INT,c2 INT);
74+
CREATE TRIGGER t BEFORE INSERT ON t1 FOR EACH ROW SET NEW.c1=(SELECT * FROM t1);
75+
--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
76+
INSERT INTO t1 VALUES (0,0);
77+
DROP TABLE t1;
78+
SET sql_mode=DEFAULT;
79+
80+
SET sql_mode='';
81+
CREATE TABLE t1 (c1 INT,c2 INT) ENGINE=MyISAM;
82+
CREATE TRIGGER t BEFORE INSERT ON t1 FOR EACH ROW SET NEW.c1=ROW(1,1);
83+
--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
84+
INSERT INTO t1 VALUES (0,0);
85+
DROP TABLE t1;
86+
SET sql_mode=DEFAULT;
87+
88+
--echo #
89+
--echo # End of 10.7 tests
90+
--echo #

0 commit comments

Comments
 (0)