Commit 9d911608 authored by Nirbhay Choubey's avatar Nirbhay Choubey

Fixes for some test failures.

parent 42132631
...@@ -234,6 +234,8 @@ INSERT INTO global_suppressions VALUES ...@@ -234,6 +234,8 @@ INSERT INTO global_suppressions VALUES
("WSREP: last inactive check more than .* skipping check"), ("WSREP: last inactive check more than .* skipping check"),
("WSREP: Gap in state sequence. Need state transfer."), ("WSREP: Gap in state sequence. Need state transfer."),
("WSREP: Failed to prepare for incremental state transfer: .*"), ("WSREP: Failed to prepare for incremental state transfer: .*"),
("WSREP: error executing 'SET GLOBAL innodb_disallow_writes=.*"),
("WSREP: Failed to disallow InnoDB writes"),
("THE_LAST_SUPPRESSION")|| ("THE_LAST_SUPPRESSION")||
......
...@@ -1099,6 +1099,9 @@ The following options may be given as the first argument: ...@@ -1099,6 +1099,9 @@ The following options may be given as the first argument:
--wsrep-recover Recover database state after crash and exit --wsrep-recover Recover database state after crash and exit
--wsrep-replicate-myisam --wsrep-replicate-myisam
To enable myisam replication To enable myisam replication
--wsrep-restart-slave
Should MySQL slave be restarted automatically, when node
joins back to cluster
--wsrep-retry-autocommit=# --wsrep-retry-autocommit=#
Max number of times to retry a failed autocommit Max number of times to retry a failed autocommit
statement statement
...@@ -1439,6 +1442,7 @@ wsrep-provider none ...@@ -1439,6 +1442,7 @@ wsrep-provider none
wsrep-provider-options wsrep-provider-options
wsrep-recover FALSE wsrep-recover FALSE
wsrep-replicate-myisam FALSE wsrep-replicate-myisam FALSE
wsrep-restart-slave FALSE
wsrep-retry-autocommit 1 wsrep-retry-autocommit 1
wsrep-slave-threads 1 wsrep-slave-threads 1
wsrep-sst-auth (No default value) wsrep-sst-auth (No default value)
......
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
[mysqld.1] [mysqld.1]
binlog-format=row binlog-format=row
wsrep_provider=/usr/lib/libgalera_smm.so wsrep_provider=/usr/lib/galera/libgalera_smm.so
wsrep_cluster_address='gcomm://' wsrep_cluster_address='gcomm://'
[mysqld.2] [mysqld.2]
binlog-format=row binlog-format=row
wsrep_provider=/usr/lib/libgalera_smm.so wsrep_provider=/usr/lib/galera/libgalera_smm.so
wsrep_cluster_address='gcomm://127.0.0.1:4567' wsrep_cluster_address='gcomm://127.0.0.1:4567'
wsrep_provider_options='gmcast.listen_addr=tcp://127.0.0.1:4568' wsrep_provider_options='gmcast.listen_addr=tcp://127.0.0.1:4568'
......
...@@ -10,7 +10,6 @@ there should be *no* long test name listed below: ...@@ -10,7 +10,6 @@ there should be *no* long test name listed below:
select distinct variable_name as `there should be *no* variables listed below:` from t2 select distinct variable_name as `there should be *no* variables listed below:` from t2
left join t1 on variable_name=test_name where test_name is null; left join t1 on variable_name=test_name where test_name is null;
there should be *no* variables listed below: there should be *no* variables listed below:
innodb_disallow_writes
wsrep_auto_increment_control wsrep_auto_increment_control
wsrep_causal_reads wsrep_causal_reads
wsrep_certify_nonpk wsrep_certify_nonpk
...@@ -38,6 +37,7 @@ wsrep_provider ...@@ -38,6 +37,7 @@ wsrep_provider
wsrep_provider_options wsrep_provider_options
wsrep_recover wsrep_recover
wsrep_replicate_myisam wsrep_replicate_myisam
wsrep_restart_slave
wsrep_retry_autocommit wsrep_retry_autocommit
wsrep_slave_threads wsrep_slave_threads
wsrep_sst_auth wsrep_sst_auth
......
...@@ -45,6 +45,7 @@ wsrep_provider # ...@@ -45,6 +45,7 @@ wsrep_provider #
wsrep_provider_options # wsrep_provider_options #
wsrep_recover # wsrep_recover #
wsrep_replicate_myisam # wsrep_replicate_myisam #
wsrep_restart_slave #
wsrep_retry_autocommit # wsrep_retry_autocommit #
wsrep_slave_threads # wsrep_slave_threads #
wsrep_sst_auth # wsrep_sst_auth #
...@@ -83,6 +84,7 @@ wsrep_provider # ...@@ -83,6 +84,7 @@ wsrep_provider #
wsrep_provider_options # wsrep_provider_options #
wsrep_recover # wsrep_recover #
wsrep_replicate_myisam # wsrep_replicate_myisam #
wsrep_restart_slave #
wsrep_retry_autocommit # wsrep_retry_autocommit #
wsrep_slave_threads # wsrep_slave_threads #
wsrep_sst_auth # wsrep_sst_auth #
......
--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 --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
\ No newline at end of file
...@@ -3437,18 +3437,7 @@ pthread_handler_t signal_hand(void *arg __attribute__((unused))) ...@@ -3437,18 +3437,7 @@ pthread_handler_t signal_hand(void *arg __attribute__((unused)))
mysql_cond_broadcast(&COND_thread_count); mysql_cond_broadcast(&COND_thread_count);
mysql_mutex_unlock(&LOCK_thread_count); mysql_mutex_unlock(&LOCK_thread_count);
/* (void) pthread_sigmask(SIG_BLOCK,&set,NULL);
Waiting for until mysqld_server_started != 0
to ensure that all server components has been successfully
initialized. This step is mandatory since signal processing
could be done safely only when all server components
has been initialized.
*/
mysql_mutex_lock(&LOCK_server_started);
while (!mysqld_server_started)
mysql_cond_wait(&COND_server_started, &LOCK_server_started);
mysql_mutex_unlock(&LOCK_server_started);
for (;;) for (;;)
{ {
int error; // Used when debugging int error; // Used when debugging
......
...@@ -308,7 +308,8 @@ bool Sql_cmd_alter_table::execute(THD *thd) ...@@ -308,7 +308,8 @@ bool Sql_cmd_alter_table::execute(THD *thd)
#ifdef WITH_WSREP #ifdef WITH_WSREP
TABLE *find_temporary_table(THD *thd, const TABLE_LIST *tl); TABLE *find_temporary_table(THD *thd, const TABLE_LIST *tl);
if ((!thd->is_current_stmt_binlog_format_row() || if (WSREP(thd) &&
(!thd->is_current_stmt_binlog_format_row() ||
!find_temporary_table(thd, first_table)) && !find_temporary_table(thd, first_table)) &&
wsrep_to_isolation_begin(thd, wsrep_to_isolation_begin(thd,
lex->name.str ? select_lex->db : NULL, lex->name.str ? select_lex->db : NULL,
......
...@@ -55,8 +55,8 @@ int wsrep_write_cache_buf(IO_CACHE *cache, uchar **buf, size_t *buf_len) ...@@ -55,8 +55,8 @@ int wsrep_write_cache_buf(IO_CACHE *cache, uchar **buf, size_t *buf_len)
wsrep_max_ws_size, total_length); wsrep_max_ws_size, total_length);
goto error; goto error;
} }
uchar* tmp = (uchar *)my_realloc(*buf, total_length,
uchar* tmp = (uchar *)my_realloc(*buf, total_length, MYF(0)); MYF(MY_ALLOW_ZERO_PTR));
if (!tmp) if (!tmp)
{ {
WSREP_ERROR("could not (re)allocate buffer: %zu + %u", WSREP_ERROR("could not (re)allocate buffer: %zu + %u",
...@@ -173,7 +173,8 @@ static int wsrep_write_cache_once(wsrep_t* const wsrep, ...@@ -173,7 +173,8 @@ static int wsrep_write_cache_once(wsrep_t* const wsrep,
if (total_length > allocated) if (total_length > allocated)
{ {
size_t const new_size(heap_size(total_length)); size_t const new_size(heap_size(total_length));
uchar* tmp = (uchar *)my_realloc(heap_buf, new_size, MYF(0)); uchar* tmp = (uchar *)my_realloc(heap_buf, new_size,
MYF(MY_ALLOW_ZERO_PTR));
if (!tmp) if (!tmp)
{ {
WSREP_ERROR("could not (re)allocate buffer: %zu + %u", WSREP_ERROR("could not (re)allocate buffer: %zu + %u",
......
...@@ -520,6 +520,7 @@ int wsrep_init() ...@@ -520,6 +520,7 @@ int wsrep_init()
wsrep_init_args args; wsrep_init_args args;
args.options = (wsrep_provider_options) ? args.options = (wsrep_provider_options) ?
wsrep_provider_options : ""; wsrep_provider_options : "";
args.logger_cb= wsrep_log_cb;
rcode = wsrep->init(wsrep, &args); rcode = wsrep->init(wsrep, &args);
if (rcode) if (rcode)
{ {
......
...@@ -16998,6 +16998,7 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr, ...@@ -16998,6 +16998,7 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr,
lock_cancel_waiting_and_release(wait_lock); lock_cancel_waiting_and_release(wait_lock);
} }
wsrep_thd_UNLOCK(thd);
wsrep_thd_awake(thd, signal); wsrep_thd_awake(thd, signal);
} else { } else {
/* abort currently executing query */ /* abort currently executing query */
...@@ -17005,6 +17006,9 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr, ...@@ -17005,6 +17006,9 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr,
wsrep_thd_thread_id(thd))); wsrep_thd_thread_id(thd)));
WSREP_DEBUG("kill query for: %ld", WSREP_DEBUG("kill query for: %ld",
wsrep_thd_thread_id(thd)); wsrep_thd_thread_id(thd));
/* Note that innobase_kill_connection will take lock_mutex
and trx_mutex */
wsrep_thd_UNLOCK(thd);
wsrep_thd_awake(thd, signal); wsrep_thd_awake(thd, signal);
/* for BF thd, we need to prevent him from committing */ /* for BF thd, we need to prevent him from committing */
...@@ -17061,15 +17065,16 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr, ...@@ -17061,15 +17065,16 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr,
WSREP_DEBUG("signaling aborter"); WSREP_DEBUG("signaling aborter");
mysql_cond_signal(&COND_wsrep_rollback); mysql_cond_signal(&COND_wsrep_rollback);
mysql_mutex_unlock(&LOCK_wsrep_rollback); mysql_mutex_unlock(&LOCK_wsrep_rollback);
wsrep_thd_UNLOCK(thd);
break; break;
} }
default: default:
WSREP_WARN("bad wsrep query state: %d", WSREP_WARN("bad wsrep query state: %d",
wsrep_thd_query_state(thd)); wsrep_thd_query_state(thd));
wsrep_thd_UNLOCK(thd);
break; break;
} }
wsrep_thd_UNLOCK(thd);
DBUG_RETURN(0); DBUG_RETURN(0);
} }
......
...@@ -17905,6 +17905,7 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr, ...@@ -17905,6 +17905,7 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr,
lock_cancel_waiting_and_release(wait_lock); lock_cancel_waiting_and_release(wait_lock);
} }
wsrep_thd_UNLOCK(thd);
wsrep_thd_awake(thd, signal); wsrep_thd_awake(thd, signal);
} else { } else {
/* abort currently executing query */ /* abort currently executing query */
...@@ -17914,6 +17915,7 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr, ...@@ -17914,6 +17915,7 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr,
wsrep_thd_thread_id(thd)); wsrep_thd_thread_id(thd));
/* Note that innobase_kill_connection will take lock_mutex /* Note that innobase_kill_connection will take lock_mutex
and trx_mutex */ and trx_mutex */
wsrep_thd_UNLOCK(thd);
wsrep_thd_awake(thd, signal); wsrep_thd_awake(thd, signal);
/* for BF thd, we need to prevent him from committing */ /* for BF thd, we need to prevent him from committing */
...@@ -17970,15 +17972,16 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr, ...@@ -17970,15 +17972,16 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr,
WSREP_DEBUG("signaling aborter"); WSREP_DEBUG("signaling aborter");
mysql_cond_signal(&COND_wsrep_rollback); mysql_cond_signal(&COND_wsrep_rollback);
mysql_mutex_unlock(&LOCK_wsrep_rollback); mysql_mutex_unlock(&LOCK_wsrep_rollback);
wsrep_thd_UNLOCK(thd);
break; break;
} }
default: default:
WSREP_WARN("bad wsrep query state: %d", WSREP_WARN("bad wsrep query state: %d",
wsrep_thd_query_state(thd)); wsrep_thd_query_state(thd));
wsrep_thd_UNLOCK(thd);
break; break;
} }
wsrep_thd_UNLOCK(thd);
DBUG_RETURN(0); DBUG_RETURN(0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment