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
00db3c39
Commit
00db3c39
authored
Jan 30, 2003
by
serg@serg.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed crash with blobs in compressed table
parent
45ed0a08
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
11 deletions
+8
-11
myisam/mi_check.c
myisam/mi_check.c
+2
-2
myisam/mi_packrec.c
myisam/mi_packrec.c
+5
-7
myisam/myisamdef.h
myisam/myisamdef.h
+1
-2
No files found.
myisam/mi_check.c
View file @
00db3c39
...
@@ -920,7 +920,7 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend)
...
@@ -920,7 +920,7 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend)
goto
err
;
goto
err
;
start_recpos
=
pos
;
start_recpos
=
pos
;
splits
++
;
splits
++
;
VOID
(
_mi_pack_get_block_info
(
info
,
&
block_info
,
-
1
,
start_recpos
,
NullS
));
VOID
(
_mi_pack_get_block_info
(
info
,
&
block_info
,
-
1
,
start_recpos
));
pos
=
block_info
.
filepos
+
block_info
.
rec_len
;
pos
=
block_info
.
filepos
+
block_info
.
rec_len
;
if
(
block_info
.
rec_len
<
(
uint
)
info
->
s
->
min_pack_length
||
if
(
block_info
.
rec_len
<
(
uint
)
info
->
s
->
min_pack_length
||
block_info
.
rec_len
>
(
uint
)
info
->
s
->
max_pack_length
)
block_info
.
rec_len
>
(
uint
)
info
->
s
->
max_pack_length
)
...
@@ -2891,7 +2891,7 @@ static int sort_get_next_record(MI_SORT_PARAM *sort_param)
...
@@ -2891,7 +2891,7 @@ static int sort_get_next_record(MI_SORT_PARAM *sort_param)
DBUG_RETURN
(
1
);
/* Something wrong with data */
DBUG_RETURN
(
1
);
/* Something wrong with data */
}
}
sort_param
->
start_recpos
=
sort_param
->
pos
;
sort_param
->
start_recpos
=
sort_param
->
pos
;
if
(
_mi_pack_get_block_info
(
info
,
&
block_info
,
-
1
,
sort_param
->
pos
,
NullS
))
if
(
_mi_pack_get_block_info
(
info
,
&
block_info
,
-
1
,
sort_param
->
pos
))
DBUG_RETURN
(
-
1
);
DBUG_RETURN
(
-
1
);
if
(
!
block_info
.
rec_len
&&
if
(
!
block_info
.
rec_len
&&
sort_param
->
pos
+
MEMMAP_EXTRA_MARGIN
==
sort_param
->
pos
+
MEMMAP_EXTRA_MARGIN
==
...
...
myisam/mi_packrec.c
View file @
00db3c39
...
@@ -416,8 +416,7 @@ int _mi_read_pack_record(MI_INFO *info, my_off_t filepos, byte *buf)
...
@@ -416,8 +416,7 @@ int _mi_read_pack_record(MI_INFO *info, my_off_t filepos, byte *buf)
DBUG_RETURN
(
-
1
);
/* _search() didn't find record */
DBUG_RETURN
(
-
1
);
/* _search() didn't find record */
file
=
info
->
dfile
;
file
=
info
->
dfile
;
if
(
_mi_pack_get_block_info
(
info
,
&
block_info
,
file
,
filepos
,
if
(
_mi_pack_get_block_info
(
info
,
&
block_info
,
file
,
filepos
))
info
->
rec_buff
))
goto
err
;
goto
err
;
if
(
my_read
(
file
,(
byte
*
)
info
->
rec_buff
+
block_info
.
offset
,
if
(
my_read
(
file
,(
byte
*
)
info
->
rec_buff
+
block_info
.
offset
,
block_info
.
rec_len
-
block_info
.
offset
,
MYF
(
MY_NABP
)))
block_info
.
rec_len
-
block_info
.
offset
,
MYF
(
MY_NABP
)))
...
@@ -963,11 +962,10 @@ int _mi_read_rnd_pack_record(MI_INFO *info, byte *buf,
...
@@ -963,11 +962,10 @@ int _mi_read_rnd_pack_record(MI_INFO *info, byte *buf,
if
(
_mi_read_cache
(
&
info
->
rec_cache
,(
byte
*
)
block_info
.
header
,
filepos
,
if
(
_mi_read_cache
(
&
info
->
rec_cache
,(
byte
*
)
block_info
.
header
,
filepos
,
share
->
pack
.
ref_length
,
skip_deleted_blocks
))
share
->
pack
.
ref_length
,
skip_deleted_blocks
))
goto
err
;
goto
err
;
b_type
=
_mi_pack_get_block_info
(
info
,
&
block_info
,
-
1
,
filepos
,
NullS
);
b_type
=
_mi_pack_get_block_info
(
info
,
&
block_info
,
-
1
,
filepos
);
}
}
else
else
b_type
=
_mi_pack_get_block_info
(
info
,
&
block_info
,
info
->
dfile
,
filepos
,
b_type
=
_mi_pack_get_block_info
(
info
,
&
block_info
,
info
->
dfile
,
filepos
);
info
->
rec_buff
);
if
(
b_type
)
if
(
b_type
)
goto
err
;
/* Error code is already set */
goto
err
;
/* Error code is already set */
#ifndef DBUG_OFF
#ifndef DBUG_OFF
...
@@ -1007,7 +1005,7 @@ int _mi_read_rnd_pack_record(MI_INFO *info, byte *buf,
...
@@ -1007,7 +1005,7 @@ int _mi_read_rnd_pack_record(MI_INFO *info, byte *buf,
/* Read and process header from a huff-record-file */
/* Read and process header from a huff-record-file */
uint
_mi_pack_get_block_info
(
MI_INFO
*
myisam
,
MI_BLOCK_INFO
*
info
,
File
file
,
uint
_mi_pack_get_block_info
(
MI_INFO
*
myisam
,
MI_BLOCK_INFO
*
info
,
File
file
,
my_off_t
filepos
,
char
*
rec_buff
)
my_off_t
filepos
)
{
{
uchar
*
header
=
info
->
header
;
uchar
*
header
=
info
->
header
;
uint
head_length
,
ref_length
;
uint
head_length
,
ref_length
;
...
@@ -1067,7 +1065,7 @@ uint _mi_pack_get_block_info(MI_INFO *myisam, MI_BLOCK_INFO *info, File file,
...
@@ -1067,7 +1065,7 @@ uint _mi_pack_get_block_info(MI_INFO *myisam, MI_BLOCK_INFO *info, File file,
if
(
file
>
0
)
if
(
file
>
0
)
{
{
info
->
offset
=
min
(
info
->
rec_len
,
ref_length
-
head_length
);
info
->
offset
=
min
(
info
->
rec_len
,
ref_length
-
head_length
);
memcpy
(
rec_buff
,
header
+
head_length
,
info
->
offset
);
memcpy
(
myisam
->
rec_buff
,
header
+
head_length
,
info
->
offset
);
}
}
return
0
;
return
0
;
}
}
...
...
myisam/myisamdef.h
View file @
00db3c39
...
@@ -608,8 +608,7 @@ extern "C" {
...
@@ -608,8 +608,7 @@ extern "C" {
extern
uint
_mi_get_block_info
(
MI_BLOCK_INFO
*
,
File
,
my_off_t
);
extern
uint
_mi_get_block_info
(
MI_BLOCK_INFO
*
,
File
,
my_off_t
);
extern
uint
_mi_rec_pack
(
MI_INFO
*
info
,
byte
*
to
,
const
byte
*
from
);
extern
uint
_mi_rec_pack
(
MI_INFO
*
info
,
byte
*
to
,
const
byte
*
from
);
extern
uint
_mi_pack_get_block_info
(
MI_INFO
*
mysql
,
MI_BLOCK_INFO
*
,
File
,
extern
uint
_mi_pack_get_block_info
(
MI_INFO
*
,
MI_BLOCK_INFO
*
,
File
,
my_off_t
);
my_off_t
,
char
*
rec_buf
);
extern
void
_my_store_blob_length
(
byte
*
pos
,
uint
pack_length
,
uint
length
);
extern
void
_my_store_blob_length
(
byte
*
pos
,
uint
pack_length
,
uint
length
);
extern
void
_myisam_log
(
enum
myisam_log_commands
command
,
MI_INFO
*
info
,
extern
void
_myisam_log
(
enum
myisam_log_commands
command
,
MI_INFO
*
info
,
const
byte
*
buffert
,
uint
length
);
const
byte
*
buffert
,
uint
length
);
...
...
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