Skip to content
Permalink
Browse files

Merge 10.2 to 10.3

  • Loading branch information...
dr-m committed Aug 13, 2019
2 parents eedd617 + ed4ccf3 commit 65d48b4a7bd7a57a27f2e9ca54473e1ae86223b5
Showing with 1,700 additions and 984 deletions.
  1. +1 −1 BUILD/compile-pentium64-asan-max
  2. +2 −1 extra/innochecksum.cc
  3. +1 −1 extra/mariabackup/xtrabackup.cc
  4. +9 −2 include/my_valgrind.h
  5. +1 −1 mysql-test/include/wait_for_slave_param.inc
  6. +1 −0 mysql-test/main/connect_debug.test
  7. +16 −0 mysql-test/main/kill.result
  8. +20 −0 mysql-test/main/kill.test
  9. +1 −0 mysql-test/mysql-test-run.pl
  10. +2 −0 mysql-test/suite/binlog/r/binlog_unsafe.result
  11. +0 −3 mysql-test/suite/galera/disabled.def
  12. +20 −5 mysql-test/suite/galera/r/MW-328A.result
  13. +1 −1 mysql-test/suite/galera/r/MW-328B.result
  14. +1 −1 mysql-test/suite/galera/r/MW-328C.result
  15. +44 −0 mysql-test/suite/galera/r/galera_performance_schema.result
  16. +1 −1 mysql-test/suite/galera/t/MW-328-footer.inc
  17. +32 −11 mysql-test/suite/galera/t/MW-328A.test
  18. +0 −2 mysql-test/suite/galera/t/MW-328B.test
  19. +1 −2 mysql-test/suite/galera/t/MW-328C.test
  20. +0 −1 mysql-test/suite/galera/t/MW-328D.test
  21. +0 −1 mysql-test/suite/galera/t/MW-328E.test
  22. +58 −0 mysql-test/suite/galera/t/galera_performance_schema.test
  23. +39 −50 mysql-test/suite/innodb/include/innodb_bulk_create_index_debug.inc
  24. +6 −2 mysql-test/suite/innodb/r/alter_copy.result
  25. +0 −51 mysql-test/suite/innodb/r/auto_increment_dup,skip-log-bin.rdiff
  26. +15 −12 mysql-test/suite/innodb/r/auto_increment_dup.result
  27. +140 −89 mysql-test/suite/innodb/r/innodb_bulk_create_index_debug.result
  28. +10 −5 mysql-test/suite/innodb/t/alter_copy.test
  29. +0 −8 mysql-test/suite/innodb/t/auto_increment_dup.test
  30. +30 −0 mysql-test/suite/mariabackup/big_innodb_log.result
  31. +87 −0 mysql-test/suite/mariabackup/big_innodb_log.test
  32. +20 −0 mysql-test/suite/rpl/r/rpl_create_or_replace_fail.result
  33. +2 −2 mysql-test/suite/rpl/r/rpl_gtid_delete_domain.result
  34. +0 −26 mysql-test/suite/rpl/r/rpl_known_bugs_detection.result
  35. +129 −0 mysql-test/suite/rpl/r/rpl_mdev_17614.result
  36. +18 −0 mysql-test/suite/rpl/r/rpl_sync_with_innodb_thd_conc.result
  37. +5 −0 mysql-test/suite/rpl/r/rpl_unsafe_statements.result
  38. +56 −0 mysql-test/suite/rpl/t/rpl_create_or_replace_fail.test
  39. +0 −39 mysql-test/suite/rpl/t/rpl_known_bugs_detection.test
  40. +121 −0 mysql-test/suite/rpl/t/rpl_mdev_17614.test
  41. +41 −0 mysql-test/suite/rpl/t/rpl_sync_with_innodb_thd_conc.test
  42. +1 −1 mysql-test/suite/rpl/t/rpl_unsafe_statements.test
  43. +1 −1 mysql-test/suite/sys_vars/r/sysvars_innodb.result
  44. +3 −15 mysql-test/suite/sys_vars/r/table_open_cache_basic.result
  45. +3 −18 mysql-test/suite/sys_vars/t/table_open_cache_basic.test
  46. +2 −1 pcre/pcretest.c
  47. +30 −8 sql/opt_range.cc
  48. +42 −6 sql/sql_class.cc
  49. +26 −14 sql/sql_class.h
  50. +1 −0 sql/sql_insert.cc
  51. +1 −1 sql/sql_parse.cc
  52. +6 −3 sql/sql_table.cc
  53. +15 −1 sql/wsrep_mysqld.cc
  54. +7 −0 sql/wsrep_mysqld.h
  55. +4 −4 sql/wsrep_sst.cc
  56. +19 −2 sql/wsrep_thd.cc
  57. +1 −1 storage/connect/myconn.cpp
  58. +10 −12 storage/innobase/handler/ha_innodb.cc
  59. +28 −32 storage/innobase/handler/handler0alter.cc
  60. +1 −1 storage/innobase/include/data0type.ic
  61. +0 −3 storage/innobase/include/ha_prototypes.h
  62. +10 −0 storage/innobase/include/log0log.h
  63. +3 −1 storage/innobase/include/log0log.ic
  64. +0 −4 storage/innobase/include/row0ins.h
  65. +145 −0 storage/innobase/include/span.h
  66. +7 −4 storage/innobase/log/log0log.cc
  67. +0 −5 storage/innobase/que/que0que.cc
  68. +9 −166 storage/innobase/row/row0ins.cc
  69. +0 −3 storage/innobase/row/row0mysql.cc
  70. +1 −1 storage/innobase/srv/srv0start.cc
  71. +3 −1 storage/maria/maria_chk.c
  72. +1 −1 storage/mroonga/vendor/groonga/lib/ts.c
  73. +1 −1 storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c
  74. +2 −0 storage/rocksdb/ha_rocksdb.cc
  75. +30 −19 storage/rocksdb/mysql-test/rocksdb/include/group_min_max.inc
  76. +332 −331 storage/rocksdb/mysql-test/rocksdb/r/group_min_max.result
  77. +6 −0 storage/rocksdb/mysql-test/rocksdb/r/kill.result
  78. +3 −2 storage/rocksdb/mysql-test/rocksdb/t/group_min_max.test
  79. +9 −0 storage/rocksdb/mysql-test/rocksdb/t/kill.test
  80. +4 −1 storage/rocksdb/mysql-test/rocksdb/t/rocksdb_concurrent_delete.inc
  81. +2 −2 unittest/mysys/my_atomic-t.c
