summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
authorunknown <kroki/tomash@moonlight.home>2007-02-04 16:49:24 +0300
committerunknown <kroki/tomash@moonlight.home>2007-02-04 16:49:24 +0300
commit86b715a79f06d0a276e1e6f72fca3cb384890bfe (patch)
treecde821247e6309cba43e298d83772b32c6021274 /sql/sql_lex.h
parentf65038bd67576e1b53fe99db092431f7fbdc2c41 (diff)
downloadmariadb-git-86b715a79f06d0a276e1e6f72fca3cb384890bfe.tar.gz
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.
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h6
1 files changed, 2 insertions, 4 deletions
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();
};