Use JDBC to query the trigger error
1. environment:
mysql5.7.39-log、JDBC8.0.28
2. steps
CREATE TABLE LSP.TEST_TRIGGLE_UPPER (
ID INT PRIMARY KEY AUTO_INCREMENT,
T_NOTE VARCHAR(30)
);
CREATE TABLE LSP.TEST_TRIGGLE_LOG (
ID INT PRIMARY KEY AUTO_INCREMENT,
T_LOG VARCHAR(30)
);
CREATE TRIGGER LSP.TRI_BEFORE_INSERT BEFORE INSERT ON LSP.TEST_TRIGGLE_UPPER
FOR EACH ROW
INSERT INTO TEST_TRIGGLE_LOG(T_LOG) VALUES('BEFORE insert.....');
SELECT TRIGGER_CATALOG,TRIGGER_SCHEMA,TRIGGER_NAME,EVENT_MANIPULATION,EVENT_OBJECT_CATALOG,EVENT_OBJECT_SCHEMA,EVENT_OBJECT_TABLE,ACTION_STATEMENT,ACTION_ORIENTATION,ACTION_TIMING FROM information_schema.triggers WHERE TRIGGER_SCHEMA = 'LSP' and TRIGGER_NAME = 'tri_before_insert';
3. actual results
def,LSP,TRI_BEFORE_INSERT,INSERT,def,LSP,TEST_TRIGGLE_UPPER,INSERT INTO TEST_TRIGGLE_LOG(T_LOG) VALUES('BEFORE insert.....'),ROW,BEFORE
def,LSP,tri_before_insert,INSERT,def,LSP,test_trigger,INSERT INTO test_trigger_log(t_log) VALUES('before insert.....'),ROW,BEFORE
4. expected outcome
def,LSP,tri_before_insert,INSERT,def,LSP,test_trigger,INSERT INTO test_trigger_log(t_log) VALUES('before insert.....'),ROW,BEFORE