@@ -17,7 +17,7 @@
path=`dirname $0`
. "$path/SETUP.sh"

extra_flags="$pentium64_cflags $debug_cflags -lasan -O -g -fsanitize=address"
extra_flags="$pentium64_cflags $debug_cflags -lasan -O -g -fsanitize=address -USAFEMALLOC -UFORCE_INIT_OF_VARS -Wno-uninitialized -Wno-maybe-uninitialized"
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs $disable_asan_plugins"
export LDFLAGS="-ldl"

@@ -568,7 +568,8 @@ is_page_corrupted(
page_size);
if (is_corrupted && log_file) {
fprintf(log_file,
"Page " ULINTPF ":%llu may be corrupted;"
"[page id: space=" ULINTPF
", page_number=%llu] may be corrupted;"
" key_version=%u\n",
space_id, cur_page_num,
mach_read_from_4(
@@ -1295,7 +1295,7 @@ struct my_option xb_server_options[] =
{"innodb_log_file_size", OPT_INNODB_LOG_FILE_SIZE,
"Ignored for mysqld option compatibility",
(G_PTR*) &srv_log_file_size, (G_PTR*) &srv_log_file_size, 0,
GET_ULL, REQUIRED_ARG, 48 << 20, 1 << 20, 512ULL << 30, 0,
GET_ULL, REQUIRED_ARG, 48 << 20, 1 << 20, log_group_max_size, 0,
UNIV_PAGE_SIZE_MAX, 0},
{"innodb_log_files_in_group", OPT_INNODB_LOG_FILES_IN_GROUP,
"Ignored for mysqld option compatibility",
@@ -55,12 +55,19 @@
#endif /* HAVE_VALGRIND_MEMCHECK_H */

#if defined(TRASH_FREED_MEMORY)
/* NOTE: Do not invoke TRASH_FILL directly! Use TRASH_ALLOC or TRASH_FREE.
The MEM_UNDEFINED() call before memset() is for canceling the effect
of any previous MEM_NOACCESS(). We must invoke MEM_UNDEFINED() after
writing the dummy pattern, unless MEM_NOACCESS() is going to be invoked.
On AddressSanitizer, the MEM_UNDEFINED() in TRASH_ALLOC() has no effect. */
#define TRASH_FILL(A,B,C) do { const size_t trash_tmp= (B); MEM_UNDEFINED(A, trash_tmp); memset(A, C, trash_tmp); } while (0)
#else
#define TRASH_FILL(A,B,C) do { MEM_UNDEFINED((A), (B)); } while (0)
#define TRASH_FILL(A,B,C) while (0)
#endif

/** Note that some memory became allocated or uninitialized. */
#define TRASH_ALLOC(A,B) do { TRASH_FILL(A,B,0xA5); MEM_UNDEFINED(A,B); } while(0)
/** Note that some memory became freed. (Prohibit further access to it.) */
#define TRASH_FREE(A,B) do { TRASH_FILL(A,B,0x8F); MEM_NOACCESS(A,B); } while(0)

#endif /* MY_VALGRIND_INCLUDED */
@@ -69,7 +69,7 @@ if (!$_slave_param_comparison)

if ($rpl_debug)
{
--echo Waiting until '$slave_param' $_slave_param_comparison '$slave_param_value' [timeout='$_slave_timeout', \$slave_error_param='$slave_error_param']
--echo Waiting until '$slave_param' $_slave_param_comparison '$slave_param_value' [\$slave_error_param='$slave_error_param']
}

--let $_slave_check_configured= query_get_value("SHOW SLAVE STATUS", Slave_IO_Running, 1)
@@ -17,6 +17,7 @@ drop user bad;
#
set global debug_dbug='+d,auth_invalid_plugin';
create user 'bad' identified by 'worse';
--replace_regex /loaded: [^\n]*/loaded: invalid plugin name/
--error 1
--exec $MYSQL --default-auth=mysql_old_password --user=bad --password=worse 2>&1
set global debug_dbug=@old_dbug;
@@ -399,3 +399,19 @@ DROP USER u1@localhost;
SET DEBUG_SYNC = 'RESET';
DROP FUNCTION MY_KILL;
set global sql_mode=default;
#
# MDEV-17998
# Deadlock and eventual Assertion `!table->pos_in_locked_tables' failed
# in tc_release_table on KILL_TIMEOUT
#
SET max_statement_time= 2;
CREATE TABLE t1 (a INT);
CREATE VIEW v1 AS SELECT * FROM t1;
CREATE TABLE t2 (b INT, c INT);
LOCK TABLES v1 READ, t2 WRITE, t1 WRITE;
ALTER TABLE t1 CHANGE f1 f2 DOUBLE;
Got one of the listed errors
ALTER TABLE t2 DROP c;
UNLOCK TABLES;
DROP VIEW v1;
DROP TABLE t1, t2;
@@ -642,3 +642,23 @@ SET DEBUG_SYNC = 'RESET';
DROP FUNCTION MY_KILL;

set global sql_mode=default;

--echo #
--echo # MDEV-17998
--echo # Deadlock and eventual Assertion `!table->pos_in_locked_tables' failed
--echo # in tc_release_table on KILL_TIMEOUT
--echo #

SET max_statement_time= 2;

CREATE TABLE t1 (a INT);
CREATE VIEW v1 AS SELECT * FROM t1;
CREATE TABLE t2 (b INT, c INT);

LOCK TABLES v1 READ, t2 WRITE, t1 WRITE;
--error ER_BAD_FIELD_ERROR,ER_STATEMENT_TIMEOUT
ALTER TABLE t1 CHANGE f1 f2 DOUBLE;
ALTER TABLE t2 DROP c;
UNLOCK TABLES;
DROP VIEW v1;
DROP TABLE t1, t2;
@@ -3329,6 +3329,7 @@ sub mysql_install_db {
# Create the bootstrap.sql file
# ----------------------------------------------------------------------
my $bootstrap_sql_file= "$opt_vardir/log/bootstrap.sql";
$ENV{'MYSQL_BOOTSTRAP_SQL_FILE'}= $bootstrap_sql_file;

if (! -e $bootstrap_sql_file)
{
@@ -2675,6 +2675,8 @@ Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. CREATE... REPLACE SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave
INSERT INTO insert_2_keys VALUES (1, 2)
ON DUPLICATE KEY UPDATE a=VALUES(a)+10, b=VALUES(b)+10;
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. INSERT... ON DUPLICATE KEY UPDATE on a table with more than one UNIQUE KEY is unsafe
DROP TABLE filler_table;
DROP TABLE insert_table;
DROP TABLE update_table;
@@ -11,9 +11,6 @@
##############################################################################

MW-286 : MDEV-19992 Galera test failure on MW-286
MW-328A : MDEV-17847 Galera test failure on MW-328[A|B|C]
MW-328B : MDEV-17847 Galera test failure on MW-328[A|B|C]
MW-328C : MDEV-17847 Galera test failure on MW-328[A|B|C]
MW-329 : MDEV-19962 Galera test failure on MW-329
MW-388: MDEV-19803 Long semaphore wait error on galera.MW-388
galera_account_management : MariaDB 10.0 does not support ALTER USER
@@ -14,14 +14,29 @@ connection node_1X;
CALL proc_update();;
connection node_2;
SET SESSION wsrep_retry_autocommit = 0;
have_successes
1
have_deadlocks
1
connection node_1;
connection node_1X;
Got one of the listed errors
connection node_1;
DROP PROCEDURE proc_update;
DROP TABLE t1, t2;
CALL mtr.add_suppression("conflict state 3 after post commit");
CALL mtr.add_suppression("conflict state ABORTED after post commit");
connection node_1;
CREATE TABLE t1 (i int primary key, j int) engine=innodb;
INSERT INTO t1 values (1,0);
BEGIN;
UPDATE t1 SET j=1 WHERE i=1;
connection node_2;
UPDATE t1 SET j=2 WHERE i=1;
connection node_1;
COMMIT;
ERROR 40001: Deadlock: wsrep aborted transaction
SELECT * FROM t1;
i j
1 2
connection node_2;
SELECT * FROM t1;
i j
1 2
connection node_1;
DROP TABLE t1;
@@ -20,4 +20,4 @@ Got one of the listed errors
connection node_1;
DROP PROCEDURE proc_update;
DROP TABLE t1, t2;
CALL mtr.add_suppression("conflict state 3 after post commit");
CALL mtr.add_suppression("conflict state ABORTED after post commit");
@@ -20,4 +20,4 @@ Got one of the listed errors
connection node_1;
DROP PROCEDURE proc_update;
DROP TABLE t1, t2;
CALL mtr.add_suppression("conflict state 3 after post commit");
CALL mtr.add_suppression("conflict state ABORTED after post commit");
@@ -0,0 +1,44 @@
use performance_schema;
SELECT name
FROM threads
WHERE name LIKE 'thread/sql/wsrep%'
ORDER BY name;
name thread/sql/wsrep_applier_thread
name thread/sql/wsrep_rollbacker_thread
use test;
create table t1 (a int not null primary key) engine=innodb;
insert into t1 values (1),(2);
use performance_schema;
select name from mutex_instances where name like 'wait/synch/mutex/sql/LOCK_wsrep%' order by name;
name wait/synch/mutex/sql/LOCK_wsrep_config_state
name wait/synch/mutex/sql/LOCK_wsrep_desync
name wait/synch/mutex/sql/LOCK_wsrep_ready
name wait/synch/mutex/sql/LOCK_wsrep_replaying
name wait/synch/mutex/sql/LOCK_wsrep_rollback
name wait/synch/mutex/sql/LOCK_wsrep_slave_threads
name wait/synch/mutex/sql/LOCK_wsrep_sst
name wait/synch/mutex/sql/LOCK_wsrep_sst_init
select name from cond_instances where name like 'wait/synch/cond/sql/COND_wsrep%' order by name;
name wait/synch/cond/sql/COND_wsrep_ready
name wait/synch/cond/sql/COND_wsrep_replaying
name wait/synch/cond/sql/COND_wsrep_rollback
name wait/synch/cond/sql/COND_wsrep_sst
name wait/synch/cond/sql/COND_wsrep_sst_init
connection node_2;
use test;
SET SESSION wsrep_on=OFF;
CREATE TABLE t2 (f1 INTEGER) engine=innodb;
connection node_1;
use test;
CREATE TABLE t2 (f1 INTEGER) engine=innodb;
connection node_2;
SET SESSION wsrep_on=ON;
SELECT COUNT(*) FROM t1;
COUNT(*) 2
use performance_schema;
select count(*)>=1 from file_instances where file_name like '%GRA_%.log';
count(*)>=1 1
CALL mtr.add_suppression("Slave SQL: Error 'Table 't2' already exists' on query");
use test;
drop table t1;
drop table t2;
@@ -15,4 +15,4 @@
DROP PROCEDURE proc_update;
DROP TABLE t1, t2;

CALL mtr.add_suppression("conflict state 3 after post commit");
CALL mtr.add_suppression("conflict state ABORTED after post commit");
@@ -3,13 +3,17 @@
#

#
# Attempt to insert into t2 and check if insert actually inserted rows if
# a success was reported.
# test phase 1 is not deterministic
#
# Here we attempt to insert into t2 and check if insert actually
# inserted rows if a success was reported.
#
# However, deadlocks may or may not happen in this test execution
# it all depends on timing.
#

--source include/big_test.inc
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/big_test.inc
--source suite/galera/t/MW-328-header.inc

--connection node_2
@@ -25,7 +29,7 @@ while ($count)
{
TRUNCATE TABLE t2;

--error 0,1213
--error 0,ER_LOCK_DEADLOCK
INSERT IGNORE INTO t2 SELECT f2 FROM t1;
if ($mysql_errno != 1213) {
--inc $successes
@@ -44,14 +48,31 @@ while ($count)

--enable_query_log


--source suite/galera/t/MW-328-footer.inc

#
# Check that the test produced both deadlocks and successes
# Test phase 2 is deterministic
# Here we generate a sure conflict in node 1 and verify that
# insert failed in both nodes
#
--connection node_1
CREATE TABLE t1 (i int primary key, j int) engine=innodb;
INSERT INTO t1 values (1,0);

--disable_query_log
--eval SELECT $successes > 0 AS have_successes
--eval SELECT $deadlocks > 0 AS have_deadlocks
--enable_query_log
BEGIN;
UPDATE t1 SET j=1 WHERE i=1;

--connection node_2
UPDATE t1 SET j=2 WHERE i=1;

--source suite/galera/t/MW-328-footer.inc
--connection node_1
--error ER_LOCK_DEADLOCK
COMMIT;

SELECT * FROM t1;
--connection node_2
SELECT * FROM t1;
--connection node_1

DROP TABLE t1;
@@ -7,9 +7,7 @@
# gets the deadlock error
#

--source include/big_test.inc
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source suite/galera/t/MW-328-header.inc

--connection node_2
@@ -7,9 +7,8 @@
# masks all deadlock errors
#

--source include/big_test.inc
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/big_test.inc
--source suite/galera/t/MW-328-header.inc

--connection node_2
@@ -7,7 +7,6 @@
#

--source include/galera_cluster.inc
--source include/have_innodb.inc

CREATE TABLE t1 (i INT) ENGINE = InnoDB;
INSERT INTO t1 (i) VALUES(1);
@@ -7,7 +7,6 @@
#

--source include/galera_cluster.inc
--source include/have_innodb.inc

create table t1 (i int primary key, j int) engine=innodb;
create table t2 (i int primary key, j int) engine=innodb;

0 comments on commit 65d48b4

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