revision-id: 9808e23a7aceeea69112fe8b6bf54460ecf4bb65 (mariadb-galera-10.0.35-21-g9808e23a7ac) parent(s): 3f0cd66a2bf5a1addfa2b020305ebc4e93ce51d1 author: Jan Lindström committer: Jan Lindström timestamp: 2018-08-03 13:44:30 +0300 message: MariaDB adjustments. --- mysql-test/suite/galera/disabled.def | 1 + sql/wsrep_mysqld.cc | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index fad1e69d4d7..bb5bd04c1f1 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -51,3 +51,4 @@ galera_admin : MDEV-13549 Galera test failures MW-416 : MDEV-13549 Galera test failures galera_wan : MDEV-13549 Galera test failures MW-388 : MDEV-13549 Galera test failures +galera#505 : Requires galera library version 25.3.24 diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 91dbe75408a..bfd22ff1900 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -538,6 +538,9 @@ int wsrep_init() wsrep->provider_vendor, sizeof(provider_vendor) - 1); } + if (!wsrep_data_home_dir || strlen(wsrep_data_home_dir) == 0) + wsrep_data_home_dir = mysql_real_data_home; + char node_addr[512]= { 0, }; size_t const node_addr_max= sizeof(node_addr) - 1; if (!wsrep_node_address || !strcmp(wsrep_node_address, "")) @@ -933,9 +936,15 @@ static bool wsrep_prepare_key_for_isolation(const char* db, wsrep_key_arr_t* ka) { wsrep_key_t* tmp; - tmp= (wsrep_key_t*)my_realloc(ka->keys, - (ka->keys_len + 1) * sizeof(wsrep_key_t), - MYF(0)); + + if (!ka->keys) + tmp= (wsrep_key_t*)my_malloc((ka->keys_len + 1) * sizeof(wsrep_key_t), + MYF(0)); + else + tmp= (wsrep_key_t*)my_realloc(ka->keys, + (ka->keys_len + 1) * sizeof(wsrep_key_t), + MYF(0)); + if (!tmp) { WSREP_ERROR("Can't allocate memory for key_array"); @@ -1410,6 +1419,9 @@ static int wsrep_TOI_begin(THD *thd, char *db_, char *table_, case SQLCOM_ALTER_EVENT: buf_err= wsrep_alter_event_query(thd, &buf, &buf_len); break; + case SQLCOM_DROP_TABLE: + buf_err= wsrep_drop_table_query(thd, &buf, &buf_len); + break; case SQLCOM_CREATE_ROLE: if (sp_process_definer(thd)) {