summaryrefslogtreecommitdiff
path: root/sql/event_parse_data.h
diff options
context:
space:
mode:
authorTatiana A. Nurnberg <azundris@mysql.com>2008-08-18 13:05:51 +0200
committerTatiana A. Nurnberg <azundris@mysql.com>2008-08-18 13:05:51 +0200
commit4b317a5688420a7ff0ba438dbc0b5fe6393c673b (patch)
treea90a32a0037c8098ecdf38ab6760130373cb10c8 /sql/event_parse_data.h
parent0e62334a2419e739d5751894626d3d1a894fb314 (diff)
downloadmariadb-git-4b317a5688420a7ff0ba438dbc0b5fe6393c673b.tar.gz
Bug#35981: ALTER EVENT causes the server to change the PRESERVE option.
If [NOT] PRESERVE was not given, parser always defaulted to NOT PRESERVE, making it impossible for the "not given = no change" rule to work in ALTER EVENT. Leaving out the PRESERVE-clause defaults to NOT PRESERVE on CREATE now, and to "no change" in ALTER.
Diffstat (limited to 'sql/event_parse_data.h')
-rw-r--r--sql/event_parse_data.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/event_parse_data.h b/sql/event_parse_data.h
index 221bf92664f..87a800c2078 100644
--- a/sql/event_parse_data.h
+++ b/sql/event_parse_data.h
@@ -38,7 +38,12 @@ public:
enum enum_on_completion
{
- ON_COMPLETION_DROP = 1,
+ /*
+ On CREATE EVENT, DROP is the DEFAULT as per the docs.
+ On ALTER EVENT, "no change" is the DEFAULT.
+ */
+ ON_COMPLETION_DEFAULT = 0,
+ ON_COMPLETION_DROP,
ON_COMPLETION_PRESERVE
};
@@ -80,6 +85,9 @@ public:
bool
check_parse_data(THD *thd);
+ bool
+ check_dates(THD *thd, int previous_on_completion);
+
private:
void