summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <jani@hynda.mysql.fi>2007-07-02 20:45:15 +0300
committerunknown <jani@hynda.mysql.fi>2007-07-02 20:45:15 +0300
commit631ecaabea7336a8f28367c0d1c291f0433f7e88 (patch)
tree2eb68f1f6af5e60c4bcdd8fcfa7e14f3650de830 /sql
parentcfdd73369c0c2d57908af8dc727de33567fe9e0b (diff)
downloadmariadb-git-631ecaabea7336a8f28367c0d1c291f0433f7e88.tar.gz
Merged with mysql-5.1 main tree.
BUILD/compile-pentium-debug-max: Added definition after macro was removed from main tree. This will be fixed back in main tree later.
Diffstat (limited to 'sql')
-rw-r--r--sql/filesort.cc6
-rw-r--r--sql/item_xmlfunc.cc2
-rw-r--r--sql/mysqld.cc22
-rw-r--r--sql/set_var.cc14
-rw-r--r--sql/set_var.h2
-rw-r--r--sql/uniques.cc2
6 files changed, 23 insertions, 25 deletions
diff --git a/sql/filesort.cc b/sql/filesort.cc
index 6c72a0a2856..0012bebf688 100644
--- a/sql/filesort.cc
+++ b/sql/filesort.cc
@@ -1076,7 +1076,7 @@ uint read_to_buffer(IO_CACHE *fromfile, BUFFPEK *buffpek,
void reuse_freed_buff(QUEUE *queue, BUFFPEK *reuse, uint key_length)
{
- byte *reuse_end= reuse->base + reuse->max_keys * key_length;
+ uchar *reuse_end= reuse->base + reuse->max_keys * key_length;
for (uint i= 0; i < queue->elements; ++i)
{
BUFFPEK *bp= (BUFFPEK *) queue_element(queue, i);
@@ -1158,7 +1158,7 @@ int merge_buffers(SORTPARAM *param, IO_CACHE *from_file,
DBUG_RETURN(1); /* purecov: inspected */
for (buffpek= Fb ; buffpek <= Tb ; buffpek++)
{
- buffpek->base= (byte*) strpos;
+ buffpek->base= (uchar*) strpos;
buffpek->max_keys= maxcount;
strpos+= (uint) (error= (int) read_to_buffer(from_file, buffpek,
rec_length));
@@ -1250,7 +1250,7 @@ int merge_buffers(SORTPARAM *param, IO_CACHE *from_file,
}
}
buffpek= (BUFFPEK*) queue_top(&queue);
- buffpek->base= (byte*) sort_buffer;
+ buffpek->base= (uchar*) sort_buffer;
buffpek->max_keys= param->keys;
/*
diff --git a/sql/item_xmlfunc.cc b/sql/item_xmlfunc.cc
index f8457a1ae50..6bc73f49a5a 100644
--- a/sql/item_xmlfunc.cc
+++ b/sql/item_xmlfunc.cc
@@ -2767,7 +2767,7 @@ String *Item_xml_str_func::parse_xml(String *raw_xml, String *parsed_xml_buf)
if ((rc= my_xml_parse(&p, raw_xml->ptr(), raw_xml->length())) != MY_XML_OK)
{
char buf[128];
- my_snprintf(buf, sizeof(buf)-1, "parse error at line %d pos %lu: %s",
+ my_snprintf(buf, sizeof(buf)-1, "parse error at line %d pos %u: %s",
my_xml_error_lineno(&p) + 1,
my_xml_error_pos(&p) + 1,
my_xml_error_string(&p));
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index ddaf0c360bb..5c915f5474b 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -548,7 +548,7 @@ MY_LOCALE *my_default_lc_time_names;
SHOW_COMP_OPTION have_ssl, have_symlink, have_dlopen, have_query_cache;
SHOW_COMP_OPTION have_geometry, have_rtree_keys;
-SHOW_COMP_OPTION have_crypt, have_compress;
+SHOW_COMP_OPTION have_crypt, have_compress, have_maria_db;
/* Thread specific variables */
@@ -1210,7 +1210,7 @@ void clean_up(bool print_message)
xid_cache_free();
delete_elements(&key_caches, (void (*)(const char*, uchar*)) free_key_cache);
#ifdef WITH_MARIA_STORAGE_ENGINE
- delete_elements(&pagecaches, (void (*)(const char*, gptr)) free_pagecache);
+ delete_elements(&pagecaches, (void (*)(const char*, uchar*)) free_pagecache);
#endif /* WITH_MARIA_STORAGE_ENGINE */
multi_keycache_free();
#ifdef WITH_MARIA_STORAGE_ENGINE
@@ -6227,16 +6227,13 @@ The minimum value for this variable is 4096.",
{"pagecache_age_threshold", OPT_KEY_CACHE_AGE_THRESHOLD,
"This characterizes the number of hits a hot block has to be untouched until it is considered aged enough to be downgraded to a warm block. This specifies the percentage ratio of that number of hits to the total number of blocks in key cache",
(uchar**) &maria_pagecache_var.param_age_threshold,
- (uchar**) 0,
- 0, (GET_ULONG | GET_ASK_ADDR), REQUIRED_ARG,
+ (uchar**) 0, 0, (GET_ULONG | GET_ASK_ADDR), REQUIRED_ARG,
300, 100, ~0L, 0, 100, 0},
{"pagecache_buffer_size", OPT_KEY_BUFFER_SIZE,
"The size of the buffer used for index blocks for MyISAM tables. Increase this to get better index handling (for all reads and multiple writes) to as much as you can afford; 64M on a 256M machine that mainly runs MySQL is quite common.",
(uchar**) &maria_pagecache_var.param_buff_size,
- (uchar**) 0,
- 0, (GET_ULL | GET_ASK_ADDR),
- REQUIRED_ARG, KEY_CACHE_SIZE, MALLOC_OVERHEAD, ~(ulong) 0, MALLOC_OVERHEAD,
- IO_SIZE, KEY_CACHE_SIZE},
+ (uchar**) 0, 0, (GET_ULL | GET_ASK_ADDR), REQUIRED_ARG,
+ KEY_CACHE_SIZE, MALLOC_OVERHEAD, ~(ulong) 0, MALLOC_OVERHEAD, IO_SIZE, 0},
{"pagecache_division_limit", OPT_KEY_CACHE_DIVISION_LIMIT,
"The minimum percentage of warm blocks in key cache",
(uchar**) &maria_pagecache_var.param_division_limit,
@@ -6252,11 +6249,12 @@ The minimum value for this variable is 4096.",
"Optional colon separated list of plugins to load, where each plugin is "
"identified by name and path to library seperated by an equals.",
(uchar**) &opt_plugin_load, (uchar**) &opt_plugin_load, 0,
+ GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"preload_buffer_size", OPT_PRELOAD_BUFFER_SIZE,
- "The size of the buffer that is allocated when preloading indexes",
- (uchar**) &global_system_variables.preload_buff_size,
- (uchar**) &max_system_variables.preload_buff_size, 0, GET_ULONG,
- REQUIRED_ARG, 32*1024L, 1024, 1024*1024*1024L, 0, 1, 0},
+ "The size of the buffer that is allocated when preloading indexes",
+ (uchar**) &global_system_variables.preload_buff_size,
+ (uchar**) &max_system_variables.preload_buff_size, 0, GET_ULONG,
+ REQUIRED_ARG, 32*1024L, 1024, 1024*1024*1024L, 0, 1, 0},
{"query_alloc_block_size", OPT_QUERY_ALLOC_BLOCK_SIZE,
"Allocation block size for query parsing and execution",
(uchar**) &global_system_variables.query_alloc_block_size,
diff --git a/sql/set_var.cc b/sql/set_var.cc
index 5b28e257f5a..ea47f2f557b 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -345,10 +345,10 @@ static sys_var_thd_enum sys_myisam_stats_method(&vars, "myisam_stats_met
&myisam_stats_method_typelib,
NULL);
-sys_var_thd_ulonglong sys_maria_max_sort_file_size("maria_max_sort_file_size", &SV::maria_max_sort_file_size, fix_maria_max_sort_file_size, 1);
-sys_var_thd_ulong sys_maria_repair_threads("maria_repair_threads", &SV::maria_repair_threads);
-sys_var_thd_ulong sys_maria_sort_buffer_size("maria_sort_buffer_size", &SV::maria_sort_buff_size);
-sys_var_thd_enum sys_maria_stats_method("maria_stats_method",
+static sys_var_thd_ulonglong sys_maria_max_sort_file_size(&vars, "maria_max_sort_file_size", &SV::maria_max_sort_file_size, fix_maria_max_sort_file_size, 1);
+static sys_var_thd_ulong sys_maria_repair_threads(&vars, "maria_repair_threads", &SV::maria_repair_threads);
+static sys_var_thd_ulong sys_maria_sort_buffer_size(&vars, "maria_sort_buffer_size", &SV::maria_sort_buff_size);
+static sys_var_thd_enum sys_maria_stats_method(&vars, "maria_stats_method",
&SV::maria_stats_method,
&myisam_stats_method_typelib,
NULL);
@@ -1963,13 +1963,13 @@ uchar *sys_var_key_cache_param::value_ptr(THD *thd, enum_var_type type,
#ifdef WITH_MARIA_STORAGE_ENGINE
-byte *sys_var_pagecache_param::value_ptr(THD *thd, enum_var_type type,
+uchar *sys_var_pagecache_param::value_ptr(THD *thd, enum_var_type type,
LEX_STRING *base)
{
PAGECACHE *pagecache= get_pagecache(base);
if (!pagecache)
pagecache= &zero_pagecache;
- return (byte*) pagecache + offset ;
+ return (uchar*) pagecache + offset ;
}
#endif /* WITH_MARIA_STORAGE_ENGINE */
@@ -3664,7 +3664,7 @@ static PAGECACHE *create_pagecache(const char *name, uint length)
if ((pagecache= (PAGECACHE*) my_malloc(sizeof(PAGECACHE),
MYF(MY_ZEROFILL | MY_WME))))
{
- if (!new NAMED_LIST(&pagecaches, name, length, (gptr) pagecache))
+ if (!new NAMED_LIST(&pagecaches, name, length, (uchar*) pagecache))
{
my_free((char*) pagecache, MYF(0));
pagecache= 0;
diff --git a/sql/set_var.h b/sql/set_var.h
index ab865f312b3..3c8c06b34df 100644
--- a/sql/set_var.h
+++ b/sql/set_var.h
@@ -742,7 +742,7 @@ 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);
+ uchar *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; }
};
diff --git a/sql/uniques.cc b/sql/uniques.cc
index 619a516e54a..6bcffbd53de 100644
--- a/sql/uniques.cc
+++ b/sql/uniques.cc
@@ -448,7 +448,7 @@ static bool merge_walk(uchar *merge_buffer, ulong merge_buffer_size,
*/
for (top= begin; top != end; ++top)
{
- top->base= (byte*) (merge_buffer + (top - begin) * piece_size);
+ top->base= (uchar*) (merge_buffer + (top - begin) * piece_size);
top->max_keys= max_key_count_per_piece;
bytes_read= read_to_buffer(file, top, key_length);
if (bytes_read == (uint) (-1))