Part 1. 分类
Stored Programs
- Stored Routines
- Procedure
- Function
- Event Scheduler
- Trigger
Part 2. 概要
另, 对于Event Scheduler和Trigger还各有一小点, 要了解到.
Event Scheduler在MHA环境下, 手动在线切换时, 会有如下信息提示, 要暂将Event Scheduler关闭.
Wed Sep 13 10:55:43 2017 - [error][/usr/local/share/perl5/MHA/MasterRotate.pm, ln161] We should not start online master switch when one of connections are running long updates on the current master(192.168.19.168(192.168.19.168:3306)). Currently 1 update thread(s) are running.
Details:
{'Time' => '147223','Command' => 'Daemon','db' => undef,'Id' => '117223','Info' => undef,'User' => 'event_scheduler','State' => 'Waiting on empty queue','Host' => 'localhost'}
Wed Sep 13 10:55:43 2017 - [error][/usr/local/share/perl5/MHA/ManagerUtil.pm, ln177] Got ERROR: at /usr/local/bin/masterha_master_switch line 53.
Trigger不能建立在mysql数据库上, 会有如下报错.
ERROR 1465 (HY000): Triggers can not be created on system tables