mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-26925 - upgrade fails creating trigger in sysschema, if root user does not exist
Fix by removing the trigger. It does not do anything useful anyway.
This commit is contained in:
@@ -12,9 +12,7 @@ There are install files available for 5.6 and 5.7 respectively. To load these, y
|
||||
|
||||
##### Description
|
||||
|
||||
Holds configuration options for the sys schema. This is a persistent table (using the `InnoDB` storage engine), with the configuration persisting across upgrades (new options are added with `INSERT IGNORE`).
|
||||
|
||||
The table also has two related triggers, which maintain the user that `INSERTs` or `UPDATEs` the configuration - `sys_config_insert_set_user` and `sys_config_update_set_user` respectively.
|
||||
Holds configuration options for the sys schema. This is a persistent table, with the configuration persisting across upgrades (new options are added with `INSERT IGNORE`).
|
||||
|
||||
Its structure is as follows:
|
||||
|
||||
|
@@ -22,14 +22,3 @@
|
||||
|
||||
DROP TRIGGER IF EXISTS sys_config_insert_set_user;
|
||||
|
||||
DELIMITER $$
|
||||
|
||||
CREATE DEFINER='root'@'localhost' TRIGGER sys_config_insert_set_user BEFORE INSERT on sys_config
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
IF @sys.ignore_sys_config_triggers != true AND NEW.set_by IS NULL THEN
|
||||
SET NEW.set_by = USER();
|
||||
END IF;
|
||||
END$$
|
||||
|
||||
DELIMITER ;
|
||||
|
@@ -22,15 +22,3 @@
|
||||
|
||||
|
||||
DROP TRIGGER IF EXISTS sys_config_update_set_user;
|
||||
|
||||
DELIMITER $$
|
||||
|
||||
CREATE DEFINER='root'@'localhost' TRIGGER sys_config_update_set_user BEFORE UPDATE on sys_config
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
IF @sys.ignore_sys_config_triggers != true AND NEW.set_by IS NULL THEN
|
||||
SET NEW.set_by = USER();
|
||||
END IF;
|
||||
END$$
|
||||
|
||||
DELIMITER ;
|
||||
|
Reference in New Issue
Block a user