summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-12-28 13:46:22 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2020-12-28 13:46:22 +0200
commita64cb6d26508c1781091ae53c8d3950952f0ed0e (patch)
tree7d5c0873421e6fde4682512dd79392f420dc67b6
parent478b83032b170b2ae030fa77fe4bed60a7910472 (diff)
parent7f037b8c9f38b11a8c5038763cea273ff7fc8136 (diff)
downloadmariadb-git-a64cb6d26508c1781091ae53c8d3950952f0ed0e.tar.gz
Merge 10.3 into 10.4
-rw-r--r--storage/innobase/lock/lock0lock.cc19
-rw-r--r--storage/innobase/log/log0recv.cc2
-rw-r--r--storage/innobase/rem/rem0rec.cc17
3 files changed, 31 insertions, 7 deletions
diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc
index 81525680a33..b6f4067c8c0 100644
--- a/storage/innobase/lock/lock0lock.cc
+++ b/storage/innobase/lock/lock0lock.cc
@@ -659,6 +659,20 @@ static void wsrep_assert_no_bf_bf_wait(
if (UNIV_LIKELY(!wsrep_thd_is_BF(lock_rec2->trx->mysql_thd, FALSE)))
return;
+ /* if BF - BF order is honored, we can keep trx1 waiting for the lock */
+ if (wsrep_thd_order_before(trx1->mysql_thd, lock_rec2->trx->mysql_thd))
+ return;
+
+ /* avoiding BF-BF conflict assert, if victim is already aborting
+ or rolling back for replaying
+ */
+ wsrep_thd_LOCK(lock_rec2->trx->mysql_thd);
+ if (wsrep_thd_is_aborting(lock_rec2->trx->mysql_thd)) {
+ wsrep_thd_UNLOCK(lock_rec2->trx->mysql_thd);
+ return;
+ }
+ wsrep_thd_UNLOCK(lock_rec2->trx->mysql_thd);
+
mtr_t mtr;
if (lock_rec1) {
@@ -1454,11 +1468,6 @@ lock_rec_create_low(
trx_mutex_exit(c_lock->trx);
- if (UNIV_UNLIKELY(wsrep_debug)) {
- wsrep_report_bf_lock_wait(trx->mysql_thd, trx->id);
- wsrep_report_bf_lock_wait(c_lock->trx->mysql_thd, c_lock->trx->id);
- }
-
/* have to bail out here to avoid lock_set_lock... */
return(lock);
}
diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc
index d7fef4e9675..d2f2fe822c8 100644
--- a/storage/innobase/log/log0recv.cc
+++ b/storage/innobase/log/log0recv.cc
@@ -2391,7 +2391,7 @@ apply:
/* Wait until all the pages have been processed */
- while (recv_sys.n_addrs != 0) {
+ while (recv_sys.n_addrs || buf_get_n_pending_read_ios()) {
const bool abort = recv_sys.found_corrupt_log
|| recv_sys.found_corrupt_fs;
diff --git a/storage/innobase/rem/rem0rec.cc b/storage/innobase/rem/rem0rec.cc
index b3c2fc84231..1cc11415615 100644
--- a/storage/innobase/rem/rem0rec.cc
+++ b/storage/innobase/rem/rem0rec.cc
@@ -2761,9 +2761,24 @@ wsrep_rec_get_foreign_key(
break;
case DATA_BLOB:
case DATA_BINARY:
+ case DATA_FIXBINARY:
+ case DATA_GEOMETRY:
memcpy(buf, data, len);
break;
- default:
+
+ case DATA_FLOAT:
+ {
+ float f = mach_float_read(data);
+ memcpy(buf, &f, sizeof(float));
+ }
+ break;
+ case DATA_DOUBLE:
+ {
+ double d = mach_double_read(data);
+ memcpy(buf, &d, sizeof(double));
+ }
+ break;
+ default:
break;
}