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
ec062c61
Commit
ec062c61
authored
Jan 15, 2018
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-12121 follow-up: Unbreak the WITH_INNODB_AHI=OFF build
parent
72136ae7
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
49 additions
and
20 deletions
+49
-20
storage/innobase/buf/buf0lru.cc
storage/innobase/buf/buf0lru.cc
+8
-4
storage/innobase/dict/dict0dict.cc
storage/innobase/dict/dict0dict.cc
+6
-2
storage/innobase/fil/fil0fil.cc
storage/innobase/fil/fil0fil.cc
+16
-4
storage/innobase/handler/ha_xtradb.h
storage/innobase/handler/ha_xtradb.h
+3
-1
storage/innobase/include/buf0lru.h
storage/innobase/include/buf0lru.h
+7
-5
storage/innobase/include/fil0fil.h
storage/innobase/include/fil0fil.h
+7
-3
storage/innobase/include/ha0ha.h
storage/innobase/include/ha0ha.h
+2
-1
No files found.
storage/innobase/buf/buf0lru.cc
View file @
ec062c61
...
@@ -696,22 +696,26 @@ buf_flush_dirty_pages(
...
@@ -696,22 +696,26 @@ buf_flush_dirty_pages(
/** Empty the flush list for all pages belonging to a tablespace.
/** Empty the flush list for all pages belonging to a tablespace.
@param[in] id tablespace identifier
@param[in] id tablespace identifier
@param[in] observer flush observer,
@param[in] observer flush observer,
or NULL if nothing is to be written
or NULL if nothing is to be written */
@param[in] drop_ahi whether to drop the adaptive hash index */
void
void
buf_LRU_flush_or_remove_pages
(
buf_LRU_flush_or_remove_pages
(
ulint
id
,
ulint
id
,
FlushObserver
*
observer
,
FlushObserver
*
observer
bool
drop_ahi
)
#ifdef BTR_CUR_HASH_ADAPT
,
bool
drop_ahi
/*!< whether to drop the adaptive hash index */
#endif
/* BTR_CUR_HASH_ADAPT */
)
{
{
/* Pages in the system tablespace must never be discarded. */
/* Pages in the system tablespace must never be discarded. */
ut_ad
(
id
||
observer
);
ut_ad
(
id
||
observer
);
for
(
ulint
i
=
0
;
i
<
srv_buf_pool_instances
;
i
++
)
{
for
(
ulint
i
=
0
;
i
<
srv_buf_pool_instances
;
i
++
)
{
buf_pool_t
*
buf_pool
=
buf_pool_from_array
(
i
);
buf_pool_t
*
buf_pool
=
buf_pool_from_array
(
i
);
#ifdef BTR_CUR_HASH_ADAPT
if
(
drop_ahi
)
{
if
(
drop_ahi
)
{
buf_LRU_drop_page_hash_for_tablespace
(
buf_pool
,
id
);
buf_LRU_drop_page_hash_for_tablespace
(
buf_pool
,
id
);
}
}
#endif
/* BTR_CUR_HASH_ADAPT */
buf_flush_dirty_pages
(
buf_pool
,
id
,
observer
);
buf_flush_dirty_pages
(
buf_pool
,
id
,
observer
);
}
}
...
...
storage/innobase/dict/dict0dict.cc
View file @
ec062c61
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
Copyright (c) 2012, Facebook Inc.
Copyright (c) 2013, 201
7
, MariaDB Corporation.
Copyright (c) 2013, 201
8
, 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
...
@@ -1641,7 +1641,11 @@ dict_table_rename_in_cache(
...
@@ -1641,7 +1641,11 @@ dict_table_rename_in_cache(
return
(
DB_OUT_OF_MEMORY
);
return
(
DB_OUT_OF_MEMORY
);
}
}
fil_delete_tablespace
(
table
->
space
,
true
);
fil_delete_tablespace
(
table
->
space
#ifdef BTR_CUR_HASH_ADAPT
,
true
#endif
/* BTR_CUR_HASH_ADAPT */
);
/* Delete any temp file hanging around. */
/* Delete any temp file hanging around. */
if
(
os_file_status
(
filepath
,
&
exists
,
&
ftype
)
if
(
os_file_status
(
filepath
,
&
exists
,
&
ftype
)
...
...
storage/innobase/fil/fil0fil.cc
View file @
ec062c61
...
@@ -2960,10 +2960,14 @@ fil_table_accessible(const dict_table_t* table)
...
@@ -2960,10 +2960,14 @@ fil_table_accessible(const dict_table_t* table)
/** Delete a tablespace and associated .ibd file.
/** Delete a tablespace and associated .ibd file.
@param[in] id tablespace identifier
@param[in] id tablespace identifier
@param[in] drop_ahi whether to drop the adaptive hash index
@return DB_SUCCESS or error */
@return DB_SUCCESS or error */
dberr_t
dberr_t
fil_delete_tablespace
(
ulint
id
,
bool
drop_ahi
)
fil_delete_tablespace
(
ulint
id
#ifdef BTR_CUR_HASH_ADAPT
,
bool
drop_ahi
/*!< whether to drop the adaptive hash index */
#endif
/* BTR_CUR_HASH_ADAPT */
)
{
{
char
*
path
=
0
;
char
*
path
=
0
;
fil_space_t
*
space
=
0
;
fil_space_t
*
space
=
0
;
...
@@ -3006,7 +3010,11 @@ fil_delete_tablespace(ulint id, bool drop_ahi)
...
@@ -3006,7 +3010,11 @@ fil_delete_tablespace(ulint id, bool drop_ahi)
To deal with potential read requests, we will check the
To deal with potential read requests, we will check the
::stop_new_ops flag in fil_io(). */
::stop_new_ops flag in fil_io(). */
buf_LRU_flush_or_remove_pages
(
id
,
NULL
,
drop_ahi
);
buf_LRU_flush_or_remove_pages
(
id
,
NULL
#ifdef BTR_CUR_HASH_ADAPT
,
drop_ahi
#endif
/* BTR_CUR_HASH_ADAPT */
);
/* If it is a delete then also delete any generated files, otherwise
/* If it is a delete then also delete any generated files, otherwise
when we drop the database the remove directory will fail. */
when we drop the database the remove directory will fail. */
...
@@ -3286,7 +3294,11 @@ fil_discard_tablespace(
...
@@ -3286,7 +3294,11 @@ fil_discard_tablespace(
{
{
dberr_t
err
;
dberr_t
err
;
switch
(
err
=
fil_delete_tablespace
(
id
,
true
))
{
switch
(
err
=
fil_delete_tablespace
(
id
#ifdef BTR_CUR_HASH_ADAPT
,
true
#endif
/* BTR_CUR_HASH_ADAPT */
))
{
case
DB_SUCCESS
:
case
DB_SUCCESS
:
break
;
break
;
...
...
storage/innobase/handler/ha_xtradb.h
View file @
ec062c61
/*****************************************************************************
/*****************************************************************************
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, MariaDB Corporation.
Copyright (c) 2017,
2018,
MariaDB Corporation.
Copyright (c) 2009, Percona Inc.
Copyright (c) 2009, Percona Inc.
Portions of this file contain modifications contributed and copyrighted
Portions of this file contain modifications contributed and copyrighted
...
@@ -957,7 +957,9 @@ innodb_check_deprecated(void)
...
@@ -957,7 +957,9 @@ innodb_check_deprecated(void)
#ifdef HA_XTRADB_SYSVARS
#ifdef HA_XTRADB_SYSVARS
/* XtraDB compatibility system variables */
/* XtraDB compatibility system variables */
#ifdef BTR_CUR_HASH_ADAPT
MYSQL_SYSVAR(adaptive_hash_index_partitions),
MYSQL_SYSVAR(adaptive_hash_index_partitions),
#endif /* BTR_CUR_HASH_ADAPT */
MYSQL_SYSVAR(buffer_pool_populate),
MYSQL_SYSVAR(buffer_pool_populate),
#if defined UNIV_DEBUG || defined UNIV_PERF_DEBUG
#if defined UNIV_DEBUG || defined UNIV_PERF_DEBUG
MYSQL_SYSVAR(cleaner_eviction_factor),
MYSQL_SYSVAR(cleaner_eviction_factor),
...
...
storage/innobase/include/buf0lru.h
View file @
ec062c61
/*****************************************************************************
/*****************************************************************************
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, MariaDB Corporation.
Copyright (c) 2017,
2018,
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
...
@@ -53,13 +53,15 @@ These are low-level functions
...
@@ -53,13 +53,15 @@ These are low-level functions
/** Empty the flush list for all pages belonging to a tablespace.
/** Empty the flush list for all pages belonging to a tablespace.
@param[in] id tablespace identifier
@param[in] id tablespace identifier
@param[in,out] observer flush observer,
@param[in,out] observer flush observer,
or NULL if nothing is to be written
or NULL if nothing is to be written */
@param[in] drop_ahi whether to drop the adaptive hash index */
void
void
buf_LRU_flush_or_remove_pages
(
buf_LRU_flush_or_remove_pages
(
ulint
id
,
ulint
id
,
FlushObserver
*
observer
,
FlushObserver
*
observer
bool
drop_ahi
=
false
);
#ifdef BTR_CUR_HASH_ADAPT
,
bool
drop_ahi
=
false
/*!< whether to drop the adaptive hash index */
#endif
/* BTR_CUR_HASH_ADAPT */
);
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
/********************************************************************//**
/********************************************************************//**
...
...
storage/innobase/include/fil0fil.h
View file @
ec062c61
/*****************************************************************************
/*****************************************************************************
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, 201
7
, MariaDB Corporation.
Copyright (c) 2013, 201
8
, 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
...
@@ -931,10 +931,14 @@ fil_table_accessible(const dict_table_t* table)
...
@@ -931,10 +931,14 @@ fil_table_accessible(const dict_table_t* table)
/** Delete a tablespace and associated .ibd file.
/** Delete a tablespace and associated .ibd file.
@param[in] id tablespace identifier
@param[in] id tablespace identifier
@param[in] drop_ahi whether to drop the adaptive hash index
@return DB_SUCCESS or error */
@return DB_SUCCESS or error */
dberr_t
dberr_t
fil_delete_tablespace
(
ulint
id
,
bool
drop_ahi
=
false
);
fil_delete_tablespace
(
ulint
id
#ifdef BTR_CUR_HASH_ADAPT
,
bool
drop_ahi
=
false
/*!< whether to drop the adaptive hash index */
#endif
/* BTR_CUR_HASH_ADAPT */
);
/** Truncate the tablespace to needed size.
/** Truncate the tablespace to needed size.
@param[in] space_id id of tablespace to truncate
@param[in] space_id id of tablespace to truncate
...
...
storage/innobase/include/ha0ha.h
View file @
ec062c61
/*****************************************************************************
/*****************************************************************************
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2018, 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
...
@@ -210,7 +211,7 @@ struct ha_node_t {
...
@@ -210,7 +211,7 @@ struct ha_node_t {
};
};
#endif
/* BTR_CUR_HASH_ADAPT */
#endif
/* BTR_CUR_HASH_ADAPT */
#if
def UNIV_DEBUG
#if
defined UNIV_DEBUG && defined BTR_CUR_HASH_ADAPT
/********************************************************************//**
/********************************************************************//**
Assert that the synchronization object in a hash operation involving
Assert that the synchronization object in a hash operation involving
possible change in the hash table is held.
possible change in the hash table is held.
...
...
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