MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:timour Date:August 24 2005 7:51am
Subject:bk commit into 5.0 tree (timour:1.1913) BUG#6276
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of timka. When timka 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.1913 05/08/24 10:51:28 timour@stripped +1 -0
  Post-fix for BUG#6276.

  sql/sql_base.cc
    1.292 05/08/24 10:51:25 timour@stripped +14 -4
    Fixed a bug in PS (prepared statements) mode - the "always TRUE" constant
    Item created for outer joins with no common columns was not created in
    the PS memory.
    Now it is created in the right memory.

# 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:	timour
# Host:	lamia.home
# Root:	/home/timka/mysql/src/5.0-2486

--- 1.291/sql/sql_base.cc	2005-08-23 20:03:29 +03:00
+++ 1.292/sql/sql_base.cc	2005-08-24 10:51:25 +03:00
@@ -3763,8 +3763,13 @@
                              TABLE_LIST *left_neighbor,
                              TABLE_LIST *right_neighbor)
 {
+  Query_arena *arena, backup;
+  bool result= TRUE;
+
   DBUG_ENTER("store_top_level_join_columns");
 
+  arena= thd->change_arena_if_needed(&backup);
+
   /* Call the procedure recursively for each nested table reference. */
   if (table_ref->nested_join)
   {
@@ -3797,7 +3802,7 @@
       if (cur_table_ref->nested_join &&
           store_top_level_join_columns(thd, cur_table_ref,
                                        cur_left_neighbor, cur_right_neighbor))
-        DBUG_RETURN(TRUE);
+        goto err;
       cur_right_neighbor= cur_table_ref;
     }
   }
@@ -3829,7 +3834,7 @@
       swap_variables(TABLE_LIST*, table_ref_1, table_ref_2);
     if (mark_common_columns(thd, table_ref_1, table_ref_2,
                             using_fields, &found_using_fields))
-      DBUG_RETURN(TRUE);
+      goto err;
 
     /*
       Swap the join operands back, so that we pick the columns of the second
@@ -3841,7 +3846,7 @@
     if (store_natural_using_join_columns(thd, table_ref, table_ref_1,
                                          table_ref_2, using_fields,
                                          found_using_fields))
-      DBUG_RETURN(TRUE);
+      goto err;
 
     /*
       Change NATURAL JOIN to JOIN ... ON. We do this for both operands
@@ -3872,7 +3877,12 @@
     else
       table_ref->next_name_resolution_table= NULL;
   }
-  DBUG_RETURN(FALSE);
+  result= FALSE; /* All is OK. */
+
+err:
+  if (arena)
+    thd->restore_backup_item_arena(arena, &backup);
+  DBUG_RETURN(result);
 }
 
 
Thread
bk commit into 5.0 tree (timour:1.1913) BUG#6276timour24 Aug