diff options
author | hf@deer.(none) <> | 2005-02-09 02:54:08 +0400 |
---|---|---|
committer | hf@deer.(none) <> | 2005-02-09 02:54:08 +0400 |
commit | 96558f6ad3ed107b6ff0645db4b496b62ca049e9 (patch) | |
tree | cbbd8c87bb306645df2da91891d307858dcc9a59 /sql/sql_base.cc | |
parent | 2c26ebe3594077cd90b95aaf591eaacc4eb2cdbe (diff) | |
parent | b94a482ee9fdc45b64eb001a908f52784dfabcc1 (diff) | |
download | mariadb-git-96558f6ad3ed107b6ff0645db4b496b62ca049e9.tar.gz |
Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0
into deer.(none):/home/hf/work/mysql-5.0.clean
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index b123dfe8176..04b439c4ce1 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -2169,6 +2169,8 @@ find_field_in_table(THD *thd, TABLE_LIST *table_list, thd->change_item_tree(ref, item_ref); else if (item_ref) *ref= item_ref; + if (!(*ref)->fixed) + (*ref)->fix_fields(thd, 0, ref); } DBUG_RETURN((Field*) view_ref_found); } @@ -3389,7 +3391,8 @@ int setup_conds(THD *thd, TABLE_LIST *tables, TABLE_LIST *leaves, COND **conds) if (cond_and->list.elements) { COND *on_expr= cond_and; - on_expr->fix_fields(thd, 0, &on_expr); + if (!on_expr->fixed) + on_expr->fix_fields(thd, 0, &on_expr); if (!embedded->outer_join) // Not left join { *conds= and_conds(*conds, cond_and); @@ -3398,7 +3401,8 @@ int setup_conds(THD *thd, TABLE_LIST *tables, TABLE_LIST *leaves, COND **conds) thd->restore_backup_item_arena(arena, &backup); if (*conds && !(*conds)->fixed) { - if ((*conds)->fix_fields(thd, tables, conds)) + if (!(*conds)->fixed && + (*conds)->fix_fields(thd, tables, conds)) goto err_no_arena; } } @@ -3410,8 +3414,8 @@ int setup_conds(THD *thd, TABLE_LIST *tables, TABLE_LIST *leaves, COND **conds) thd->restore_backup_item_arena(arena, &backup); if (embedded->on_expr && !embedded->on_expr->fixed) { - if (embedded->on_expr->fix_fields(thd, tables, - &embedded->on_expr)) + if (!embedded->on_expr->fixed && + embedded->on_expr->fix_fields(thd, tables, &embedded->on_expr)) goto err_no_arena; } } |