Commit 81a84424 authored by monty@mashka.mysql.fi's avatar monty@mashka.mysql.fi

SET CHARACTER SET DEFAULT didn't work (Bug #462)

parent 863c5634
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"
extra_flags="$pentium_cflags $debug_cflags -DBIG_TABLES" extra_flags="$pentium_cflags $debug_cflags"
c_warnings="$c_warnings $debug_extra_warnings" c_warnings="$c_warnings $debug_extra_warnings"
cxx_warnings="$cxx_warnings $debug_extra_warnings" cxx_warnings="$cxx_warnings $debug_extra_warnings"
extra_configs="$pentium_configs $debug_configs" extra_configs="$pentium_configs $debug_configs"
......
select @@convert_character_set;
@@convert_character_set
select @@global.convert_character_set;
@@global.convert_character_set
show variables like "%convert_character_set%";
Variable_name Value
convert_character_set
SET CHARACTER SET cp1251_koi8;
select @@convert_character_set;
@@convert_character_set
cp1251_koi8
SET CHARACTER SET DEFAULT;
select @@convert_character_set;
@@convert_character_set
# Test of character set conversions
# Test that SET DEFAULT works
select @@convert_character_set;
select @@global.convert_character_set;
show variables like "%convert_character_set%";
SET CHARACTER SET cp1251_koi8;
select @@convert_character_set;
SET CHARACTER SET DEFAULT;
select @@convert_character_set;
...@@ -1083,6 +1083,11 @@ byte *sys_var_thd_conv_charset::value_ptr(THD *thd, enum_var_type type) ...@@ -1083,6 +1083,11 @@ byte *sys_var_thd_conv_charset::value_ptr(THD *thd, enum_var_type type)
} }
void sys_var_thd_conv_charset::set_default(THD *thd, enum_var_type type)
{
thd->variables.convert_set= global_system_variables.convert_set;
}
bool sys_var_timestamp::update(THD *thd, set_var *var) bool sys_var_timestamp::update(THD *thd, set_var *var)
{ {
......
...@@ -412,6 +412,7 @@ class sys_var_thd_conv_charset :public sys_var_thd ...@@ -412,6 +412,7 @@ class sys_var_thd_conv_charset :public sys_var_thd
return type != STRING_RESULT; /* Only accept strings */ return type != STRING_RESULT; /* Only accept strings */
} }
bool check_default(enum_var_type type) { return 0; } bool check_default(enum_var_type type) { return 0; }
void set_default(THD *thd, enum_var_type type);
}; };
......
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