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
a8e291cc
Commit
a8e291cc
authored
Nov 18, 2011
by
Inaam Rana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge bug#13390506 from mysql-5.1
parent
e305e6b0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
91 additions
and
0 deletions
+91
-0
mysql-test/suite/innodb/r/innodb_cmp_drop_table.result
mysql-test/suite/innodb/r/innodb_cmp_drop_table.result
+13
-0
mysql-test/suite/innodb/t/innodb_cmp_drop_table-master.opt
mysql-test/suite/innodb/t/innodb_cmp_drop_table-master.opt
+1
-0
mysql-test/suite/innodb/t/innodb_cmp_drop_table.test
mysql-test/suite/innodb/t/innodb_cmp_drop_table.test
+59
-0
storage/innobase/buf/buf0buf.c
storage/innobase/buf/buf0buf.c
+18
-0
No files found.
mysql-test/suite/innodb/r/innodb_cmp_drop_table.result
0 → 100644
View file @
a8e291cc
set global innodb_file_per_table=on;
set global innodb_file_format=`1`;
create table t1(a text) engine=innodb key_block_size=8;
SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0;
page_size
8192
drop table t1;
SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0;
page_size
create table t2(a text) engine=innodb;
SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0;
page_size
drop table t2;
mysql-test/suite/innodb/t/innodb_cmp_drop_table-master.opt
0 → 100644
View file @
a8e291cc
--innodb-buffer-pool-size=8M
mysql-test/suite/innodb/t/innodb_cmp_drop_table.test
0 → 100644
View file @
a8e291cc
--
source
include
/
have_innodb
.
inc
let
$per_table
=
`select @@innodb_file_per_table`
;
let
$format
=
`select @@innodb_file_format`
;
--
let
$query_i_s
=
SELECT
page_size
FROM
information_schema
.
innodb_cmpmem
WHERE
pages_used
>
0
set
global
innodb_file_per_table
=
on
;
set
global
innodb_file_format
=
`1`
;
create
table
t1
(
a
text
)
engine
=
innodb
key_block_size
=
8
;
--
disable_query_log
# insert some rows so we are using compressed pages
--
let
$i
=
10
while
(
$i
)
{
insert
into
t1
values
(
repeat
(
'abcdefghijklmnopqrstuvwxyz'
,
100
));
dec
$i
;
}
--
enable_query_log
# we should be using some 8K pages
--
eval
$query_i_s
drop
table
t1
;
# no lazy eviction at drop table in 5.1 and 5.5 there should be no
# used 8K pages
--
eval
$query_i_s
# create a non-compressed table and insert enough into it to evict
# compressed pages
create
table
t2
(
a
text
)
engine
=
innodb
;
--
disable_query_log
--
let
$i
=
200
while
(
$i
)
{
insert
into
t2
values
(
repeat
(
'abcdefghijklmnopqrstuvwxyz'
,
1000
));
dec
$i
;
}
--
enable_query_log
# now there should be no 8K pages in the buffer pool
--
eval
$query_i_s
drop
table
t2
;
#
# restore environment to the state it was before this test execution
#
--
disable_query_log
eval
set
global
innodb_file_format
=
$format
;
eval
set
global
innodb_file_per_table
=
$per_table
;
storage/innobase/buf/buf0buf.c
View file @
a8e291cc
...
@@ -1219,6 +1219,24 @@ buf_pool_free_instance(
...
@@ -1219,6 +1219,24 @@ buf_pool_free_instance(
{
{
buf_chunk_t
*
chunk
;
buf_chunk_t
*
chunk
;
buf_chunk_t
*
chunks
;
buf_chunk_t
*
chunks
;
buf_page_t
*
bpage
;
bpage
=
UT_LIST_GET_LAST
(
buf_pool
->
LRU
);
while
(
bpage
!=
NULL
)
{
buf_page_t
*
prev_bpage
=
UT_LIST_GET_PREV
(
LRU
,
bpage
);
enum
buf_page_state
state
=
buf_page_get_state
(
bpage
);
ut_ad
(
buf_page_in_file
(
bpage
));
ut_ad
(
bpage
->
in_LRU_list
);
if
(
state
!=
BUF_BLOCK_FILE_PAGE
)
{
/* We must not have any dirty block. */
ut_ad
(
state
==
BUF_BLOCK_ZIP_PAGE
);
buf_page_free_descriptor
(
bpage
);
}
bpage
=
prev_bpage
;
}
chunks
=
buf_pool
->
chunks
;
chunks
=
buf_pool
->
chunks
;
chunk
=
chunks
+
buf_pool
->
n_chunks
;
chunk
=
chunks
+
buf_pool
->
n_chunks
;
...
...
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