From c62e49d0cf90c1631e78ae3b10f2cb9383ac2d27 Mon Sep 17 00:00:00 2001 From: Julius Goryavsky Date: Mon, 1 Oct 2018 09:53:37 +0200 Subject: [PATCH 01/15] MDEV-16656: DROP DATABASE crashes the Galera Cluster When converting table identifiers to a new format, some tables can be renamed twice, which subsequently leads to the appearance of "false" auxiliary tables belonging to another main (parent) table (which does not actually have auxiliary tables). This is because the table number is repeatedly added to the aux_tables_to_rename vector inside the function fts_check_and_drop_orphaned_tables. To correct this error, we must add a check for the occurrence of the table number in the aux_tables_to_rename vector before adding a new element. https://jira.mariadb.org/browse/MDEV-16656 --- .../galera/r/galera_drop_database.result | 17 +++++ .../suite/galera/t/galera_drop_database.test | 65 +++++++++++++++++++ storage/innobase/fts/fts0fts.cc | 25 ++++++- storage/xtradb/fts/fts0fts.cc | 25 ++++++- 4 files changed, 126 insertions(+), 6 deletions(-) create mode 100644 mysql-test/suite/galera/r/galera_drop_database.result create mode 100644 mysql-test/suite/galera/t/galera_drop_database.test diff --git a/mysql-test/suite/galera/r/galera_drop_database.result b/mysql-test/suite/galera/r/galera_drop_database.result new file mode 100644 index 00000000000..79789da5a11 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_drop_database.result @@ -0,0 +1,17 @@ +CREATE DATABASE fts; +USE fts; +CREATE TABLE fts_t1 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(100), FULLTEXT (f2)) ENGINE=InnoDB; +CREATE TABLE fts_t2 (f2 VARCHAR(100), FULLTEXT (f2)) ENGINE=InnoDB; +CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +INSERT INTO fts_t1 (f2) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3; +INSERT INTO fts_t2 (f2) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3; +DROP TABLE ten; +UPDATE fts_t1 SET f2 = 'abcd'; +UPDATE fts_t2 SET f2 = 'efjh'; +USE fts; +DROP TABLE fts_t1; +DROP TABLE fts_t2; +SHOW TABLES; +Tables_in_fts +DROP DATABASE fts; diff --git a/mysql-test/suite/galera/t/galera_drop_database.test b/mysql-test/suite/galera/t/galera_drop_database.test new file mode 100644 index 00000000000..47fe8315198 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_drop_database.test @@ -0,0 +1,65 @@ +# +# This test tests a DROP empty database +# +--source include/galera_cluster.inc +--source include/have_innodb.inc + +# Save original auto_increment_offset values. +--let $node_1=node_1 +--let $node_2=node_2 +--source include/auto_increment_offset_save.inc + +CREATE DATABASE fts; +USE fts; +CREATE TABLE fts_t1 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(100), FULLTEXT (f2)) ENGINE=InnoDB; +CREATE TABLE fts_t2 (f2 VARCHAR(100), FULLTEXT (f2)) ENGINE=InnoDB; + +# Insert 1K rows +CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +INSERT INTO fts_t1 (f2) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3; +INSERT INTO fts_t2 (f2) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3; +DROP TABLE ten; +UPDATE fts_t1 SET f2 = 'abcd'; +UPDATE fts_t2 SET f2 = 'efjh'; + +--connection node_2 +let $wsrep_cluster_address = `SELECT @@global.wsrep_node_incoming_address`; +--source include/restart_mysqld.inc + +--connection node_1 +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc + +--let $galera_connection_name = node_2a +--let $galera_server_number = 2 +--source include/galera_connect.inc +--connection node_2a +--source include/wait_until_ready.inc + +--connection node_1 +--let $restart_parameters = --wsrep-cluster-address=gcomm://$wsrep_cluster_address +--source include/restart_mysqld.inc + +--connection node_2a +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc + +--let $galera_connection_name = node_1a +--let $galera_server_number = 1 +--source include/galera_connect.inc +--connection node_1a +--source include/wait_until_ready.inc + +USE fts; +DROP TABLE fts_t1; +DROP TABLE fts_t2; +SHOW TABLES; +DROP DATABASE fts; + +# Restore original auto_increment_offset values. +--let $node_1=node_1a +--let $node_2=node_2a +--source include/auto_increment_offset_restore.inc + +--source include/galera_end.inc diff --git a/storage/innobase/fts/fts0fts.cc b/storage/innobase/fts/fts0fts.cc index a5b2bbb47ce..04aaff96b91 100644 --- a/storage/innobase/fts/fts0fts.cc +++ b/storage/innobase/fts/fts0fts.cc @@ -2762,7 +2762,7 @@ retry: mutex_enter(&cache->doc_id_lock); /* For each sync operation, we will add next_doc_id by 1, so to mark a sync operation */ - if (cache->next_doc_id < cache->synced_doc_id + 1) { + if (cache->next_doc_id <= cache->synced_doc_id) { cache->next_doc_id = cache->synced_doc_id + 1; } mutex_exit(&cache->doc_id_lock); @@ -6665,7 +6665,6 @@ fts_rename_aux_tables_to_hex_format( "All the fts index associated with the table are " "marked as corrupted. Please rebuild the " "index again.", parent_table->name); - fts_sql_rollback(trx_rename); /* Corrupting the fts index related to parent table. */ trx_t* trx_corrupt; @@ -7042,7 +7041,27 @@ fts_check_and_drop_orphaned_tables( /* If the aux table is in decimal format, we should rename it, so push it to aux_tables_to_rename */ if (!drop && rename) { - ib_vector_push(aux_tables_to_rename, aux_table); + /* It is necessary to check that the table with + this name is missing in the vector - otherwise it + can be renamed twice: */ + bool rename_table = true; + for (ulint count = 0; + count < ib_vector_size(aux_tables_to_rename); + count++) { + fts_aux_table_t* rename_aux = + static_cast( + ib_vector_get(aux_tables_to_rename, + count)); + if (strcmp(rename_aux->name, + aux_table->name) == 0) { + rename_table = false; + break; + } + } + if (rename_table) { + ib_vector_push(aux_tables_to_rename, + aux_table); + } } if (i + 1 < ib_vector_size(tables)) { diff --git a/storage/xtradb/fts/fts0fts.cc b/storage/xtradb/fts/fts0fts.cc index 5981c24c470..d5128955f56 100644 --- a/storage/xtradb/fts/fts0fts.cc +++ b/storage/xtradb/fts/fts0fts.cc @@ -2761,7 +2761,7 @@ retry: mutex_enter(&cache->doc_id_lock); /* For each sync operation, we will add next_doc_id by 1, so to mark a sync operation */ - if (cache->next_doc_id < cache->synced_doc_id + 1) { + if (cache->next_doc_id <= cache->synced_doc_id) { cache->next_doc_id = cache->synced_doc_id + 1; } mutex_exit(&cache->doc_id_lock); @@ -6664,7 +6664,6 @@ fts_rename_aux_tables_to_hex_format( "All the fts index associated with the table are " "marked as corrupted. Please rebuild the " "index again.", parent_table->name); - fts_sql_rollback(trx_rename); /* Corrupting the fts index related to parent table. */ trx_t* trx_corrupt; @@ -7041,7 +7040,27 @@ fts_check_and_drop_orphaned_tables( /* If the aux table is in decimal format, we should rename it, so push it to aux_tables_to_rename */ if (!drop && rename) { - ib_vector_push(aux_tables_to_rename, aux_table); + /* It is necessary to check that the table with + this name is missing in the vector - otherwise it + can be renamed twice: */ + bool rename_table = true; + for (ulint count = 0; + count < ib_vector_size(aux_tables_to_rename); + count++) { + fts_aux_table_t* rename_aux = + static_cast( + ib_vector_get(aux_tables_to_rename, + count)); + if (strcmp(rename_aux->name, + aux_table->name) == 0) { + rename_table = false; + break; + } + } + if (rename_table) { + ib_vector_push(aux_tables_to_rename, + aux_table); + } } if (i + 1 < ib_vector_size(tables)) { From 865237e5af9e07ceabaadd1ba4cf327eeba0bb4f Mon Sep 17 00:00:00 2001 From: Sachin Date: Mon, 1 Oct 2018 15:15:34 +0530 Subject: [PATCH 02/15] Fix rpl_parallel_optimistic_nobinlog failure on binlog --- mysql-test/suite/rpl/t/rpl_parallel_optimistic_nobinlog.cnf | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/suite/rpl/t/rpl_parallel_optimistic_nobinlog.cnf b/mysql-test/suite/rpl/t/rpl_parallel_optimistic_nobinlog.cnf index 0ea0d951568..b85a84f6625 100644 --- a/mysql-test/suite/rpl/t/rpl_parallel_optimistic_nobinlog.cnf +++ b/mysql-test/suite/rpl/t/rpl_parallel_optimistic_nobinlog.cnf @@ -5,5 +5,6 @@ log-slave-updates=0 loose-innodb [mysqld.2] +slave-transaction-retries=100 log-slave-updates=0 loose-innodb From 15803fce92a9e3ec7daab79d21990b499b1a709e Mon Sep 17 00:00:00 2001 From: Eugene Kosov Date: Fri, 28 Sep 2018 19:57:06 +0300 Subject: [PATCH 03/15] MDEV-17313 Data race in ib_counter_t ib_counter_t: make all reads/writes to m_counter relaxed atomical --- storage/innobase/include/ut0counter.h | 46 ++++++++++++++++----------- storage/xtradb/include/ut0counter.h | 46 ++++++++++++++++----------- 2 files changed, 54 insertions(+), 38 deletions(-) diff --git a/storage/innobase/include/ut0counter.h b/storage/innobase/include/ut0counter.h index edc0db3b03d..6fde8a7a638 100644 --- a/storage/innobase/include/ut0counter.h +++ b/storage/innobase/include/ut0counter.h @@ -32,6 +32,7 @@ Created 2012/04/12 by Sunny Bains #include #include "os0thread.h" #include "os0sync.h" +#include "my_atomic.h" /** Default number of slots to use in ib_counter_t */ #define IB_N_SLOTS 64 @@ -81,8 +82,8 @@ struct thread_id_indexer_t : public generic_indexer_t { } }; -/** Class for using fuzzy counters. The counter is not protected by any -mutex and the results are not guaranteed to be 100% accurate but close +/** Class for using fuzzy counters. The counter is relaxed atomic +so the results are not guaranteed to be 100% accurate but close enough. Creates an array of counters and separates each element by the CACHE_LINE_SIZE bytes */ template < @@ -91,20 +92,6 @@ template < template class Indexer = thread_id_indexer_t> struct MY_ALIGNED(CACHE_LINE_SIZE) ib_counter_t { -#ifdef UNIV_DEBUG - ~ib_counter_t() - { - size_t n = (CACHE_LINE_SIZE / sizeof(Type)); - - /* Check that we aren't writing outside our defined bounds. */ - for (size_t i = 0; i < UT_ARR_SIZE(m_counter); i += n) { - for (size_t j = 1; j < n - 1; ++j) { - ut_ad(m_counter[i + j] == 0); - } - } - } -#endif /* UNIV_DEBUG */ - /** Increment the counter by 1. */ void inc() UNIV_NOTHROW { add(1); } @@ -124,15 +111,36 @@ struct MY_ALIGNED(CACHE_LINE_SIZE) ib_counter_t ut_ad(i < UT_ARR_SIZE(m_counter)); - m_counter[i] += n; + if (sizeof(Type) == 8) { + my_atomic_add64_explicit( + reinterpret_cast(&m_counter[i]), + static_cast(n), MY_MEMORY_ORDER_RELAXED); + } else if (sizeof(Type) == 4) { + my_atomic_add32_explicit( + reinterpret_cast(&m_counter[i]), + static_cast(n), MY_MEMORY_ORDER_RELAXED); + } + compile_time_assert(sizeof(Type) == 8 || sizeof(Type) == 4); } - /* @return total value - not 100% accurate, since it is not atomic. */ + /* @return total value - not 100% accurate, since it is relaxed atomic. */ operator Type() const UNIV_NOTHROW { Type total = 0; for (size_t i = 0; i < N; ++i) { - total += m_counter[m_policy.offset(i)]; + if (sizeof(Type) == 8) { + total += static_cast< + Type>(my_atomic_load64_explicit( + reinterpret_cast(const_cast( + &m_counter[m_policy.offset(i)])), + MY_MEMORY_ORDER_RELAXED)); + } else if (sizeof(Type) == 4) { + total += static_cast< + Type>(my_atomic_load32_explicit( + reinterpret_cast(const_cast( + &m_counter[m_policy.offset(i)])), + MY_MEMORY_ORDER_RELAXED)); + } } return(total); diff --git a/storage/xtradb/include/ut0counter.h b/storage/xtradb/include/ut0counter.h index edc0db3b03d..6fde8a7a638 100644 --- a/storage/xtradb/include/ut0counter.h +++ b/storage/xtradb/include/ut0counter.h @@ -32,6 +32,7 @@ Created 2012/04/12 by Sunny Bains #include #include "os0thread.h" #include "os0sync.h" +#include "my_atomic.h" /** Default number of slots to use in ib_counter_t */ #define IB_N_SLOTS 64 @@ -81,8 +82,8 @@ struct thread_id_indexer_t : public generic_indexer_t { } }; -/** Class for using fuzzy counters. The counter is not protected by any -mutex and the results are not guaranteed to be 100% accurate but close +/** Class for using fuzzy counters. The counter is relaxed atomic +so the results are not guaranteed to be 100% accurate but close enough. Creates an array of counters and separates each element by the CACHE_LINE_SIZE bytes */ template < @@ -91,20 +92,6 @@ template < template class Indexer = thread_id_indexer_t> struct MY_ALIGNED(CACHE_LINE_SIZE) ib_counter_t { -#ifdef UNIV_DEBUG - ~ib_counter_t() - { - size_t n = (CACHE_LINE_SIZE / sizeof(Type)); - - /* Check that we aren't writing outside our defined bounds. */ - for (size_t i = 0; i < UT_ARR_SIZE(m_counter); i += n) { - for (size_t j = 1; j < n - 1; ++j) { - ut_ad(m_counter[i + j] == 0); - } - } - } -#endif /* UNIV_DEBUG */ - /** Increment the counter by 1. */ void inc() UNIV_NOTHROW { add(1); } @@ -124,15 +111,36 @@ struct MY_ALIGNED(CACHE_LINE_SIZE) ib_counter_t ut_ad(i < UT_ARR_SIZE(m_counter)); - m_counter[i] += n; + if (sizeof(Type) == 8) { + my_atomic_add64_explicit( + reinterpret_cast(&m_counter[i]), + static_cast(n), MY_MEMORY_ORDER_RELAXED); + } else if (sizeof(Type) == 4) { + my_atomic_add32_explicit( + reinterpret_cast(&m_counter[i]), + static_cast(n), MY_MEMORY_ORDER_RELAXED); + } + compile_time_assert(sizeof(Type) == 8 || sizeof(Type) == 4); } - /* @return total value - not 100% accurate, since it is not atomic. */ + /* @return total value - not 100% accurate, since it is relaxed atomic. */ operator Type() const UNIV_NOTHROW { Type total = 0; for (size_t i = 0; i < N; ++i) { - total += m_counter[m_policy.offset(i)]; + if (sizeof(Type) == 8) { + total += static_cast< + Type>(my_atomic_load64_explicit( + reinterpret_cast(const_cast( + &m_counter[m_policy.offset(i)])), + MY_MEMORY_ORDER_RELAXED)); + } else if (sizeof(Type) == 4) { + total += static_cast< + Type>(my_atomic_load32_explicit( + reinterpret_cast(const_cast( + &m_counter[m_policy.offset(i)])), + MY_MEMORY_ORDER_RELAXED)); + } } return(total); From 84a24d36d844841ba12ae93f708785ee63635336 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Wed, 3 Oct 2018 08:49:57 +0300 Subject: [PATCH 04/15] MDEV-17357: Test failure on galera.galera_pc_ignore_sb Add wait until cluster has correct number of nodes. --- mysql-test/suite/galera/disabled.def | 2 +- .../suite/galera/r/galera_pc_ignore_sb.result | 6 +++++- .../suite/galera/t/galera_pc_ignore_sb.test | 20 ++++++++++++------- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index 92e45cc0f25..9a686b560b2 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -33,4 +33,4 @@ galera_gc_fc_limit : MDEV-17061 Test failure on galera.galera_gc_fc_limit partition : MDEV-13881 galera.partition failed in buildbot with wrong result galera_as_slave_replication_budle : MDEV-15785 Test case galera_as_slave_replication_bundle caused debug assertion galera_wan : MDEV-17259: Test failure on galera.galera_wan - +galera_pic_ignore_sb : MDEV-17357 Test failure on galera.galera_pc_ignore_sb diff --git a/mysql-test/suite/galera/r/galera_pc_ignore_sb.result b/mysql-test/suite/galera/r/galera_pc_ignore_sb.result index 5fcccfe2d59..81892a6cb38 100644 --- a/mysql-test/suite/galera/r/galera_pc_ignore_sb.result +++ b/mysql-test/suite/galera/r/galera_pc_ignore_sb.result @@ -1,4 +1,6 @@ -SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true'; +SET @wsrep_cluster_address_orig = @@GLOBAL.wsrep_cluster_address; +SET @wsrep_provider_options_orig = @@GLOBAL.wsrep_provider_options; +SET GLOBAL wsrep_provider_options ='pc.ignore_sb=true'; Killing server ... CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); @@ -10,3 +12,5 @@ SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABL VARIABLE_VALUE = 'ON' 1 SET GLOBAL wsrep_cluster_address = ''; +SET GLOBAL wsrep_cluster_address = @wsrep_cluster_address_orig; +SET GLOBAL wsrep_provider_options = @wsrep_provider_options_orig; diff --git a/mysql-test/suite/galera/t/galera_pc_ignore_sb.test b/mysql-test/suite/galera/t/galera_pc_ignore_sb.test index f24ca5cd25b..6ae2079577f 100644 --- a/mysql-test/suite/galera/t/galera_pc_ignore_sb.test +++ b/mysql-test/suite/galera/t/galera_pc_ignore_sb.test @@ -11,10 +11,13 @@ --source include/auto_increment_offset_save.inc --connection node_1 ---let $wsrep_cluster_address_orig = `SELECT @@wsrep_cluster_address` ---let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options` +SET @wsrep_cluster_address_orig = @@GLOBAL.wsrep_cluster_address; +SET @wsrep_provider_options_orig = @@GLOBAL.wsrep_provider_options; -SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true'; +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' +--source include/wait_condition.inc + +SET GLOBAL wsrep_provider_options ='pc.ignore_sb=true'; --connection node_2 --source include/kill_galera.inc @@ -33,14 +36,17 @@ SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABL # Reset the master and restart the slave so that post-test checks can run SET GLOBAL wsrep_cluster_address = ''; ---disable_query_log ---eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_orig'; ---eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_orig'; ---enable_query_log +SET GLOBAL wsrep_cluster_address = @wsrep_cluster_address_orig; --connection node_2 --source include/start_mysqld.inc +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' +--source include/wait_condition.inc + +--connection node_1 +SET GLOBAL wsrep_provider_options = @wsrep_provider_options_orig; + # Restore original auto_increment_offset values. --source include/auto_increment_offset_restore.inc From e2a1c58582ac25af0af0621a2c32d822a5e9cecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Wed, 3 Oct 2018 08:58:23 +0300 Subject: [PATCH 05/15] Fix test failure on wsrep.variables SLES11 can't build currently latest Galera library version. --- mysql-test/suite/wsrep/t/variables.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/suite/wsrep/t/variables.test b/mysql-test/suite/wsrep/t/variables.test index 15104b9b654..1a2ab2579a5 100644 --- a/mysql-test/suite/wsrep/t/variables.test +++ b/mysql-test/suite/wsrep/t/variables.test @@ -30,7 +30,7 @@ CALL mtr.add_suppression("WSREP: Could not open saved state file for reading.*") --disable_result_log --disable_query_log eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER'; ---let $galera_version=25.3.17 +--let $galera_version=25.3.24 source include/check_galera_version.inc; --enable_result_log --enable_query_log From 391b7f5bd190c3fcbaedf1128a6bc3e7f9981efe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Thu, 4 Oct 2018 08:04:55 +0300 Subject: [PATCH 06/15] Fix typo. --- mysql-test/suite/galera/disabled.def | 2 +- mysql-test/suite/galera/t/galera_pc_ignore_sb.test | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index 9a686b560b2..464ed6444f9 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -33,4 +33,4 @@ galera_gc_fc_limit : MDEV-17061 Test failure on galera.galera_gc_fc_limit partition : MDEV-13881 galera.partition failed in buildbot with wrong result galera_as_slave_replication_budle : MDEV-15785 Test case galera_as_slave_replication_bundle caused debug assertion galera_wan : MDEV-17259: Test failure on galera.galera_wan -galera_pic_ignore_sb : MDEV-17357 Test failure on galera.galera_pc_ignore_sb +galera_pc_ignore_sb : MDEV-17357 Test failure on galera.galera_pc_ignore_sb diff --git a/mysql-test/suite/galera/t/galera_pc_ignore_sb.test b/mysql-test/suite/galera/t/galera_pc_ignore_sb.test index 6ae2079577f..c48ddc66bdf 100644 --- a/mysql-test/suite/galera/t/galera_pc_ignore_sb.test +++ b/mysql-test/suite/galera/t/galera_pc_ignore_sb.test @@ -41,10 +41,11 @@ SET GLOBAL wsrep_cluster_address = @wsrep_cluster_address_orig; --connection node_2 --source include/start_mysqld.inc + +--connection node_1 --let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' --source include/wait_condition.inc ---connection node_1 SET GLOBAL wsrep_provider_options = @wsrep_provider_options_orig; # Restore original auto_increment_offset values. From 6c29544c20968bad607456dc94c4fd5bd787e9f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Thu, 4 Oct 2018 08:05:50 +0300 Subject: [PATCH 07/15] Enable for staging tree. --- mysql-test/suite/galera/disabled.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index 464ed6444f9..efd02a14fec 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -33,4 +33,4 @@ galera_gc_fc_limit : MDEV-17061 Test failure on galera.galera_gc_fc_limit partition : MDEV-13881 galera.partition failed in buildbot with wrong result galera_as_slave_replication_budle : MDEV-15785 Test case galera_as_slave_replication_bundle caused debug assertion galera_wan : MDEV-17259: Test failure on galera.galera_wan -galera_pc_ignore_sb : MDEV-17357 Test failure on galera.galera_pc_ignore_sb +#galera_pc_ignore_sb : MDEV-17357 Test failure on galera.galera_pc_ignore_sb From e855912733287d496cb2f429c8019005aaac9d0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Thu, 4 Oct 2018 13:29:29 +0300 Subject: [PATCH 08/15] Test by reverting MDEV-16656: DROP DATABASE crashes the Galera Cluster --- mysql-test/suite/galera/disabled.def | 3 ++- storage/innobase/fts/fts0fts.cc | 25 +++---------------------- storage/xtradb/fts/fts0fts.cc | 25 +++---------------------- 3 files changed, 8 insertions(+), 45 deletions(-) diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index efd02a14fec..603031f52b7 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -33,4 +33,5 @@ galera_gc_fc_limit : MDEV-17061 Test failure on galera.galera_gc_fc_limit partition : MDEV-13881 galera.partition failed in buildbot with wrong result galera_as_slave_replication_budle : MDEV-15785 Test case galera_as_slave_replication_bundle caused debug assertion galera_wan : MDEV-17259: Test failure on galera.galera_wan -#galera_pc_ignore_sb : MDEV-17357 Test failure on galera.galera_pc_ignore_sb +galera_pc_ignore_sb : MDEV-17357 Test failure on galera.galera_pc_ignore_sb +galera_drop_database : test diff --git a/storage/innobase/fts/fts0fts.cc b/storage/innobase/fts/fts0fts.cc index 04aaff96b91..a5b2bbb47ce 100644 --- a/storage/innobase/fts/fts0fts.cc +++ b/storage/innobase/fts/fts0fts.cc @@ -2762,7 +2762,7 @@ retry: mutex_enter(&cache->doc_id_lock); /* For each sync operation, we will add next_doc_id by 1, so to mark a sync operation */ - if (cache->next_doc_id <= cache->synced_doc_id) { + if (cache->next_doc_id < cache->synced_doc_id + 1) { cache->next_doc_id = cache->synced_doc_id + 1; } mutex_exit(&cache->doc_id_lock); @@ -6665,6 +6665,7 @@ fts_rename_aux_tables_to_hex_format( "All the fts index associated with the table are " "marked as corrupted. Please rebuild the " "index again.", parent_table->name); + fts_sql_rollback(trx_rename); /* Corrupting the fts index related to parent table. */ trx_t* trx_corrupt; @@ -7041,27 +7042,7 @@ fts_check_and_drop_orphaned_tables( /* If the aux table is in decimal format, we should rename it, so push it to aux_tables_to_rename */ if (!drop && rename) { - /* It is necessary to check that the table with - this name is missing in the vector - otherwise it - can be renamed twice: */ - bool rename_table = true; - for (ulint count = 0; - count < ib_vector_size(aux_tables_to_rename); - count++) { - fts_aux_table_t* rename_aux = - static_cast( - ib_vector_get(aux_tables_to_rename, - count)); - if (strcmp(rename_aux->name, - aux_table->name) == 0) { - rename_table = false; - break; - } - } - if (rename_table) { - ib_vector_push(aux_tables_to_rename, - aux_table); - } + ib_vector_push(aux_tables_to_rename, aux_table); } if (i + 1 < ib_vector_size(tables)) { diff --git a/storage/xtradb/fts/fts0fts.cc b/storage/xtradb/fts/fts0fts.cc index d5128955f56..5981c24c470 100644 --- a/storage/xtradb/fts/fts0fts.cc +++ b/storage/xtradb/fts/fts0fts.cc @@ -2761,7 +2761,7 @@ retry: mutex_enter(&cache->doc_id_lock); /* For each sync operation, we will add next_doc_id by 1, so to mark a sync operation */ - if (cache->next_doc_id <= cache->synced_doc_id) { + if (cache->next_doc_id < cache->synced_doc_id + 1) { cache->next_doc_id = cache->synced_doc_id + 1; } mutex_exit(&cache->doc_id_lock); @@ -6664,6 +6664,7 @@ fts_rename_aux_tables_to_hex_format( "All the fts index associated with the table are " "marked as corrupted. Please rebuild the " "index again.", parent_table->name); + fts_sql_rollback(trx_rename); /* Corrupting the fts index related to parent table. */ trx_t* trx_corrupt; @@ -7040,27 +7041,7 @@ fts_check_and_drop_orphaned_tables( /* If the aux table is in decimal format, we should rename it, so push it to aux_tables_to_rename */ if (!drop && rename) { - /* It is necessary to check that the table with - this name is missing in the vector - otherwise it - can be renamed twice: */ - bool rename_table = true; - for (ulint count = 0; - count < ib_vector_size(aux_tables_to_rename); - count++) { - fts_aux_table_t* rename_aux = - static_cast( - ib_vector_get(aux_tables_to_rename, - count)); - if (strcmp(rename_aux->name, - aux_table->name) == 0) { - rename_table = false; - break; - } - } - if (rename_table) { - ib_vector_push(aux_tables_to_rename, - aux_table); - } + ib_vector_push(aux_tables_to_rename, aux_table); } if (i + 1 < ib_vector_size(tables)) { From 1655053ac1c0b175d860defa2819b29642f664a7 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Fri, 21 Sep 2018 16:04:16 +0400 Subject: [PATCH 09/15] MDEV-17200 - pthread_detach called for already detached threads pthread_detach_this_thread() was intended to be defined to something meaningful only on some ancient unixes, which don't have pthread_attr_setdetachstate() defined. Otherwise, on normal unixes, threads are created detached in the first place. This was broken in 0f01bf267680244ec488adaf65a42838756ed48e so that we started calling pthread_detach() for already detached threads. Intention was to detach aria checkpoint thread. However in 87007dc2f71634cc460271eb277ad851ec69c04b aria service threads were made joinable with appropriate handling, which makes breaking revision unneccessary. Revert remnants of 0f01bf267680244ec488adaf65a42838756ed48e, so that pthread_detach_this_thread() is meaningful only on some ancient unixes again. --- include/my_pthread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/my_pthread.h b/include/my_pthread.h index 6b830ca36d2..ae2f912f979 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -184,7 +184,7 @@ int pthread_cancel(pthread_t thread); #define pthread_key(T,V) pthread_key_t V #define my_pthread_getspecific_ptr(T,V) my_pthread_getspecific(T,(V)) #define my_pthread_setspecific_ptr(T,V) pthread_setspecific(T,(void*) (V)) -#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(tmp); } +#define pthread_detach_this_thread() #define pthread_handler_t EXTERNC void * typedef void *(* pthread_handler)(void *); From 1eca49577e979220f3ab663a7e46e0eb70d728c4 Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Sun, 7 Oct 2018 10:19:19 -0700 Subject: [PATCH 10/15] MDEV-17382 Hash join algorithm should not be used to join materialized derived table / view by equality Now rows of a materialized derived table are always put into a temporary table before join operation. If BNLH is used to join this table with the result of a partial join then both operands of the join are actually put into main memory. In most cases this is not efficient. We could avoid this by sending the rows of the derived table directly to the join operation. However this kind of data flow is not supported yet. Fixed by not allowing usage of hash join algorithm to join a materialized derived table if it's joined by an equality predicate of the form f=e where f is a field of the derived table. --- mysql-test/r/derived_opt.result | 35 ++++++++++++++++++++++++++- mysql-test/r/innodb_mrr_cpk.result | 2 +- mysql-test/t/derived_opt.test | 38 ++++++++++++++++++++++++++++++ sql/sql_select.cc | 8 +++++++ 4 files changed, 81 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/derived_opt.result b/mysql-test/r/derived_opt.result index 04a76c2cbc8..63d2c432768 100644 --- a/mysql-test/r/derived_opt.result +++ b/mysql-test/r/derived_opt.result @@ -499,9 +499,42 @@ where D1.a= t1.a; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 10 Using where -1 PRIMARY hash_ALL key0 #hash#key0 5 test.t1.a 100 Using join buffer (flat, BNLH join) +1 PRIMARY ref key0 key0 5 test.t1.a 10 2 DERIVED t2 ALL NULL NULL NULL NULL 100 Using filesort set join_cache_level=@tmp_jcl; set optimizer_switch=@tmp_os; drop table t1, t2; +# +# Bug mdev-17382: equi-join of derived table with join_cache_level=4 +# +CREATE TABLE t1 ( +id int NOT NULL, +amount decimal DEFAULT NULL, +PRIMARY KEY (id) +); +CREATE TABLE t2 ( +id int NOT NULL, +name varchar(50) DEFAULT NULL, +PRIMARY KEY (id) +); +INSERT INTO t1 VALUES +(1, 10.0000), (2, 20.0000), (3, 30.0000), (4, 40.0000), +(5, NULL), (6, NULL), (7, 70.0000), (8, 80.0000); +INSERT INTO t2 VALUES +(1,'A'), (2,'B'), (3,'C'), (4,'D'), (5, NULL), (6, NULL), +(7,'E'), (8,'F'), (9,'G'), (10,'H'), (11, NULL), (12, NULL); +set join_cache_level=4; +EXPLAIN +SELECT t2.id,t2.name,t.total_amt +FROM t2 +LEFT JOIN +(SELECT id, sum(amount) total_amt FROM t1 GROUP BY id) AS t +ON t2.id=t.id +WHERE t2.id < 3; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 range PRIMARY PRIMARY 4 NULL 3 Using index condition +1 PRIMARY ref key0 key0 5 test.t2.id 2 +2 DERIVED t1 ALL NULL NULL NULL NULL 8 Using temporary; Using filesort +set join_cache_level=default; +DROP TABLE t1,t2; set optimizer_switch=@exit_optimizer_switch; diff --git a/mysql-test/r/innodb_mrr_cpk.result b/mysql-test/r/innodb_mrr_cpk.result index 28d7dd51df8..a2e43d7d127 100644 --- a/mysql-test/r/innodb_mrr_cpk.result +++ b/mysql-test/r/innodb_mrr_cpk.result @@ -226,7 +226,7 @@ set join_cache_level=3; explain SELECT 1 FROM (SELECT url, id FROM t2 LIMIT 1 OFFSET 20) derived RIGHT JOIN t1 ON t1.id = derived.id; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL # -1 PRIMARY hash_ALL key0 #hash#key0 25 test.t1.id # Using join buffer (flat, BNLH join) +1 PRIMARY ref key0 key0 25 test.t1.id # 2 DERIVED t2 ALL NULL NULL NULL NULL # set join_cache_level= @tmp_mdev5037; drop table t0,t1,t2; diff --git a/mysql-test/t/derived_opt.test b/mysql-test/t/derived_opt.test index 7f19553e4e5..aab95f69f26 100644 --- a/mysql-test/t/derived_opt.test +++ b/mysql-test/t/derived_opt.test @@ -363,5 +363,43 @@ set join_cache_level=@tmp_jcl; set optimizer_switch=@tmp_os; drop table t1, t2; +--echo # +--echo # Bug mdev-17382: equi-join of derived table with join_cache_level=4 +--echo # + +CREATE TABLE t1 ( + id int NOT NULL, + amount decimal DEFAULT NULL, +PRIMARY KEY (id) +); + +CREATE TABLE t2 ( + id int NOT NULL, + name varchar(50) DEFAULT NULL, +PRIMARY KEY (id) +); + +INSERT INTO t1 VALUES +(1, 10.0000), (2, 20.0000), (3, 30.0000), (4, 40.0000), +(5, NULL), (6, NULL), (7, 70.0000), (8, 80.0000); + +INSERT INTO t2 VALUES +(1,'A'), (2,'B'), (3,'C'), (4,'D'), (5, NULL), (6, NULL), +(7,'E'), (8,'F'), (9,'G'), (10,'H'), (11, NULL), (12, NULL); + +set join_cache_level=4; + +EXPLAIN +SELECT t2.id,t2.name,t.total_amt + FROM t2 + LEFT JOIN + (SELECT id, sum(amount) total_amt FROM t1 GROUP BY id) AS t + ON t2.id=t.id + WHERE t2.id < 3; + +set join_cache_level=default; + +DROP TABLE t1,t2; + # The following command must be the last one the file set optimizer_switch=@exit_optimizer_switch; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index fa0be81ff3d..62f40eeb99c 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -11005,7 +11005,15 @@ uint check_join_cache_usage(JOIN_TAB *tab, effort now. */ if (tab->table->pos_in_table_list->is_materialized_derived()) + { no_bka_cache= true; + /* + Don't use hash join algorithm if the temporary table for the rows + of the derived table will be created with an equi-join key. + */ + if (tab->table->s->keys) + no_hashed_cache= true; + } /* Don't use join buffering if we're dictated not to by no_jbuf_after From f517d8c7425257b6b9fe81c82c489e1e5619898d Mon Sep 17 00:00:00 2001 From: Andrei Elkin Date: Tue, 2 Oct 2018 14:30:44 +0300 Subject: [PATCH 11/15] MDEV-17346 parallel slave start and stop races to workers disappeared The bug appears as a slave SQL thread hanging in rpl_parallel_thread_pool::get_thread() while there are no slave worker threads to awake it. The reason of the hang is that at the parallel slave worker pool activation the being stared SQL thread could read the worker pool size concurrently with pool deactivation. At reading the SQL thread did not employ necessary protection from a race. Fixed with making the SQL thread at the pool activation first to grab the same lock as potential deactivator also does prior to access the pool size. --- sql/rpl_parallel.cc | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/sql/rpl_parallel.cc b/sql/rpl_parallel.cc index 35cddee6d4d..8fef2d66635 100644 --- a/sql/rpl_parallel.cc +++ b/sql/rpl_parallel.cc @@ -1617,13 +1617,32 @@ int rpl_parallel_resize_pool_if_no_slaves(void) } +/** + Pool activation is preceeded by taking a "lock" of pool_mark_busy + which guarantees the number of running slaves drops to zero atomicly + with the number of pool workers. + This resolves race between the function caller thread and one + that may be attempting to deactivate the pool. +*/ int rpl_parallel_activate_pool(rpl_parallel_thread_pool *pool) { + int rc= 0; + + if ((rc= pool_mark_busy(pool, current_thd))) + return rc; // killed + if (!pool->count) - return rpl_parallel_change_thread_count(pool, opt_slave_parallel_threads, - 0); - return 0; + { + pool_mark_not_busy(pool); + rc= rpl_parallel_change_thread_count(pool, opt_slave_parallel_threads, + 0); + } + else + { + pool_mark_not_busy(pool); + } + return rc; } From 5b0b6660f6010dbd9fe8807af72ddba4d9b73781 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Tue, 9 Oct 2018 18:34:37 +0100 Subject: [PATCH 12/15] MDEV-17413 - Don't crash in my_malloc_size_cb_func() if thread specific memory is requested and current_thd is NULL. Leave DBUG_ASSERT() in place, to check in DBUG version. --- sql/mysqld.cc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 3dff49f5ccb..c2fdb5a4026 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3907,14 +3907,16 @@ static void my_malloc_size_cb_func(long long size, my_bool is_thread_specific) { THD *thd= current_thd; - if (is_thread_specific) /* If thread specific memory */ - { - /* - When thread specfic is set, both mysqld_server_initialized and thd - must be set - */ - DBUG_ASSERT(mysqld_server_initialized && thd); + /* + When thread specific is set, both mysqld_server_initialized and thd + must be set, and we check that with DBUG_ASSERT. + However, do not crash, if current_thd is NULL, in release version. + */ + DBUG_ASSERT(!is_thread_specific || (mysqld_server_initialized && thd)); + + if (is_thread_specific && likely(thd)) /* If thread specific memory */ + { DBUG_PRINT("info", ("thd memory_used: %lld size: %lld", (longlong) thd->status_var.local_memory_used, size)); From 3c3c4ae22545d3242a8b7c4f2bec3bf2d245890a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Wed, 10 Oct 2018 09:14:16 +0300 Subject: [PATCH 13/15] MDEV-17403: Test failure on galera.galera_enum Add wait on second node. --- mysql-test/suite/galera/r/galera_enum.result | 37 +++++++++++--------- mysql-test/suite/galera/t/galera_enum.test | 18 ++++++---- 2 files changed, 33 insertions(+), 22 deletions(-) diff --git a/mysql-test/suite/galera/r/galera_enum.result b/mysql-test/suite/galera/r/galera_enum.result index e853c5c9943..7b42aab264c 100644 --- a/mysql-test/suite/galera/r/galera_enum.result +++ b/mysql-test/suite/galera/r/galera_enum.result @@ -4,23 +4,23 @@ INSERT INTO t1 VALUES ('one'), ('two'); INSERT INTO t1 VALUES (0), (1), (2); Warnings: Warning 1265 Data truncated for column 'f1' at row 1 -SELECT COUNT(*) = 6 FROM t1; -COUNT(*) = 6 -1 -SELECT COUNT(*) = 2 FROM t1 where f1 = ''; -COUNT(*) = 2 -1 -SELECT COUNT(*) = 2 FROM t1 where f1 = 'one'; -COUNT(*) = 2 -1 +SELECT COUNT(*) FROM t1; +COUNT(*) +6 +SELECT COUNT(*) FROM t1 where f1 = ''; +COUNT(*) +2 +SELECT COUNT(*) FROM t1 where f1 = 'one'; +COUNT(*) +2 DROP TABLE t1; CREATE TABLE t1 (f1 ENUM('', 'one', 'two', 'three', 'four') PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (''), ('one'), ('two'); -SELECT COUNT(*) = 3 FROM t1; -COUNT(*) = 3 -1 -SELECT COUNT(*) = 1 FROM t1 WHERE f1 = ''; -COUNT(*) = 1 +SELECT COUNT(*) FROM t1; +COUNT(*) +3 +SELECT COUNT(*) FROM t1 WHERE f1 = ''; +COUNT(*) 1 SET AUTOCOMMIT=OFF; START TRANSACTION; @@ -31,7 +31,12 @@ UPDATE t1 SET f1 = 'four' where f1 = ''; COMMIT; COMMIT; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction -SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 'three'; -COUNT(*) = 1 +SELECT COUNT(*) FROM t1 WHERE f1 = 'three'; +COUNT(*) 1 +SELECT * FROM t1; +f1 +one +two +three DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/galera_enum.test b/mysql-test/suite/galera/t/galera_enum.test index ff5332486aa..782180a3aa1 100644 --- a/mysql-test/suite/galera/t/galera_enum.test +++ b/mysql-test/suite/galera/t/galera_enum.test @@ -17,9 +17,12 @@ INSERT INTO t1 VALUES ('one'), ('two'); INSERT INTO t1 VALUES (0), (1), (2); --connection node_2 -SELECT COUNT(*) = 6 FROM t1; -SELECT COUNT(*) = 2 FROM t1 where f1 = ''; -SELECT COUNT(*) = 2 FROM t1 where f1 = 'one'; +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t1'; +--source include/wait_condition.inc + +SELECT COUNT(*) FROM t1; +SELECT COUNT(*) FROM t1 where f1 = ''; +SELECT COUNT(*) FROM t1 where f1 = 'one'; DROP TABLE t1; @@ -33,8 +36,10 @@ CREATE TABLE t1 (f1 ENUM('', 'one', 'two', 'three', 'four') PRIMARY KEY) ENGINE= INSERT INTO t1 VALUES (''), ('one'), ('two'); --connection node_2 -SELECT COUNT(*) = 3 FROM t1; -SELECT COUNT(*) = 1 FROM t1 WHERE f1 = ''; +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t1'; +--source include/wait_condition.inc +SELECT COUNT(*) FROM t1; +SELECT COUNT(*) FROM t1 WHERE f1 = ''; # Conflict @@ -57,6 +62,7 @@ COMMIT; --connection node_1 -SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 'three'; +SELECT COUNT(*) FROM t1 WHERE f1 = 'three'; +SELECT * FROM t1; DROP TABLE t1; From 8d116d1686de3086b4b85d149e8ef0a4fdd3ad0d Mon Sep 17 00:00:00 2001 From: Sergei Petrunia Date: Wed, 10 Oct 2018 14:39:57 +0300 Subject: [PATCH 14/15] MDEV-17181: rocksdb.allow_to_start_after_corruption fails on current 10.2 The test needs to be run with rocksdb_flush_log_at_trx_commit=1, otherwise the changes do not survive a crash. --- .../rocksdb/t/allow_to_start_after_corruption-master.opt | 1 + 1 file changed, 1 insertion(+) create mode 100644 storage/rocksdb/mysql-test/rocksdb/t/allow_to_start_after_corruption-master.opt diff --git a/storage/rocksdb/mysql-test/rocksdb/t/allow_to_start_after_corruption-master.opt b/storage/rocksdb/mysql-test/rocksdb/t/allow_to_start_after_corruption-master.opt new file mode 100644 index 00000000000..70c120604f6 --- /dev/null +++ b/storage/rocksdb/mysql-test/rocksdb/t/allow_to_start_after_corruption-master.opt @@ -0,0 +1 @@ +--rocksdb_flush_log_at_trx_commit=1 From 940f0c78a4c45536ddede5aaeeebcf36bda53251 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 10 Oct 2018 14:10:29 +0300 Subject: [PATCH 15/15] MDEV-11487: Make row_ins_index_entry_set_vals() static --- storage/innobase/include/row0ins.h | 10 ---------- storage/innobase/row/row0ins.cc | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/storage/innobase/include/row0ins.h b/storage/innobase/include/row0ins.h index b0b9ccd271b..a7320f9ed03 100644 --- a/storage/innobase/include/row0ins.h +++ b/storage/innobase/include/row0ins.h @@ -127,16 +127,6 @@ row_ins_sec_index_entry_low( /*!< in: if true, just do duplicate check and return. don't execute actual insert. */ MY_ATTRIBUTE((warn_unused_result)); -/** Sets the values of the dtuple fields in entry from the values of appropriate -columns in row. -@param[in] index index handler -@param[out] entry index entry to make -@param[in] row row */ -dberr_t -row_ins_index_entry_set_vals( - const dict_index_t* index, - dtuple_t* entry, - const dtuple_t* row); /***************************************************************//** Inserts an entry into a clustered index. Tries first optimistic, diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc index 39c219ee067..4423ec90dff 100644 --- a/storage/innobase/row/row0ins.cc +++ b/storage/innobase/row/row0ins.cc @@ -3330,8 +3330,8 @@ columns in row. @param[in] index index handler @param[out] entry index entry to make @param[in] row row - @return DB_SUCCESS if the set is successful */ +static dberr_t row_ins_index_entry_set_vals( const dict_index_t* index,