1. ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you might want to use the less safe log_bin_trust_function_creators variable)

http://dev.mysql.com/doc/refman/5.0/en/stored-programs-logging.html

**`SET GLOBAL log_bin_trust_function_creators = 1; 
`**

用完改回来.

2. 生成的备份sql在drop event 没有 if exist 导致出错.手动添加(利用替换).

3. Procedure 里的 LIMIT 在 v5.5.6之前不能使用变量做参数.

ERROR 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'row_count ;
END' at line 24

http://stackoverflow.com/questions/6922175/procedure-parameter-problem-mysql-5-1-sql-error-1064