diff options
author | Andrei Elkin <aelkin@mysql.com> | 2008-11-12 19:51:47 +0200 |
---|---|---|
committer | Andrei Elkin <aelkin@mysql.com> | 2008-11-12 19:51:47 +0200 |
commit | ca2d1846950b07115a001a37d84ce63ab2acdc6c (patch) | |
tree | da19273bb9e832fe232c5251aa3f4d9dc29ee7f0 /sql/sql_base.cc | |
parent | 162e550fcf986454cd1a542e98d8adc8fa81fd00 (diff) | |
parent | 1d521f6c20881997c9162bd11cadcbc77d20520b (diff) | |
download | mariadb-git-ca2d1846950b07115a001a37d84ce63ab2acdc6c.tar.gz |
merging 5.1 -> 5.1 rpl. 3 of 4 conflicts are resolved similarly to 6.0->6.0-rpl merging.
mysql_upgrade results changed due to the error messesge of mysqlcheck has changed.
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index f18ee0ec562..d7bb571b8c7 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -489,12 +489,20 @@ static TABLE_SHARE "no such table" errors. @todo Rework the alternative ways to deal with ER_NO_SUCH TABLE. */ - if (thd->is_error() && table_list->belong_to_view) + if (thd->is_error()) { - TABLE_LIST *view= table_list->belong_to_view; - thd->clear_error(); - my_error(ER_VIEW_INVALID, MYF(0), - view->view_db.str, view->view_name.str); + if (table_list->parent_l) + { + thd->clear_error(); + my_error(ER_WRONG_MRG_TABLE, MYF(0)); + } + else if (table_list->belong_to_view) + { + TABLE_LIST *view= table_list->belong_to_view; + thd->clear_error(); + my_error(ER_VIEW_INVALID, MYF(0), + view->view_db.str, view->view_name.str); + } } DBUG_RETURN(0); } @@ -7760,6 +7768,10 @@ insert_fields(THD *thd, Name_resolution_context *context, const char *db_name, if (!(item= field_iterator.create_item(thd))) DBUG_RETURN(TRUE); + DBUG_ASSERT(item->fixed); + /* cache the table for the Item_fields inserted by expanding stars */ + if (item->type() == Item::FIELD_ITEM && tables->cacheable_table) + ((Item_field *)item)->cached_table= tables; if (!found) { |