List:Commits« Previous MessageNext Message »
From:kgeorge Date:March 26 2007 4:15pm
Subject:bk commit into 5.1 tree (gkodinov:1.2507)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of kgeorge. When kgeorge 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@stripped, 2007-03-26 19:15:30+03:00, gkodinov@stripped +6 -0
  WL3527: 5.1
   renamed "--old-mode" to "--old" to prevent
   ambiguity.
   "old" now appears in SHOW VARIABLES as a
   read-only option.

  mysql-test/r/group_by.result@stripped, 2007-03-26 19:15:27+03:00, gkodinov@stripped +5 -0
    WL3527: 5.1 test case

  mysql-test/t/group_by.test@stripped, 2007-03-26 19:15:27+03:00, gkodinov@stripped +6 -1
    WL3527: 5.1 test case

  sql/mysqld.cc@stripped, 2007-03-26 19:15:27+03:00, gkodinov@stripped +1 -1
    WL3527: 5.1
     renamed the "old-mode" to "old" to fit
     the options naming scheme

  sql/set_var.cc@stripped, 2007-03-26 19:15:27+03:00, gkodinov@stripped +3 -0
    WL3527: 5.1
     added "-old" as read-only system variable

  sql/set_var.h@stripped, 2007-03-26 19:15:27+03:00, gkodinov@stripped +10 -0
    WL3527: 5.1
     added class for boolean pointer read-only 
     option to support the "--old" option.

  sql/sql_base.cc@stripped, 2007-03-26 19:15:27+03:00, gkodinov@stripped +0 -2
    fixed 5.0->5.1 merge problems.

# 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:	gkodinov
# Host:	magare.gmz
# Root:	/home/kgeorge/mysql/work/WL3527-after-merge-5.1-opt

--- 1.622/sql/mysqld.cc	2007-03-19 23:37:31 +02:00
+++ 1.623/sql/mysqld.cc	2007-03-26 19:15:27 +03:00
@@ -6268,7 +6268,7 @@ The minimum value for this variable is 4
    (gptr*) &global_system_variables.net_write_timeout,
    (gptr*) &max_system_variables.net_write_timeout, 0, GET_ULONG,
    REQUIRED_ARG, NET_WRITE_TIMEOUT, 1, LONG_TIMEOUT, 0, 1, 0},
-  { "old_mode", OPT_OLD_MODE, "Use compatible behaviour.", 
+  { "old", OPT_OLD_MODE, "Use compatible behavior.", 
     (gptr*) &global_system_variables.old_mode,
     (gptr*) &max_system_variables.old_mode, 0, GET_BOOL, NO_ARG, 
     0, 0, 0, 0, 0, 0},

--- 1.391/sql/sql_base.cc	2007-03-26 17:03:55 +03:00
+++ 1.392/sql/sql_base.cc	2007-03-26 19:15:27 +03:00
@@ -5772,7 +5772,6 @@ bool setup_tables_and_check_access(THD *
   TABLE_LIST *leaves_tmp= NULL;
   bool first_table= true;
 
-  thd->leaf_count= 0;
   if (setup_tables(thd, context, from_clause, tables,
                    &leaves_tmp, select_insert))
     return TRUE;
@@ -5790,7 +5789,6 @@ bool setup_tables_and_check_access(THD *
       return TRUE;
     }
     first_table= 0;
-    thd->leaf_count++;
   }
   return FALSE;
 }

--- 1.79/mysql-test/r/group_by.result	2007-03-12 12:19:10 +02:00
+++ 1.80/mysql-test/r/group_by.result	2007-03-26 19:15:27 +03:00
@@ -1141,4 +1141,9 @@ EXPLAIN SELECT 1 FROM t2 WHERE a IN
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	PRIMARY	t2	index	NULL	a	5	NULL	4	Using where; Using index
 2	DEPENDENT SUBQUERY	t1	ALL	NULL	NULL	NULL	NULL	256	Using where
+SHOW VARIABLES LIKE 'old';
+Variable_name	Value
+old	OFF
+SET @@old = off;
+ERROR HY000: Variable 'old' is a read only variable
 DROP TABLE t1, t2;

--- 1.63/mysql-test/t/group_by.test	2007-03-09 16:55:55 +02:00
+++ 1.64/mysql-test/t/group_by.test	2007-03-26 19:15:27 +03:00
@@ -755,7 +755,8 @@ SET SQL_MODE = '';
 
 #
 # Bug #21174: Index degrades sort performance and 
-#             optimizer does not honor IGNORE INDEX
+#             optimizer does not honor IGNORE INDEX.
+#             a.k.a WL3527.
 #
 CREATE TABLE t1 (a INT, b INT,
                  PRIMARY KEY (a),
@@ -818,5 +819,9 @@ EXPLAIN SELECT a, SUM(b) FROM t2 IGNORE 
 
 EXPLAIN SELECT 1 FROM t2 WHERE a IN
   (SELECT a FROM t1 USE INDEX (i2) IGNORE INDEX (i2));
+
+SHOW VARIABLES LIKE 'old';  
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SET @@old = off;  
 
 DROP TABLE t1, t2;

--- 1.222/sql/set_var.cc	2007-03-19 23:37:31 +02:00
+++ 1.223/sql/set_var.cc	2007-03-26 19:15:27 +03:00
@@ -356,6 +356,8 @@ sys_var_thd_ulong	sys_net_retry_count("n
 					    &SV::net_retry_count,
 					    0, fix_net_retry_count);
 sys_var_thd_bool	sys_new_mode("new", &SV::new_mode);
+sys_var_bool_ptr_readonly sys_old_mode("old", 
+                                       &global_system_variables.old_mode);
 sys_var_thd_bool	sys_old_alter_table("old_alter_table",
 					    &SV::old_alter_table);
 sys_var_thd_bool	sys_old_passwords("old_passwords", &SV::old_passwords);
@@ -942,6 +944,7 @@ SHOW_VAR init_vars[]= {
   {sys_net_retry_count.name,  (char*) &sys_net_retry_count,	    SHOW_SYS},
   {sys_net_write_timeout.name,(char*) &sys_net_write_timeout,       SHOW_SYS},
   {sys_new_mode.name,         (char*) &sys_new_mode,                SHOW_SYS},
+  {sys_old_mode.name,         (char*) &sys_old_mode,                SHOW_SYS},
   {sys_old_alter_table.name,  (char*) &sys_old_alter_table,         SHOW_SYS},
   {sys_old_passwords.name,    (char*) &sys_old_passwords,           SHOW_SYS},
   {"open_files_limit",	      (char*) &open_files_limit,	    SHOW_LONG},

--- 1.102/sql/set_var.h	2007-02-23 13:23:40 +02:00
+++ 1.103/sql/set_var.h	2007-03-26 19:15:27 +03:00
@@ -169,6 +169,16 @@ public:
 };
 
 
+class sys_var_bool_ptr_readonly :public sys_var_bool_ptr
+{
+public:
+  sys_var_bool_ptr_readonly(const char *name_arg, my_bool *value_arg)
+    :sys_var_bool_ptr(name_arg, value_arg)
+  {}
+  bool is_readonly() const { return 1; }
+};
+
+
 class sys_var_str :public sys_var
 {
 public:
Thread
bk commit into 5.1 tree (gkodinov:1.2507)kgeorge26 Mar