diff options
author | unknown <monty@mysql.com> | 2006-05-04 22:19:31 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2006-05-04 22:19:31 +0300 |
commit | afe4715242576a8575abcec955baa4bfd78af85e (patch) | |
tree | ab94fbdd3f6cb59559386eb27ddc3c505971f35d /sql/sql_view.cc | |
parent | 94964da31fe3fa849e951ce069aa09f08f13315d (diff) | |
download | mariadb-git-afe4715242576a8575abcec955baa4bfd78af85e.tar.gz |
Fixed wrong free in sql_view.cc
mysql-test-run now fails in case of warnings
mysql-test/lib/mtr_report.pl:
Fail if find warnings
mysql-test/mysql-test-run.sh:
Fail if find warnings
sql/sql_lex.cc:
Initalize st_lex properly
sql/sql_view.cc:
Fixed problem with unaligned memory (wrong free)
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r-- | sql/sql_view.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 640881cb3aa..0f836bd58ff 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -941,7 +941,6 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table) goto err; } - if (!(table->view_tables= (List<TABLE_LIST>*) new(thd->mem_root) List<TABLE_LIST>)) goto err; @@ -1192,14 +1191,16 @@ ok2: old_lex->time_zone_tables_used= thd->lex->time_zone_tables_used; result= !table->prelocking_placeholder && table->prepare_security(thd); + lex_end(thd->lex); end: if (arena) thd->restore_active_arena(arena, &backup); - lex_end(thd->lex); thd->lex= old_lex; DBUG_RETURN(result); err: + DBUG_ASSERT(thd->lex == table->view); + lex_end(thd->lex); delete table->view; table->view= 0; // now it is not VIEW placeholder result= 1; |