List:Commits« Previous MessageNext Message »
From:Andrei Elkin Date:May 7 2006 10:43am
Subject:bk commit into 4.1 tree (aelkin:1.2469)
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of elkin. When elkin 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.2469 06/05/07 11:43:27 aelkin@stripped +1 -0
  Merge mysql.com:/usr_rh9/home/elkin.rh9/MySQL/BARE/4.1
  into  mysql.com:/usr_rh9/home/elkin.rh9/MySQL/FIXES/4.1-bug19136_unass_user_var

  sql/item_func.cc
    1.261 06/05/07 11:43:22 aelkin@stripped +0 -0
    Auto merged

# 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:	aelkin
# Host:	dsl-hkigw8-feb0de00-199.dhcp.inet.fi
# Root:	/usr_rh9/home/elkin.rh9/MySQL/FIXES/4.1-bug19136_unass_user_var/RESYNC

--- 1.260/sql/item_func.cc	2006-04-24 17:06:39 +03:00
+++ 1.261/sql/item_func.cc	2006-05-07 11:43:22 +03:00
@@ -2735,14 +2735,24 @@
       sql_set_variables(), we could instead manually call check() and update();
       this would save memory and time; but calling sql_set_variables() makes
       one unique place to maintain (sql_set_variables()). 
+
+      Manipulation with lex is necessary since free_underlaid_joins
+      is going to release memory belonging to the main query.
     */
 
     List<set_var_base> tmp_var_list;
+    LEX *sav_lex= thd->lex, lex_tmp;
+    thd->lex= &lex_tmp;
+    lex_start(thd, NULL, 0);
     tmp_var_list.push_back(new set_var_user(new Item_func_set_user_var(name,
                                                                        new
Item_null())));
     /* Create the variable */
     if (sql_set_variables(thd, &tmp_var_list))
+    {
+      thd->lex= sav_lex;
       goto err;
+    }
+    thd->lex= sav_lex;
     if (!(var_entry= get_variable(&thd->user_vars, name, 0)))
       goto err;
   }
Thread
bk commit into 4.1 tree (aelkin:1.2469)Andrei Elkin7 May