Commit 98e2c17e authored by Marko Mäkelä's avatar Marko Mäkelä

Cleanup: Remove fil_check_adress_in_tablespace()

parent 14543afd
...@@ -554,12 +554,18 @@ buf_dblwr_process() ...@@ -554,12 +554,18 @@ buf_dblwr_process()
continue; continue;
} }
if (!fil_check_adress_in_tablespace(space_id, page_no)) { if (!space()->size) {
fil_space_get_size(space_id);
}
if (UNIV_UNLIKELY(space()->size <= page_no)) {
ib_logf(IB_LOG_LEVEL_WARN, ib_logf(IB_LOG_LEVEL_WARN,
"A copy of page " ULINTPF ":" ULINTPF "A copy of page " ULINTPF
" in the doublewrite buffer slot " ULINTPF " in the doublewrite buffer slot " ULINTPF
" is not within space bounds", " is beyond the end of the tablespace "
space_id, page_no, page_no_dblwr); " %s (" ULINTPF " pages)",
page_no, page_no_dblwr,
space()->name, space()->size);
continue; continue;
} }
......
/***************************************************************************** /*****************************************************************************
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2014, 2019, MariaDB Corporation. Copyright (c) 2014, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under 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 the terms of the GNU General Public License as published by the Free Software
...@@ -1775,25 +1775,6 @@ fil_space_get_zip_size( ...@@ -1775,25 +1775,6 @@ fil_space_get_zip_size(
return(flags); return(flags);
} }
/*******************************************************************//**
Checks if the pair space, page_no refers to an existing page in a tablespace
file space. The tablespace must be cached in the memory cache.
@return TRUE if the address is meaningful */
UNIV_INTERN
ibool
fil_check_adress_in_tablespace(
/*===========================*/
ulint id, /*!< in: space id */
ulint page_no)/*!< in: page number */
{
if (fil_space_get_size(id) > page_no) {
return(TRUE);
}
return(FALSE);
}
/****************************************************************//** /****************************************************************//**
Initializes the tablespace memory cache. */ Initializes the tablespace memory cache. */
UNIV_INTERN UNIV_INTERN
......
/***************************************************************************** /*****************************************************************************
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2013, 2019, MariaDB Corporation. Copyright (c) 2013, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under 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 the terms of the GNU General Public License as published by the Free Software
...@@ -568,16 +568,6 @@ ulint ...@@ -568,16 +568,6 @@ ulint
fil_space_get_zip_size( fil_space_get_zip_size(
/*===================*/ /*===================*/
ulint id); /*!< in: space id */ ulint id); /*!< in: space id */
/*******************************************************************//**
Checks if the pair space, page_no refers to an existing page in a tablespace
file space. The tablespace must be cached in the memory cache.
@return TRUE if the address is meaningful */
UNIV_INTERN
ibool
fil_check_adress_in_tablespace(
/*===========================*/
ulint id, /*!< in: space id */
ulint page_no);/*!< in: page number */
/****************************************************************//** /****************************************************************//**
Initializes the tablespace memory cache. */ Initializes the tablespace memory cache. */
UNIV_INTERN UNIV_INTERN
......
...@@ -554,12 +554,18 @@ buf_dblwr_process() ...@@ -554,12 +554,18 @@ buf_dblwr_process()
continue; continue;
} }
if (!fil_check_adress_in_tablespace(space_id, page_no)) { if (!space()->size) {
fil_space_get_size(space_id);
}
if (UNIV_UNLIKELY(space()->size <= page_no)) {
ib_logf(IB_LOG_LEVEL_WARN, ib_logf(IB_LOG_LEVEL_WARN,
"A copy of page " ULINTPF ":" ULINTPF "A copy of page " ULINTPF
" in the doublewrite buffer slot " ULINTPF " in the doublewrite buffer slot " ULINTPF
" is not within space bounds", " is beyond the end of the tablespace "
space_id, page_no, page_no_dblwr); " %s (" ULINTPF " pages)",
page_no, page_no_dblwr,
space()->name, space()->size);
continue; continue;
} }
......
/***************************************************************************** /*****************************************************************************
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2014, 2019, MariaDB Corporation. Copyright (c) 2014, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under 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 the terms of the GNU General Public License as published by the Free Software
...@@ -1815,25 +1815,6 @@ fil_space_get_zip_size( ...@@ -1815,25 +1815,6 @@ fil_space_get_zip_size(
return(flags); return(flags);
} }
/*******************************************************************//**
Checks if the pair space, page_no refers to an existing page in a tablespace
file space. The tablespace must be cached in the memory cache.
@return TRUE if the address is meaningful */
UNIV_INTERN
ibool
fil_check_adress_in_tablespace(
/*===========================*/
ulint id, /*!< in: space id */
ulint page_no)/*!< in: page number */
{
if (fil_space_get_size(id) > page_no) {
return(TRUE);
}
return(FALSE);
}
/****************************************************************//** /****************************************************************//**
Initializes the tablespace memory cache. */ Initializes the tablespace memory cache. */
UNIV_INTERN UNIV_INTERN
......
/***************************************************************************** /*****************************************************************************
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2013, 2019, MariaDB Corporation. Copyright (c) 2013, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under 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 the terms of the GNU General Public License as published by the Free Software
...@@ -574,16 +574,6 @@ ulint ...@@ -574,16 +574,6 @@ ulint
fil_space_get_zip_size( fil_space_get_zip_size(
/*===================*/ /*===================*/
ulint id); /*!< in: space id */ ulint id); /*!< in: space id */
/*******************************************************************//**
Checks if the pair space, page_no refers to an existing page in a tablespace
file space. The tablespace must be cached in the memory cache.
@return TRUE if the address is meaningful */
UNIV_INTERN
ibool
fil_check_adress_in_tablespace(
/*===========================*/
ulint id, /*!< in: space id */
ulint page_no);/*!< in: page number */
/****************************************************************//** /****************************************************************//**
Initializes the tablespace memory cache. */ Initializes the tablespace memory cache. */
UNIV_INTERN UNIV_INTERN
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment