Skip to content
Permalink
Browse files

Merge 10.1 into 10.2

  • Loading branch information...
kevgs committed Jul 9, 2019
2 parents b955741 + fd08f95 commit 26c389b7b770a3699ec1fc81df7f379f6084c9e6
Showing with 616 additions and 170 deletions.
  1. +2 −6 cmake/systemd.cmake
  2. +1 −1 extra/yassl/taocrypt/src/des.cpp
  3. +7 −0 mysql-test/lib/My/Config.pm
  4. +4 −1 mysql-test/mysql-test-run.pl
  5. +2 −2 mysql-test/r/repair_symlink-5543.result
  6. +14 −0 mysql-test/r/sp.result
  7. +10 −0 mysql-test/r/type_datetime.result
  8. +4 −0 mysql-test/suite/galera/r/galera_as_slave_gtid.result
  9. +51 −45 mysql-test/suite/galera/r/galera_log_bin.result
  10. +2 −0 mysql-test/suite/galera/r/galera_log_output_csv.result
  11. +5 −0 mysql-test/suite/galera/r/galera_var_gtid_domain_id.result
  12. +5 −0 mysql-test/suite/galera/r/mdev_10518.result
  13. +10 −0 mysql-test/suite/galera/t/galera_as_slave_gtid.test
  14. +12 −8 mysql-test/suite/galera/t/galera_log_bin.test
  15. +2 −0 mysql-test/suite/galera/t/galera_log_output_csv.test
  16. +2 −0 mysql-test/suite/galera/t/galera_sync_wait_show.test
  17. +7 −0 mysql-test/suite/galera/t/galera_var_gtid_domain_id.test
  18. +7 −0 mysql-test/suite/galera/t/mdev_10518.test
  19. +25 −0 mysql-test/suite/multi_source/mdev-8874.cnf
  20. +114 −0 mysql-test/suite/multi_source/mdev-8874.result
  21. +141 −0 mysql-test/suite/multi_source/mdev-8874.test
  22. +8 −3 mysql-test/suite/rpl/r/kill_race_condition.result
  23. +0 −4 mysql-test/suite/rpl/r/rpl_semi_sync_uninstall_plugin.result
  24. +12 −5 mysql-test/suite/rpl/t/kill_race_condition.test
  25. +7 −2 mysql-test/suite/rpl/t/rpl_semi_sync_uninstall_plugin.test
  26. +4 −4 mysql-test/t/repair_symlink-5543.test
  27. +20 −0 mysql-test/t/sp.test
  28. +10 −0 mysql-test/t/type_datetime.test
  29. +28 −11 plugin/server_audit/server_audit.c
  30. +2 −2 scripts/mysqld_safe.sh
  31. +7 −4 sql/item_sum.cc
  32. +0 −9 sql/rpl_mi.cc
  33. +1 −1 sql/sp_head.cc
  34. +5 −4 sql/sql_plugin.cc
  35. +2 −2 storage/connect/array.cpp
  36. +11 −11 storage/connect/csort.cpp
  37. +2 −2 storage/connect/ha_connect.cc
  38. +1 −1 storage/connect/odbconn.cpp
  39. +2 −2 storage/connect/valblk.cpp
  40. +9 −9 storage/connect/xindex.cpp
  41. +6 −1 storage/innobase/row/row0ins.cc
  42. +1 −1 storage/maria/ma_blockrec.c
  43. +1 −1 storage/maria/ma_checkpoint.c
  44. +12 −5 storage/maria/ma_loghandler.c
  45. +1 −1 storage/maria/ma_open.c
  46. +27 −11 storage/maria/ma_recovery.c
  47. +3 −9 storage/maria/ma_recovery_util.c
  48. +1 −1 storage/spider/spd_table.cc
  49. +6 −1 storage/xtradb/row/row0ins.cc
@@ -26,13 +26,9 @@ MACRO(CHECK_SYSTEMD)
pkg_search_module(LIBSYSTEMD libsystemd libsystemd-daemon)
ENDIF()
IF(HAVE_DLOPEN)
SET(LIBSYSTEMD ${LIBSYSTEMD_LIBRARIES})
#SET(CMAKE_REQUIRED_FLAGS ${LIBSYSTEMD_CFLAGS})
SET(MYSQLD_LINK_FLAGS "${MYSQLD_LINK_FLAGS} ${LIBSYSTEMD_LDFLAGS}")
SET(LIBSYSTEMD ${LIBSYSTEMD_LDFLAGS} ${LIBSYSTEMD_LIBRARIES})
ELSE()
SET(LIBSYSTEMD ${LIBSYSTEMD_STATIC_LIBRARIES})
#SET(CMAKE_REQUIRED_FLAGS ${LIBSYSTEMD_STATIC_CFLAGS})
SET(MYSQLD_LINK_FLAGS "${MYSQLD_LINK_FLAGS} ${LIBSYSTEMD_STATIC_LDFLAGS}")
SET(LIBSYSTEMD ${LIBSYSTEMD_STATIC_LDFLAGS} ${LIBSYSTEMD_STATIC_LIBRARIES})
ENDIF()
ELSE()
SET(LIBSYSTEMD systemd)
@@ -224,7 +224,7 @@ void BasicDES::SetKey(const byte* key, word32 /*length*/, CipherDir dir)
byte *const pc1m = buffer; /* place to modify pc1 into */
byte *const pcr = pc1m + 56; /* place to rotate pc1 into */
byte *const ks = pcr + 56;
register int i,j,l;
int i,j,l;
int m;

