summaryrefslogtreecommitdiff
path: root/storage/xtradb/row/row0upd.c
diff options
context:
space:
mode:
Diffstat (limited to 'storage/xtradb/row/row0upd.c')
-rw-r--r--storage/xtradb/row/row0upd.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/storage/xtradb/row/row0upd.c b/storage/xtradb/row/row0upd.c
index 95d1d00aeef..d0aaecd3dae 100644
--- a/storage/xtradb/row/row0upd.c
+++ b/storage/xtradb/row/row0upd.c
@@ -92,6 +92,16 @@ the x-latch freed? The most efficient way for performing a
searched delete is obviously to keep the x-latch for several
steps of query graph execution. */
+/*************************************************************************
+IMPORTANT NOTE: Any operation that generates redo MUST check that there
+is enough space in the redo log before for that operation. This is
+done by calling log_free_check(). The reason for checking the
+availability of the redo log space before the start of the operation is
+that we MUST not hold any synchonization objects when performing the
+check.
+If you make a change in this module make sure that no codepath is
+introduced where a call to log_free_check() is bypassed. */
+
/***********************************************************//**
Checks if an update vector changes some of the first ordering fields of an
index record. This is only used in foreign key checks and we can assume
@@ -1453,7 +1463,6 @@ row_upd_sec_index_entry(
entry = row_build_index_entry(node->row, node->ext, index, heap);
ut_a(entry);
- log_free_check();
mtr_start(&mtr);
found = row_search_index_entry(index, entry, BTR_MODIFY_LEAF, &pcur,
@@ -1529,7 +1538,7 @@ Updates the secondary index record if it is changed in the row update or
deletes it if this is a delete.
@return DB_SUCCESS if operation successfully completed, else error
code or DB_LOCK_WAIT */
-UNIV_INLINE
+static
ulint
row_upd_sec_step(
/*=============*/
@@ -2015,6 +2024,7 @@ row_upd(
if (node->state == UPD_NODE_UPDATE_CLUSTERED
|| node->state == UPD_NODE_INSERT_CLUSTERED) {
+ log_free_check();
err = row_upd_clust_step(node, thr);
if (err != DB_SUCCESS) {
@@ -2029,6 +2039,8 @@ row_upd(
}
while (node->index != NULL) {
+
+ log_free_check();
err = row_upd_sec_step(node, thr);
if (err != DB_SUCCESS) {