Bug #91651 can not enable a event with alter event xxx enable
Submitted: 16 Jul 2018 6:57 Modified: 16 Aug 2018 7:53
Reporter: yghmgl yang Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: DDL Severity:S3 (Non-critical)
Version:5.7 OS:Any
Assigned to: CPU Architecture:Any

[16 Jul 2018 6:57] yghmgl yang
Description:
can not enable a event with 'alter event xxx enable',you must execute the statement twice, then the event become enable.

How to repeat:
CREATE DATABASE DATABASE_TEST_01;
USE DATABASE_TEST_01;
CREATE EVENT `Μεγάλο` ON SCHEDULE AT '2018-06-05 18:15:44' ON COMPLETION PRESERVE ENABLE DO call updateStatus;
SHOW EVENTS LIKE 'Μεγάλο';
ALTER EVENT `Μεγάλο` ENABLE;
SHOW EVENTS LIKE 'Μεγάλο';
ALTER EVENT `Μεγάλο` ENABLE;
SHOW EVENTS LIKE 'Μεγάλο';
DROP DATABASE DATABASE_TEST_01;
[16 Jul 2018 7:53] MySQL Verification Team
Hello yghmgl yang,

Thank you for the report.
Could you please confirm exact version of MySQL server in which you are seeing this issues? No issues observed with 5.7.22:

===
mysql> show variables like '%version%';
+-------------------------+------------------------------+
| Variable_name           | Value                        |
+-------------------------+------------------------------+
| innodb_version          | 5.7.22                       |
| protocol_version        | 10                           |
| slave_type_conversions  |                              |
| tls_version             | TLSv1,TLSv1.1                |
| version                 | 5.7.22                       |
| version_comment         | MySQL Community Server (GPL) |
| version_compile_machine | x86_64                       |
| version_compile_os      | linux-glibc2.12              |
+-------------------------+------------------------------+
8 rows in set (0.00 sec)

mysql> CREATE DATABASE DATABASE_TEST_01;
Query OK, 1 row affected (0.00 sec)

mysql> USE DATABASE_TEST_01;
Database changed
mysql> CREATE EVENT `Μεγάλο` ON SCHEDULE AT '2018-06-05 18:15:44' ON COMPLETION PRESERVE ENABLE DO call updateStatus;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> show warnings;
+-------+------+--------------------------------------------------------------+
| Level | Code | Message                                                      |
+-------+------+--------------------------------------------------------------+
| Note  | 1544 | Event execution time is in the past. Event has been disabled |
+-------+------+--------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> SHOW EVENTS LIKE 'Μεγάλο';
+------------------+--------------+----------------+-----------+----------+---------------------+----------------+----------------+--------+------+----------+------------+----------------------+----------------------+--------------------+
| Db               | Name         | Definer        | Time zone | Type     | Execute at          | Interval value | Interval field | Starts | Ends | Status   | Originator | character_set_client | collation_connection | Database Collation |
+------------------+--------------+----------------+-----------+----------+---------------------+----------------+----------------+--------+------+----------+------------+----------------------+----------------------+--------------------+
| DATABASE_TEST_01 | Μεγάλο       | root@localhost | SYSTEM    | ONE TIME | 2018-06-05 18:15:44 | NULL           | NULL           | NULL   | NULL | DISABLED |          0 | utf8                 | utf8_general_ci      | latin1_swedish_ci  |
+------------------+--------------+----------------+-----------+----------+---------------------+----------------+----------------+--------+------+----------+------------+----------------------+----------------------+--------------------+
1 row in set (0.00 sec)

mysql> ALTER EVENT `Μεγάλο` ENABLE;
Query OK, 0 rows affected (0.00 sec)

mysql> SHOW EVENTS LIKE 'Μεγάλο';
+------------------+--------------+----------------+-----------+----------+---------------------+----------------+----------------+--------+------+---------+------------+----------------------+----------------------+--------------------+
| Db               | Name         | Definer        | Time zone | Type     | Execute at          | Interval value | Interval field | Starts | Ends | Status  | Originator | character_set_client | collation_connection | Database Collation |
+------------------+--------------+----------------+-----------+----------+---------------------+----------------+----------------+--------+------+---------+------------+----------------------+----------------------+--------------------+
| DATABASE_TEST_01 | Μεγάλο       | root@localhost | SYSTEM    | ONE TIME | 2018-06-05 18:15:44 | NULL           | NULL           | NULL   | NULL | ENABLED |          0 | utf8                 | utf8_general_ci      | latin1_swedish_ci  |
+------------------+--------------+----------------+-----------+----------+---------------------+----------------+----------------+--------+------+---------+------------+----------------------+----------------------+--------------------+
1 row in set (0.00 sec)

Thanks,
Umesh
[17 Aug 2018 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".