Commit 7411ac19 authored by bell@sanja.is.com.ua's avatar bell@sanja.is.com.ua

Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1

into sanja.is.com.ua:/home/bell/mysql/bk/work-select_list-4.1
parents 947e6e00 f122e751
......@@ -382,6 +382,17 @@ select 1;
1
select @@session.key_buffer_size;
ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable
set ft_boolean_syntax = @@init_connect;
ERROR HY000: Variable 'ft_boolean_syntax' is a GLOBAL variable and should be set with SET GLOBAL
set global ft_boolean_syntax = @@init_connect;
ERROR 42000: Variable 'ft_boolean_syntax' can't be set to the value of ''
set init_connect = NULL;
ERROR HY000: Variable 'init_connect' is a GLOBAL variable and should be set with SET GLOBAL
set global init_connect = NULL;
set ft_boolean_syntax = @@init_connect;
ERROR HY000: Variable 'ft_boolean_syntax' is a GLOBAL variable and should be set with SET GLOBAL
set global ft_boolean_syntax = @@init_connect;
ERROR 42000: Variable 'ft_boolean_syntax' can't be set to the value of ''
select @@global.max_user_connections,@@local.max_join_size;
@@global.max_user_connections @@session.max_join_size
100 200
......
......@@ -54,7 +54,7 @@ select * from t1;
drop table t1;
#
# Bug #2366 Wrong utf8 behaviour when data is trancated
# Bug #2366 Wrong utf8 behaviour when data is truncated
#
set names koi8r;
create table t1 (s1 char(1) character set utf8);
......@@ -101,7 +101,7 @@ drop table t1;
#
# Bug 2699
# UTF8 breaks primary keys for cols > 85 characters
# UTF8 breaks primary keys for cols > 333 characters
#
--error 1071
create table t1 (a text character set utf8, primary key(a(360)));
......
......@@ -270,6 +270,18 @@ select 1;
--error 1238
select @@session.key_buffer_size;
--error 1229
set ft_boolean_syntax = @@init_connect;
--error 1231
set global ft_boolean_syntax = @@init_connect;
--error 1229
set init_connect = NULL;
set global init_connect = NULL;
--error 1229
set ft_boolean_syntax = @@init_connect;
--error 1231
set global ft_boolean_syntax = @@init_connect;
#
# swap
#
......
......@@ -2189,10 +2189,14 @@ static int init_common_variables(const char *conf_file_name, int argc,
sys_init_connect.value_length= 0;
if ((sys_init_connect.value= opt_init_connect))
sys_init_connect.value_length= strlen(opt_init_connect);
else
sys_init_connect.value=my_strdup("",MYF(0));
sys_init_slave.value_length= 0;
if ((sys_init_slave.value= opt_init_slave))
sys_init_slave.value_length= strlen(opt_init_slave);
else
sys_init_slave.value=my_strdup("",MYF(0));
if (use_temp_pool && bitmap_init(&temp_pool,0,1024,1))
return 1;
......
......@@ -121,7 +121,8 @@ sys_var_character_set_server sys_character_set_server("character_set_server");
sys_var_str sys_charset_system("character_set_system",
sys_check_charset,
sys_update_charset,
sys_set_default_charset);
sys_set_default_charset,
(char *)my_charset_utf8_general_ci.name);
sys_var_character_set_database sys_character_set_database("character_set_database");
sys_var_character_set_client sys_character_set_client("character_set_client");
sys_var_character_set_connection sys_character_set_connection("character_set_connection");
......@@ -150,13 +151,14 @@ sys_var_long_ptr sys_flush_time("flush_time", &flush_time);
sys_var_str sys_ft_boolean_syntax("ft_boolean_syntax",
sys_check_ftb_syntax,
sys_update_ftb_syntax,
sys_default_ftb_syntax);
sys_default_ftb_syntax,
ft_boolean_syntax);
sys_var_str sys_init_connect("init_connect", 0,
sys_update_init_connect,
sys_default_init_connect);
sys_default_init_connect,0);
sys_var_str sys_init_slave("init_slave", 0,
sys_update_init_slave,
sys_default_init_slave);
sys_default_init_slave,0);
sys_var_thd_ulong sys_interactive_timeout("interactive_timeout",
&SV::net_interactive_timeout);
sys_var_thd_ulong sys_join_buffer_size("join_buffer_size",
......@@ -665,11 +667,11 @@ struct show_var_st init_vars[]= {
{sys_join_buffer_size.name, (char*) &sys_join_buffer_size, SHOW_SYS},
{sys_key_buffer_size.name, (char*) &sys_key_buffer_size, SHOW_SYS},
{sys_key_cache_age_threshold.name, (char*) &sys_key_cache_age_threshold,
SHOW_SYS},
SHOW_SYS},
{sys_key_cache_block_size.name, (char*) &sys_key_cache_block_size,
SHOW_SYS},
SHOW_SYS},
{sys_key_cache_division_limit.name, (char*) &sys_key_cache_division_limit,
SHOW_SYS},
SHOW_SYS},
{"language", language, SHOW_CHAR},
{"large_files_support", (char*) &opt_large_files, SHOW_BOOL},
{sys_license.name, (char*) &sys_license, SHOW_SYS},
......@@ -833,15 +835,11 @@ bool sys_var_str::check(THD *thd, set_var *var)
bool update_sys_var_str(sys_var_str *var_str, rw_lock_t *var_mutex,
set_var *var)
{
char *res= 0, *old_value;
uint new_length= 0;
/* If the string is "", delete old init command */
if (var && (new_length= var->value->str_value.length()))
{
if (!(res= my_strdup_with_length((byte*) var->value->str_value.ptr(),
new_length, MYF(0))))
return 1;
}
char *res= 0, *old_value=(char *)(var ? var->value->str_value.ptr() : 0);
uint new_length= (var ? var->value->str_value.length() : 0);
if (!old_value) old_value="";
if (!(res= my_strdup_with_length(old_value, new_length, MYF(0))))
return 1;
/*
Replace the old value in such a way that the any thread using
the value will work.
......
......@@ -139,8 +139,9 @@ public:
sys_var_str(const char *name_arg,
sys_check_func check_func_arg,
sys_update_func update_func_arg,
sys_set_default_func set_default_func_arg)
:sys_var(name_arg), check_func(check_func_arg),
sys_set_default_func set_default_func_arg,
char *value_arg)
:sys_var(name_arg), check_func(check_func_arg), value(value_arg),
update_func(update_func_arg),set_default_func(set_default_func_arg)
{}
bool check(THD *thd, set_var *var);
......
......@@ -3188,7 +3188,7 @@ log '%s' at position %s, relay log '%s' position: %s", RPL_LOG_NAME,
llstr(rli->group_relay_log_pos,llbuff1));
/* execute init_slave variable */
if (sys_init_slave.value)
if (sys_init_slave.value_length)
{
execute_init_command(thd, &sys_init_slave, &LOCK_sys_init_slave);
if (thd->query_error)
......
......@@ -1000,7 +1000,7 @@ pthread_handler_decl(handle_one_connection,arg)
net->compress=1; // Use compression
thd->version= refresh_version;
if (sys_init_connect.value && !(thd->master_access & SUPER_ACL))
if (sys_init_connect.value_length && !(thd->master_access & SUPER_ACL))
{
execute_init_command(thd, &sys_init_connect, &LOCK_sys_init_connect);
if (thd->query_error)
......
......@@ -71,7 +71,7 @@ max_connections = 100
# the host will be blocked from connecting to the MySQL server until
# "FLUSH HOSTS" has been run or the server was restarted. Invalid
# passwords and other errors during the connect phase result in
# increasing this value. See the "Aborted_Connects" status variable for
# increasing this value. See the "Aborted_connects" status variable for
# global counter.
max_connect_errors = 10
......@@ -111,14 +111,14 @@ max_heap_table_size = 64M
# Sort buffer is used to perform sorts for some ORDER BY and GROUP BY
# queries. If sorted data does not fit into the sort buffer, a disk
# based merge sort is used instead - See "sort_merge_passes". Allocated
# per thread if sort is needed.
# based merge sort is used instead - See the "Sort_merge_passes"
# status variable. Allocated per thread if sort is needed.
sort_buffer_size = 8M
# This buffer is used for the optimization of full JOINs (JOINs without
# indexes). Such JOINs are very bad for performance in most cases
# anyway, but setting this variable to a large value reduces the
# performance impact. See the "select_full_join" status variable for a
# performance impact. See the "Select_full_join" status variable for a
# count of full JOINs. Allocated per thread if full join is found
join_buffer_size = 8M
......
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