1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00
sql/sql_base.cc:
  Auto merged
mysql-test/r/view.result:
  SCCS merged
mysql-test/t/view.test:
  SCCS merged
This commit is contained in:
unknown
2005-07-12 20:49:43 +04:00
3 changed files with 34 additions and 6 deletions

View File

@ -2400,9 +2400,11 @@ Field *view_ref_found= (Field*) 0x2;
name name of field
item_name name of item if it will be created (VIEW)
length length of name
ref expression substituted in VIEW should be
ref [in/out] expression substituted in VIEW should be
passed using this reference (return
view_ref_found)
(*ref != NULL) only if *ref contains
the item that we need to replace.
check_grants_table do check columns grants for table?
check_grants_view do check columns grants for view?
allow_rowid do allow finding of "_rowid" field?
@ -2440,11 +2442,6 @@ find_field_in_table(THD *thd, TABLE_LIST *table_list,
{
if (!my_strcasecmp(system_charset_info, field_it.name(), name))
{
Item *item= field_it.create_item(thd);
if (!item)
{
DBUG_RETURN(0);
}
if (table_list->schema_table_reformed)
{
/*
@ -2463,6 +2460,19 @@ find_field_in_table(THD *thd, TABLE_LIST *table_list,
name, length))
DBUG_RETURN(WRONG_GRANT);
#endif
Item *item= field_it.create_item(thd);
if (!item)
{
DBUG_RETURN(0);
}
/*
*ref != NULL means that *ref contains the item that we need to
replace. If the item was aliased by the user, set the alias to
the replacing item.
*/
if (*ref && !(*ref)->is_autogenerated_name)
item->set_name((*ref)->name, (*ref)->name_length,
system_charset_info);
if (register_tree_change)
thd->change_item_tree(ref, item);
else