List:Commits« Previous MessageNext Message »
From:eugene Date:December 15 2005 4:24pm
Subject:bk commit into 5.0 tree (evgen:1.1975) BUG#15706
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of evgen. When evgen 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/12/15 19:24:48 evgen@stripped +1 -0
  Fix bug #15706 find_field_in_tables() returns field from wrong select 
  
  If item->cached_table is set, find_field_in_tables() returns found field
  even if it doesn't belong to current select. Because Item_field::fix_fields
  doesn't expect such behaviour, reported bug occurs.
  
  Added check to find_field_in_tables() whether found field belongs to current 
  select.

  sql/sql_base.cc
    1.320 05/12/15 19:24:01 evgen@stripped +8 -0
    Fix bug #15706 find_field_in_tables() returns field from wrong select
    Added check to find_field_in_tables() whether found field belongs to current 
    select.

# 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:	evgen
# Host:	moonbone.local
# Root:	/work/15706-bug-5.0-mysql

--- 1.319/sql/sql_base.cc	2005-12-11 10:30:52 +03:00
+++ 1.320/sql/sql_base.cc	2005-12-15 19:24:01 +03:00
@@ -3177,6 +3177,14 @@
       accept this trade off.
     */
     TABLE_LIST *table_ref= item->cached_table;
+
+    /*
+      Don't find field if it's table doesn't belong to given select.
+      Item_field::fix_fields() expects this behaviour.
+    */
+    if (first_table && first_table->select_lex &&
+        table_ref->select_lex != first_table->select_lex)
+      return not_found_field;
     /*
       The condition (table_ref->view == NULL) ensures that we will call
       find_field_in_table even in the case of information schema tables
Thread
bk commit into 5.0 tree (evgen:1.1975) BUG#15706eugene15 Dec