Commit 0663f35a authored by unknown's avatar unknown

Merge desktop.sanja.is.com.ua:/home/bell/mysql/bk/mysql-maria

into  desktop.sanja.is.com.ua:/home/bell/mysql/bk/work-maria-write


storage/maria/ma_pagecache.c:
  Auto merged
parents df03e791 25120a32
This diff is collapsed.
...@@ -283,6 +283,10 @@ extern my_bool pagecache_delete(PAGECACHE *pagecache, ...@@ -283,6 +283,10 @@ extern my_bool pagecache_delete(PAGECACHE *pagecache,
pgcache_page_no_t pageno, pgcache_page_no_t pageno,
enum pagecache_page_lock lock, enum pagecache_page_lock lock,
my_bool flush); my_bool flush);
extern my_bool pagecache_delete_by_link(PAGECACHE *pagecache,
PAGECACHE_BLOCK_LINK *link,
enum pagecache_page_lock lock,
my_bool flush);
extern my_bool pagecache_delete_pages(PAGECACHE *pagecache, extern my_bool pagecache_delete_pages(PAGECACHE *pagecache,
PAGECACHE_FILE *file, PAGECACHE_FILE *file,
pgcache_page_no_t pageno, pgcache_page_no_t pageno,
...@@ -296,6 +300,9 @@ extern my_bool pagecache_collect_changed_blocks_with_lsn(PAGECACHE *pagecache, ...@@ -296,6 +300,9 @@ extern my_bool pagecache_collect_changed_blocks_with_lsn(PAGECACHE *pagecache,
extern int reset_pagecache_counters(const char *name, PAGECACHE *pagecache); extern int reset_pagecache_counters(const char *name, PAGECACHE *pagecache);
extern uchar *pagecache_block_link_to_buffer(PAGECACHE_BLOCK_LINK *block); extern uchar *pagecache_block_link_to_buffer(PAGECACHE_BLOCK_LINK *block);
extern uint pagacache_pagelevel(PAGECACHE_BLOCK_LINK *block);
extern void pagecache_add_level_by_link(PAGECACHE_BLOCK_LINK *block,
uint level);
/* Functions to handle multiple key caches */ /* Functions to handle multiple key caches */
extern my_bool multi_pagecache_init(void); extern my_bool multi_pagecache_init(void);
......
...@@ -453,6 +453,7 @@ int simple_delete_flush_test() ...@@ -453,6 +453,7 @@ int simple_delete_flush_test()
{ {
unsigned char *buffw= malloc(PAGE_SIZE); unsigned char *buffw= malloc(PAGE_SIZE);
unsigned char *buffr= malloc(PAGE_SIZE); unsigned char *buffr= malloc(PAGE_SIZE);
PAGECACHE_BLOCK_LINK *link;
int res; int res;
DBUG_ENTER("simple_delete_flush_test"); DBUG_ENTER("simple_delete_flush_test");
/* prepare the file */ /* prepare the file */
...@@ -462,7 +463,7 @@ int simple_delete_flush_test() ...@@ -462,7 +463,7 @@ int simple_delete_flush_test()
PAGECACHE_LOCK_WRITE, PAGECACHE_LOCK_WRITE,
PAGECACHE_PIN, PAGECACHE_PIN,
PAGECACHE_WRITE_DELAY, PAGECACHE_WRITE_DELAY,
0, LSN_IMPOSSIBLE); &link, LSN_IMPOSSIBLE);
flush_pagecache_blocks(&pagecache, &file1, FLUSH_FORCE_WRITE); flush_pagecache_blocks(&pagecache, &file1, FLUSH_FORCE_WRITE);
/* test */ /* test */
bfill(buffw, PAGE_SIZE, '\2'); bfill(buffw, PAGE_SIZE, '\2');
...@@ -472,12 +473,16 @@ int simple_delete_flush_test() ...@@ -472,12 +473,16 @@ int simple_delete_flush_test()
PAGECACHE_PIN_LEFT_PINNED, PAGECACHE_PIN_LEFT_PINNED,
PAGECACHE_WRITE_DELAY, PAGECACHE_WRITE_DELAY,
0, LSN_IMPOSSIBLE); 0, LSN_IMPOSSIBLE);
pagecache_delete(&pagecache, &file1, 0, if (pagecache_delete_by_link(&pagecache, link,
PAGECACHE_LOCK_LEFT_WRITELOCKED, 1); PAGECACHE_LOCK_LEFT_WRITELOCKED, 1))
{
diag("simple_delete_flush_test: error during delete");
exit(1);
}
flush_pagecache_blocks(&pagecache, &file1, FLUSH_FORCE_WRITE); flush_pagecache_blocks(&pagecache, &file1, FLUSH_FORCE_WRITE);
ok((res= test(test_file(file1, file1_name, PAGE_SIZE, PAGE_SIZE, ok((res= test(test_file(file1, file1_name, PAGE_SIZE, PAGE_SIZE,
simple_delete_flush_test_file))), simple_delete_flush_test_file))),
"Simple delete-forget page file"); "Simple delete flush (link) page file");
if (res) if (res)
reset_file(&file1, file1_name); reset_file(&file1, file1_name);
free(buffw); free(buffw);
......
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