diff options
author | Nirbhay Choubey <nirbhay@skysql.com> | 2014-04-09 12:25:47 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@skysql.com> | 2014-04-09 12:25:47 -0400 |
commit | 9d911608f15005be48dad55440e87a6982067233 (patch) | |
tree | 34312354f96d6d796547f8934c9da4ba680bb7f7 | |
parent | 421326310168e2b0a83eddcf9520336e1d58ea42 (diff) | |
download | mariadb-git-9d911608f15005be48dad55440e87a6982067233.tar.gz |
Fixes for some test failures.
-rw-r--r-- | mysql-test/include/mtr_warnings.sql | 2 | ||||
-rw-r--r-- | mysql-test/r/mysqld--help.result | 4 | ||||
-rw-r--r-- | mysql-test/suite/galera/galera_2nodes.cnf | 4 | ||||
-rw-r--r-- | mysql-test/suite/sys_vars/r/all_vars.result | 2 | ||||
-rw-r--r-- | mysql-test/suite/wsrep/r/variables.result | 2 | ||||
-rw-r--r-- | mysql-test/suite/wsrep/t/binlog_format.opt | 2 | ||||
-rw-r--r-- | sql/mysqld.cc | 13 | ||||
-rw-r--r-- | sql/sql_alter.cc | 3 | ||||
-rw-r--r-- | sql/wsrep_binlog.cc | 7 | ||||
-rw-r--r-- | sql/wsrep_mysqld.cc | 1 | ||||
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 7 | ||||
-rw-r--r-- | storage/xtradb/handler/ha_innodb.cc | 5 |
12 files changed, 30 insertions, 22 deletions
diff --git a/mysql-test/include/mtr_warnings.sql b/mysql-test/include/mtr_warnings.sql index 06a7b49e979..768693bfecc 100644 --- a/mysql-test/include/mtr_warnings.sql +++ b/mysql-test/include/mtr_warnings.sql @@ -234,6 +234,8 @@ INSERT INTO global_suppressions VALUES ("WSREP: last inactive check more than .* skipping check"), ("WSREP: Gap in state sequence. Need 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")|| diff --git a/mysql-test/r/mysqld--help.result b/mysql-test/r/mysqld--help.result index 00c152e813a..21d1ca3b8b8 100644 --- a/mysql-test/r/mysqld--help.result +++ b/mysql-test/r/mysqld--help.result @@ -1099,6 +1099,9 @@ The following options may be given as the first argument: --wsrep-recover Recover database state after crash and exit --wsrep-replicate-myisam To enable myisam replication + --wsrep-restart-slave + Should MySQL slave be restarted automatically, when node + joins back to cluster --wsrep-retry-autocommit=# Max number of times to retry a failed autocommit statement @@ -1439,6 +1442,7 @@ wsrep-provider none wsrep-provider-options wsrep-recover FALSE wsrep-replicate-myisam FALSE +wsrep-restart-slave FALSE wsrep-retry-autocommit 1 wsrep-slave-threads 1 wsrep-sst-auth (No default value) diff --git a/mysql-test/suite/galera/galera_2nodes.cnf b/mysql-test/suite/galera/galera_2nodes.cnf index b950ae1fe4d..1ef673e9582 100644 --- a/mysql-test/suite/galera/galera_2nodes.cnf +++ b/mysql-test/suite/galera/galera_2nodes.cnf @@ -3,12 +3,12 @@ [mysqld.1] binlog-format=row -wsrep_provider=/usr/lib/libgalera_smm.so +wsrep_provider=/usr/lib/galera/libgalera_smm.so wsrep_cluster_address='gcomm://' [mysqld.2] 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_provider_options='gmcast.listen_addr=tcp://127.0.0.1:4568' diff --git a/mysql-test/suite/sys_vars/r/all_vars.result b/mysql-test/suite/sys_vars/r/all_vars.result index adfd9f3bbe6..a31d3914168 100644 --- a/mysql-test/suite/sys_vars/r/all_vars.result +++ b/mysql-test/suite/sys_vars/r/all_vars.result @@ -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 left join t1 on variable_name=test_name where test_name is null; there should be *no* variables listed below: -innodb_disallow_writes wsrep_auto_increment_control wsrep_causal_reads wsrep_certify_nonpk @@ -38,6 +37,7 @@ wsrep_provider wsrep_provider_options wsrep_recover wsrep_replicate_myisam +wsrep_restart_slave wsrep_retry_autocommit wsrep_slave_threads wsrep_sst_auth diff --git a/mysql-test/suite/wsrep/r/variables.result b/mysql-test/suite/wsrep/r/variables.result index 1b778f835e0..ea04c54eb47 100644 --- a/mysql-test/suite/wsrep/r/variables.result +++ b/mysql-test/suite/wsrep/r/variables.result @@ -45,6 +45,7 @@ wsrep_provider # wsrep_provider_options # wsrep_recover # wsrep_replicate_myisam # +wsrep_restart_slave # wsrep_retry_autocommit # wsrep_slave_threads # wsrep_sst_auth # @@ -83,6 +84,7 @@ wsrep_provider # wsrep_provider_options # wsrep_recover # wsrep_replicate_myisam # +wsrep_restart_slave # wsrep_retry_autocommit # wsrep_slave_threads # wsrep_sst_auth # diff --git a/mysql-test/suite/wsrep/t/binlog_format.opt b/mysql-test/suite/wsrep/t/binlog_format.opt index 901ead9a41d..771d9b05e1e 100644 --- a/mysql-test/suite/wsrep/t/binlog_format.opt +++ b/mysql-test/suite/wsrep/t/binlog_format.opt @@ -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
\ No newline at end of file +--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 diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 5d9ff0bfa87..bdd5b59206e 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3437,18 +3437,7 @@ pthread_handler_t signal_hand(void *arg __attribute__((unused))) mysql_cond_broadcast(&COND_thread_count); mysql_mutex_unlock(&LOCK_thread_count); - /* - 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); - + (void) pthread_sigmask(SIG_BLOCK,&set,NULL); for (;;) { int error; // Used when debugging diff --git a/sql/sql_alter.cc b/sql/sql_alter.cc index e3282709cd6..8b4f4ab9963 100644 --- a/sql/sql_alter.cc +++ b/sql/sql_alter.cc @@ -308,7 +308,8 @@ bool Sql_cmd_alter_table::execute(THD *thd) #ifdef WITH_WSREP 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)) && wsrep_to_isolation_begin(thd, lex->name.str ? select_lex->db : NULL, diff --git a/sql/wsrep_binlog.cc b/sql/wsrep_binlog.cc index 62c62cb56f0..5cb910248a2 100644 --- a/sql/wsrep_binlog.cc +++ b/sql/wsrep_binlog.cc @@ -55,8 +55,8 @@ int wsrep_write_cache_buf(IO_CACHE *cache, uchar **buf, size_t *buf_len) wsrep_max_ws_size, total_length); goto error; } - - uchar* tmp = (uchar *)my_realloc(*buf, total_length, MYF(0)); + uchar* tmp = (uchar *)my_realloc(*buf, total_length, + MYF(MY_ALLOW_ZERO_PTR)); if (!tmp) { WSREP_ERROR("could not (re)allocate buffer: %zu + %u", @@ -173,7 +173,8 @@ static int wsrep_write_cache_once(wsrep_t* const wsrep, if (total_length > allocated) { 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) { WSREP_ERROR("could not (re)allocate buffer: %zu + %u", diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 35629b1fbf6..4b1fe3cc2d9 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -520,6 +520,7 @@ int wsrep_init() wsrep_init_args args; args.options = (wsrep_provider_options) ? wsrep_provider_options : ""; + args.logger_cb= wsrep_log_cb; rcode = wsrep->init(wsrep, &args); if (rcode) { diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 3b704208bbc..b6913bd2e94 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -16998,6 +16998,7 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr, lock_cancel_waiting_and_release(wait_lock); } + wsrep_thd_UNLOCK(thd); wsrep_thd_awake(thd, signal); } else { /* abort currently executing query */ @@ -17005,6 +17006,9 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr, wsrep_thd_thread_id(thd))); WSREP_DEBUG("kill query for: %ld", 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); /* for BF thd, we need to prevent him from committing */ @@ -17061,15 +17065,16 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr, WSREP_DEBUG("signaling aborter"); mysql_cond_signal(&COND_wsrep_rollback); mysql_mutex_unlock(&LOCK_wsrep_rollback); + wsrep_thd_UNLOCK(thd); break; } default: WSREP_WARN("bad wsrep query state: %d", wsrep_thd_query_state(thd)); + wsrep_thd_UNLOCK(thd); break; } - wsrep_thd_UNLOCK(thd); DBUG_RETURN(0); } diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc index e2c7b1158aa..d3d90ebeab9 100644 --- a/storage/xtradb/handler/ha_innodb.cc +++ b/storage/xtradb/handler/ha_innodb.cc @@ -17905,6 +17905,7 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr, lock_cancel_waiting_and_release(wait_lock); } + wsrep_thd_UNLOCK(thd); wsrep_thd_awake(thd, signal); } else { /* abort currently executing query */ @@ -17914,6 +17915,7 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr, 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); /* for BF thd, we need to prevent him from committing */ @@ -17970,15 +17972,16 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr, WSREP_DEBUG("signaling aborter"); mysql_cond_signal(&COND_wsrep_rollback); mysql_mutex_unlock(&LOCK_wsrep_rollback); + wsrep_thd_UNLOCK(thd); break; } default: WSREP_WARN("bad wsrep query state: %d", wsrep_thd_query_state(thd)); + wsrep_thd_UNLOCK(thd); break; } - wsrep_thd_UNLOCK(thd); DBUG_RETURN(0); } |