From 86b715a79f06d0a276e1e6f72fca3cb384890bfe Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 4 Feb 2007 16:49:24 +0300 Subject: BUG#25897: Some queries are no longer possible after a CREATE VIEW fails The bug was introduced with the push of the fix for bug#20953: after the error on view creation we never reset the error state, so some valid statements would give the same error after that. The solution is to properly reset the error state. mysql-test/r/view.result: Add result for bug#25897: Some queries are no longer possible after a CREATE VIEW fails. mysql-test/t/view.test: Add test case for bug#25897: Some queries are no longer possible after a CREATE VIEW fails. sql/sql_lex.cc: Add st_parsing_options::reset() method, call it from lex_start(). sql/sql_lex.h: Add st_parsing_options::reset() method, call it from constructor. --- sql/sql_lex.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sql/sql_lex.h') diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 5731e009cb4..eaa907b6ed3 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -866,10 +866,8 @@ struct st_parsing_options bool allows_select_procedure; bool allows_derived; - st_parsing_options() - : allows_variable(TRUE), allows_select_into(TRUE), - allows_select_procedure(TRUE), allows_derived(TRUE) - {} + st_parsing_options() { reset(); } + void reset(); }; -- cgit v1.2.1