mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed failures for privilege_table_io and wsrep_cluster_address_basic
- Sometimes privilege_table_io printed double rows of roles_mapping - Fixed by forcing restart of server when running test - Wsrep_cluster_address_basic failed in some combinations because wsrep_cluster_address was set to NULL - Fixed by ensuring it's never set to NULL, only empty string
This commit is contained in:
@ -1,7 +1,10 @@
|
||||
# Tests for PERFORMANCE_SCHEMA table io
|
||||
# This test makes a restart because without it, events_waits_history_long
|
||||
# sometimes contains duplicated entries of roles_mapping.
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
--source include/restart_mysqld.inc
|
||||
--source ../include/table_io_setup_helper.inc
|
||||
|
||||
# Remove "deleted" records from mysql.db that may come from previous tests,
|
||||
|
@ -805,7 +805,7 @@ void wsrep_init_startup (bool first)
|
||||
(wsrep_on_fun)wsrep_on);
|
||||
|
||||
/* Skip replication start if no cluster address */
|
||||
if (!wsrep_cluster_address || strlen(wsrep_cluster_address) == 0) return;
|
||||
if (!wsrep_cluster_address || wsrep_cluster_address[0] == 0) return;
|
||||
|
||||
if (first) wsrep_sst_grab(); // do it so we can wait for SST below
|
||||
|
||||
@ -918,7 +918,7 @@ bool wsrep_start_replication()
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!wsrep_cluster_address || strlen(wsrep_cluster_address)== 0)
|
||||
if (!wsrep_cluster_address || wsrep_cluster_address[0]== 0)
|
||||
{
|
||||
// if provider is non-trivial, but no address is specified, wait for address
|
||||
wsrep_ready_set(FALSE);
|
||||
|
@ -359,11 +359,11 @@ bool wsrep_cluster_address_check (sys_var *self, THD* thd, set_var* var)
|
||||
(var->save_result.string_value.length > (FN_REFLEN - 1))) // safety
|
||||
goto err;
|
||||
|
||||
memcpy(addr_buf, var->save_result.string_value.str,
|
||||
var->save_result.string_value.length);
|
||||
addr_buf[var->save_result.string_value.length]= 0;
|
||||
strmake(addr_buf, var->save_result.string_value.str,
|
||||
sizeof(addr_buf)-1);
|
||||
|
||||
if (!wsrep_cluster_address_verify(addr_buf)) return 0;
|
||||
if (!wsrep_cluster_address_verify(addr_buf))
|
||||
return 0;
|
||||
|
||||
err:
|
||||
my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), var->var->name.str,
|
||||
@ -421,8 +421,8 @@ void wsrep_cluster_address_init (const char* value)
|
||||
(wsrep_cluster_address) ? wsrep_cluster_address : "null",
|
||||
(value) ? value : "null");
|
||||
|
||||
if (wsrep_cluster_address) my_free ((void*)wsrep_cluster_address);
|
||||
wsrep_cluster_address = (value) ? my_strdup(value, MYF(0)) : NULL;
|
||||
my_free((void*) wsrep_cluster_address);
|
||||
wsrep_cluster_address= my_strdup(value ? value : "", MYF(0));
|
||||
}
|
||||
|
||||
/* wsrep_cluster_name cannot be NULL or an empty string. */
|
||||
|
Reference in New Issue
Block a user