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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
17bfc673
Commit
17bfc673
authored
Jan 20, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
two bugs in parallel repair fixed
parent
4681ca8d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
11 deletions
+20
-11
myisam/mi_check.c
myisam/mi_check.c
+8
-2
myisam/mi_dynrec.c
myisam/mi_dynrec.c
+8
-8
myisam/myisamdef.h
myisam/myisamdef.h
+4
-1
No files found.
myisam/mi_check.c
View file @
17bfc673
...
...
@@ -922,7 +922,7 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend)
info
->
checksum
=
mi_checksum
(
info
,
record
);
if
(
param
->
testflag
&
(
T_EXTEND
|
T_MEDIUM
|
T_VERBOSE
))
{
if
(
_mi_rec_check
(
info
,
record
,
info
->
rec_buff
))
if
(
_mi_rec_check
(
info
,
record
,
info
->
rec_buff
,
block_info
.
rec_len
))
{
mi_check_print_error
(
param
,
"Found wrong packed record at %s"
,
llstr
(
start_recpos
,
llbuff
));
...
...
@@ -2350,6 +2350,11 @@ int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info,
sort_param
[
i
].
record
=
(((
char
*
)(
sort_param
+
share
->
base
.
keys
))
+
(
share
->
base
.
pack_reclength
*
i
));
if
(
!
mi_alloc_rec_buff
(
info
,
-
1
,
&
sort_param
[
i
].
rec_buff
))
{
mi_check_print_error
(
param
,
"Not enough memory!"
);
goto
err
;
}
sort_param
[
i
].
key_length
=
share
->
rec_reflength
;
for
(
keyseg
=
sort_param
[
i
].
keyinfo
->
seg
;
keyseg
->
type
!=
HA_KEYTYPE_END
;
...
...
@@ -2911,7 +2916,8 @@ static int sort_get_next_record(MI_SORT_PARAM *sort_param)
info
->
checksum
=
mi_checksum
(
info
,
sort_param
->
record
);
if
((
param
->
testflag
&
(
T_EXTEND
|
T_REP
))
||
searching
)
{
if
(
_mi_rec_check
(
info
,
sort_param
->
record
,
sort_param
->
rec_buff
))
if
(
_mi_rec_check
(
info
,
sort_param
->
record
,
sort_param
->
rec_buff
,
sort_param
->
find_length
))
{
mi_check_print_info
(
param
,
"Found wrong packed record at %s"
,
llstr
(
sort_param
->
start_recpos
,
llbuff
));
...
...
myisam/mi_dynrec.c
View file @
17bfc673
...
...
@@ -148,7 +148,7 @@ static int write_dynamic_record(MI_INFO *info, const byte *record,
}
while
(
reclength
);
DBUG_RETURN
(
0
);
err:
err:
DBUG_RETURN
(
1
);
}
...
...
@@ -744,7 +744,8 @@ uint _mi_rec_pack(MI_INFO *info, register byte *to, register const byte *from)
Returns 0 if record is ok.
*/
my_bool
_mi_rec_check
(
MI_INFO
*
info
,
const
char
*
record
,
byte
*
rec_buff
)
my_bool
_mi_rec_check
(
MI_INFO
*
info
,
const
char
*
record
,
byte
*
rec_buff
,
ulong
packed_length
)
{
uint
length
,
new_length
,
flag
,
bit
,
i
;
char
*
pos
,
*
end
,
*
packpos
,
*
to
;
...
...
@@ -836,8 +837,7 @@ my_bool _mi_rec_check(MI_INFO *info,const char *record, byte *rec_buff)
to
+=
length
;
}
}
if
(
info
->
packed_length
!=
(
uint
)
(
to
-
rec_buff
)
+
test
(
info
->
s
->
calc_checksum
)
||
if
(
packed_length
!=
(
uint
)
(
to
-
rec_buff
)
+
test
(
info
->
s
->
calc_checksum
)
||
(
bit
!=
1
&&
(
flag
&
~
(
bit
-
1
))))
goto
err
;
if
(
info
->
s
->
calc_checksum
)
...
...
@@ -850,7 +850,7 @@ my_bool _mi_rec_check(MI_INFO *info,const char *record, byte *rec_buff)
}
DBUG_RETURN
(
0
);
err:
err:
DBUG_RETURN
(
1
);
}
...
...
@@ -966,8 +966,8 @@ ulong _mi_rec_unpack(register MI_INFO *info, register byte *to, byte *from,
if
(
info
->
s
->
calc_checksum
)
from
++
;
if
(
to
==
to_end
&&
from
==
from_end
&&
(
bit
==
1
||
!
(
flag
&
~
(
bit
-
1
))))
DBUG_RETURN
(
(
info
->
packed_length
=
found_length
)
);
err:
DBUG_RETURN
(
found_length
);
err:
my_errno
=
HA_ERR_RECORD_DELETED
;
DBUG_PRINT
(
"error"
,(
"to_end: %lx -> %lx from_end: %lx -> %lx"
,
to
,
to_end
,
from
,
from_end
));
...
...
@@ -1210,7 +1210,7 @@ int _mi_cmp_dynamic_record(register MI_INFO *info, register const byte *record)
}
}
my_errno
=
0
;
err:
err:
if
(
buffer
!=
info
->
rec_buff
)
my_afree
((
gptr
)
buffer
);
DBUG_RETURN
(
my_errno
);
...
...
myisam/myisamdef.h
View file @
17bfc673
...
...
@@ -244,6 +244,8 @@ struct st_myisam_info {
my_off_t
last_search_keypage
;
/* Last keypage when searching */
my_off_t
dupp_key_pos
;
ha_checksum
checksum
;
/* QQ: the folloing two xxx_length fields should be removed,
as they are not compatible with parallel repair */
ulong
packed_length
,
blob_length
;
/* Length of found, packed record */
int
dfile
;
/* The datafile */
uint
opt_flag
;
/* Optim. for space/speed */
...
...
@@ -536,7 +538,8 @@ extern byte *mi_alloc_rec_buff(MI_INFO *,ulong, byte**);
extern
ulong
_mi_rec_unpack
(
MI_INFO
*
info
,
byte
*
to
,
byte
*
from
,
ulong
reclength
);
extern
my_bool
_mi_rec_check
(
MI_INFO
*
info
,
const
char
*
record
,
byte
*
packpos
);
extern
my_bool
_mi_rec_check
(
MI_INFO
*
info
,
const
char
*
record
,
byte
*
packpos
,
ulong
reclength
);
extern
int
_mi_write_part_record
(
MI_INFO
*
info
,
my_off_t
filepos
,
ulong
length
,
my_off_t
next_filepos
,
byte
**
record
,
ulong
*
reclength
,
int
*
flag
);
...
...
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