List:Internals« Previous MessageNext Message »
From:Jim Winstead Date:June 16 2005 2:34am
Subject:bk commit into 4.1 tree (jimw:1.2291) BUG#10724
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of jimw. When jimw 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.2291 05/06/15 17:34:16 jimw@stripped +6 -0
  Don't force column header to @@session.var_name if @@local.var_name
  was used. (Bug #10724)

  sql/sql_yacc.yy
    1.388 05/06/15 17:34:13 jimw@stripped +3 -3
    Use OPT_LOCAL

  sql/set_var.h
    1.59 05/06/15 17:34:13 jimw@stripped +1 -1
    Add OPT_LOCAL (same as OPT_SESSION, but separate for output purposes)

  sql/set_var.cc
    1.165 05/06/15 17:34:13 jimw@stripped +1 -1
    Handle OPT_LOCAL

  sql/item_func.cc
    1.245 05/06/15 17:34:13 jimw@stripped +3 -1
    Handle OPT_LOCAL

  mysql-test/t/user_var.test
    1.21 05/06/15 17:34:13 jimw@stripped +13 -0
    Add new test

  mysql-test/r/user_var.result
    1.28 05/06/15 17:34:13 jimw@stripped +12 -0
    Add new results

# 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:	jimw
# Host:	rama.(none)
# Root:	/home/jimw/my/mysql-4.1-10724

--- 1.244/sql/item_func.cc	2005-05-14 06:24:32 -07:00
+++ 1.245/sql/item_func.cc	2005-06-15 17:34:13 -07:00
@@ -3399,9 +3399,11 @@
   pos=buff+2;
   if (var_type == OPT_SESSION)
     pos=strmov(pos,"session.");
+  else if (var_type == OPT_LOCAL)
+    pos=strmov(pos,"local.");
   else if (var_type == OPT_GLOBAL)
     pos=strmov(pos,"global.");
-  
+
   set_if_smaller(component_name->length, MAX_SYS_VAR_LENGTH);
   set_if_smaller(base_name->length, MAX_SYS_VAR_LENGTH);
 

--- 1.387/sql/sql_yacc.yy	2005-05-18 03:46:51 -07:00
+++ 1.388/sql/sql_yacc.yy	2005-06-15 17:34:13 -07:00
@@ -5377,7 +5377,7 @@
 option_type_ext:
         option_type     {}
 	| GLOBAL_SYM	{ Lex->option_type= OPT_GLOBAL; }
-	| LOCAL_SYM	{ Lex->option_type= OPT_SESSION; }
+	| LOCAL_SYM	{ Lex->option_type= OPT_LOCAL; }
 	| SESSION_SYM	{ Lex->option_type= OPT_SESSION; }
 	;
 
@@ -5389,14 +5389,14 @@
 opt_var_type:
 	/* empty */	{ $$=OPT_SESSION; }
 	| GLOBAL_SYM	{ $$=OPT_GLOBAL; }
-	| LOCAL_SYM	{ $$=OPT_SESSION; }
+	| LOCAL_SYM	{ $$=OPT_LOCAL; }
 	| SESSION_SYM	{ $$=OPT_SESSION; }
 	;
 
 opt_var_ident_type:
 	/* empty */		{ $$=OPT_DEFAULT; }
 	| GLOBAL_SYM '.'	{ $$=OPT_GLOBAL; }
-	| LOCAL_SYM '.'		{ $$=OPT_SESSION; }
+	| LOCAL_SYM '.'		{ $$=OPT_LOCAL; }
 	| SESSION_SYM '.'	{ $$=OPT_SESSION; }
 	;
 

--- 1.164/sql/set_var.cc	2005-04-15 17:40:27 -07:00
+++ 1.165/sql/set_var.cc	2005-06-15 17:34:13 -07:00
@@ -1083,7 +1083,7 @@
 
 static void fix_tx_isolation(THD *thd, enum_var_type type)
 {
-  if (type == OPT_SESSION)
+  if (type == OPT_SESSION || type == OPT_LOCAL)
     thd->session_tx_isolation= ((enum_tx_isolation)
 				thd->variables.tx_isolation);
 }

--- 1.58/sql/set_var.h	2005-05-04 06:05:53 -07:00
+++ 1.59/sql/set_var.h	2005-06-15 17:34:13 -07:00
@@ -32,7 +32,7 @@
 
 enum enum_var_type
 {
-  OPT_DEFAULT, OPT_SESSION, OPT_GLOBAL
+  OPT_DEFAULT, OPT_SESSION, OPT_LOCAL, OPT_GLOBAL
 };
 
 typedef int (*sys_check_func)(THD *,  set_var *);

--- 1.27/mysql-test/r/user_var.result	2005-04-06 02:11:08 -07:00
+++ 1.28/mysql-test/r/user_var.result	2005-06-15 17:34:13 -07:00
@@ -179,3 +179,15 @@
 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near '@honk=99' at line 1
 set one_shot @honk=99;
 ERROR HY000: The SET ONE_SHOT syntax is reserved for purposes internal to the MySQL
server
+select @@local.max_allowed_packet;
+@@local.max_allowed_packet
+#
+select @@session.max_allowed_packet;
+@@session.max_allowed_packet
+#
+select @@global.max_allowed_packet;
+@@global.max_allowed_packet
+#
+select @@max_allowed_packet;
+@@max_allowed_packet
+#

--- 1.20/mysql-test/t/user_var.test	2005-04-06 02:11:08 -07:00
+++ 1.21/mysql-test/t/user_var.test	2005-06-15 17:34:13 -07:00
@@ -119,3 +119,16 @@
 set session @honk=99;
 --error 1105
 set one_shot @honk=99;
+
+#
+# Bug #10724  @@local not preserved in column name of select
+#
+# The value doesn't actually matter, we just care about the column name
+--replace_column 1 #
+select @@local.max_allowed_packet;
+--replace_column 1 #
+select @@session.max_allowed_packet;
+--replace_column 1 #
+select @@global.max_allowed_packet;
+--replace_column 1 #
+select @@max_allowed_packet;
Thread
bk commit into 4.1 tree (jimw:1.2291) BUG#10724Jim Winstead16 Jun