Skip to content

Commit 020e7d8

Browse files
committed
Merge 10.2 into 10.3
2 parents 739002e + 303448b commit 020e7d8

25 files changed

+326
-118
lines changed

BUILD/SETUP.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ fi
211211

212212
max_no_embedded_configs="$SSL_LIBRARY --with-plugins=max"
213213
max_no_qc_configs="$SSL_LIBRARY --with-plugins=max --without-query-cache"
214-
max_configs="$SSL_LIBRARY --with-plugins=max --with-embedded-server --with-libevent --without-plugin=plugin_file_key_management --with-plugin-rocksdb=dynamic --without-plugin-tokudb --with-plugin-test_sql_discovery=DYNAMIC"
214+
max_configs="$SSL_LIBRARY --with-plugins=max --with-embedded-server --with-libevent --with-plugin-rocksdb=dynamic --without-plugin-tokudb --with-plugin-test_sql_discovery=DYNAMIC --with-plugin-file_key_management=DYNAMIC"
215215
all_configs="$SSL_LIBRARY --with-plugins=max --with-embedded-server --with-innodb_plugin --with-libevent"
216216

217217
#

CREDITS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ organization registered in the USA.
44
The current main sponsors of the MariaDB Foundation are:
55

66
Alibaba Cloud https://www.alibabacloud.com/ (2017)
7+
Intel https://www.intel.com (2022)
78
MariaDB Corporation https://www.mariadb.com (2013)
89
Microsoft https://microsoft.com/ (2017)
910
ServiceNow https://servicenow.com (2019)
11+
SIT https://sit.org (2022)
1012
Tencent Cloud https://cloud.tencent.com (2017)
1113
Development Bank of Singapore https://dbs.com (2016)
1214
IBM https://www.ibm.com (2017)

client/mysqlbinlog.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2569,6 +2569,7 @@ static Exit_status handle_event_raw_mode(PRINT_EVENT_INFO *print_event_info,
25692569
error("Could not write into log file '%s'", out_file_name);
25702570
DBUG_RETURN(ERROR_STOP);
25712571
}
2572+
fflush(result_file);
25722573

25732574
DBUG_RETURN(OK_CONTINUE);
25742575
}

mysql-test/main/contributors.result

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Tencent Cloud https://cloud.tencent.com Platinum Sponsor of the MariaDB Foundati
55
Microsoft https://microsoft.com/ Platinum Sponsor of the MariaDB Foundation
66
MariaDB Corporation https://mariadb.com Founding member, Platinum Sponsor of the MariaDB Foundation
77
ServiceNow https://servicenow.com Platinum Sponsor of the MariaDB Foundation
8+
Intel https://www.intel.com Platinum Sponsor of the MariaDB Foundation
9+
SIT https://sit.org Platinum Sponsor of the MariaDB Foundation
810
Visma https://visma.com Gold Sponsor of the MariaDB Foundation
911
DBS https://dbs.com Gold Sponsor of the MariaDB Foundation
1012
IBM https://www.ibm.com Gold Sponsor of the MariaDB Foundation

