Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
b363d975
Commit
b363d975
authored
Nov 10, 2022
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup: Use the alias BTR_PURGE_TREE for pessimistic delete
parent
ae6ebafd
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
26 deletions
+15
-26
storage/innobase/ibuf/ibuf0ibuf.cc
storage/innobase/ibuf/ibuf0ibuf.cc
+1
-2
storage/innobase/row/row0import.cc
storage/innobase/row/row0import.cc
+1
-2
storage/innobase/row/row0log.cc
storage/innobase/row/row0log.cc
+2
-4
storage/innobase/row/row0purge.cc
storage/innobase/row/row0purge.cc
+4
-7
storage/innobase/row/row0uins.cc
storage/innobase/row/row0uins.cc
+4
-7
storage/innobase/row/row0umod.cc
storage/innobase/row/row0umod.cc
+3
-4
No files found.
storage/innobase/ibuf/ibuf0ibuf.cc
View file @
b363d975
...
...
@@ -4011,8 +4011,7 @@ bool ibuf_delete_rec(const page_id_t page_id, btr_pcur_t* pcur,
ibuf_mtr_start
(
mtr
);
mysql_mutex_lock
(
&
ibuf_mutex
);
if
(
!
ibuf_restore_pos
(
page_id
,
search_tuple
,
BTR_MODIFY_TREE
|
BTR_LATCH_FOR_DELETE
,
if
(
!
ibuf_restore_pos
(
page_id
,
search_tuple
,
BTR_PURGE_TREE
,
pcur
,
mtr
))
{
mysql_mutex_unlock
(
&
ibuf_mutex
);
...
...
storage/innobase/row/row0import.cc
View file @
b363d975
...
...
@@ -1598,8 +1598,7 @@ tree structure may be changed during a pessimistic delete. */
inline
dberr_t
IndexPurge
::
purge_pessimistic_delete
()
noexcept
{
dberr_t
err
;
if
(
m_pcur
.
restore_position
(
BTR_MODIFY_TREE
|
BTR_LATCH_FOR_DELETE
,
&
m_mtr
)
!=
btr_pcur_t
::
CORRUPTED
)
if
(
m_pcur
.
restore_position
(
BTR_PURGE_TREE
,
&
m_mtr
)
!=
btr_pcur_t
::
CORRUPTED
)
{
ut_ad
(
rec_get_deleted_flag
(
btr_pcur_get_rec
(
&
m_pcur
),
m_index
->
table
->
not_redundant
()));
...
...
storage/innobase/row/row0log.cc
View file @
b363d975
...
...
@@ -1696,8 +1696,7 @@ row_log_table_apply_delete_low(
mtr
->
start
();
index
->
set_modified
(
*
mtr
);
error
=
btr_pcur_open
(
index
,
entry
,
PAGE_CUR_LE
,
BTR_MODIFY_TREE
|
BTR_LATCH_FOR_DELETE
,
pcur
,
mtr
);
BTR_PURGE_TREE
,
pcur
,
mtr
);
if
(
error
)
{
goto
err_exit
;
}
...
...
@@ -1780,8 +1779,7 @@ row_log_table_apply_delete(
mtr_start
(
&
mtr
);
index
->
set_modified
(
mtr
);
dberr_t
err
=
btr_pcur_open
(
index
,
old_pk
,
PAGE_CUR_LE
,
BTR_MODIFY_TREE
|
BTR_LATCH_FOR_DELETE
,
&
pcur
,
&
mtr
);
BTR_PURGE_TREE
,
&
pcur
,
&
mtr
);
if
(
err
!=
DB_SUCCESS
)
{
goto
all_done
;
}
...
...
storage/innobase/row/row0purge.cc
View file @
b363d975
...
...
@@ -216,7 +216,7 @@ row_purge_remove_clust_if_poss_low(
btr_pcur_get_btr_cur
(
&
node
->
pcur
),
0
,
&
mtr
);
}
else
{
dberr_t
err
;
ut_ad
(
mode
==
(
BTR_MODIFY_TREE
|
BTR_LATCH_FOR_DELETE
)
);
ut_ad
(
mode
==
BTR_PURGE_TREE
);
btr_cur_pessimistic_delete
(
&
err
,
FALSE
,
btr_pcur_get_btr_cur
(
&
node
->
pcur
),
0
,
false
,
&
mtr
);
...
...
@@ -257,8 +257,7 @@ row_purge_remove_clust_if_poss(
for
(
ulint
n_tries
=
0
;
n_tries
<
BTR_CUR_RETRY_DELETE_N_TIMES
;
n_tries
++
)
{
if
(
row_purge_remove_clust_if_poss_low
(
node
,
BTR_MODIFY_TREE
|
BTR_LATCH_FOR_DELETE
))
{
if
(
row_purge_remove_clust_if_poss_low
(
node
,
BTR_PURGE_TREE
))
{
return
(
true
);
}
...
...
@@ -349,10 +348,8 @@ row_purge_remove_sec_if_poss_tree(
mtr
.
start
();
index
->
set_modified
(
mtr
);
search_result
=
row_search_index_entry
(
index
,
entry
,
BTR_MODIFY_TREE
|
BTR_LATCH_FOR_DELETE
,
&
pcur
,
&
mtr
);
search_result
=
row_search_index_entry
(
index
,
entry
,
BTR_PURGE_TREE
,
&
pcur
,
&
mtr
);
switch
(
search_result
)
{
case
ROW_NOT_FOUND
:
...
...
storage/innobase/row/row0uins.cc
View file @
b363d975
...
...
@@ -207,9 +207,8 @@ row_undo_ins_remove_clust_rec(
}
else
{
index
->
set_modified
(
mtr
);
}
ut_a
(
node
->
pcur
.
restore_position
(
BTR_MODIFY_TREE
|
BTR_LATCH_FOR_DELETE
,
&
mtr
)
==
btr_pcur_t
::
SAME_ALL
);
ut_a
(
node
->
pcur
.
restore_position
(
BTR_PURGE_TREE
,
&
mtr
)
==
btr_pcur_t
::
SAME_ALL
);
btr_cur_pessimistic_delete
(
&
err
,
FALSE
,
&
node
->
pcur
.
btr_cur
,
0
,
true
,
&
mtr
);
...
...
@@ -272,7 +271,7 @@ row_undo_ins_remove_sec_low(
mode
=
BTR_MODIFY_LEAF
|
BTR_ALREADY_S_LATCHED
;
mtr_s_lock_index
(
index
,
&
mtr
);
}
else
{
ut_ad
(
mode
==
(
BTR_MODIFY_TREE
|
BTR_LATCH_FOR_DELETE
)
);
ut_ad
(
mode
==
BTR_PURGE_TREE
);
mtr_sx_lock_index
(
index
,
&
mtr
);
}
...
...
@@ -349,9 +348,7 @@ row_undo_ins_remove_sec(
/* Try then pessimistic descent to the B-tree */
retry:
err
=
row_undo_ins_remove_sec_low
(
BTR_MODIFY_TREE
|
BTR_LATCH_FOR_DELETE
,
index
,
entry
,
thr
);
err
=
row_undo_ins_remove_sec_low
(
BTR_PURGE_TREE
,
index
,
entry
,
thr
);
/* The delete operation may fail if we have little
file space left: TODO: easiest to crash the database
...
...
storage/innobase/row/row0umod.cc
View file @
b363d975
...
...
@@ -356,8 +356,7 @@ row_undo_mod_clust(
}
mtr
.
start
();
if
(
pcur
->
restore_position
(
BTR_MODIFY_TREE
|
BTR_LATCH_FOR_DELETE
,
&
mtr
)
!=
if
(
pcur
->
restore_position
(
BTR_PURGE_TREE
,
&
mtr
)
!=
btr_pcur_t
::
SAME_ALL
)
{
goto
mtr_commit_exit
;
}
...
...
@@ -504,7 +503,7 @@ row_undo_mod_del_mark_or_remove_sec_low(
mode
=
BTR_MODIFY_LEAF
|
BTR_ALREADY_S_LATCHED
;
mtr_s_lock_index
(
index
,
&
mtr
);
}
else
{
ut_ad
(
mode
==
(
BTR_MODIFY_TREE
|
BTR_LATCH_FOR_DELETE
)
);
ut_ad
(
mode
==
BTR_PURGE_TREE
);
mtr_sx_lock_index
(
index
,
&
mtr
);
}
}
else
{
...
...
@@ -634,7 +633,7 @@ row_undo_mod_del_mark_or_remove_sec(
}
err
=
row_undo_mod_del_mark_or_remove_sec_low
(
node
,
thr
,
index
,
entry
,
BTR_
MODIFY_TREE
|
BTR_LATCH_FOR_DELET
E
);
entry
,
BTR_
PURGE_TRE
E
);
return
(
err
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment