diff options
author | unknown <serg@janus.mylan> | 2007-12-17 20:33:27 +0100 |
---|---|---|
committer | unknown <serg@janus.mylan> | 2007-12-17 20:33:27 +0100 |
commit | 488cf72078d3e0a5e9b48db515f977fabd8e8170 (patch) | |
tree | d3b69ed4747cc9696fd2875dea172d64b809e6b2 | |
parent | b621aecc155d6d5e72f9f70be1b22d294f00ef7a (diff) | |
download | mariadb-git-488cf72078d3e0a5e9b48db515f977fabd8e8170.tar.gz |
maria_page_checksum variable
-rw-r--r-- | include/maria.h | 4 | ||||
-rw-r--r-- | mysql-test/r/maria.result | 1 | ||||
-rw-r--r-- | storage/maria/ha_maria.cc | 8 | ||||
-rw-r--r-- | storage/maria/ma_static.c | 2 |
4 files changed, 11 insertions, 4 deletions
diff --git a/include/maria.h b/include/maria.h index 8baacfc9c13..6e9ae4d8391 100644 --- a/include/maria.h +++ b/include/maria.h @@ -14,7 +14,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* This file should be included when using maria_funktions */ +/* This file should be included when using maria functions */ #ifndef _maria_h #define _maria_h @@ -250,7 +250,7 @@ typedef struct st_maria_columndef /* column information */ extern ulong maria_block_size, maria_checkpoint_frequency; extern ulong maria_concurrent_insert; -extern my_bool maria_flush, maria_single_user; +extern my_bool maria_flush, maria_single_user, maria_page_checksums; extern my_bool maria_delay_key_write; extern my_off_t maria_max_temp_length; extern ulong maria_bulk_insert_tree_size, maria_data_pointer_size; diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index 62619feb323..64381eab254 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -2052,6 +2052,7 @@ maria_checkpoint_interval 30 maria_log_file_size 4294959104 maria_log_purge_type immediate maria_max_sort_file_size 9223372036853727232 +maria_page_checksum ON maria_pagecache_age_threshold 300 maria_pagecache_buffer_size 8384512 maria_pagecache_division_limit 100 diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc index 1ce85e22f2f..e20cc131382 100644 --- a/storage/maria/ha_maria.cc +++ b/storage/maria/ha_maria.cc @@ -124,6 +124,10 @@ static MYSQL_SYSVAR_ULONG(checkpoint_interval, checkpoint_interval, " 0 means 'no automatic checkpoints'.", NULL, update_checkpoint_interval, 30, 0, UINT_MAX, 1); +static MYSQL_SYSVAR_BOOL(page_checksum, maria_page_checksums, 0, + "Maintain page checksums (can be overridden per table " + "with PAGE_CHECKSUM clause in CREATE TABLE)", 0, 0, 1); + static MYSQL_SYSVAR_ULONG(log_file_size, log_file_size, PLUGIN_VAR_RQCMDARG, "Limit for transaction log size", @@ -2253,7 +2257,8 @@ int ha_maria::create(const char *name, register TABLE *table_arg, create_flags|= HA_CREATE_CHECKSUM; if (options & HA_OPTION_DELAY_KEY_WRITE) create_flags|= HA_CREATE_DELAY_KEY_WRITE; - if (ha_create_info->page_checksum != HA_CHOICE_NO) + if ((ha_create_info->page_checksum == HA_CHOICE_UNDEF && maria_page_checksums) || + ha_create_info->page_checksum == HA_CHOICE_YES) create_flags|= HA_CREATE_PAGE_CHECKSUM; /* TODO: Check that the following fn_format is really needed */ @@ -2658,6 +2663,7 @@ my_bool ha_maria::register_query_cache_table(THD *thd, char *table_name, static struct st_mysql_sys_var* system_variables[]= { MYSQL_SYSVAR(block_size), MYSQL_SYSVAR(checkpoint_interval), + MYSQL_SYSVAR(page_checksum), MYSQL_SYSVAR(log_file_size), MYSQL_SYSVAR(log_purge_type), MYSQL_SYSVAR(max_sort_file_size), diff --git a/storage/maria/ma_static.c b/storage/maria/ma_static.c index 20c5c999a8f..33f6e9f9fbe 100644 --- a/storage/maria/ma_static.c +++ b/storage/maria/ma_static.c @@ -33,7 +33,7 @@ uchar maria_uuid[MY_UUID_SIZE]; uint maria_quick_table_bits=9; ulong maria_block_size= MARIA_KEY_BLOCK_LENGTH; my_bool maria_flush= 0, maria_single_user= 0; -my_bool maria_delay_key_write= 0; +my_bool maria_delay_key_write= 0, maria_page_checksums= 1; #if defined(THREAD) && !defined(DONT_USE_RW_LOCKS) ulong maria_concurrent_insert= 2; #else |