for (j = 0; j < 56; j++) { /* convert pc1 to bits of key */
@@ -338,6 +338,13 @@ sub new {
# Skip comment
next;
}
# Correctly process Replication Filter when they are defined
# with connection name.
elsif ( $line =~ /^([\w]+.[\w]+)\s*=\s*(.*)\s*/){
my $option= $1;
my $value= $2;
$self->insert($group_name, $option, $value);
}
else {
croak "Unexpected line '$line' found in '$path'";
}
@@ -1891,7 +1891,10 @@ sub collect_mysqld_features {
if (/Copyright/ .. /^-{30,}/) {
# here we want to detect all not mandatory plugins
# they are listed in the --help output as
# --archive[=name] Enable or disable ARCHIVE plugin. Possible values are ON, OFF, FORCE (don't start if the plugin fails to load).
# --archive[=name]
# Enable or disable ARCHIVE plugin. Possible values are ON, OFF,
# FORCE (don't start if the plugin fails to load),
# FORCE_PLUS_PERMANENT (like FORCE, but the plugin can not be uninstalled).
push @optional_plugins, $1
if /^ --([-a-z0-9]+)\[=name\] +Enable or disable \w+ plugin. One of: ON, OFF, FORCE/;
next;
@@ -1,7 +1,7 @@
create table t1 (a int) engine=myisam data directory='MYSQL_TMP_DIR';
insert t1 values (1);
# Some systems fail with errcode 40, when doing openat, while others
# don't have openat and fail with errcode 20.
# Some systems fail with errcode 40, or 90 (MIPS) when doing openat,
# while others don't have openat and fail with errcode 20.
repair table t1;
Table Op Msg_type Msg_text
test.t1 repair error 20 for record at pos 0
@@ -8327,6 +8327,20 @@ UNION
SELECT * FROM INFORMATION_SCHEMA.TABLES JOIN INFORMATION_SCHEMA.PARAMETERS;
DROP FUNCTION f;
DROP VIEW v;
#
# MDEV-17963: Assertion `field_pos < field_count' failed in Protocol_text::store,
# Assertion `field_handlers == 0 || field_pos < field_count'
#
CREATE TABLE t1 (ct time);
INSERT INTO t1 VALUES ('16:11:28');
CREATE FUNCTION f1 () RETURNS varchar(100)
BEGIN
DECLARE xxx varchar(100);
ANALYZE SELECT sum(ct) FROM t1 INTO xxx ;
RETURN xxx;
END|
ERROR 0A000: Not allowed to return a result set from a function
drop table t1;
#End of 10.1 tests
#
# MDEV-11081: CURSOR for query with GROUP BY
@@ -1146,6 +1146,16 @@ a
00:01:00
DROP TABLE t1;
#
# MDEV-17857 Assertion `tmp != ((long long) 0x8000000000000000LL)' failed in TIME_from_longlong_datetime_packed upon SELECT with GROUP BY
#
CREATE TABLE t1 (i INT, d DATETIME);
INSERT INTO t1 VALUES (3,NULL),(3,'1976-12-14 13:21:07'),(NULL,'1981-09-24 01:04:47');
SELECT ExtractValue('foo','bar'), i, MIN(d) FROM t1 GROUP BY i;
ExtractValue('foo','bar') i MIN(d)
NULL 1981-09-24 01:04:47
3 1976-12-14 13:21:07
DROP TABLE t1;
#
# End of 10.1 tests
#
#
@@ -22,3 +22,7 @@ connection node_3;
connection node_2;
STOP SLAVE;
RESET SLAVE ALL;
#cleanup
reset master;
reset master;
reset master;
@@ -1,3 +1,7 @@
connection node_1;
reset master;
connection node_2;
reset master;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
CREATE TABLE t2 (id INT) ENGINE=InnoDB;
@@ -12,58 +16,60 @@ COUNT(*) = 2
1
connection node_1;
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
FLUSH LOGS;
SHOW BINLOG EVENTS IN 'mysqld-bin.000002' LIMIT 4,21;
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
mysqld-bin.000002 # Gtid # # GTID 0-1-1
mysqld-bin.000002 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
mysqld-bin.000002 # Gtid # # BEGIN GTID 0-1-2
mysqld-bin.000002 # Annotate_rows # # INSERT INTO t1 VALUES (1)
mysqld-bin.000002 # Table_map # # table_id: # (test.t1)
mysqld-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000002 # Xid # # COMMIT /* xid=# */
mysqld-bin.000002 # Gtid # # GTID 0-1-3
mysqld-bin.000002 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
mysqld-bin.000002 # Gtid # # BEGIN GTID 0-1-4
mysqld-bin.000002 # Annotate_rows # # INSERT INTO t2 VALUES (1)
mysqld-bin.000002 # Table_map # # table_id: # (test.t2)
mysqld-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000002 # Xid # # COMMIT /* xid=# */
mysqld-bin.000002 # Gtid # # BEGIN GTID 0-1-5
mysqld-bin.000002 # Annotate_rows # # INSERT INTO t2 VALUES (1)
mysqld-bin.000002 # Table_map # # table_id: # (test.t2)
mysqld-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000002 # Xid # # COMMIT /* xid=# */
mysqld-bin.000002 # Gtid # # GTID 0-1-6
mysqld-bin.000002 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
mysqld-bin.000001 # Gtid # # GTID #-#-#
mysqld-bin.000001 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
mysqld-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1)
mysqld-bin.000001 # Table_map # # table_id: # (test.t1)
mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000001 # Xid # # COMMIT /* XID */
mysqld-bin.000001 # Gtid # # GTID #-#-#
mysqld-bin.000001 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
mysqld-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1)
mysqld-bin.000001 # Table_map # # table_id: # (test.t2)
mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000001 # Xid # # COMMIT /* XID */
mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
mysqld-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1)
mysqld-bin.000001 # Table_map # # table_id: # (test.t2)
mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000001 # Xid # # COMMIT /* XID */
mysqld-bin.000001 # Gtid # # GTID #-#-#
mysqld-bin.000001 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
connection node_2;
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
COUNT(*) = 2
1
SHOW BINLOG EVENTS IN 'mysqld-bin.000003' LIMIT 3,21;
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
mysqld-bin.000003 # Gtid # # GTID 0-1-1
mysqld-bin.000003 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
mysqld-bin.000003 # Gtid # # BEGIN GTID 0-1-2
mysqld-bin.000003 # Annotate_rows # # INSERT INTO t1 VALUES (1)
mysqld-bin.000003 # Table_map # # table_id: # (test.t1)
mysqld-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000003 # Xid # # COMMIT /* xid=# */
mysqld-bin.000003 # Gtid # # GTID 0-1-3
mysqld-bin.000003 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
mysqld-bin.000003 # Gtid # # BEGIN GTID 0-1-4
mysqld-bin.000003 # Annotate_rows # # INSERT INTO t2 VALUES (1)
mysqld-bin.000003 # Table_map # # table_id: # (test.t2)
mysqld-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000003 # Xid # # COMMIT /* xid=# */
mysqld-bin.000003 # Gtid # # BEGIN GTID 0-1-5
mysqld-bin.000003 # Annotate_rows # # INSERT INTO t2 VALUES (1)
mysqld-bin.000003 # Table_map # # table_id: # (test.t2)
mysqld-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000003 # Xid # # COMMIT /* xid=# */
mysqld-bin.000003 # Gtid # # GTID 0-1-6
mysqld-bin.000003 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
mysqld-bin.000001 # Gtid # # GTID #-#-#
mysqld-bin.000001 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
mysqld-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1)
mysqld-bin.000001 # Table_map # # table_id: # (test.t1)
mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000001 # Xid # # COMMIT /* XID */
mysqld-bin.000001 # Gtid # # GTID #-#-#
mysqld-bin.000001 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
mysqld-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1)
mysqld-bin.000001 # Table_map # # table_id: # (test.t2)
mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000001 # Xid # # COMMIT /* XID */
mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
mysqld-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1)
mysqld-bin.000001 # Table_map # # table_id: # (test.t2)
mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000001 # Xid # # COMMIT /* XID */
mysqld-bin.000001 # Gtid # # GTID #-#-#
mysqld-bin.000001 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
DROP TABLE t1;
DROP TABLE t2;
#cleanup
connection node_1;
RESET MASTER;
connection node_2;
reset master;
@@ -18,3 +18,5 @@ COUNT(*) = 1
1
connection node_1;
DROP TABLE t1;
truncate table mysql.slow_log;
truncate table mysql.general_log;
@@ -78,6 +78,11 @@ wsrep_gtid_mode 1
# On node_1
connection node_1;
DROP TABLE t1, t2;
#cleanup
connection node_1;
reset master;
connection node_2;
reset master;
disconnect node_2;
disconnect node_1;
# End of test
@@ -78,6 +78,11 @@ wsrep_gtid_mode 1
# On node_1
connection node_1;
DROP TABLE t1, t2;
#cleanup
connection node_1;
reset master;
connection node_2;
reset master;
disconnect node_2;
disconnect node_1;
# End of test
@@ -65,3 +65,13 @@ DROP TABLE t1;

