diff options
author | Praveenkumar Hulakund <praveenkumar.hulakund@oracle.com> | 2013-01-10 14:37:02 +0530 |
---|---|---|
committer | Praveenkumar Hulakund <praveenkumar.hulakund@oracle.com> | 2013-01-10 14:37:02 +0530 |
commit | d6aed37a2f941ae57147ce0ba59d83581f8d5147 (patch) | |
tree | c5d4aa8d0540c35bbdff59f8d56510675de1d25c | |
parent | a69f4a05737ec779dee9ffc73f3088ea8f504bc9 (diff) | |
parent | 79438d7506f2fb696116a36bc760474fca1f5993 (diff) | |
download | mariadb-git-d6aed37a2f941ae57147ce0ba59d83581f8d5147.tar.gz |
Merge from 5.1 to 5.5
-rw-r--r-- | sql/sql_view.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 24cb0dd3e8d..e1884329d98 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -1143,9 +1143,10 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table, TODO: when VIEWs will be stored in cache, table mem_root should be used here */ - if (parser->parse((uchar*)table, thd->mem_root, view_parameters, - required_view_parameters, &file_parser_dummy_hook)) - goto err; + if ((result= parser->parse((uchar*)table, thd->mem_root, + view_parameters, required_view_parameters, + &file_parser_dummy_hook))) + goto end; /* check old format view .frm @@ -1208,6 +1209,11 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table, now Lex placed in statement memory */ table->view= lex= thd->lex= (LEX*) new(thd->mem_root) st_lex_local; + if (!table->view) + { + result= true; + goto end; + } { char old_db_buf[NAME_LEN+1]; |