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
fa4c629c
Commit
fa4c629c
authored
Jan 21, 2013
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql-5.1 to mysql-5.5.
parents
89f31d9d
f130ccc1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
93 additions
and
2 deletions
+93
-2
mysql-test/suite/sys_vars/r/innodb_buffer_pool_evict_basic.result
...st/suite/sys_vars/r/innodb_buffer_pool_evict_basic.result
+7
-0
mysql-test/suite/sys_vars/t/innodb_buffer_pool_evict_basic.test
...test/suite/sys_vars/t/innodb_buffer_pool_evict_basic.test
+10
-0
storage/innobase/buf/buf0buf.c
storage/innobase/buf/buf0buf.c
+10
-1
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+66
-1
No files found.
mysql-test/suite/sys_vars/r/innodb_buffer_pool_evict_basic.result
0 → 100644
View file @
fa4c629c
SELECT @@global.innodb_buffer_pool_evict;
@@global.innodb_buffer_pool_evict
SET GLOBAL innodb_buffer_pool_evict = 'uncompressed';
SELECT @@global.innodb_buffer_pool_evict;
@@global.innodb_buffer_pool_evict
mysql-test/suite/sys_vars/t/innodb_buffer_pool_evict_basic.test
0 → 100644
View file @
fa4c629c
--
source
include
/
have_innodb
.
inc
# This is a debug variable for now
--
source
include
/
have_debug
.
inc
SELECT
@@
global
.
innodb_buffer_pool_evict
;
SET
GLOBAL
innodb_buffer_pool_evict
=
'uncompressed'
;
# Should always be empty.
SELECT
@@
global
.
innodb_buffer_pool_evict
;
storage/innobase/buf/buf0buf.c
View file @
fa4c629c
/*****************************************************************************
Copyright (c) 1995, 201
2
, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1995, 201
3
, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
Portions of this file contain modifications contributed and copyrighted by
...
...
@@ -2359,6 +2359,7 @@ got_block:
/* The page is being read to buffer pool,
but we cannot wait around for the read to
complete. */
null_exit:
buf_pool_mutex_exit
(
buf_pool
);
return
(
NULL
);
...
...
@@ -2373,6 +2374,14 @@ got_block:
case
BUF_BLOCK_ZIP_PAGE
:
case
BUF_BLOCK_ZIP_DIRTY
:
if
(
mode
==
BUF_PEEK_IF_IN_POOL
)
{
/* This mode is only used for dropping an
adaptive hash index. There cannot be an
adaptive hash index for a compressed-only
page, so do not bother decompressing the page. */
goto
null_exit
;
}
bpage
=
&
block
->
page
;
/* Protect bpage->buf_fix_count. */
mutex_enter
(
&
buf_pool
->
zip_mutex
);
...
...
storage/innobase/handler/ha_innodb.cc
View file @
fa4c629c
/*****************************************************************************
Copyright (c) 2000, 201
2
, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2000, 201
3
, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, 2009 Google Inc.
Copyright (c) 2009, Percona Inc.
...
...
@@ -11201,6 +11201,61 @@ innodb_change_buffering_update(
*
static_cast
<
const
char
*
const
*>
(
save
);
}
#ifndef DBUG_OFF
static
char
*
srv_buffer_pool_evict
;
/****************************************************************//**
Called on SET GLOBAL innodb_buffer_pool_evict=...
Handles some values specially, to evict pages from the buffer pool.
SET GLOBAL innodb_buffer_pool_evict='uncompressed'
evicts all uncompressed page frames of compressed tablespaces. */
static
void
innodb_buffer_pool_evict_update
(
/*============================*/
THD
*
thd
,
/*!< in: thread handle */
struct
st_mysql_sys_var
*
var
,
/*!< in: pointer to system variable */
void
*
var_ptr
,
/*!< out: ignored */
const
void
*
save
)
/*!< in: immediate result
from check function */
{
if
(
const
char
*
op
=
*
static_cast
<
const
char
*
const
*>
(
save
))
{
if
(
!
strcmp
(
op
,
"uncompressed"
))
{
/* Evict all uncompressed pages of compressed
tables from the buffer pool. Keep the compressed
pages in the buffer pool. */
for
(
ulint
i
=
0
;
i
<
srv_buf_pool_instances
;
i
++
)
{
buf_pool_t
*
buf_pool
=
&
buf_pool_ptr
[
i
];
buf_pool_mutex_enter
(
buf_pool
);
for
(
buf_block_t
*
block
=
UT_LIST_GET_LAST
(
buf_pool
->
unzip_LRU
);
block
!=
NULL
;
)
{
buf_block_t
*
prev_block
=
UT_LIST_GET_PREV
(
unzip_LRU
,
block
);
ut_ad
(
buf_block_get_state
(
block
)
==
BUF_BLOCK_FILE_PAGE
);
ut_ad
(
block
->
in_unzip_LRU_list
);
ut_ad
(
block
->
page
.
in_LRU_list
);
mutex_enter
(
&
block
->
mutex
);
buf_LRU_free_block
(
&
block
->
page
,
FALSE
);
mutex_exit
(
&
block
->
mutex
);
block
=
prev_block
;
}
buf_pool_mutex_exit
(
buf_pool
);
}
}
}
}
#endif
/* !DBUG_OFF */
static
int
show_innodb_vars
(
THD
*
thd
,
SHOW_VAR
*
var
,
char
*
buff
)
{
innodb_export_status
();
...
...
@@ -11442,6 +11497,13 @@ static MYSQL_SYSVAR_ULONG(autoextend_increment, srv_auto_extend_increment,
"Data file autoextend increment in megabytes"
,
NULL
,
NULL
,
8L
,
1L
,
1000L
,
0
);
#ifndef DBUG_OFF
static
MYSQL_SYSVAR_STR
(
buffer_pool_evict
,
srv_buffer_pool_evict
,
PLUGIN_VAR_RQCMDARG
,
"Evict pages from the InnoDB buffer pool."
,
NULL
,
innodb_buffer_pool_evict_update
,
""
);
#endif
/* !DBUG_OFF */
static
MYSQL_SYSVAR_LONGLONG
(
buffer_pool_size
,
innobase_buffer_pool_size
,
PLUGIN_VAR_RQCMDARG
|
PLUGIN_VAR_READONLY
,
"The size of the memory buffer InnoDB uses to cache data and indexes of its tables."
,
...
...
@@ -11629,6 +11691,9 @@ static MYSQL_SYSVAR_BOOL(print_all_deadlocks, srv_print_all_deadlocks,
static
struct
st_mysql_sys_var
*
innobase_system_variables
[]
=
{
MYSQL_SYSVAR
(
additional_mem_pool_size
),
MYSQL_SYSVAR
(
autoextend_increment
),
#ifndef DBUG_OFF
MYSQL_SYSVAR
(
buffer_pool_evict
),
#endif
/* !DBUG_OFF */
MYSQL_SYSVAR
(
buffer_pool_size
),
MYSQL_SYSVAR
(
buffer_pool_instances
),
MYSQL_SYSVAR
(
checksums
),
...
...
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