[Commits] add854675e8: Merge remote-tracking branch 'wsrep/10.4-wsrep_api-26' into bb-10.4-galera4
revision-id: add854675e869e0e2f7bb84b9ac808a9daaf50ed (mariadb-10.3.6-195-gadd854675e8) parent(s): 00ce1cb01badf4c5f8101c7791ddea316f288905 f7b00db9aa6db323825034c040f32cf2098f1e9a author: Jan Lindström committer: Jan Lindström timestamp: 2018-11-23 14:13:07 +0200 message: Merge remote-tracking branch 'wsrep/10.4-wsrep_api-26' into bb-10.4-galera4 include/mysql/service_wsrep.h | 3 + include/wsrep.h | 1 - mysql-test/suite/galera/disabled.def | 4 + mysql-test/suite/galera/r/MW-286.result | 2 + mysql-test/suite/galera/r/MW-328A.result | 7 + mysql-test/suite/galera/r/galera_kill_ddl.result | 1 + .../suite/galera/r/galera_kill_largechanges.result | 1 + .../suite/galera/r/galera_kill_smallchanges.result | 1 + mysql-test/suite/galera/r/galera_roles.result | 2 + .../galera/r/galera_var_reject_queries.result | 1 - mysql-test/suite/galera/r/galera_wan.result | 4 + mysql-test/suite/galera/r/mysql-wsrep#332.result | 42 +++++- mysql-test/suite/galera/r/versioning_trx_id.result | 2 + mysql-test/suite/galera/suite.pm | 4 +- .../suite/galera/t/galera_var_reject_queries.test | 7 +- mysql-test/suite/galera/t/mysql-wsrep#332.test | 2 +- .../galera_3nodes/r/galera_wsrep_schema.result | 1 + .../suite/galera_3nodes/t/galera_pc_weight.test | 10 -- mysql-test/suite/galera_3nodes_sr/t/GCF-606.test | 2 +- sql/mysqld.cc | 2 +- sql/sql_class.cc | 13 -- sql/sql_parse.cc | 1 - sql/sql_plugin_services.ic | 1 + sql/sql_trigger.cc | 3 +- sql/table_cache.cc | 36 ++--- sql/wsrep_applier.cc | 6 + sql/wsrep_client_service.cc | 2 +- sql/wsrep_mysqld.cc | 77 ++++++---- sql/wsrep_priv.h | 4 +- sql/wsrep_schema.cc | 165 +++++++++++---------- sql/wsrep_schema.h | 2 +- sql/wsrep_server_service.cc | 18 +++ sql/wsrep_server_service.h | 2 + sql/wsrep_server_state.cc | 4 - sql/wsrep_server_state.h | 2 - sql/wsrep_sst.cc | 82 +++++++--- sql/wsrep_var.cc | 53 +------ storage/innobase/handler/ha_innodb.cc | 11 +- wsrep-lib | 2 +- 39 files changed, 326 insertions(+), 257 deletions(-) diff --cc include/wsrep.h index 03dd8f4fd0e,fb6e50fad55..a3dbe20212a --- a/include/wsrep.h +++ b/include/wsrep.h @@@ -69,7 -68,8 +69,6 @@@ //#define WSREP_WARN(...) #define WSREP_ERROR(...) #define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) do { } while(0) - //#define WSREP_TO_ISOLATION_END -#define WSREP_TO_ISOLATION_BEGIN_ALTER(db_, table_, table_list_, alter_info_) -#define WSREP_TO_ISOLATION_END #define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_) #define WSREP_SYNC_WAIT(thd_, before_) #endif /* WITH_WSREP */ diff --cc mysql-test/suite/galera_3nodes/t/galera_pc_weight.test index 575f84d1f32,729f14a731f..3b145f2b7ac --- a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test +++ b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test @@@ -69,18 -69,28 +69,8 @@@ SELECT VARIABLE_VALUE = 'ON' FROM INFOR SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state'; SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; - # wait for nodes 2 and 3 to reconnect -SET GLOBAL wsrep_provider_options = 'pc.weight=1'; SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight'; - -# Resume cluster connectivity on node_1 ---connection node_1 -SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0'; - ---let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' ---source include/wait_condition.inc -- ----connection node_2 - --source include/galera_wait_ready.inc ---source include/wait_condition.inc -- ----connection node_3 - --source include/galera_wait_ready.inc ---source include/wait_condition.inc -- ----connection node_1 - --source include/galera_wait_ready.inc ---source include/wait_condition.inc - -# On all nodes, we now expect a Primary component of size 3, weight 3, Synced and ready SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; -SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight'; SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected'; SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'; diff --cc sql/sql_parse.cc index cf074d91c2e,dd710439170..0567cec72b4 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@@ -7976,10 -7976,8 +7976,9 @@@ static bool wsrep_mysql_parse(THD *thd "WAIT_FOR wsrep_retry_autocommit_continue"; DBUG_ASSERT(!debug_sync_set_action(thd, STRING_WITH_LEN(act))); }); - mysql_parse(thd, rawbuf, length, parser_state, is_com_multi, is_next_command); + WSREP_DEBUG("Retry autocommit query: %s", thd->query()); + mysql_parse(thd, rawbuf, length, parser_state, is_com_multi, is_next_command); - /* Convert all ER_QUERY_INTERRUPTED errors to ER_LOCK_DEADLOCK if the transaction was BF aborted. This can happen when the diff --cc sql/wsrep_server_state.cc index b2217148586,51d94d28226..eef6cc5e893 --- a/sql/wsrep_server_state.cc +++ b/sql/wsrep_server_state.cc @@@ -18,15 -18,11 +18,14 @@@ #include "wsrep_server_state.h" mysql_mutex_t LOCK_wsrep_server_state; -PSI_mutex_key key_LOCK_wsrep_server_state; mysql_cond_t COND_wsrep_server_state; + +#ifdef HAVE_PSI_INTERFACE +PSI_mutex_key key_LOCK_wsrep_server_state; PSI_cond_key key_COND_wsrep_server_state; +#endif Wsrep_server_state::Wsrep_server_state(const std::string& name, - const std::string& id, const std::string& incoming_address, const std::string& address, const std::string& working_dir, diff --cc storage/innobase/handler/ha_innodb.cc index 99f74d451e2,635dbe81d92..f55f14f795c --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@@ -18512,13 -18512,15 +18512,14 @@@ wsrep_innobase_kill_one_trx DBUG_RETURN(1); } WSREP_LOG_CONFLICT((const void*)bf_thd, (const void*)thd, TRUE); -- wsrep_thd_LOCK(thd); - WSREP_DEBUG("BF kill (%lu, seqno: %lld), victim: (%lu) trx: %llu", - signal, (long long)bf_seqno, thd_get_thread_id(thd), - (long long)victim_trx->id); + WSREP_DEBUG("BF kill (" ULINTPF ", seqno: " INT64PF + "), victim: (%lu) trx: " TRX_ID_FMT, + signal, bf_seqno, + thd_get_thread_id(thd), + victim_trx->id); - WSREP_DEBUG("Aborting query: %s conf %s trx: %lld", + WSREP_DEBUG("Aborting query: %s conf %s trx: %" PRId64, (thd && wsrep_thd_query(thd)) ? wsrep_thd_query(thd) : "void", wsrep_thd_transaction_state_str(thd), wsrep_thd_transaction_id(thd));
participants (1)
-
jan