Skip to content

Commit 9d91160

Browse files
author
Nirbhay Choubey
committed
Fixes for some test failures.
1 parent 4213263 commit 9d91160

File tree

12 files changed

+30
-22
lines changed

12 files changed

+30
-22
lines changed

mysql-test/include/mtr_warnings.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ INSERT INTO global_suppressions VALUES
234234
("WSREP: last inactive check more than .* skipping check"),
235235
("WSREP: Gap in state sequence. Need state transfer."),
236236
("WSREP: Failed to prepare for incremental state transfer: .*"),
237+
("WSREP: error executing 'SET GLOBAL innodb_disallow_writes=.*"),
238+
("WSREP: Failed to disallow InnoDB writes"),
237239
("THE_LAST_SUPPRESSION")||
238240

239241

mysql-test/r/mysqld--help.result

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,6 +1099,9 @@ The following options may be given as the first argument:
10991099
--wsrep-recover Recover database state after crash and exit
11001100
--wsrep-replicate-myisam
11011101
To enable myisam replication
1102+
--wsrep-restart-slave
1103+
Should MySQL slave be restarted automatically, when node
1104+
joins back to cluster
11021105
--wsrep-retry-autocommit=#
11031106
Max number of times to retry a failed autocommit
11041107
statement
@@ -1439,6 +1442,7 @@ wsrep-provider none
14391442
wsrep-provider-options
14401443
wsrep-recover FALSE
14411444
wsrep-replicate-myisam FALSE
1445+
wsrep-restart-slave FALSE
14421446
wsrep-retry-autocommit 1
14431447
wsrep-slave-threads 1
14441448
wsrep-sst-auth (No default value)

mysql-test/suite/galera/galera_2nodes.cnf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
[mysqld.1]
55
binlog-format=row
6-
wsrep_provider=/usr/lib/libgalera_smm.so
6+
wsrep_provider=/usr/lib/galera/libgalera_smm.so
77
wsrep_cluster_address='gcomm://'
88

99
[mysqld.2]
1010
binlog-format=row
11-
wsrep_provider=/usr/lib/libgalera_smm.so
11+
wsrep_provider=/usr/lib/galera/libgalera_smm.so
1212
wsrep_cluster_address='gcomm://127.0.0.1:4567'
1313
wsrep_provider_options='gmcast.listen_addr=tcp://127.0.0.1:4568'
1414

mysql-test/suite/sys_vars/r/all_vars.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ there should be *no* long test name listed below:
1010
select distinct variable_name as `there should be *no* variables listed below:` from t2
1111
left join t1 on variable_name=test_name where test_name is null;
1212
there should be *no* variables listed below:
13-
innodb_disallow_writes
1413
wsrep_auto_increment_control
1514
wsrep_causal_reads
1615
wsrep_certify_nonpk
@@ -38,6 +37,7 @@ wsrep_provider
3837
wsrep_provider_options
3938
wsrep_recover
4039
wsrep_replicate_myisam
40+
wsrep_restart_slave
4141
wsrep_retry_autocommit
4242
wsrep_slave_threads
4343
wsrep_sst_auth

mysql-test/suite/wsrep/r/variables.result

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ wsrep_provider #
4545
wsrep_provider_options #
4646
wsrep_recover #
4747
wsrep_replicate_myisam #
48+
wsrep_restart_slave #
4849
wsrep_retry_autocommit #
4950
wsrep_slave_threads #
5051
wsrep_sst_auth #
@@ -83,6 +84,7 @@ wsrep_provider #
8384
wsrep_provider_options #
8485
wsrep_recover #
8586
wsrep_replicate_myisam #
87+
wsrep_restart_slave #
8688
wsrep_retry_autocommit #
8789
wsrep_slave_threads #
8890
wsrep_sst_auth #
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--binlog-format=row --innodb_autoinc_lock_mode=2 --innodb_locks_unsafe_for_binlog=1 --wsrep-provider=/usr/lib/libgalera_smm.so --wsrep-cluster-address=gcomm:// --wsrep-on=1 --log-bin
1+
--binlog-format=row --innodb_autoinc_lock_mode=2 --innodb_locks_unsafe_for_binlog=1 --wsrep-provider=/usr/lib/galera/libgalera_smm.so --wsrep-cluster-address=gcomm:// --wsrep-on=1 --log-bin

sql/mysqld.cc

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3437,18 +3437,7 @@ pthread_handler_t signal_hand(void *arg __attribute__((unused)))
34373437
mysql_cond_broadcast(&COND_thread_count);
34383438
mysql_mutex_unlock(&LOCK_thread_count);
34393439

3440-
/*
3441-
Waiting for until mysqld_server_started != 0
3442-
to ensure that all server components has been successfully
3443-
initialized. This step is mandatory since signal processing
3444-
could be done safely only when all server components
3445-
has been initialized.
3446-
*/
3447-
mysql_mutex_lock(&LOCK_server_started);
3448-
while (!mysqld_server_started)
3449-
mysql_cond_wait(&COND_server_started, &LOCK_server_started);
3450-
mysql_mutex_unlock(&LOCK_server_started);
3451-
3440+
(void) pthread_sigmask(SIG_BLOCK,&set,NULL);
34523441
for (;;)
34533442
{
34543443
int error;// Used when debugging

sql/sql_alter.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,8 @@ bool Sql_cmd_alter_table::execute(THD *thd)
308308
#ifdef WITH_WSREP
309309
TABLE *find_temporary_table(THD *thd, const TABLE_LIST *tl);
310310

311-
if ((!thd->is_current_stmt_binlog_format_row() ||
311+
if (WSREP(thd) &&
312+
(!thd->is_current_stmt_binlog_format_row() ||
312313
!find_temporary_table(thd, first_table)) &&
313314
wsrep_to_isolation_begin(thd,
314315
lex->name.str ? select_lex->db : NULL,

sql/wsrep_binlog.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ int wsrep_write_cache_buf(IO_CACHE *cache, uchar **buf, size_t *buf_len)
5555
wsrep_max_ws_size, total_length);
5656
goto error;
5757
}
58-
59-
uchar* tmp = (uchar *)my_realloc(*buf, total_length, MYF(0));
58+
uchar* tmp = (uchar *)my_realloc(*buf, total_length,
59+
MYF(MY_ALLOW_ZERO_PTR));
6060
if (!tmp)
6161
{
6262
WSREP_ERROR("could not (re)allocate buffer: %zu + %u",
@@ -173,7 +173,8 @@ static int wsrep_write_cache_once(wsrep_t* const wsrep,
173173
if (total_length > allocated)
174174
{
175175
size_t const new_size(heap_size(total_length));
176-
uchar* tmp = (uchar *)my_realloc(heap_buf, new_size, MYF(0));
176+
uchar* tmp = (uchar *)my_realloc(heap_buf, new_size,
177+
MYF(MY_ALLOW_ZERO_PTR));
177178
if (!tmp)
178179
{
179180
WSREP_ERROR("could not (re)allocate buffer: %zu + %u",

sql/wsrep_mysqld.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,7 @@ int wsrep_init()
520520
wsrep_init_args args;
521521
args.options = (wsrep_provider_options) ?
522522
wsrep_provider_options : "";
523+
args.logger_cb= wsrep_log_cb;
523524
rcode = wsrep->init(wsrep, &args);
524525
if (rcode)
525526
{

0 commit comments

Comments
 (0)