Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.4(EOL), 10.5
-
None
Description
Created trigger on 10.3 installation with oracle mode.
MariaDB [information_schema]> SELECT * FROM TRIGGERS\G
|
*************************** 1. row *************************** |
TRIGGER_CATALOG: def
|
TRIGGER_SCHEMA: test
|
TRIGGER_NAME: tr_sez
|
EVENT_MANIPULATION: DELETE
|
EVENT_OBJECT_CATALOG: def
|
EVENT_OBJECT_SCHEMA: test
|
EVENT_OBJECT_TABLE: sez
|
ACTION_ORDER: 1 |
ACTION_CONDITION: NULL
|
ACTION_STATEMENT: declare akon char(1); |
begin
|
akon := 'U'; |
if deleting then akon := 'D'; |
end if; |
delete from sachb_z
|
where mand = :old.mand
|
and id_role = :old.id_role
|
and sach_nr in (select sach_nr from sach_b
|
where mand = :old.mand
|
and id_se = :old.id_se);
|
end
|
ACTION_ORIENTATION: ROW
|
ACTION_TIMING: AFTER
|
ACTION_REFERENCE_OLD_TABLE: NULL
|
ACTION_REFERENCE_NEW_TABLE: NULL
|
ACTION_REFERENCE_OLD_ROW: OLD
|
ACTION_REFERENCE_NEW_ROW: NEW
|
CREATED: 2021-05-12 02:18:25.52 |
SQL_MODE: PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER,SIMULTANEOUS_ASSIGNMENT
|
DEFINER: root@localhost |
CHARACTER_SET_CLIENT: latin1
|
COLLATION_CONNECTION: latin1_swedish_ci
|
DATABASE_COLLATION: latin1_swedish_ci
|
1 row in set (0.004 sec) |
And after upgrade to 10.4, TRIGGER_NAME column is empty.
MariaDB [test]> select * from information_schema.triggers\G
|
*************************** 1. row *************************** |
TRIGGER_CATALOG: def
|
TRIGGER_SCHEMA: test
|
TRIGGER_NAME:
|
EVENT_MANIPULATION: DELETE
|
EVENT_OBJECT_CATALOG: def
|
EVENT_OBJECT_SCHEMA: test
|
EVENT_OBJECT_TABLE: sez
|
ACTION_ORDER: 1 |
ACTION_CONDITION: NULL
|
ACTION_STATEMENT: CREATE DEFINER="root"@"localhost" trigger tr_sez |
after delete on sez
|
for each row |
declare akon char(1); |
begin
|
akon := 'U'; |
if deleting then akon := 'D'; |
end if; |
delete from sachb_z
|
where mand = :old.mand
|
and id_role = :old.id_role
|
and sach_nr in (select sach_nr from sach_b
|
where mand = :old.mand
|
and id_se = :old.id_se);
|
end
|
ACTION_ORIENTATION: ROW
|
ACTION_TIMING: AFTER
|
ACTION_REFERENCE_OLD_TABLE: NULL
|
ACTION_REFERENCE_NEW_TABLE: NULL
|
ACTION_REFERENCE_OLD_ROW: OLD
|
ACTION_REFERENCE_NEW_ROW: NEW
|
CREATED: 2021-05-12 02:18:25.52 |
SQL_MODE: PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER,SIMULTANEOUS_ASSIGNMENT
|
DEFINER:
|
CHARACTER_SET_CLIENT: latin1
|
COLLATION_CONNECTION: latin1_swedish_ci
|
DATABASE_COLLATION: latin1_swedish_ci
|
1 row in set (0.002 sec) |
And can't find way to drop trigger or write to table in question. Tried to set same sql_mode as for trigger and bounce server but no luck.
MariaDB> INSERT INTO test.sez (mand,id_se,id_role) VALUES (1,2,5); |
ERROR 1064 (42000): Unknown trigger has an error in its body: 'Undeclared variable: deleting' |