1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

updateability of field with collation support (BUG#5506)

This commit is contained in:
bell@sanja.is.com.ua
2004-09-16 23:45:20 +03:00
parent d24f293601
commit 09b316f051
7 changed files with 57 additions and 14 deletions

View File

@ -67,9 +67,10 @@ static bool check_fields(THD *thd, List<Item> &items)
{
List_iterator<Item> it(items);
Item *item;
Item_field *field;
while ((item= it++))
{
if (item->type() != Item::FIELD_ITEM)
if (!(field= item->filed_for_view_update()))
{
/* as far as item comes from VIEW select list it has name */
my_error(ER_NONUPDATEABLE_COLUMN, MYF(0), item->name);
@ -79,7 +80,7 @@ static bool check_fields(THD *thd, List<Item> &items)
we make temporary copy of Item_field, to avoid influence of changing
result_field on Item_ref which refer on this field
*/
Item_field *field= new Item_field(thd, (Item_field *)item);
field= new Item_field(thd, field);
it.replace(field);
((Item_field *)item)->register_item_tree_changing(it.ref());
}