summaryrefslogtreecommitdiff
path: root/storage/innobase/include/page0zip.ic
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2012-08-01 17:27:34 +0300
committerMichael Widenius <monty@askmonty.org>2012-08-01 17:27:34 +0300
commit1d0f70c2f894b27e98773a282871d32802f67964 (patch)
tree833e683e0ced29c4323c29a9d845703d4dfcd81b /storage/innobase/include/page0zip.ic
parent5a86a61219826aadf8d08cbc447fe438f2bf50c3 (diff)
downloadmariadb-git-1d0f70c2f894b27e98773a282871d32802f67964.tar.gz
Temporary commit of merge of MariaDB 10.0-base and MySQL 5.6
Diffstat (limited to 'storage/innobase/include/page0zip.ic')
-rw-r--r--storage/innobase/include/page0zip.ic32
1 files changed, 15 insertions, 17 deletions
diff --git a/storage/innobase/include/page0zip.ic b/storage/innobase/include/page0zip.ic
index 75cc7a9fcc4..c9300aa4e9f 100644
--- a/storage/innobase/include/page0zip.ic
+++ b/storage/innobase/include/page0zip.ic
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2005, 2009, Innobase Oy. All Rights Reserved.
+Copyright (c) 2005, 2011, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -11,8 +11,8 @@ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
-this program; if not, write to the Free Software Foundation, Inc., 59 Temple
-Place, Suite 330, Boston, MA 02111-1307 USA
+this program; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
*****************************************************************************/
@@ -120,13 +120,13 @@ page_zip_get_size(
{
ulint size;
- if (UNIV_UNLIKELY(!page_zip->ssize)) {
+ if (!page_zip->ssize) {
return(0);
}
- size = (PAGE_ZIP_MIN_SIZE >> 1) << page_zip->ssize;
+ size = (UNIV_ZIP_SIZE_MIN >> 1) << page_zip->ssize;
- ut_ad(size >= PAGE_ZIP_MIN_SIZE);
+ ut_ad(size >= UNIV_ZIP_SIZE_MIN);
ut_ad(size <= UNIV_PAGE_SIZE);
return(size);
@@ -175,12 +175,12 @@ page_zip_rec_needs_ext(
ut_ad(comp || !zip_size);
#if UNIV_PAGE_SIZE > REC_MAX_DATA_SIZE
- if (UNIV_UNLIKELY(rec_size >= REC_MAX_DATA_SIZE)) {
+ if (rec_size >= REC_MAX_DATA_SIZE) {
return(TRUE);
}
#endif
- if (UNIV_UNLIKELY(zip_size)) {
+ if (zip_size) {
ut_ad(comp);
/* On a compressed page, there is a two-byte entry in
the dense page directory for every record. But there
@@ -209,7 +209,7 @@ page_zip_simple_validate(
{
ut_ad(page_zip);
ut_ad(page_zip->data);
- ut_ad(page_zip->ssize < PAGE_ZIP_NUM_SSIZE);
+ ut_ad(page_zip->ssize <= PAGE_ZIP_SSIZE_MAX);
ut_ad(page_zip_get_size(page_zip)
> PAGE_DATA + PAGE_ZIP_DIR_SLOT_SIZE);
ut_ad(page_zip->m_start <= page_zip->m_end);
@@ -238,11 +238,11 @@ page_zip_get_trailer_len(
ut_ad(page_zip_simple_validate(page_zip));
UNIV_MEM_ASSERT_RW(page_zip->data, page_zip_get_size(page_zip));
- if (UNIV_UNLIKELY(!page_is_leaf(page_zip->data))) {
+ if (!page_is_leaf(page_zip->data)) {
uncompressed_size = PAGE_ZIP_DIR_SLOT_SIZE
+ REC_NODE_PTR_SIZE;
ut_ad(!page_zip->n_blobs);
- } else if (UNIV_UNLIKELY(is_clust)) {
+ } else if (is_clust) {
uncompressed_size = PAGE_ZIP_DIR_SLOT_SIZE
+ DATA_TRX_ID_LEN + DATA_ROLL_PTR_LEN;
} else {
@@ -315,7 +315,7 @@ page_zip_available(
space needed for identifying the record (encoded heap_no). */
length -= REC_N_NEW_EXTRA_BYTES - 2;
- if (UNIV_UNLIKELY(create)) {
+ if (create > 0) {
/* When a record is created, a pointer may be added to
the dense directory.
Likewise, space for the columns that will not be
@@ -326,10 +326,8 @@ page_zip_available(
trailer_len += uncompressed_size;
}
- return(UNIV_LIKELY(length
- + trailer_len
- + page_zip->m_end
- < page_zip_get_size(page_zip)));
+ return(length + trailer_len + page_zip->m_end
+ < page_zip_get_size(page_zip));
}
/**********************************************************************//**
@@ -384,7 +382,7 @@ page_zip_write_header(
/* The following would fail in page_cur_insert_rec_zip(). */
/* ut_ad(page_zip_validate(page_zip, str - pos)); */
- if (UNIV_LIKELY_NULL(mtr)) {
+ if (mtr) {
#ifndef UNIV_HOTBACKUP
page_zip_write_header_log(str, length, mtr);
#endif /* !UNIV_HOTBACKUP */