diff options
author | unknown <bell@sanja.is.com.ua> | 2005-01-04 18:04:16 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2005-01-04 18:04:16 +0200 |
commit | 34f313eeafcf430899b1ae6e148470440b5897f9 (patch) | |
tree | 614f6803a8c639e656f89a70e02feda14d66d919 /sql/table.cc | |
parent | 592ffbcd68337c40dd75f2e052ee0479a120f8bd (diff) | |
download | mariadb-git-34f313eeafcf430899b1ae6e148470440b5897f9.tar.gz |
fixed bugs in view code with prepared statemnts
sql/sql_acl.cc:
block checking view underlying tables
sql/sql_base.cc:
item registration fixed
fixed non registred item resolving
fixed result of outo-merge
fixed creation reference if alias used
sql/sql_insert.cc:
layout fixed
removed unused variable
sql/sql_parse.cc:
block checking view underlying tables
sql/sql_prepare.cc:
make preparation check same as usual check
sql/sql_update.cc:
made want_privilege assignment simplier
block checking view underlying tables
sql/sql_view.cc:
belong_to_view assignmebt moved after privileges check
sql/table.cc:
check option fix field added
arena management added
Diffstat (limited to 'sql/table.cc')
-rw-r--r-- | sql/table.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/table.cc b/sql/table.cc index e9b89d6b124..12862d21ac0 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1726,6 +1726,9 @@ bool st_table_list::setup_ancestor(THD *thd, Item **conds, } if (where && !where->fixed && where->fix_fields(thd, ancestor, &where)) goto err; + if (check_option && !check_option->fixed && + check_option->fix_fields(thd, ancestor, &where)) + goto err; restore_want_privilege(); /* WHERE/ON resolved => we can rename fields */ @@ -1873,11 +1876,19 @@ bool st_table_list::setup_ancestor(THD *thd, Item **conds, /* full text function moving to current select */ if (view->select_lex.ftfunc_list->elements) { + Item_arena *arena= thd->current_arena, backup; + if (arena->is_conventional()) + arena= 0; // For easier test + else + thd->set_n_backup_item_arena(arena, &backup); + Item_func_match *ifm; List_iterator_fast<Item_func_match> li(*(view->select_lex.ftfunc_list)); while ((ifm= li++)) current_select_save->ftfunc_list->push_front(ifm); + if (arena) + thd->restore_backup_item_arena(arena, &backup); } ok: |