STOP SLAVE;
RESET SLAVE ALL;

--echo #cleanup
--connection node_1
reset master;

--connection node_2
reset master;

--connection node_3
reset master;
@@ -1,6 +1,11 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc

--connection node_1
reset master;
--connection node_2
reset master;

#
# Test Galera with --log-bin --log-slave-updates .
# This way the actual MySQL binary log is used,
@@ -20,20 +25,19 @@ SELECT COUNT(*) = 2 FROM t2;

--connection node_1
ALTER TABLE t1 ADD COLUMN f2 INTEGER;

FLUSH LOGS;
--replace_column 2 # 4 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /xid=[0-9]+/xid=#/
SHOW BINLOG EVENTS IN 'mysqld-bin.000002' LIMIT 4,21;
--let $MASTER_MYPORT=$NODE_MYPORT_1
--source include/show_binlog_events.inc

--connection node_2
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
--replace_column 2 # 4 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /xid=[0-9]+/xid=#/
SHOW BINLOG EVENTS IN 'mysqld-bin.000003' LIMIT 3,21;
--let $MASTER_MYPORT=$NODE_MYPORT_2
--source include/show_binlog_events.inc

DROP TABLE t1;
DROP TABLE t2;

--echo #cleanup
--connection node_1
RESET MASTER;
--connection node_2
reset master;
@@ -22,3 +22,5 @@ SELECT COUNT(*) = 1 FROM mysql.slow_log WHERE sql_text = 'SELECT 2 = 2 FROM t1';

--connection node_1
DROP TABLE t1;
truncate table mysql.slow_log;
truncate table mysql.general_log;
@@ -64,7 +64,9 @@ DROP TABLE t1;


--connection node_1
--disable_warnings
CREATE EVENT event1 ON SCHEDULE AT '2038-01-01 23:59:59' DO SELECT 1;
--enable_warnings

--connection node_2
SHOW CREATE EVENT event1;
@@ -48,6 +48,13 @@ source include/print_gtid.inc;
# Cleanup
DROP TABLE t1, t2;

--echo #cleanup
--connection node_1
reset master;

--connection node_2
reset master;

--source include/galera_end.inc
--echo # End of test

@@ -48,6 +48,13 @@ source include/print_gtid.inc;
# Cleanup
DROP TABLE t1, t2;

--echo #cleanup
--connection node_1
reset master;

--connection node_2
reset master;

--source include/galera_end.inc
--echo # End of test

@@ -0,0 +1,25 @@
!include my.cnf

[mysqld.1]
log-bin
log-slave-updates

[mysqld.2]
log-bin
log-slave-updates

[mysqld.3]
log-bin
log-slave-updates

[mysqld.4]
server-id=4
log-bin=server4-bin
log-slave-updates
m1.replicate_ignore_table='a.t1'
m2.replicate_ignore_table='b.t1'
replicate_ignore_table='c.t1'

[ENV]
SERVER_MYPORT_4= @mysqld.4.port
SERVER_MYSOCK_4= @mysqld.4.socket

0 comments on commit 26c389b

Please sign in to comment.
You can’t perform that action at this time.