trigger errors?
Just copy this strings into your sql client:
-- Tables schema for example
CREATE TABLE `test_1` (
`id` int(11) DEFAULT NULL
) ENGINE=InnoDB;
CREATE TABLE `test_2` (
`id` int(11) DEFAULT NULL
) ENGINE=InnoDB;
-- Views schema for example
CREATE ALGORITHM=UNDEFINED DEFINER=
-- Triggers schema for example
CREATE
TRIGGER test_delete
AFTER DELETE
ON test_1 FOR EACH ROW
INSERT INTO view_test_2 VALUES(1);
CREATE
TRIGGER test_insert
AFTER INSERT
ON test_2 FOR EACH ROW
SELECT IF(count(id) > 0, 1, NULL) as t into @test FROM test_1; -- show error Table test_1 dosn't exist :)
-------
NOW insert some values into table test_1 and try to delete any row. You should be got error Table 'test_1' doesn't exist
Question information
- Language:
- English Edit question
- Status:
- Expired
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: