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
7f9ddb84
Commit
7f9ddb84
authored
Mar 12, 2013
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql-5.1 to mysql-5.5.
parents
a79dcd5f
1a2cb3de
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
24 deletions
+12
-24
storage/innobase/include/page0zip.ic
storage/innobase/include/page0zip.ic
+5
-15
storage/innobase/page/page0zip.c
storage/innobase/page/page0zip.c
+7
-9
No files found.
storage/innobase/include/page0zip.ic
View file @
7f9ddb84
...
...
@@ -229,9 +229,7 @@ ibool
page_zip_get_trailer_len(
/*=====================*/
const page_zip_des_t* page_zip,/*!< in: compressed page */
ibool is_clust,/*!< in: TRUE if clustered index */
ulint* entry_size)/*!< out: size of the uncompressed
portion of a user record */
ibool is_clust)/*!< in: TRUE if clustered index */
{
ulint uncompressed_size;
...
...
@@ -250,10 +248,6 @@ page_zip_get_trailer_len(
ut_ad(!page_zip->n_blobs);
}
if (entry_size) {
*entry_size = uncompressed_size;
}
return((page_dir_get_n_heap(page_zip->data) - 2)
* uncompressed_size
+ page_zip->n_blobs * BTR_EXTERN_FIELD_REF_SIZE);
...
...
@@ -270,11 +264,9 @@ page_zip_max_ins_size(
const page_zip_des_t* page_zip,/*!< in: compressed page */
ibool is_clust)/*!< in: TRUE if clustered index */
{
ulint uncompressed_size;
ulint trailer_len;
trailer_len = page_zip_get_trailer_len(page_zip, is_clust,
&uncompressed_size);
trailer_len = page_zip_get_trailer_len(page_zip, is_clust);
/* When a record is created, a pointer may be added to
the dense directory.
...
...
@@ -283,7 +275,7 @@ page_zip_max_ins_size(
Also the BLOB pointers will be allocated from there, but
we may as well count them in the length of the record. */
trailer_len +=
uncompressed_size
;
trailer_len +=
PAGE_ZIP_DIR_SLOT_SIZE
;
return((lint) page_zip_get_size(page_zip)
- trailer_len - page_zip->m_end
...
...
@@ -303,13 +295,11 @@ page_zip_available(
ulint create) /*!< in: nonzero=add the record to
the heap */
{
ulint uncompressed_size;
ulint trailer_len;
ut_ad(length > REC_N_NEW_EXTRA_BYTES);
trailer_len = page_zip_get_trailer_len(page_zip, is_clust,
&uncompressed_size);
trailer_len = page_zip_get_trailer_len(page_zip, is_clust);
/* Subtract the fixed extra bytes and add the maximum
space needed for identifying the record (encoded heap_no). */
...
...
@@ -323,7 +313,7 @@ page_zip_available(
Also the BLOB pointers will be allocated from there, but
we may as well count them in the length of the record. */
trailer_len +=
uncompressed_size
;
trailer_len +=
PAGE_ZIP_DIR_SLOT_SIZE
;
}
return(UNIV_LIKELY(length
...
...
storage/innobase/page/page0zip.c
View file @
7f9ddb84
...
...
@@ -2271,13 +2271,12 @@ zlib_done:
if
(
UNIV_UNLIKELY
(
page_zip_get_trailer_len
(
page_zip
,
dict_index_is_clust
(
index
)
,
NULL
)
dict_index_is_clust
(
index
))
+
page_zip
->
m_end
>=
page_zip_get_size
(
page_zip
)))
{
page_zip_fail
((
"page_zip_decompress_node_ptrs:"
" %lu + %lu >= %lu, %lu
\n
"
,
(
ulong
)
page_zip_get_trailer_len
(
page_zip
,
dict_index_is_clust
(
index
),
NULL
),
page_zip
,
dict_index_is_clust
(
index
)),
(
ulong
)
page_zip
->
m_end
,
(
ulong
)
page_zip_get_size
(
page_zip
),
(
ulong
)
dict_index_is_clust
(
index
)));
...
...
@@ -2428,12 +2427,12 @@ zlib_done:
page_zip
->
m_nonempty
=
mod_log_ptr
!=
d_stream
->
next_in
;
}
if
(
UNIV_UNLIKELY
(
page_zip_get_trailer_len
(
page_zip
,
FALSE
,
NULL
)
if
(
UNIV_UNLIKELY
(
page_zip_get_trailer_len
(
page_zip
,
FALSE
)
+
page_zip
->
m_end
>=
page_zip_get_size
(
page_zip
)))
{
page_zip_fail
((
"page_zip_decompress_sec: %lu + %lu >= %lu
\n
"
,
(
ulong
)
page_zip_get_trailer_len
(
page_zip
,
FALSE
,
NULL
),
page_zip
,
FALSE
),
(
ulong
)
page_zip
->
m_end
,
(
ulong
)
page_zip_get_size
(
page_zip
)));
return
(
FALSE
);
...
...
@@ -2759,12 +2758,12 @@ zlib_done:
page_zip
->
m_nonempty
=
mod_log_ptr
!=
d_stream
->
next_in
;
}
if
(
UNIV_UNLIKELY
(
page_zip_get_trailer_len
(
page_zip
,
TRUE
,
NULL
)
if
(
UNIV_UNLIKELY
(
page_zip_get_trailer_len
(
page_zip
,
TRUE
)
+
page_zip
->
m_end
>=
page_zip_get_size
(
page_zip
)))
{
page_zip_fail
((
"page_zip_decompress_clust: %lu + %lu >= %lu
\n
"
,
(
ulong
)
page_zip_get_trailer_len
(
page_zip
,
TRUE
,
NULL
),
page_zip
,
TRUE
),
(
ulong
)
page_zip
->
m_end
,
(
ulong
)
page_zip_get_size
(
page_zip
)));
return
(
FALSE
);
...
...
@@ -4639,8 +4638,7 @@ page_zip_copy_recs(
memcpy
(
page_zip
,
src_zip
,
sizeof
*
page_zip
);
page_zip
->
data
=
data
;
}
ut_ad
(
page_zip_get_trailer_len
(
page_zip
,
dict_index_is_clust
(
index
),
NULL
)
ut_ad
(
page_zip_get_trailer_len
(
page_zip
,
dict_index_is_clust
(
index
))
+
page_zip
->
m_end
<
page_zip_get_size
(
page_zip
));
if
(
!
page_is_leaf
(
src
)
...
...
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