Commit 09cb2fe6 authored by unknown's avatar unknown

Postreview changes.


include/my_sys.h:
  The comments added.
include/pagecache.h:
  Functions names changed.
storage/maria/unittest/mf_pagecache_consist.c:
  Functions names changed.
storage/maria/unittest/mf_pagecache_single.c:
  Functions names changed.
parent 1f57759a
......@@ -280,7 +280,12 @@ enum cache_type
enum flush_type
{
FLUSH_KEEP, FLUSH_RELEASE, FLUSH_IGNORE_CHANGED, FLUSH_FORCE_WRITE
FLUSH_KEEP, /* flush block and keep it in the cache */
FLUSH_RELEASE, /* flush block and remove it from the cache */
FLUSH_IGNORE_CHANGED, /* remove block from the cache */
/* as my_disable_flush_pagecache_blocks is always 0, it is
strictly equivalent to FLUSH_KEEP */
FLUSH_FORCE_WRITE
};
typedef struct st_record_cache /* Used when cacheing records */
......
......@@ -194,30 +194,30 @@ extern my_bool pagecache_write(PAGECACHE *pagecache,
enum pagecache_page_pin pin,
enum pagecache_write_mode write_mode,
PAGECACHE_PAGE_LINK *link);
extern void pagecache_unlock_page(PAGECACHE *pagecache,
PAGECACHE_FILE *file,
pgcache_page_no_t pageno,
enum pagecache_page_lock lock,
enum pagecache_page_pin pin,
LSN first_REDO_LSN_for_page);
extern void pagecache_unlock(PAGECACHE *pagecache,
PAGECACHE_PAGE_LINK *link,
PAGECACHE_FILE *file,
pgcache_page_no_t pageno,
enum pagecache_page_lock lock,
enum pagecache_page_pin pin,
LSN first_REDO_LSN_for_page);
extern void pagecache_unpin_page(PAGECACHE *pagecache,
PAGECACHE_FILE *file,
pgcache_page_no_t pageno);
extern void pagecache_unlock_by_link(PAGECACHE *pagecache,
PAGECACHE_PAGE_LINK *link,
enum pagecache_page_lock lock,
enum pagecache_page_pin pin,
LSN first_REDO_LSN_for_page);
extern void pagecache_unpin(PAGECACHE *pagecache,
PAGECACHE_PAGE_LINK *link);
PAGECACHE_FILE *file,
pgcache_page_no_t pageno);
extern void pagecache_unpin_by_link(PAGECACHE *pagecache,
PAGECACHE_PAGE_LINK *link);
extern int flush_pagecache_blocks(PAGECACHE *keycache,
PAGECACHE_FILE *file,
enum flush_type type);
extern my_bool pagecache_delete_page(PAGECACHE *pagecache,
PAGECACHE_FILE *file,
pgcache_page_no_t pageno,
enum pagecache_page_lock lock,
my_bool flush);
extern my_bool pagecache_delete(PAGECACHE *pagecache,
PAGECACHE_FILE *file,
pgcache_page_no_t pageno,
enum pagecache_page_lock lock,
my_bool flush);
extern void end_pagecache(PAGECACHE *keycache, my_bool cleanup);
extern my_bool pagecache_collect_changed_blocks_with_lsn(PAGECACHE *pagecache,
LEX_STRING *str,
......
This diff is collapsed.
......@@ -135,8 +135,8 @@ err:
DBUG_PRINT("err", ("try to flush"));
if (page_locked)
{
pagecache_delete_page(&pagecache, &file1, page_no,
PAGECACHE_LOCK_LEFT_WRITELOCKED, 1);
pagecache_delete(&pagecache, &file1, page_no,
PAGECACHE_LOCK_LEFT_WRITELOCKED, 1);
}
else
{
......
......@@ -231,12 +231,12 @@ int simple_pin_test()
ok((res= test(test_file(file1, file1_name, PAGE_SIZE*2, PAGE_SIZE*2,
simple_pin_test_file1))),
"Simple pin page file with pin");
pagecache_unlock_page(&pagecache,
&file1,
0,
PAGECACHE_LOCK_READ_UNLOCK,
PAGECACHE_UNPIN,
0);
pagecache_unlock(&pagecache,
&file1,
0,
PAGECACHE_LOCK_READ_UNLOCK,
PAGECACHE_UNPIN,
0);
if (flush_pagecache_blocks(&pagecache, &file1, FLUSH_FORCE_WRITE))
{
diag("Got error in flush_pagecache_blocks\n");
......@@ -282,8 +282,8 @@ int simple_delete_forget_test()
PAGECACHE_PIN_LEFT_UNPINNED,
PAGECACHE_WRITE_DELAY,
0);
pagecache_delete_page(&pagecache, &file1, 0,
PAGECACHE_LOCK_WRITE, 0);
pagecache_delete(&pagecache, &file1, 0,
PAGECACHE_LOCK_WRITE, 0);
flush_pagecache_blocks(&pagecache, &file1, FLUSH_FORCE_WRITE);
ok((res= test(test_file(file1, file1_name, PAGE_SIZE, PAGE_SIZE,
simple_delete_forget_test_file))),
......@@ -324,8 +324,8 @@ int simple_delete_flush_test()
PAGECACHE_PIN_LEFT_PINNED,
PAGECACHE_WRITE_DELAY,
0);
pagecache_delete_page(&pagecache, &file1, 0,
PAGECACHE_LOCK_LEFT_WRITELOCKED, 1);
pagecache_delete(&pagecache, &file1, 0,
PAGECACHE_LOCK_LEFT_WRITELOCKED, 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))),
......
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