~ubuntu-branches/ubuntu/precise/mysql-5.5/precise-201203300109

« back to all changes in this revision

Viewing changes to storage/innobase/include/fsp0fsp.ic

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-02-14 23:59:22 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20120214235922-cux5uek1e5l0hje9
Tags: 5.5.20-0ubuntu1
* New upstream release.
* d/mysql-server-5.5.mysql.upstart: Fix stop on to make sure mysql is
  fully stopped before shutdown commences. (LP: #688541) Also simplify
  start on as it is redundant.
* d/control: Depend on upstart version which has apparmor profile load
  script to prevent failure on upgrade from lucid to precise.
  (LP: #907465)
* d/apparmor-profile: need to allow /run since that is the true path
  of /var/run files. (LP: #917542)
* d/control: mysql-server-5.5 has files in it that used to be owned
  by libmysqlclient-dev, so it must break/replace it. (LP: #912487)
* d/rules, d/control: 5.5.20 Fixes segfault on tests with gcc 4.6,
  change compiler back to system default.
* d/rules: Turn off embedded libedit/readline.(Closes: #659566)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 
3
 
Copyright (c) 1995, 2009, Innobase Oy. All Rights Reserved.
 
3
Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved.
4
4
 
5
5
This program is free software; you can redistribute it and/or modify it under
6
6
the terms of the GNU General Public License as published by the Free Software
11
11
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
12
 
13
13
You should have received a copy of the GNU General Public License along with
14
 
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
15
 
Place, Suite 330, Boston, MA 02111-1307 USA
 
14
this program; if not, write to the Free Software Foundation, Inc.,
 
15
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
16
16
 
17
17
*****************************************************************************/
18
18
 
43
43
 
44
44
        return(UNIV_UNLIKELY((page_no & (zip_size - 1)) == FSP_XDES_OFFSET));
45
45
}
 
46
/********************************************************************//**
 
47
Extract the page size from tablespace flags.
 
48
This feature, storing the page_ssize into the tablespace flags, is added
 
49
to InnoDB 5.6.4.  This is here only to protect against a crash if a newer
 
50
database is opened with this code branch.
 
51
@return page size of the tablespace in bytes */
 
52
UNIV_INLINE
 
53
ulint
 
54
fsp_flags_get_page_size(
 
55
/*====================*/
 
56
        ulint   flags)  /*!< in: tablespace flags */
 
57
{
 
58
        ulint   page_size = 0;
 
59
        ulint   ssize = FSP_FLAGS_GET_PAGE_SSIZE(flags);
 
60
 
 
61
        /* Convert from a 'log2 minus 9' to a page size in bytes. */
 
62
        if (UNIV_UNLIKELY(ssize)) {
 
63
                page_size = (512 << ssize);
 
64
 
 
65
                ut_ad(page_size <= UNIV_PAGE_SIZE);
 
66
        } else {
 
67
                /* If the page size was not stored, then it is the
 
68
                original 16k. */
 
69
                page_size = UNIV_PAGE_SIZE;
 
70
        }
 
71
 
 
72
        return(page_size);
 
73
}