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

fixed error processing of prepare in VIEW creation (BUG#4801)

mysql-test/r/view.result:
  test of error processing found in preparation phase
mysql-test/t/view.test:
  test of error processing found in preparation phase
sql/sql_view.cc:
  fixed error processing of prepare
This commit is contained in:
unknown
2004-08-23 12:38:55 +03:00
parent acd4f7debd
commit 9ca63e55bc
3 changed files with 21 additions and 1 deletions

View File

@ -183,8 +183,15 @@ int mysql_create_view(THD *thd,
// prepare select to resolve all fields
lex->view_prepare_mode= 1;
if ((res= unit->prepare(thd, 0, 0)))
if (unit->prepare(thd, 0, 0))
{
/*
some errors from prepare are reported to user, if is not then
it will be checked after err: label
*/
res= 1;
goto err;
}
/* view list (list of view fields names) */
if (lex->view_list.elements)