mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Add call to log_free_check() in the DML code paths that were missing
this before.
This commit is contained in:
@@ -51,6 +51,15 @@ Created 4/20/1996 Heikki Tuuri
|
|||||||
#define ROW_INS_PREV 1
|
#define ROW_INS_PREV 1
|
||||||
#define ROW_INS_NEXT 2
|
#define ROW_INS_NEXT 2
|
||||||
|
|
||||||
|
/*********************************************************************//**
|
||||||
|
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. */
|
||||||
|
|
||||||
/*********************************************************************//**
|
/*********************************************************************//**
|
||||||
Creates an insert node struct.
|
Creates an insert node struct.
|
||||||
|
@@ -44,6 +44,16 @@ Created 3/14/1997 Heikki Tuuri
|
|||||||
#include "row0mysql.h"
|
#include "row0mysql.h"
|
||||||
#include "log0log.h"
|
#include "log0log.h"
|
||||||
|
|
||||||
|
/*********************************************************************//**
|
||||||
|
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. */
|
||||||
|
|
||||||
/********************************************************************//**
|
/********************************************************************//**
|
||||||
Creates a purge node to a query graph.
|
Creates a purge node to a query graph.
|
||||||
@return own: purge node */
|
@return own: purge node */
|
||||||
@@ -126,6 +136,7 @@ row_purge_remove_clust_if_poss_low(
|
|||||||
pcur = &(node->pcur);
|
pcur = &(node->pcur);
|
||||||
btr_cur = btr_pcur_get_btr_cur(pcur);
|
btr_cur = btr_pcur_get_btr_cur(pcur);
|
||||||
|
|
||||||
|
log_free_check();
|
||||||
mtr_start(&mtr);
|
mtr_start(&mtr);
|
||||||
|
|
||||||
success = row_purge_reposition_pcur(mode, node, &mtr);
|
success = row_purge_reposition_pcur(mode, node, &mtr);
|
||||||
|
@@ -46,6 +46,16 @@ Created 2/25/1997 Heikki Tuuri
|
|||||||
#include "ibuf0ibuf.h"
|
#include "ibuf0ibuf.h"
|
||||||
#include "log0log.h"
|
#include "log0log.h"
|
||||||
|
|
||||||
|
/*********************************************************************//**
|
||||||
|
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. */
|
||||||
|
|
||||||
/***************************************************************//**
|
/***************************************************************//**
|
||||||
Removes a clustered index record. The pcur in node was positioned on the
|
Removes a clustered index record. The pcur in node was positioned on the
|
||||||
record, now it is detached.
|
record, now it is detached.
|
||||||
@@ -152,7 +162,6 @@ row_undo_ins_remove_sec_low(
|
|||||||
ulint err;
|
ulint err;
|
||||||
mtr_t mtr;
|
mtr_t mtr;
|
||||||
|
|
||||||
log_free_check();
|
|
||||||
mtr_start(&mtr);
|
mtr_start(&mtr);
|
||||||
|
|
||||||
found = row_search_index_entry(index, entry, mode, &pcur, &mtr);
|
found = row_search_index_entry(index, entry, mode, &pcur, &mtr);
|
||||||
@@ -335,6 +344,7 @@ row_undo_ins(
|
|||||||
transactions. */
|
transactions. */
|
||||||
ut_a(trx_is_recv(node->trx));
|
ut_a(trx_is_recv(node->trx));
|
||||||
} else {
|
} else {
|
||||||
|
log_free_check();
|
||||||
err = row_undo_ins_remove_sec(node->index, entry);
|
err = row_undo_ins_remove_sec(node->index, entry);
|
||||||
|
|
||||||
if (err != DB_SUCCESS) {
|
if (err != DB_SUCCESS) {
|
||||||
@@ -346,5 +356,6 @@ row_undo_ins(
|
|||||||
node->index = dict_table_get_next_index(node->index);
|
node->index = dict_table_get_next_index(node->index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log_free_check();
|
||||||
return(row_undo_ins_remove_clust_rec(node));
|
return(row_undo_ins_remove_clust_rec(node));
|
||||||
}
|
}
|
||||||
|
@@ -58,12 +58,22 @@ delete marked clustered index record was delete unmarked and possibly also
|
|||||||
some of its fields were changed. Now, it is possible that the delete marked
|
some of its fields were changed. Now, it is possible that the delete marked
|
||||||
version has become obsolete at the time the undo is started. */
|
version has become obsolete at the time the undo is started. */
|
||||||
|
|
||||||
|
/*********************************************************************//**
|
||||||
|
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 also the previous version of the clustered index record was
|
Checks if also the previous version of the clustered index record was
|
||||||
modified or inserted by the same transaction, and its undo number is such
|
modified or inserted by the same transaction, and its undo number is such
|
||||||
that it should be undone in the same rollback.
|
that it should be undone in the same rollback.
|
||||||
@return TRUE if also previous modify or insert of this row should be undone */
|
@return TRUE if also previous modify or insert of this row should be undone */
|
||||||
UNIV_INLINE
|
static
|
||||||
ibool
|
ibool
|
||||||
row_undo_mod_undo_also_prev_vers(
|
row_undo_mod_undo_also_prev_vers(
|
||||||
/*=============================*/
|
/*=============================*/
|
||||||
@@ -231,6 +241,8 @@ row_undo_mod_clust(
|
|||||||
|
|
||||||
ut_ad(node && thr);
|
ut_ad(node && thr);
|
||||||
|
|
||||||
|
log_free_check();
|
||||||
|
|
||||||
/* Check if also the previous version of the clustered index record
|
/* Check if also the previous version of the clustered index record
|
||||||
should be undone in this same rollback operation */
|
should be undone in this same rollback operation */
|
||||||
|
|
||||||
|
@@ -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
|
searched delete is obviously to keep the x-latch for several
|
||||||
steps of query graph execution. */
|
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
|
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
|
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);
|
entry = row_build_index_entry(node->row, node->ext, index, heap);
|
||||||
ut_a(entry);
|
ut_a(entry);
|
||||||
|
|
||||||
log_free_check();
|
|
||||||
mtr_start(&mtr);
|
mtr_start(&mtr);
|
||||||
|
|
||||||
found = row_search_index_entry(index, entry, BTR_MODIFY_LEAF, &pcur,
|
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.
|
deletes it if this is a delete.
|
||||||
@return DB_SUCCESS if operation successfully completed, else error
|
@return DB_SUCCESS if operation successfully completed, else error
|
||||||
code or DB_LOCK_WAIT */
|
code or DB_LOCK_WAIT */
|
||||||
UNIV_INLINE
|
static
|
||||||
ulint
|
ulint
|
||||||
row_upd_sec_step(
|
row_upd_sec_step(
|
||||||
/*=============*/
|
/*=============*/
|
||||||
@@ -2015,6 +2024,7 @@ row_upd(
|
|||||||
if (node->state == UPD_NODE_UPDATE_CLUSTERED
|
if (node->state == UPD_NODE_UPDATE_CLUSTERED
|
||||||
|| node->state == UPD_NODE_INSERT_CLUSTERED) {
|
|| node->state == UPD_NODE_INSERT_CLUSTERED) {
|
||||||
|
|
||||||
|
log_free_check();
|
||||||
err = row_upd_clust_step(node, thr);
|
err = row_upd_clust_step(node, thr);
|
||||||
|
|
||||||
if (err != DB_SUCCESS) {
|
if (err != DB_SUCCESS) {
|
||||||
@@ -2029,6 +2039,8 @@ row_upd(
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (node->index != NULL) {
|
while (node->index != NULL) {
|
||||||
|
|
||||||
|
log_free_check();
|
||||||
err = row_upd_sec_step(node, thr);
|
err = row_upd_sec_step(node, thr);
|
||||||
|
|
||||||
if (err != DB_SUCCESS) {
|
if (err != DB_SUCCESS) {
|
||||||
|
Reference in New Issue
Block a user