1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

resolve UPDATE fields belonged to VIEWs as Item_field (instead of Item_ref) in prepared statements, too (BUG#4999)

This commit is contained in:
bell@sanja.is.com.ua
2004-08-16 23:15:31 +03:00
parent 312e4d5076
commit ad8cb7628a
3 changed files with 65 additions and 5 deletions

View File

@ -978,11 +978,19 @@ static int mysql_test_update(Prepared_statement *stmt,
select->order_list.elements,
(ORDER *) select->order_list.first)))
{
if (setup_fields(thd, 0, table_list,
select->item_list, 1, 0, 0) ||
setup_fields(thd, 0, table_list,
stmt->lex->value_list, 0, 0, 0))
res= -1;
thd->lex->select_lex.no_wrap_view_item= 1;
if (setup_fields(thd, 0, table_list, select->item_list, 1, 0, 0))
{
res= -1;
thd->lex->select_lex.no_wrap_view_item= 0;
}
else
{
thd->lex->select_lex.no_wrap_view_item= 0;
if (setup_fields(thd, 0, table_list,
stmt->lex->value_list, 0, 0, 0))
res= -1;
}
}
stmt->lex->unit.cleanup();
}