Skip to content

Commit cac995e

Browse files
committed
Merge 10.4 into 10.5
2 parents 5948d76 + 6f4740f commit cac995e

Some content is hidden

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

42 files changed

+676
-775
lines changed

client/mysqltest.cc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ static struct property prop_list[] = {
157157
{ &display_session_track_info, 0, 1, 1, "$ENABLED_STATE_CHANGE_INFO" },
158158
{ &display_metadata, 0, 0, 0, "$ENABLED_METADATA" },
159159
{ &ps_protocol_enabled, 0, 0, 0, "$ENABLED_PS_PROTOCOL" },
160+
{ &view_protocol_enabled, 0, 0, 0, "$ENABLED_VIEW_PROTOCOL"},
160161
{ &disable_query_log, 0, 0, 1, "$ENABLED_QUERY_LOG" },
161162
{ &disable_result_log, 0, 0, 1, "$ENABLED_RESULT_LOG" },
162163
{ &disable_warnings, 0, 0, 1, "$ENABLED_WARNINGS" }
@@ -171,6 +172,7 @@ enum enum_prop {
171172
P_SESSION_TRACK,
172173
P_META,
173174
P_PS,
175+
P_VIEW,
174176
P_QUERY,
175177
P_RESULT,
176178
P_WARN,
@@ -376,6 +378,7 @@ enum enum_commands {
376378
Q_LOWERCASE,
377379
Q_START_TIMER, Q_END_TIMER,
378380
Q_CHARACTER_SET, Q_DISABLE_PS_PROTOCOL, Q_ENABLE_PS_PROTOCOL,
381+
Q_DISABLE_VIEW_PROTOCOL, Q_ENABLE_VIEW_PROTOCOL,
379382
Q_ENABLE_NON_BLOCKING_API, Q_DISABLE_NON_BLOCKING_API,
380383
Q_DISABLE_RECONNECT, Q_ENABLE_RECONNECT,
381384
Q_IF,
@@ -463,6 +466,8 @@ const char *command_names[]=
463466
"character_set",
464467
"disable_ps_protocol",
465468
"enable_ps_protocol",
469+
"disable_view_protocol",
470+
"enable_view_protocol",
466471
"enable_non_blocking_api",
467472
"disable_non_blocking_api",
468473
"disable_reconnect",
@@ -1388,6 +1393,16 @@ void close_connections()
13881393
DBUG_VOID_RETURN;
13891394
}
13901395

1396+
void close_util_connections()
1397+
{
1398+
DBUG_ENTER("close_util_connections");
1399+
if (cur_con->util_mysql)
1400+
{
1401+
mysql_close(cur_con->util_mysql);
1402+
cur_con->util_mysql = 0;
1403+
}
1404+
DBUG_VOID_RETURN;
1405+
}
13911406

13921407
void close_statements()
13931408
{
@@ -9674,6 +9689,14 @@ int main(int argc, char **argv)
96749689
case Q_ENABLE_PS_PROTOCOL:
96759690
set_property(command, P_PS, ps_protocol);
96769691
break;
9692+
case Q_DISABLE_VIEW_PROTOCOL:
9693+
set_property(command, P_VIEW, 0);
9694+
/* Close only util connections */
9695+
close_util_connections();
9696+
break;
9697+
case Q_ENABLE_VIEW_PROTOCOL:
9698+
set_property(command, P_VIEW, view_protocol);
9699+
break;
96779700
case Q_DISABLE_NON_BLOCKING_API:
96789701
non_blocking_api_enabled= 0;
96799702
break;

man/mysqladmin.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
.\" administration: server
1616
.\" server administration
1717
.SH "NAME"
18-
mysqladmin \- client for administering a MariaB server
18+
mysqladmin \- client for administering a MariaDB server
1919
.SH "SYNOPSIS"
2020
.HP \w'\fBmysqladmin\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIcommand\fR\fR\fB\ [\fR\fB\fIcommand\-arg\fR\fR\fB]\ [\fR\fB\fIcommand\fR\fR\fB\ [\fR\fB\fIcommand\-arg\fR\fR\fB]]\ \&.\&.\&.\fR\ 'u
2121
\fBmysqladmin [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIcommand\fR\fR\fB [\fR\fB\fIcommand\-arg\fR\fR\fB] [\fR\fB\fIcommand\fR\fR\fB [\fR\fB\fIcommand\-arg\fR\fR\fB]] \&.\&.\&.\fR
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# The file with expected results fits only to a run with
2+
# view-protocol.
3+
if (`SELECT $VIEW_PROTOCOL = 0`)
4+
{
5+
--skip Test requires view-protocol
6+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
flush status;
2+
create table t1 (a int);
3+
insert into t1 (a) values (1);
4+
create table t2 (b int);
5+
insert into t2 (b) values (2);
6+
select * from t1;
7+
a
8+
1
9+
show status like 'Opened_views';
10+
Variable_name Value
11+
Opened_views 1
12+
flush status;
13+
select * from t2;
14+
b
15+
2
16+
show status like 'Opened_views';
17+
Variable_name Value
18+
Opened_views 0
19+
drop table t1, t2;
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
-- source include/have_view_protocol.inc
2+
3+
flush status;
4+
5+
create table t1 (a int);
6+
insert into t1 (a) values (1);
7+
create table t2 (b int);
8+
insert into t2 (b) values (2);
9+
select * from t1;
10+
show status like 'Opened_views';
11+
12+
flush status;
13+
--disable_view_protocol
14+
select * from t2;
15+
--enable_view_protocol
16+
17+
show status like 'Opened_views';
18+
19+
drop table t1, t2;
20+
21+

mysql-test/main/session_tracker_last_gtid.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ drop table t1;
3232
-- last_gtid
3333
-- 0-1-1002
3434

35+
reset master;

mysql-test/main/session_tracker_last_gtid.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ select @@last_gtid;
1717
drop table t1;
1818

1919
--disable_session_track_info
20+
reset master;

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

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -655,9 +655,9 @@ START TRANSACTION WITH CONSISTENT SNAPSHOT;
655655
connection default;
656656
DELETE IGNORE FROM t1 WHERE b = 1;
657657
Warnings:
658-
Warning 152 InnoDB: Cannot delete/update rows with cascading foreign key constraints that exceed max depth of 20. Please drop extra constraints and try again
658+
Warning 152 InnoDB: Cannot delete/update rows with cascading foreign key constraints that exceed max depth of 15. Please drop extra constraints and try again
659659
Warning 1296 Got error 193 '`test`.`t1`, CONSTRAINT `t1_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t1` (`b`) ON DELETE CASCADE' from InnoDB
660-
Warning 152 InnoDB: Cannot delete/update rows with cascading foreign key constraints that exceed max depth of 20. Please drop extra constraints and try again
660+
Warning 152 InnoDB: Cannot delete/update rows with cascading foreign key constraints that exceed max depth of 15. Please drop extra constraints and try again
661661
Warning 1296 Got error 193 '`test`.`t1`, CONSTRAINT `t1_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t1` (`b`) ON DELETE CASCADE' from InnoDB
662662
SELECT a FROM t1 FORCE INDEX(a);
663663
a
@@ -808,6 +808,25 @@ ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint
808808
Parsing foreign keys 3...
809809
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
810810
Parsing foreign keys 4...
811+
#
812+
# MDEV-27583 InnoDB uses different constants for FK cascade
813+
# error message in SQL vs error log
814+
#
815+
CREATE TABLE t1
816+
(a INT, b INT, KEY(b),
817+
CONSTRAINT FOREIGN KEY (a) REFERENCES t1 (b) ON DELETE CASCADE)
818+
ENGINE=InnoDB;
819+
INSERT INTO t1 (a,b) VALUES
820+
(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),
821+
(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,1),(1,0);
822+
DELETE FROM t1 WHERE b = 1;
823+
ERROR HY000: Got error 193 '`test`.`t1`, CONSTRAINT `t1_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t1` (`b`) ON DELETE CASCADE' from InnoDB
824+
SHOW WARNINGS;
825+
Level Code Message
826+
Warning 152 InnoDB: Cannot delete/update rows with cascading foreign key constraints that exceed max depth of 15. Please drop extra constraints and try again
827+
Error 1296 Got error 193 '`test`.`t1`, CONSTRAINT `t1_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t1` (`b`) ON DELETE CASCADE' from InnoDB
828+
DROP TABLE t1;
829+
FOUND 1 /InnoDB: Cannot delete/update rows with cascading foreign key constraints that exceed max depth of 15.*/ in mysqld.1.err
811830
# End of 10.2 tests
812831
CREATE TABLE t1 (a GEOMETRY, INDEX(a(8)),
813832
FOREIGN KEY (a) REFERENCES x (xx)) ENGINE=InnoDB;

mysql-test/suite/innodb/r/innodb-16k.result

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@ WHERE LOWER(variable_name) = 'innodb_page_size';
55
variable_value
66
16384
77
# Test 4) The maximum row size is dependent upon the page size.
8-
# Redundant: 8123, Compact: 8126.
9-
# Compressed: 8126, Dynamic: 8126.
8+
# Redundant: 8123, Compact: 8126, Dynamic: 8126.
109
# Each row format has its own amount of overhead that
1110
# varies depending on number of fields and other overhead.
1211
SET SESSION innodb_strict_mode = ON;
12+
SET @save_frequency=@@GLOBAL.innodb_purge_rseg_truncate_frequency;
13+
SET @save_level=@@GLOBAL.innodb_compression_level;
14+
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
15+
SET GLOBAL innodb_compression_level=1;
1316
CREATE TABLE t1 (
1417
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
1518
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
@@ -18,7 +21,7 @@ c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
1821
c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
1922
c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
2023
c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
21-
c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(157)
24+
c36 char(200), c37 char(200), c38 char(196)
2225
) ROW_FORMAT=compressed;
2326
DROP TABLE t1;
2427
CREATE TABLE t1 (
@@ -495,10 +498,13 @@ drop table t1;
495498
CREATE TABLE t1(c text, PRIMARY KEY (c(440)))
496499
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
497500
ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
498-
CREATE TABLE t1(c text, PRIMARY KEY (c(438)))
501+
CREATE TABLE t1(c text, PRIMARY KEY (c(292)))
499502
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
500503
INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512));
501504
DROP TABLE t1;
505+
InnoDB 0 transactions not purged
506+
SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency;
507+
SET GLOBAL innodb_compression_level=@save_level;
502508
DROP TABLE t1_purge, t2_purge, t3_purge, t4_purge;
503509
DROP TABLE tlong;
504510
DROP TABLE tlong2;

mysql-test/suite/innodb/r/instant_alter,32k.rdiff

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
--- instant_alter.result
2-
+++ instant_alter,32k.result
3-
@@ -2,7 +2,7 @@
4-
# MDEV-11369: Instant ADD COLUMN for InnoDB
5-
#
1+
@@ -5,7 +5,7 @@
2+
SET GLOBAL innodb_instant_alter_column_allowed = DEFAULT;
3+
call mtr.add_suppression("Cannot add field `.*` in table `test`.`.*` because after adding it, the row size is");
64
CREATE TABLE t(a INT UNIQUE)ENGINE=InnoDB ROW_FORMAT=COMPACT;
75
-ALTER TABLE t ADD e INT, ROW_FORMAT=COMPRESSED;
86
+ALTER TABLE t ADD e INT, ROW_FORMAT=DYNAMIC;
97
INSERT INTO t SET a=1;
108
SET @old_instant=
119
(SELECT variable_value FROM information_schema.global_status
12-
@@ -33,17 +33,17 @@
10+
@@ -36,17 +36,17 @@
1311
`c` int(11) NOT NULL,
1412
`d` int(11) NOT NULL,
1513
UNIQUE KEY `a` (`a`)
@@ -30,7 +28,7 @@
3028
DROP TABLE t;
3129
connect analyze, localhost, root;
3230
connection default;
33-
@@ -374,7 +374,7 @@
31+
@@ -404,7 +404,7 @@
3432
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
3533
WHERE name = 'test/big';
3634
clust_index_size
@@ -39,7 +37,7 @@
3937
connection default;
4038
ALTER TABLE big ADD COLUMN
4139
(d1 INT DEFAULT 0, d2 VARCHAR(20) DEFAULT 'abcde',
42-
@@ -397,7 +397,7 @@
40+
@@ -428,7 +428,7 @@
4341
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
4442
WHERE name = 'test/big';
4543
clust_index_size
@@ -48,16 +46,16 @@
4846
connection default;
4947
ROLLBACK;
5048
CHECKSUM TABLE big;
51-
@@ -410,7 +410,7 @@
49+
@@ -442,7 +442,7 @@
5250
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
5351
WHERE name = 'test/big';
5452
clust_index_size
5553
-3
5654
+1
5755
connection default;
5856
InnoDB 0 transactions not purged
59-
DROP TABLE t1,t2,t3,big;
60-
@@ -734,7 +734,7 @@
57+
DROP TABLE t1,t2,t3,t4,big;
58+
@@ -1326,7 +1326,7 @@
6159
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
6260
WHERE name = 'test/big';
6361
clust_index_size
@@ -66,7 +64,7 @@
6664
connection default;
6765
ALTER TABLE big ADD COLUMN
6866
(d1 INT DEFAULT 0, d2 VARCHAR(20) DEFAULT 'abcde',
69-
@@ -757,7 +757,7 @@
67+
@@ -1350,7 +1350,7 @@
7068
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
7169
WHERE name = 'test/big';
7270
clust_index_size
@@ -75,16 +73,16 @@
7573
connection default;
7674
ROLLBACK;
7775
CHECKSUM TABLE big;
78-
@@ -770,7 +770,7 @@
76+
@@ -1364,7 +1364,7 @@
7977
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
8078
WHERE name = 'test/big';
8179
clust_index_size
8280
-3
8381
+1
8482
connection default;
8583
InnoDB 0 transactions not purged
86-
DROP TABLE t1,t2,t3,big;
87-
@@ -1094,7 +1094,7 @@
84+
DROP TABLE t1,t2,t3,t4,big;
85+
@@ -2248,7 +2248,7 @@
8886
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
8987
WHERE name = 'test/big';
9088
clust_index_size
@@ -93,7 +91,7 @@
9391
connection default;
9492
ALTER TABLE big ADD COLUMN
9593
(d1 INT DEFAULT 0, d2 VARCHAR(20) DEFAULT 'abcde',
96-
@@ -1117,7 +1117,7 @@
94+
@@ -2272,7 +2272,7 @@
9795
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
9896
WHERE name = 'test/big';
9997
clust_index_size
@@ -102,12 +100,12 @@
102100
connection default;
103101
ROLLBACK;
104102
CHECKSUM TABLE big;
105-
@@ -1130,7 +1130,7 @@
103+
@@ -2286,7 +2286,7 @@
106104
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
107105
WHERE name = 'test/big';
108106
clust_index_size
109107
-3
110108
+1
111109
connection default;
112110
InnoDB 0 transactions not purged
113-
DROP TABLE t1,t2,t3,big;
111+
DROP TABLE t1,t2,t3,t4,big;

0 commit comments

Comments
 (0)