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
916fe818
Commit
916fe818
authored
Sep 27, 2007
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use direct memory access for the log scan
BUILD/SETUP.sh: compile maria by default
parent
e914e469
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
11 deletions
+22
-11
BUILD/SETUP.sh
BUILD/SETUP.sh
+1
-0
storage/maria/ma_recovery.c
storage/maria/ma_recovery.c
+21
-11
No files found.
BUILD/SETUP.sh
View file @
916fe818
...
@@ -145,6 +145,7 @@ base_configs="--prefix=$prefix --enable-assembler "
...
@@ -145,6 +145,7 @@ base_configs="--prefix=$prefix --enable-assembler "
base_configs
=
"
$base_configs
--with-extra-charsets=complex "
base_configs
=
"
$base_configs
--with-extra-charsets=complex "
base_configs
=
"
$base_configs
--enable-thread-safe-client "
base_configs
=
"
$base_configs
--enable-thread-safe-client "
base_configs
=
"
$base_configs
--with-big-tables"
base_configs
=
"
$base_configs
--with-big-tables"
base_configs
=
"
$base_configs
--with-plugin-maria"
if
test
-d
"
$path
/../cmd-line-utils/readline"
if
test
-d
"
$path
/../cmd-line-utils/readline"
then
then
...
...
storage/maria/ma_recovery.c
View file @
916fe818
...
@@ -1496,7 +1496,7 @@ static int run_redo_phase(LSN lsn, my_bool apply)
...
@@ -1496,7 +1496,7 @@ static int run_redo_phase(LSN lsn, my_bool apply)
tprint
(
tracef
,
"Failed to read header of the first record.
\n
"
);
tprint
(
tracef
,
"Failed to read header of the first record.
\n
"
);
return
1
;
return
1
;
}
}
if
(
translog_init_scanner
(
lsn
,
1
,
&
scanner
,
0
))
if
(
translog_init_scanner
(
lsn
,
1
,
&
scanner
,
1
))
{
{
tprint
(
tracef
,
"Scanner init failed
\n
"
);
tprint
(
tracef
,
"Scanner init failed
\n
"
);
return
1
;
return
1
;
...
@@ -1529,24 +1529,25 @@ static int run_redo_phase(LSN lsn, my_bool apply)
...
@@ -1529,24 +1529,25 @@ static int run_redo_phase(LSN lsn, my_bool apply)
}
}
else
else
{
{
struct
st_translog_scanner_data
scanner2
;
TRANSLOG_HEADER_BUFFER
rec2
;
/*
/*
There is a complete group for this transaction, containing more
There is a complete group for this transaction, containing more
than this event.
than this event.
*/
*/
tprint
(
tracef
,
" ends a group:
\n
"
);
tprint
(
tracef
,
" ends a group:
\n
"
);
struct
st_translog_scanner_data
scanner2
;
TRANSLOG_HEADER_BUFFER
rec2
;
len
=
len
=
translog_read_record_header
(
all_active_trans
[
sid
].
group_start_lsn
,
&
rec2
);
translog_read_record_header
(
all_active_trans
[
sid
].
group_start_lsn
,
&
rec2
);
if
(
len
<
0
)
/* EOF or error */
if
(
len
<
0
)
/* EOF or error */
{
{
tprint
(
tracef
,
"Cannot find record where it should be
\n
"
);
tprint
(
tracef
,
"Cannot find record where it should be
\n
"
);
return
1
;
goto
err
;
}
}
if
(
translog_init_scanner
(
rec2
.
lsn
,
1
,
&
scanner2
,
0
))
if
(
translog_init_scanner
(
rec2
.
lsn
,
1
,
&
scanner2
,
1
))
{
{
tprint
(
tracef
,
"Scanner2 init failed
\n
"
);
tprint
(
tracef
,
"Scanner2 init failed
\n
"
);
return
1
;
goto
err
;
}
}
current_group_end_lsn
=
rec
.
lsn
;
current_group_end_lsn
=
rec
.
lsn
;
do
do
...
@@ -1556,13 +1557,16 @@ static int run_redo_phase(LSN lsn, my_bool apply)
...
@@ -1556,13 +1557,16 @@ static int run_redo_phase(LSN lsn, my_bool apply)
const
LOG_DESC
*
log_desc2
=
&
log_record_type_descriptor
[
rec2
.
type
];
const
LOG_DESC
*
log_desc2
=
&
log_record_type_descriptor
[
rec2
.
type
];
display_record_position
(
log_desc2
,
&
rec2
,
0
);
display_record_position
(
log_desc2
,
&
rec2
,
0
);
if
(
apply
&&
display_and_apply_record
(
log_desc2
,
&
rec2
))
if
(
apply
&&
display_and_apply_record
(
log_desc2
,
&
rec2
))
return
1
;
{
translog_destroy
(
&
scanner2
);
goto
err
;
}
}
}
len
=
translog_read_next_record_header
(
&
scanner2
,
&
rec2
);
len
=
translog_read_next_record_header
(
&
scanner2
,
&
rec2
);
if
(
len
<
0
)
/* EOF or error */
if
(
len
<
0
)
/* EOF or error */
{
{
tprint
(
tracef
,
"Cannot find record where it should be
\n
"
);
tprint
(
tracef
,
"Cannot find record where it should be
\n
"
);
return
1
;
goto
err
;
}
}
}
}
while
(
rec2
.
lsn
<
rec
.
lsn
);
while
(
rec2
.
lsn
<
rec
.
lsn
);
...
@@ -1571,10 +1575,11 @@ static int run_redo_phase(LSN lsn, my_bool apply)
...
@@ -1571,10 +1575,11 @@ static int run_redo_phase(LSN lsn, my_bool apply)
all_active_trans
[
sid
].
group_start_lsn
=
LSN_IMPOSSIBLE
;
all_active_trans
[
sid
].
group_start_lsn
=
LSN_IMPOSSIBLE
;
current_group_end_lsn
=
LSN_IMPOSSIBLE
;
/* for debugging */
current_group_end_lsn
=
LSN_IMPOSSIBLE
;
/* for debugging */
display_record_position
(
log_desc
,
&
rec
,
0
);
display_record_position
(
log_desc
,
&
rec
,
0
);
translog_destroy_scanner
(
&
scanner2
);
}
}
}
}
if
(
apply
&&
display_and_apply_record
(
log_desc
,
&
rec
))
if
(
apply
&&
display_and_apply_record
(
log_desc
,
&
rec
))
return
1
;
goto
err
;
}
}
else
/* record does not end group */
else
/* record does not end group */
{
{
...
@@ -1595,13 +1600,18 @@ static int run_redo_phase(LSN lsn, my_bool apply)
...
@@ -1595,13 +1600,18 @@ static int run_redo_phase(LSN lsn, my_bool apply)
break
;
break
;
case
RECHEADER_READ_ERROR
:
case
RECHEADER_READ_ERROR
:
tprint
(
tracef
,
"Error reading log
\n
"
);
tprint
(
tracef
,
"Error reading log
\n
"
);
return
1
;
goto
err
;
}
}
break
;
break
;
}
}
}
}
translog_destroy_scanner
(
&
scanner
);
translog_free_record_header
(
&
rec
);
translog_free_record_header
(
&
rec
);
return
0
;
return
0
;
err:
translog_destroy_scanner
(
&
scanner
);
return
1
;
}
}
...
...
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