bzr merge -r4065..4088 codership/5.6
This commit is contained in:
parent
0903e2b744
commit
0b98d2fd2a
@ -128,5 +128,5 @@ else
|
|||||||
wsrep_log_info "Bypassing state dump."
|
wsrep_log_info "Bypassing state dump."
|
||||||
echo $SET_START_POSITION | $MYSQL
|
echo $SET_START_POSITION | $MYSQL
|
||||||
fi
|
fi
|
||||||
wsrep_cleanup_progress_file
|
|
||||||
#
|
#
|
||||||
|
@ -860,10 +860,27 @@ then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if [[ ! -z $WSREP_SST_OPT_BINLOG ]];then
|
||||||
|
|
||||||
|
BINLOG_DIRNAME=$(dirname $WSREP_SST_OPT_BINLOG)
|
||||||
|
BINLOG_FILENAME=$(basename $WSREP_SST_OPT_BINLOG)
|
||||||
|
|
||||||
|
# To avoid comparing data directory and BINLOG_DIRNAME
|
||||||
|
mv $DATA/${BINLOG_FILENAME}.* $BINLOG_DIRNAME/ 2>/dev/null || true
|
||||||
|
|
||||||
|
pushd $BINLOG_DIRNAME &>/dev/null
|
||||||
|
for bfiles in $(ls -1 ${BINLOG_FILENAME}.*);do
|
||||||
|
echo ${BINLOG_DIRNAME}/${bfiles} >> ${BINLOG_FILENAME}.index
|
||||||
|
done
|
||||||
|
popd &> /dev/null
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $incremental -eq 1 ]];then
|
if [[ $incremental -eq 1 ]];then
|
||||||
# Added --ibbackup=xtrabackup_55 because it fails otherwise citing connection issues.
|
# Added --ibbackup=xtrabackup_55 because it fails otherwise citing connection issues.
|
||||||
INNOAPPLY="${INNOBACKUPEX_BIN} $disver --defaults-file=${WSREP_SST_OPT_CONF} \
|
INNOAPPLY="${INNOBACKUPEX_BIN} $disver --defaults-file=${WSREP_SST_OPT_CONF} \
|
||||||
--ibbackup=xtrabackup_55 --apply-log $rebuildcmd --redo-only $BDATA --incremental-dir=${DATA} &>>${BDATA}/innobackup.prepare.log"
|
--ibbackup=xtrabackup_56 --apply-log $rebuildcmd --redo-only $BDATA --incremental-dir=${DATA} &>>${BDATA}/innobackup.prepare.log"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
wsrep_log_info "Preparing the backup at ${DATA}"
|
wsrep_log_info "Preparing the backup at ${DATA}"
|
||||||
|
@ -62,7 +62,6 @@ err:
|
|||||||
#include "rpl_rli.h" // class Relay_log_info;
|
#include "rpl_rli.h" // class Relay_log_info;
|
||||||
#include "sql_base.h" // close_temporary_table()
|
#include "sql_base.h" // close_temporary_table()
|
||||||
|
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
wsrep_set_apply_format(THD* thd, Format_description_log_event* ev)
|
wsrep_set_apply_format(THD* thd, Format_description_log_event* ev)
|
||||||
{
|
{
|
||||||
@ -94,7 +93,7 @@ static wsrep_cb_status_t wsrep_apply_events(THD* thd,
|
|||||||
int rcode= 0;
|
int rcode= 0;
|
||||||
int event= 1;
|
int event= 1;
|
||||||
|
|
||||||
DBUG_ENTER("wsrep_apply_rbr");
|
DBUG_ENTER("wsrep_apply_events");
|
||||||
|
|
||||||
if (thd->killed == KILL_CONNECTION)
|
if (thd->killed == KILL_CONNECTION)
|
||||||
{
|
{
|
||||||
@ -118,7 +117,6 @@ static wsrep_cb_status_t wsrep_apply_events(THD* thd,
|
|||||||
Log_event* ev= wsrep_read_log_event(&buf, &buf_len,
|
Log_event* ev= wsrep_read_log_event(&buf, &buf_len,
|
||||||
wsrep_get_apply_format(thd));
|
wsrep_get_apply_format(thd));
|
||||||
|
|
||||||
|
|
||||||
if (!ev)
|
if (!ev)
|
||||||
{
|
{
|
||||||
WSREP_ERROR("applier could not read binlog event, seqno: %lld, len: %zu",
|
WSREP_ERROR("applier could not read binlog event, seqno: %lld, len: %zu",
|
||||||
@ -126,6 +124,7 @@ static wsrep_cb_status_t wsrep_apply_events(THD* thd,
|
|||||||
rcode= 1;
|
rcode= 1;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (ev->get_type_code()) {
|
switch (ev->get_type_code()) {
|
||||||
case FORMAT_DESCRIPTION_EVENT:
|
case FORMAT_DESCRIPTION_EVENT:
|
||||||
wsrep_set_apply_format(thd, (Format_description_log_event*)ev);
|
wsrep_set_apply_format(thd, (Format_description_log_event*)ev);
|
||||||
@ -368,6 +367,7 @@ wsrep_cb_status_t wsrep_commit_cb(void* const ctx,
|
|||||||
return rcode;
|
return rcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wsrep_cb_status_t wsrep_unordered_cb(void* const ctx,
|
wsrep_cb_status_t wsrep_unordered_cb(void* const ctx,
|
||||||
const void* const data,
|
const void* const data,
|
||||||
size_t const size)
|
size_t const size)
|
||||||
|
@ -46,6 +46,9 @@ int wsrep_write_cache (wsrep_t* wsrep,
|
|||||||
/* Dump replication buffer to disk */
|
/* Dump replication buffer to disk */
|
||||||
void wsrep_dump_rbr_buf(THD *thd, const void* rbr_buf, size_t buf_len);
|
void wsrep_dump_rbr_buf(THD *thd, const void* rbr_buf, size_t buf_len);
|
||||||
|
|
||||||
|
/* Dump replication buffer to disk without intermediate buffer */
|
||||||
|
void wsrep_dump_rbr_direct(THD* thd, IO_CACHE* cache);
|
||||||
|
|
||||||
int wsrep_binlog_close_connection(THD* thd);
|
int wsrep_binlog_close_connection(THD* thd);
|
||||||
int wsrep_binlog_savepoint_set(THD *thd, void *sv);
|
int wsrep_binlog_savepoint_set(THD *thd, void *sv);
|
||||||
int wsrep_binlog_savepoint_rollback(THD *thd, void *sv);
|
int wsrep_binlog_savepoint_rollback(THD *thd, void *sv);
|
||||||
|
@ -1937,6 +1937,10 @@ row_ins_scan_sec_index_for_duplicate(
|
|||||||
#ifdef UNIV_SYNC_DEBUG
|
#ifdef UNIV_SYNC_DEBUG
|
||||||
ut_ad(s_latch == rw_lock_own(&index->lock, RW_LOCK_SHARED));
|
ut_ad(s_latch == rw_lock_own(&index->lock, RW_LOCK_SHARED));
|
||||||
#endif /* UNIV_SYNC_DEBUG */
|
#endif /* UNIV_SYNC_DEBUG */
|
||||||
|
#ifdef WITH_WSREP
|
||||||
|
/* appliers don't need dupkey checks */
|
||||||
|
if (wsrep_thd_is_BF(thr_get_trx(thr)->mysql_thd, 0)) return(DB_SUCCESS);
|
||||||
|
#endif /* WITH_WSREP */
|
||||||
|
|
||||||
n_unique = dict_index_get_n_unique(index);
|
n_unique = dict_index_get_n_unique(index);
|
||||||
|
|
||||||
@ -2005,10 +2009,6 @@ row_ins_scan_sec_index_for_duplicate(
|
|||||||
lock_type, block, rec, index, offsets, thr);
|
lock_type, block, rec, index, offsets, thr);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
#ifdef WITH_WSREP
|
|
||||||
/* appliers don't need dupkey checks */
|
|
||||||
if (!wsrep_thd_is_BF(thr_get_trx(thr)->mysql_thd, 0))
|
|
||||||
#endif /* WITH_WSREP */
|
|
||||||
err = row_ins_set_shared_rec_lock(
|
err = row_ins_set_shared_rec_lock(
|
||||||
lock_type, block, rec, index, offsets, thr);
|
lock_type, block, rec, index, offsets, thr);
|
||||||
}
|
}
|
||||||
|
@ -365,6 +365,7 @@ wsrep_row_upd_check_foreign_constraints(
|
|||||||
ulint n_ext;
|
ulint n_ext;
|
||||||
dberr_t err;
|
dberr_t err;
|
||||||
ibool got_s_lock = FALSE;
|
ibool got_s_lock = FALSE;
|
||||||
|
ibool opened = FALSE;
|
||||||
|
|
||||||
if (UT_LIST_GET_FIRST(table->foreign_list) == NULL) {
|
if (UT_LIST_GET_FIRST(table->foreign_list) == NULL) {
|
||||||
|
|
||||||
@ -412,6 +413,7 @@ wsrep_row_upd_check_foreign_constraints(
|
|||||||
dict_table_open_on_name(
|
dict_table_open_on_name(
|
||||||
foreign->referenced_table_name_lookup,
|
foreign->referenced_table_name_lookup,
|
||||||
FALSE, FALSE, DICT_ERR_IGNORE_NONE);
|
FALSE, FALSE, DICT_ERR_IGNORE_NONE);
|
||||||
|
opened = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (foreign->referenced_table) {
|
if (foreign->referenced_table) {
|
||||||
@ -440,6 +442,11 @@ wsrep_row_upd_check_foreign_constraints(
|
|||||||
(foreign->referenced_table
|
(foreign->referenced_table
|
||||||
->n_foreign_key_checks_running)--;
|
->n_foreign_key_checks_running)--;
|
||||||
|
|
||||||
|
if (opened == TRUE) {
|
||||||
|
dict_table_close(foreign->referenced_table, TRUE, FALSE);
|
||||||
|
opened = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
mutex_exit(&(dict_sys->mutex));
|
mutex_exit(&(dict_sys->mutex));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1949,6 +1949,10 @@ row_ins_scan_sec_index_for_duplicate(
|
|||||||
#ifdef UNIV_SYNC_DEBUG
|
#ifdef UNIV_SYNC_DEBUG
|
||||||
ut_ad(s_latch == rw_lock_own(&index->lock, RW_LOCK_SHARED));
|
ut_ad(s_latch == rw_lock_own(&index->lock, RW_LOCK_SHARED));
|
||||||
#endif /* UNIV_SYNC_DEBUG */
|
#endif /* UNIV_SYNC_DEBUG */
|
||||||
|
#ifdef WITH_WSREP
|
||||||
|
/* appliers don't need dupkey checks */
|
||||||
|
if (wsrep_thd_is_BF(thr_get_trx(thr)->mysql_thd, 0)) return(DB_SUCCESS);
|
||||||
|
#endif /* WITH_WSREP */
|
||||||
|
|
||||||
n_unique = dict_index_get_n_unique(index);
|
n_unique = dict_index_get_n_unique(index);
|
||||||
|
|
||||||
@ -2017,10 +2021,6 @@ row_ins_scan_sec_index_for_duplicate(
|
|||||||
lock_type, block, rec, index, offsets, thr);
|
lock_type, block, rec, index, offsets, thr);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
#ifdef WITH_WSREP
|
|
||||||
/* appliers don't need dupkey checks */
|
|
||||||
if (!wsrep_thd_is_BF(thr_get_trx(thr)->mysql_thd, 0))
|
|
||||||
#endif /* WITH_WSREP */
|
|
||||||
err = row_ins_set_shared_rec_lock(
|
err = row_ins_set_shared_rec_lock(
|
||||||
lock_type, block, rec, index, offsets, thr);
|
lock_type, block, rec, index, offsets, thr);
|
||||||
}
|
}
|
||||||
|
@ -367,6 +367,7 @@ wsrep_row_upd_check_foreign_constraints(
|
|||||||
ulint n_ext;
|
ulint n_ext;
|
||||||
dberr_t err;
|
dberr_t err;
|
||||||
ibool got_s_lock = FALSE;
|
ibool got_s_lock = FALSE;
|
||||||
|
ibool opened = FALSE;
|
||||||
|
|
||||||
if (UT_LIST_GET_FIRST(table->foreign_list) == NULL) {
|
if (UT_LIST_GET_FIRST(table->foreign_list) == NULL) {
|
||||||
|
|
||||||
@ -414,6 +415,7 @@ wsrep_row_upd_check_foreign_constraints(
|
|||||||
dict_table_open_on_name(
|
dict_table_open_on_name(
|
||||||
foreign->referenced_table_name_lookup,
|
foreign->referenced_table_name_lookup,
|
||||||
FALSE, FALSE, DICT_ERR_IGNORE_NONE);
|
FALSE, FALSE, DICT_ERR_IGNORE_NONE);
|
||||||
|
opened = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (foreign->referenced_table) {
|
if (foreign->referenced_table) {
|
||||||
@ -442,6 +444,11 @@ wsrep_row_upd_check_foreign_constraints(
|
|||||||
(foreign->referenced_table
|
(foreign->referenced_table
|
||||||
->n_foreign_key_checks_running)--;
|
->n_foreign_key_checks_running)--;
|
||||||
|
|
||||||
|
if (opened == TRUE) {
|
||||||
|
dict_table_close(foreign->referenced_table, TRUE, FALSE);
|
||||||
|
opened = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
mutex_exit(&(dict_sys->mutex));
|
mutex_exit(&(dict_sys->mutex));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user