Commit 488cf720 authored by unknown's avatar unknown

maria_page_checksum variable

parent b621aecc
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 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 #ifndef _maria_h
#define _maria_h #define _maria_h
...@@ -250,7 +250,7 @@ typedef struct st_maria_columndef /* column information */ ...@@ -250,7 +250,7 @@ typedef struct st_maria_columndef /* column information */
extern ulong maria_block_size, maria_checkpoint_frequency; extern ulong maria_block_size, maria_checkpoint_frequency;
extern ulong maria_concurrent_insert; 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_bool maria_delay_key_write;
extern my_off_t maria_max_temp_length; extern my_off_t maria_max_temp_length;
extern ulong maria_bulk_insert_tree_size, maria_data_pointer_size; extern ulong maria_bulk_insert_tree_size, maria_data_pointer_size;
......
...@@ -2052,6 +2052,7 @@ maria_checkpoint_interval 30 ...@@ -2052,6 +2052,7 @@ maria_checkpoint_interval 30
maria_log_file_size 4294959104 maria_log_file_size 4294959104
maria_log_purge_type immediate maria_log_purge_type immediate
maria_max_sort_file_size 9223372036853727232 maria_max_sort_file_size 9223372036853727232
maria_page_checksum ON
maria_pagecache_age_threshold 300 maria_pagecache_age_threshold 300
maria_pagecache_buffer_size 8384512 maria_pagecache_buffer_size 8384512
maria_pagecache_division_limit 100 maria_pagecache_division_limit 100
......
...@@ -124,6 +124,10 @@ static MYSQL_SYSVAR_ULONG(checkpoint_interval, checkpoint_interval, ...@@ -124,6 +124,10 @@ static MYSQL_SYSVAR_ULONG(checkpoint_interval, checkpoint_interval,
" 0 means 'no automatic checkpoints'.", " 0 means 'no automatic checkpoints'.",
NULL, update_checkpoint_interval, 30, 0, UINT_MAX, 1); 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, static MYSQL_SYSVAR_ULONG(log_file_size, log_file_size,
PLUGIN_VAR_RQCMDARG, PLUGIN_VAR_RQCMDARG,
"Limit for transaction log size", "Limit for transaction log size",
...@@ -2253,7 +2257,8 @@ int ha_maria::create(const char *name, register TABLE *table_arg, ...@@ -2253,7 +2257,8 @@ int ha_maria::create(const char *name, register TABLE *table_arg,
create_flags|= HA_CREATE_CHECKSUM; create_flags|= HA_CREATE_CHECKSUM;
if (options & HA_OPTION_DELAY_KEY_WRITE) if (options & HA_OPTION_DELAY_KEY_WRITE)
create_flags|= HA_CREATE_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; create_flags|= HA_CREATE_PAGE_CHECKSUM;
/* TODO: Check that the following fn_format is really needed */ /* 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, ...@@ -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[]= { static struct st_mysql_sys_var* system_variables[]= {
MYSQL_SYSVAR(block_size), MYSQL_SYSVAR(block_size),
MYSQL_SYSVAR(checkpoint_interval), MYSQL_SYSVAR(checkpoint_interval),
MYSQL_SYSVAR(page_checksum),
MYSQL_SYSVAR(log_file_size), MYSQL_SYSVAR(log_file_size),
MYSQL_SYSVAR(log_purge_type), MYSQL_SYSVAR(log_purge_type),
MYSQL_SYSVAR(max_sort_file_size), MYSQL_SYSVAR(max_sort_file_size),
......
...@@ -33,7 +33,7 @@ uchar maria_uuid[MY_UUID_SIZE]; ...@@ -33,7 +33,7 @@ uchar maria_uuid[MY_UUID_SIZE];
uint maria_quick_table_bits=9; uint maria_quick_table_bits=9;
ulong maria_block_size= MARIA_KEY_BLOCK_LENGTH; ulong maria_block_size= MARIA_KEY_BLOCK_LENGTH;
my_bool maria_flush= 0, maria_single_user= 0; 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) #if defined(THREAD) && !defined(DONT_USE_RW_LOCKS)
ulong maria_concurrent_insert= 2; ulong maria_concurrent_insert= 2;
#else #else
......
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