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
961fc6a6
Commit
961fc6a6
authored
Nov 24, 2016
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: T_REP/T_REP_BY_SORT/T_REP_PARALLEL in MyISAM
always set them according to the repair method used
parent
b634bd50
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
10 deletions
+9
-10
storage/myisam/ha_myisam.cc
storage/myisam/ha_myisam.cc
+2
-2
storage/myisam/mi_check.c
storage/myisam/mi_check.c
+4
-4
storage/myisam/myisamchk.c
storage/myisam/myisamchk.c
+3
-4
No files found.
storage/myisam/ha_myisam.cc
View file @
961fc6a6
...
...
@@ -1031,9 +1031,9 @@ int ha_myisam::repair(THD* thd, HA_CHECK_OPT *check_opt)
continue
;
}
param
.
testflag
&=
~
T_QUICK
;
if
((
param
.
testflag
&
T_REP_BY_SORT
))
if
((
param
.
testflag
&
(
T_REP_BY_SORT
|
T_REP_PARALLEL
)
))
{
param
.
testflag
=
(
param
.
testflag
&
~
T_REP_
BY_SORT
)
|
T_REP
;
param
.
testflag
=
(
param
.
testflag
&
~
T_REP_
ANY
)
|
T_REP
;
sql_print_information
(
"Retrying repair of: '%s' with keycache"
,
table
->
s
->
path
.
str
);
continue
;
...
...
storage/myisam/mi_check.c
View file @
961fc6a6
...
...
@@ -2207,7 +2207,7 @@ int mi_repair_by_sort(HA_CHECK *param, register MI_INFO *info,
printf
(
"- recovering (with sort) MyISAM-table '%s'
\n
"
,
name
);
printf
(
"Data records: %s
\n
"
,
llstr
(
start_records
,
llbuff
));
}
param
->
testflag
|=
T_REP
;
/* for easy checking */
param
->
testflag
|=
T_REP
_BY_SORT
;
/* for easy checking */
param
->
retry_repair
=
0
;
param
->
warning_printed
=
param
->
error_printed
=
param
->
note_printed
=
0
;
...
...
@@ -2637,7 +2637,7 @@ int mi_repair_parallel(HA_CHECK *param, register MI_INFO *info,
printf
(
"- parallel recovering (with sort) MyISAM-table '%s'
\n
"
,
name
);
printf
(
"Data records: %s
\n
"
,
llstr
(
start_records
,
llbuff
));
}
param
->
testflag
|=
T_REP
;
/* for easy checking */
param
->
testflag
|=
T_REP
_PARALLEL
;
/* for easy checking */
param
->
retry_repair
=
0
;
param
->
warning_printed
=
0
;
param
->
error_printed
=
0
;
...
...
@@ -3555,7 +3555,7 @@ static int sort_get_next_record(MI_SORT_PARAM *sort_param)
if
(
sort_param
->
calc_checksum
)
info
->
checksum
=
(
*
info
->
s
->
calc_check_checksum
)(
info
,
sort_param
->
record
);
if
((
param
->
testflag
&
(
T_EXTEND
|
T_REP
))
||
searching
)
if
((
param
->
testflag
&
(
T_EXTEND
|
T_REP
_ANY
))
||
searching
)
{
if
(
_mi_rec_check
(
info
,
sort_param
->
record
,
sort_param
->
rec_buff
,
sort_param
->
find_length
,
...
...
@@ -4509,7 +4509,7 @@ void update_auto_increment_key(HA_CHECK *param, MI_INFO *info,
DBUG_VOID_RETURN
;
}
if
(
!
(
param
->
testflag
&
T_SILENT
)
&&
!
(
param
->
testflag
&
T_REP
))
!
(
param
->
testflag
&
T_REP
_ANY
))
printf
(
"Updating MyISAM file: %s
\n
"
,
param
->
isam_file_name
);
/*
We have to use an allocated buffer instead of info->rec_buff as
...
...
storage/myisam/myisamchk.c
View file @
961fc6a6
...
...
@@ -94,11 +94,10 @@ int main(int argc, char **argv)
(
void
)
fflush
(
stderr
);
if
((
check_param
.
error_printed
|
check_param
.
warning_printed
)
&&
(
check_param
.
testflag
&
T_FORCE_CREATE
)
&&
(
!
(
check_param
.
testflag
&
(
T_REP
|
T_REP_BY_SORT
|
T_SORT_RECORDS
|
T_SORT_INDEX
))))
(
!
(
check_param
.
testflag
&
(
T_REP_ANY
|
T_SORT_RECORDS
|
T_SORT_INDEX
))))
{
ulonglong
old_testflag
=
check_param
.
testflag
;
if
(
!
(
check_param
.
testflag
&
T_REP
))
if
(
!
(
check_param
.
testflag
&
T_REP
_ANY
))
check_param
.
testflag
|=
T_REP_BY_SORT
;
check_param
.
testflag
&=
~
T_EXTEND
;
/* Don't needed */
error
|=
myisamchk
(
&
check_param
,
argv
[
-
1
]);
...
...
@@ -1067,7 +1066,7 @@ static int myisamchk(HA_CHECK *param, char * filename)
error
=
mi_sort_records
(
param
,
info
,
filename
,
param
->
opt_sort_key
,
/* what is the following parameter for ? */
(
my_bool
)
!
(
param
->
testflag
&
T_REP
),
(
my_bool
)
!
(
param
->
testflag
&
T_REP
_ANY
),
update_index
);
datafile
=
info
->
dfile
;
/* This is now locked */
if
(
!
error
&&
!
update_index
)
...
...
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