mysql-test/main/ctype_utf32.result

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2913,5 +2913,30 @@ t1 CREATE TABLE `t1` (
29132913
DROP TABLE t1;
29142914
SET NAMES utf8;
29152915
#
2916+
# MDEV-28078 Garbage on multiple equal ENUMs with tricky character sets
2917+
#
2918+
CREATE TABLE t1 (
2919+
c1 ENUM ('a','b') CHARACTER SET utf32 DEFAULT 'a',
2920+
c2 ENUM ('a','b') CHARACTER SET utf32 DEFAULT 'a'
2921+
);
2922+
SHOW CREATE TABLE t1;
2923+
Table Create Table
2924+
t1 CREATE TABLE `t1` (
2925+
`c1` enum('a','b') CHARACTER SET utf32 DEFAULT 'a',
2926+
`c2` enum('a','b') CHARACTER SET utf32 DEFAULT 'a'
2927+
) ENGINE=MyISAM DEFAULT CHARSET=latin1
2928+
DROP TABLE t1;
2929+
CREATE TABLE t1 (
2930+
c1 ENUM ('00000061','00000062') DEFAULT '00000061' COLLATE latin1_bin,
2931+
c2 ENUM ('a','b') DEFAULT 'a' COLLATE utf32_general_ci
2932+
);
2933+
SHOW CREATE TABLE t1;
2934+
Table Create Table
2935+
t1 CREATE TABLE `t1` (
2936+
`c1` enum('00000061','00000062') CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '00000061',
2937+
`c2` enum('a','b') CHARACTER SET utf32 DEFAULT 'a'
2938+
) ENGINE=MyISAM DEFAULT CHARSET=latin1
2939+
DROP TABLE t1;
2940+
#
29162941
# End of 10.2 tests
29172942
#

mysql-test/main/ctype_utf32.test

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,6 +1067,25 @@ DROP TABLE t1;
10671067
SET NAMES utf8;
10681068

10691069

1070+
--echo #
1071+
--echo # MDEV-28078 Garbage on multiple equal ENUMs with tricky character sets
1072+
--echo #
1073+
1074+
CREATE TABLE t1 (
1075+
c1 ENUM ('a','b') CHARACTER SET utf32 DEFAULT 'a',
1076+
c2 ENUM ('a','b') CHARACTER SET utf32 DEFAULT 'a'
1077+
);
1078+
SHOW CREATE TABLE t1;
1079+
DROP TABLE t1;
1080+
1081+
CREATE TABLE t1 (
1082+
c1 ENUM ('00000061','00000062') DEFAULT '00000061' COLLATE latin1_bin,
1083+
c2 ENUM ('a','b') DEFAULT 'a' COLLATE utf32_general_ci
1084+
);
1085+
SHOW CREATE TABLE t1;
1086+
DROP TABLE t1;
1087+
1088+
10701089
--echo #
10711090
--echo # End of 10.2 tests
10721091
--echo #
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CREATE TABLE t1 (a int);
2+
FLUSH LOGS;
3+
INSERT INTO t1 VALUES (1);
4+
# timeout TIMEOUT MYSQL_BINLOG --raw --read-from-remote-server --user=root --host=127.0.0.1 --port=MASTER_MYPORT --stop-never --result-file=MYSQLTEST_VARDIR/tmp/ master-bin.000001
5+
# MYSQL_BINLOG MYSQLTEST_VARDIR/tmp/master-bin.000002 > MYSQLTEST_VARDIR/tmp/local-bin.000002.out
6+
FOUND 1 /GTID 0-1-2/ in local-bin.000002.out
7+
DROP TABLE t1;
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#
2+
# Purpose:
3+
# When using mariadb-binlog with options for --raw and --stop-never, events
4+
# from the master's currently active log file should be written to their
5+
# respective log file specified by --result-file, and shown on-disk. This test
6+
# ensures that the log files on disk, created by mariadb-binlog, have the most
7+
# up-to-date events from the master.
8+
#
9+
# Methodology:
10+
# On the master, rotate to a newly active binlog file and write an event to
11+
# it. Read the master's binlog using mariadb-binlog with --raw and --stop-never
12+
# and write the data to an intermediary binlog file (a timeout is used on this
13+
# command to ensure it exits). Read the local intermediary binlog file to ensure
14+
# that the master's most recent event exists in the local file.
15+
#
16+
# References:
17+
# MDEV-14608: mysqlbinlog lastest backupfile size is 0
18+
#
19+
20+
--source include/linux.inc
21+
--source include/have_log_bin.inc
22+
23+
# Create newly active log
24+
CREATE TABLE t1 (a int);
25+
FLUSH LOGS;
26+
INSERT INTO t1 VALUES (1);
27+
28+
# Read binlog data from master to intermediary result file
29+
--let TIMEOUT=1
30+
--echo # timeout TIMEOUT MYSQL_BINLOG --raw --read-from-remote-server --user=root --host=127.0.0.1 --port=MASTER_MYPORT --stop-never --result-file=MYSQLTEST_VARDIR/tmp/ master-bin.000001
31+
--error 124 # Error 124 means timeout was reached
32+
--exec timeout $TIMEOUT $MYSQL_BINLOG --raw --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT --stop-never --result-file=$MYSQLTEST_VARDIR/tmp/ master-bin.000001
33+
34+
# Ensure the binlog output has the most recent events from the master
35+
--echo # MYSQL_BINLOG MYSQLTEST_VARDIR/tmp/master-bin.000002 > MYSQLTEST_VARDIR/tmp/local-bin.000002.out
36+
--exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/tmp/master-bin.000002 > $MYSQLTEST_VARDIR/tmp/local-bin.000002.out
37+
--let SEARCH_PATTERN= GTID 0-1-2
38+
--let SEARCH_FILE= $MYSQLTEST_VARDIR/tmp/local-bin.000002.out
39+
--source include/search_pattern_in_file.inc
40+
41+
# Cleanup
42+
DROP TABLE t1;
43+
--remove_file $MYSQLTEST_VARDIR/tmp/master-bin.000001
44+
--remove_file $MYSQLTEST_VARDIR/tmp/master-bin.000002
45+
--remove_file $MYSQLTEST_VARDIR/tmp/local-bin.000002.out
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
include/rpl_init.inc [topology=1->2->3]
2+
call mtr.add_suppression('Unsafe statement written to the binary log using ');
3+
connection server_1;
4+
set binlog_format=statement;
5+
#first bug
6+
create table t1 (a int);
7+
create temporary table tmp like t1;
8+
load data local infile 'MYSQLTEST_VARDIR/load_data' INTO TABLE tmp;
9+
insert into t1 select * from tmp;
10+
#second bug
11+
create table t2 (a int);
12+
create temporary table tmp2 like t2;
13+
insert into tmp2 values(10);
14+
update tmp2 set a = 20 limit 1;
15+
Warnings:
16+
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted
17+
insert into t2 select * from tmp2;
18+
connection server_2;
19+
connection server_3;
20+
#t1 should have 2 rows
21+
select count(*) = 2 from t1;
22+
count(*) = 2
23+
1
24+
#t2 should have 1 rows with a = 20
25+
select * from t2;
26+
a
27+
20
28+
connection server_1;
29+
drop table t1, t2, tmp, tmp2;
30+
include/rpl_end.inc

mysql-test/suite/rpl/t/mdev_24667.cnf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
!include ../my.cnf
2+
3+
[mysqld.3]
4+
log-slave-updates
5+
6+
[ENV]
7+
SERVER_MYPORT_3= @mysqld.3.port
8+
SERVER_MYSOCK_3= @mysqld.3.socket

0 commit comments

Comments
 (0)