summaryrefslogtreecommitdiff
path: root/sql/set_var.h
diff options
context:
space:
mode:
authorunknown <bell@pwbook.sanja.is.com.ua>2007-04-04 23:37:09 +0300
committerunknown <bell@pwbook.sanja.is.com.ua>2007-04-04 23:37:09 +0300
commit39d64a1d2565b09307d11b2a665f3f2c6bc8106e (patch)
treef06eaccb6a5b46b3894e7939c81911d30e765fd5 /sql/set_var.h
parenta3f9083bb4649530b210423e21589803c075bb9e (diff)
downloadmariadb-git-39d64a1d2565b09307d11b2a665f3f2c6bc8106e.tar.gz
Pagecache integration for review.
storage/maria/unittest/ma_pagecache_single.c: Rename: storage/maria/unittest/mf_pagecache_single.c -> storage/maria/unittest/ma_pagecache_single.c include/maria.h: Pagecache integration. include/myisamchk.h: Pagecache integration. include/pagecache.h: removed WRITE_NOW mode Pagecache parameters management. mysys/Makefile.am: Safe hash procedures moved to the separate file. Pagecache moved to maria engine directory. mysys/mf_keycaches.c: Safe hash procedures moved to the separate file. sql/handler.cc: Pageccahe integration. sql/handler.h: Pagecache integration. sql/mysql_priv.h: pagecache integration sql/mysqld.cc: pagecache integration sql/set_var.cc: Pagecache integration. sql/set_var.h: Pagecache integration. storage/maria/Makefile.am: Pagecache integration and moving to maria engine directory. storage/maria/ha_maria.cc: File changed on PAGECCAHE_FILE. storage/maria/ma_bitmap.c: Pagecache integration. storage/maria/ma_blockrec.c: Pagecache integration. storage/maria/ma_check.c: File changed on PAGECCAHE_FILE. Pagecache integration. storage/maria/ma_close.c: File changed on PAGECCAHE_FILE. storage/maria/ma_delete_all.c: File changed on PAGECCAHE_FILE. storage/maria/ma_dynrec.c: File changed on PAGECCAHE_FILE. storage/maria/ma_extra.c: File changed on PAGECCAHE_FILE. storage/maria/ma_info.c: File changed on PAGECCAHE_FILE. storage/maria/ma_keycache.c: Pagecache integration. storage/maria/ma_locking.c: File changed on PAGECCAHE_FILE. storage/maria/ma_loghandler.c: Assert added. storage/maria/ma_loghandler.h: extern specifier added. storage/maria/ma_open.c: Pagecache integration. File changed on PAGECCAHE_FILE. storage/maria/ma_packrec.c: File changed on PAGECCAHE_FILE. storage/maria/ma_page.c: Pagecache integration. storage/maria/ma_pagecache.c: Pagecache renamed and moved to the maria directory. BLOCK_* defines renamed to avoid conflict with BLOCK_ERROR defined in maria_def.h storage/maria/ma_panic.c: File changed on PAGECCAHE_FILE. storage/maria/ma_preload.c: Pagecache integration. File changed on PAGECCAHE_FILE. storage/maria/ma_static.c: Pagecache integration. storage/maria/ma_test1.c: Pagecache integration. storage/maria/ma_test2.c: Pagecache integration. storage/maria/ma_test3.c: Pagecache integration. storage/maria/ma_write.c: File changed on PAGECCAHE_FILE. storage/maria/maria_chk.c: Pagecache integration. File changed on PAGECCAHE_FILE. storage/maria/maria_def.h: Pagecache integration. File changed on PAGECCAHE_FILE. storage/maria/maria_ftdump.c: Pagecache integration. storage/maria/maria_pack.c: File changed on PAGECCAHE_FILE. storage/maria/unittest/Makefile.am: Pagecache moved to the maria directory. storage/maria/unittest/ma_pagecache_consist.c: fixed using uninitialized variable storage/maria/ma_pagecaches.c: New BitKeeper file ``storage/maria/ma_pagecaches.c'' mysys/my_safehash.h: New BitKeeper file ``mysys/my_safehash.h''
Diffstat (limited to 'sql/set_var.h')
-rw-r--r--sql/set_var.h42
1 files changed, 40 insertions, 2 deletions
diff --git a/sql/set_var.h b/sql/set_var.h
index 17f9b248c07..a415f629cb9 100644
--- a/sql/set_var.h
+++ b/sql/set_var.h
@@ -749,6 +749,33 @@ public:
};
+#ifdef WITH_MARIA_STORAGE_ENGINE
+class sys_var_pagecache_param :public sys_var
+{
+protected:
+ size_t offset;
+public:
+ sys_var_pagecache_param(const char *name_arg, size_t offset_arg)
+ :sys_var(name_arg), offset(offset_arg)
+ {}
+ byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base);
+ bool check_default(enum_var_type type) { return 1; }
+ bool is_struct() { return 1; }
+};
+
+
+class sys_var_pagecache_long :public sys_var_pagecache_param
+{
+public:
+ sys_var_pagecache_long(const char *name_arg, size_t offset_arg)
+ :sys_var_pagecache_param(name_arg, offset_arg)
+ {}
+ bool update(THD *thd, set_var *var);
+ SHOW_TYPE type() { return SHOW_LONG; }
+};
+#endif /* WITH_MARIA_STORAGE_ENGINE */
+
+
class sys_var_thd_date_time_format :public sys_var_thd
{
DATE_TIME_FORMAT *SV::*offset;
@@ -1095,7 +1122,11 @@ public:
my_free((char*) name, MYF(0));
}
friend bool process_key_caches(int (* func) (const char *name,
- KEY_CACHE *));
+ KEY_CACHE *));
+#ifdef WITH_MARIA_STORAGE_ENGINE
+ friend bool process_pagecaches(int (* func) (const char *name,
+ PAGECACHE *));
+#endif /* WITH_MARIA_STORAGE_ENGINE */
friend void delete_elements(I_List<NAMED_LIST> *list,
void (*free_element)(const char*, gptr));
};
@@ -1105,7 +1136,9 @@ public:
extern sys_var_thd_bool sys_old_alter_table;
extern sys_var_thd_bool sys_old_passwords;
extern LEX_STRING default_key_cache_base;
-extern LEX_STRING maria_key_cache_base;
+#ifdef WITH_MARIA_STORAGE_ENGINE
+extern LEX_STRING maria_pagecache_base;
+#endif /* WITH_MARIA_STORAGE_ENGINE */
/* For sql_yacc */
struct sys_var_with_base
@@ -1143,3 +1176,8 @@ void free_key_cache(const char *name, KEY_CACHE *key_cache);
bool process_key_caches(int (* func) (const char *name, KEY_CACHE *));
void delete_elements(I_List<NAMED_LIST> *list,
void (*free_element)(const char*, gptr));
+#ifdef WITH_MARIA_STORAGE_ENGINE
+PAGECACHE *get_or_create_pagecache(const char *name, uint length);
+void free_pagecache(const char *name, PAGECACHE *pagecache);
+bool process_pagecaches(int (* func) (const char *name, PAGECACHE *));
+#endif /* WITH_MARIA_STORAGE_ENGINE */