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
6aa97fb6
Commit
6aa97fb6
authored
Jan 05, 2009
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
910284e6
4da218f0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
storage/maria/ma_key_recover.c
storage/maria/ma_key_recover.c
+15
-2
No files found.
storage/maria/ma_key_recover.c
View file @
6aa97fb6
...
...
@@ -123,12 +123,23 @@ my_bool _ma_write_clr(MARIA_HA *info, LSN undo_lsn,
log_array
[
TRANSLOG_INTERNAL_PARTS
+
0
].
str
=
log_data
;
log_array
[
TRANSLOG_INTERNAL_PARTS
+
0
].
length
=
(
uint
)
(
log_pos
-
log_data
);
/*
We need intern_lock mutex for calling _ma_state_info_write in the trigger.
We do it here to have the same sequence of mutexes locking everywhere
(first intern_lock then transactional log buffer lock)
*/
if
(
undo_type
==
LOGREC_UNDO_BULK_INSERT
)
pthread_mutex_lock
(
&
info
->
s
->
intern_lock
);
res
=
translog_write_record
(
res_lsn
,
LOGREC_CLR_END
,
info
->
trn
,
info
,
(
translog_size_t
)
log_array
[
TRANSLOG_INTERNAL_PARTS
+
0
].
length
,
TRANSLOG_INTERNAL_PARTS
+
1
,
log_array
,
log_data
+
LSN_STORE_SIZE
,
&
msg
);
if
(
undo_type
==
LOGREC_UNDO_BULK_INSERT
)
pthread_mutex_unlock
(
&
info
->
s
->
intern_lock
);
DBUG_RETURN
(
res
);
}
...
...
@@ -149,6 +160,7 @@ my_bool write_hook_for_clr_end(enum translog_record_type type
struct
st_msg_to_write_hook_for_clr_end
*
msg
=
(
struct
st_msg_to_write_hook_for_clr_end
*
)
hook_arg
;
my_bool
error
=
FALSE
;
DBUG_ENTER
(
"write_hook_for_clr_end"
);
DBUG_ASSERT
(
trn
->
trid
!=
0
);
trn
->
undo_lsn
=
msg
->
previous_undo_lsn
;
...
...
@@ -177,9 +189,10 @@ my_bool write_hook_for_clr_end(enum translog_record_type type
case
LOGREC_UNDO_KEY_DELETE
:
break
;
case
LOGREC_UNDO_BULK_INSERT
:
safe_mutex_assert_owner
(
&
share
->
intern_lock
);
error
=
(
maria_enable_indexes
(
tbl_info
)
||
/* we enabled indices, need '2' below */
_ma_state_info_write
(
share
,
1
|
2
|
4
));
_ma_state_info_write
(
share
,
1
|
2
));
/* no need for _ma_reset_status(): REDO_DELETE_ALL is just before us */
break
;
default:
...
...
@@ -187,7 +200,7 @@ my_bool write_hook_for_clr_end(enum translog_record_type type
}
if
(
trn
->
undo_lsn
==
LSN_IMPOSSIBLE
)
/* has fully rolled back */
trn
->
first_undo_lsn
=
LSN_WITH_FLAGS_TO_FLAGS
(
trn
->
first_undo_lsn
);
return
error
;
DBUG_RETURN
(
error
)
;
}
...
...
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