在 Mysql 版本 5.0.77 上,我运行了这个
CREATE TRIGGER ins_trap_to_memory AFTER INSERT on Table1
FOR EACH ROW
INSERT INTO Table1_Copy SELECT NEW.*;
它运行了,但是现在每当我尝试做某些事情时数据库就会断开连接:
无法查看触发器-
mysql> SHOW TRIGGERS LIKE '%'\G
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 7
Current database: mydb
ERROR 2013 (HY000): Lost connection to MySQL server during query
无法删除问题触发器-
mysql> DROP TRIGGER ins_trap_to_memory;
ERROR 1064 (42000): 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 '' at line 3
无法查询信息_schema.TRIGGERS-
mysql> select * from information_schema.TRIGGERS;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 12
Current database: information_schema
ERROR 2013 (HY000): Lost connection to MySQL server during query