Commit eec6417e authored by Jan Lindström's avatar Jan Lindström

Apply galera patches to XtraDB storage engine and remove one debug output.

parent 2aaed448
......@@ -6000,8 +6000,6 @@ ha_innobase::write_row(
prebuilt->table->flags,
user_thd);
#ifdef WITH_WSREP
fprintf(stderr, "JAN: split %d load %d\n", wsrep_load_data_splitting,
sql_command == SQLCOM_LOAD);
if (!error_result
&& wsrep_on(user_thd)
&& wsrep_thd_exec_mode(user_thd) == LOCAL_STATE
......
......@@ -7025,13 +7025,21 @@ ha_innobase::write_row(
prebuilt->table->flags,
user_thd);
#ifdef WITH_WSREP
if (!error_result &&
wsrep_thd_exec_mode(user_thd) == LOCAL_STATE &&
wsrep_on(user_thd) &&
!wsrep_consistency_check(user_thd))
{
if (wsrep_append_keys(user_thd, false, record, NULL))
{
if (!error_result
&& wsrep_on(user_thd)
&& wsrep_thd_exec_mode(user_thd) == LOCAL_STATE
&& !wsrep_consistency_check(user_thd)
&& (sql_command != SQLCOM_CREATE_TABLE)) {
/* This change part of commit
a4bc8db216b4dd61ca0b1cb5a8b7806437416dc7
MW-322 - CTAS fix will cause regression on galera.partition
test case. Commented until galeracluster developers have
looked the issue.
&& (sql_command != SQLCOM_LOAD ||
thd_binlog_format(user_thd) ==
BINLOG_FORMAT_ROW)) {
*/
if (wsrep_append_keys(user_thd, false, record, NULL)) {
DBUG_PRINT("wsrep", ("row key failed"));
error_result = HA_ERR_INTERNAL_ERROR;
goto wsrep_error;
......
......@@ -761,7 +761,7 @@ row_ins_invalidate_query_cache(
mem_free(buf);
}
#ifdef WITH_WSREP
ulint wsrep_append_foreign_key(trx_t *trx,
ulint wsrep_append_foreign_key(trx_t *trx,
dict_foreign_t* foreign,
const rec_t* clust_rec,
dict_index_t* clust_index,
......@@ -1083,13 +1083,14 @@ row_ins_foreign_check_on_constraint(
#ifdef WITH_WSREP
err = wsrep_append_foreign_key(
thr_get_trx(thr),
foreign,
clust_rec,
clust_index,
FALSE, FALSE);
thr_get_trx(thr),
foreign,
clust_rec,
clust_index,
FALSE,
(node) ? TRUE : FALSE);
if (err != DB_SUCCESS) {
fprintf(stderr,
fprintf(stderr,
"WSREP: foreign key append failed: %lu\n", err);
} else
#endif
......@@ -1248,6 +1249,9 @@ row_ins_check_foreign_constraint(
ulint* offsets = offsets_;
rec_offs_init(offsets_);
#ifdef WITH_WSREP
upd_node= NULL;
#endif /* WITH_WSREP */
run_again:
#ifdef UNIV_SYNC_DEBUG
ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_SHARED));
......@@ -1436,9 +1440,10 @@ row_ins_check_foreign_constraint(
err = wsrep_append_foreign_key(
thr_get_trx(thr),
foreign,
rec,
check_index,
check_ref, TRUE);
rec,
check_index,
check_ref,
(upd_node) ? TRUE : FALSE);
#endif /* WITH_WSREP */
goto end_scan;
} else if (foreign->type != 0) {
......
......@@ -1842,7 +1842,9 @@ row_upd_sec_index_entry(
index, offsets, thr, &mtr);
}
#ifdef WITH_WSREP
if (err == DB_SUCCESS && !referenced &&
if (wsrep_on(trx->mysql_thd) &&
!wsrep_thd_is_BF(trx->mysql_thd, FALSE) &&
err == DB_SUCCESS && !referenced &&
!(parent && que_node_get_type(parent) ==
QUE_NODE_UPDATE &&
((upd_node_t*)parent)->cascade_node == node) &&
......
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