mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
5.5 merge
This commit is contained in:
14
sql/table.cc
14
sql/table.cc
@@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
|
||||
|
||||
|
||||
/* Some general useful functions */
|
||||
@@ -4187,6 +4187,7 @@ bool TABLE_LIST::prep_where(THD *thd, Item **conds,
|
||||
bool no_where_clause)
|
||||
{
|
||||
DBUG_ENTER("TABLE_LIST::prep_where");
|
||||
bool res= FALSE;
|
||||
|
||||
for (TABLE_LIST *tbl= merge_underlying_list; tbl; tbl= tbl->next_local)
|
||||
{
|
||||
@@ -4235,10 +4236,11 @@ bool TABLE_LIST::prep_where(THD *thd, Item **conds,
|
||||
if (tbl == 0)
|
||||
{
|
||||
if (*conds && !(*conds)->fixed)
|
||||
(*conds)->fix_fields(thd, conds);
|
||||
*conds= and_conds(*conds, where->copy_andor_structure(thd));
|
||||
if (*conds && !(*conds)->fixed)
|
||||
(*conds)->fix_fields(thd, conds);
|
||||
res= (*conds)->fix_fields(thd, conds);
|
||||
if (!res)
|
||||
*conds= and_conds(*conds, where->copy_andor_structure(thd));
|
||||
if (*conds && !(*conds)->fixed && !res)
|
||||
res= (*conds)->fix_fields(thd, conds);
|
||||
}
|
||||
if (arena)
|
||||
thd->restore_active_arena(arena, &backup);
|
||||
@@ -4246,7 +4248,7 @@ bool TABLE_LIST::prep_where(THD *thd, Item **conds,
|
||||
}
|
||||
}
|
||||
|
||||
DBUG_RETURN(FALSE);
|
||||
DBUG_RETURN(res);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user