Commit caa0e9b1 authored by unknown's avatar unknown

Merge abelkin@bk-internal.mysql.com:/home/bk/mysql-maria

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

parents 25bccab9 b51c819c
This diff is collapsed.
......@@ -283,6 +283,10 @@ extern my_bool pagecache_delete(PAGECACHE *pagecache,
pgcache_page_no_t pageno,
enum pagecache_page_lock lock,
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,
PAGECACHE_FILE *file,
pgcache_page_no_t pageno,
......@@ -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 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 */
extern my_bool multi_pagecache_init(void);
......
......@@ -453,6 +453,7 @@ int simple_delete_flush_test()
{
unsigned char *buffw= malloc(PAGE_SIZE);
unsigned char *buffr= malloc(PAGE_SIZE);
PAGECACHE_BLOCK_LINK *link;
int res;
DBUG_ENTER("simple_delete_flush_test");
/* prepare the file */
......@@ -462,7 +463,7 @@ int simple_delete_flush_test()
PAGECACHE_LOCK_WRITE,
PAGECACHE_PIN,
PAGECACHE_WRITE_DELAY,
0, LSN_IMPOSSIBLE);
&link, LSN_IMPOSSIBLE);
flush_pagecache_blocks(&pagecache, &file1, FLUSH_FORCE_WRITE);
/* test */
bfill(buffw, PAGE_SIZE, '\2');
......@@ -472,12 +473,16 @@ int simple_delete_flush_test()
PAGECACHE_PIN_LEFT_PINNED,
PAGECACHE_WRITE_DELAY,
0, LSN_IMPOSSIBLE);
pagecache_delete(&pagecache, &file1, 0,
PAGECACHE_LOCK_LEFT_WRITELOCKED, 1);
if (pagecache_delete_by_link(&pagecache, link,
PAGECACHE_LOCK_LEFT_WRITELOCKED, 1))
{
diag("simple_delete_flush_test: error during delete");
exit(1);
}
flush_pagecache_blocks(&pagecache, &file1, FLUSH_FORCE_WRITE);
ok((res= test(test_file(file1, file1_name, PAGE_SIZE, PAGE_SIZE,
simple_delete_flush_test_file))),
"Simple delete-forget page file");
"Simple delete flush (link) page file");
if (res)
reset_file(&file1, file1_name);
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