MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:gluh Date:September 7 2005 10:38am
Subject:bk commit into 5.0 tree (gluh:1.1975) BUG#11775
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of gluh. When gluh does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.1975 05/09/07 15:38:09 gluh@stripped +4 -0
  Fix for bug#11775 Variable character_set_system does not exist (sometimes).
    Variable character_set_system is selectable now
    More accurate error message results during 
    update of character_set_system and some other read only variables

  sql/set_var.h
    1.70 05/09/07 15:36:58 gluh@stripped +2 -1
    Fix for bug#11775 Variable character_set_system does not exist (sometimes).
      Variable character_set_system is selectable now
      More accurate error message results during 
      update of character_set_system and some other read only variables

  sql/set_var.cc
    1.139 05/09/07 15:36:58 gluh@stripped +3 -26
    Fix for bug#11775 Variable character_set_system does not exist (sometimes).
      Variable character_set_system is selectable now
      More accurate error message results during 
      update of character_set_system and some other read only variables

  mysql-test/t/variables.test
    1.49 05/09/07 15:36:58 gluh@stripped +9 -0
    Fix for bug#11775 Variable character_set_system does not exist (sometimes).
      test case

  mysql-test/r/variables.result
    1.73 05/09/07 15:36:58 gluh@stripped +7 -0
    Fix for bug#11775 Variable character_set_system does not exist (sometimes).
      test case

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	gluh
# Host:	eagle.intranet.mysql.r18.ru
# Root:	/home/gluh/MySQL/Merge/5.0

--- 1.72/mysql-test/r/variables.result	Sat Sep  3 00:41:58 2005
+++ 1.73/mysql-test/r/variables.result	Wed Sep  7 15:36:58 2005
@@ -545,3 +545,10 @@
 select @@have_innodb;
 @@have_innodb
 #
+select @@character_set_system;
+@@character_set_system
+utf8
+set global character_set_system = latin1;
+ERROR HY000: Variable 'character_set_system' is a read only variable
+set @@global.version_compile_os='234';
+ERROR HY000: Variable 'version_compile_os' is a read only variable

--- 1.48/mysql-test/t/variables.test	Sat Sep  3 00:40:59 2005
+++ 1.49/mysql-test/t/variables.test	Wed Sep  7 15:36:58 2005
@@ -435,3 +435,12 @@
 
 --replace_column 1 #
 select @@have_innodb;
+
+#
+# Bug #11775 Variable character_set_system does not exist (sometimes)
+#
+select @@character_set_system;
+--error 1238
+set global character_set_system = latin1;
+--error 1238
+set @@global.version_compile_os='234';

--- 1.138/sql/set_var.cc	Tue Sep  6 22:51:08 2005
+++ 1.139/sql/set_var.cc	Wed Sep  7 15:36:58 2005
@@ -142,11 +142,8 @@
 sys_var_thd_ulong	sys_bulk_insert_buff_size("bulk_insert_buffer_size",
 						  &SV::bulk_insert_buff_size);
 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,
-                                    (char *)my_charset_utf8_general_ci.name);
+sys_var_const_str       sys_charset_system("character_set_system",
+                                           (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");
@@ -569,6 +566,7 @@
   &sys_character_set_client,
   &sys_character_set_connection,
   &sys_character_set_results,
+  &sys_charset_system,
   &sys_collation_connection,
   &sys_collation_database,
   &sys_collation_server,
@@ -1115,27 +1113,6 @@
 {
   strmake(ft_boolean_syntax, def_ft_boolean_syntax,
 	  sizeof(ft_boolean_syntax)-1);
-}
-
-/*
-  The following 3 functions need to be changed in 4.1 when we allow
-  one to change character sets
-*/
-
-static int sys_check_charset(THD *thd, set_var *var)
-{
-  return 0;
-}
-
-
-static bool sys_update_charset(THD *thd, set_var *var)
-{
-  return 0;
-}
-
-
-static void sys_set_default_charset(THD *thd, enum_var_type type)
-{
 }
 
 

--- 1.69/sql/set_var.h	Fri Jul 29 00:39:07 2005
+++ 1.70/sql/set_var.h	Wed Sep  7 15:36:58 2005
@@ -190,6 +190,7 @@
     return 1;
   }
   bool check_default(enum_var_type type) { return 1; }
+  bool is_readonly() const { return 1; }
 };
 
 
@@ -900,7 +901,7 @@
 bool not_all_support_one_shot(List<set_var_base> *var_list);
 void fix_delay_key_write(THD *thd, enum_var_type type);
 ulong fix_sql_mode(ulong sql_mode);
-extern sys_var_str sys_charset_system;
+extern sys_var_const_str sys_charset_system;
 extern sys_var_str sys_init_connect;
 extern sys_var_str sys_init_slave;
 extern sys_var_thd_time_zone sys_time_zone;
Thread
bk commit into 5.0 tree (gluh:1.1975) BUG#11775gluh7 Sep