diff options
author | unknown <monty@mashka.mysql.fi> | 2003-06-29 12:58:43 +0300 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-06-29 12:58:43 +0300 |
commit | e224c1238d58c99b10ff6f55f816bee09be146c8 (patch) | |
tree | d033a2cb19acc7382add71516ff61db3dd936e95 | |
parent | 5768f4a34ed7218c61ed34cf5b76eee66b715224 (diff) | |
download | mariadb-git-e224c1238d58c99b10ff6f55f816bee09be146c8.tar.gz |
SET CHARACTER SET DEFAULT didn't work (Bug #462)
BUILD/compile-pentium-debug-max:
Removed -DBIG_TABLES because of problems with gdb 5.3
sql/set_var.cc:
SET CHARACTER SET DEFAULT didn't work
sql/set_var.h:
SET CHARACTER SET DEFAULT didn't work
-rwxr-xr-x | BUILD/compile-pentium-debug-max | 2 | ||||
-rw-r--r-- | mysql-test/r/convert.result | 17 | ||||
-rw-r--r-- | mysql-test/t/convert.test | 11 | ||||
-rw-r--r-- | sql/set_var.cc | 5 | ||||
-rw-r--r-- | sql/set_var.h | 1 |
5 files changed, 35 insertions, 1 deletions
diff --git a/BUILD/compile-pentium-debug-max b/BUILD/compile-pentium-debug-max index f71b849384f..1684686ce8c 100755 --- a/BUILD/compile-pentium-debug-max +++ b/BUILD/compile-pentium-debug-max @@ -3,7 +3,7 @@ path=`dirname $0` . "$path/SETUP.sh" -extra_flags="$pentium_cflags $debug_cflags -DBIG_TABLES" +extra_flags="$pentium_cflags $debug_cflags" c_warnings="$c_warnings $debug_extra_warnings" cxx_warnings="$cxx_warnings $debug_extra_warnings" extra_configs="$pentium_configs $debug_configs" diff --git a/mysql-test/r/convert.result b/mysql-test/r/convert.result new file mode 100644 index 00000000000..f8dad8c69ba --- /dev/null +++ b/mysql-test/r/convert.result @@ -0,0 +1,17 @@ +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 + diff --git a/mysql-test/t/convert.test b/mysql-test/t/convert.test new file mode 100644 index 00000000000..f26ef3a8c72 --- /dev/null +++ b/mysql-test/t/convert.test @@ -0,0 +1,11 @@ +# 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; diff --git a/sql/set_var.cc b/sql/set_var.cc index 3edcdbc1f7f..b66c410c6d5 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -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) { diff --git a/sql/set_var.h b/sql/set_var.h index f33f53c5acc..e22c55276a7 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -412,6 +412,7 @@ public: return type != STRING_RESULT; /* Only accept strings */ } bool check_default(enum_var_type type) { return 0; } + void set_default(THD *thd, enum_var_type type); }; |