mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +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:
@ -110,16 +110,6 @@ ORDER BY trigger_schema, trigger_name;
|
||||
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
|
||||
def mtr gs_insert INSERT def mtr global_suppressions 1 NULL BEGIN DECLARE dummy INT; SELECT "" REGEXP NEW.pattern INTO dummy; END ROW BEFORE NULL NULL OLD NEW # root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
def mtr ts_insert INSERT def mtr test_suppressions 1 NULL BEGIN DECLARE dummy INT; SELECT "" REGEXP NEW.pattern INTO dummy; END ROW BEFORE NULL NULL OLD NEW # root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
def sys sys_config_insert_set_user INSERT def sys sys_config 1 NULL BEGIN
|
||||
IF @sys.ignore_sys_config_triggers != true AND NEW.set_by IS NULL THEN
|
||||
SET NEW.set_by = USER();
|
||||
END IF;
|
||||
END ROW BEFORE NULL NULL OLD NEW # root@localhost utf8mb3 utf8mb3_general_ci utf8mb3_general_ci
|
||||
def sys sys_config_update_set_user UPDATE def sys sys_config 1 NULL BEGIN
|
||||
IF @sys.ignore_sys_config_triggers != true AND NEW.set_by IS NULL THEN
|
||||
SET NEW.set_by = USER();
|
||||
END IF;
|
||||
END ROW BEFORE NULL NULL OLD NEW # root@localhost utf8mb3 utf8mb3_general_ci utf8mb3_general_ci
|
||||
##################################################################################
|
||||
# Testcase 3.2.18.2 + 3.2.18.3: INFORMATION_SCHEMA.TRIGGERS accessible information
|
||||
##################################################################################
|
||||
|
@ -110,16 +110,6 @@ ORDER BY trigger_schema, trigger_name;
|
||||
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
|
||||
def mtr gs_insert INSERT def mtr global_suppressions 1 NULL BEGIN DECLARE dummy INT; SELECT "" REGEXP NEW.pattern INTO dummy; END ROW BEFORE NULL NULL OLD NEW # root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
def mtr ts_insert INSERT def mtr test_suppressions 1 NULL BEGIN DECLARE dummy INT; SELECT "" REGEXP NEW.pattern INTO dummy; END ROW BEFORE NULL NULL OLD NEW # root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
def sys sys_config_insert_set_user INSERT def sys sys_config 1 NULL BEGIN
|
||||
IF @sys.ignore_sys_config_triggers != true AND NEW.set_by IS NULL THEN
|
||||
SET NEW.set_by = USER();
|
||||
END IF;
|
||||
END ROW BEFORE NULL NULL OLD NEW # root@localhost utf8mb3 utf8mb3_general_ci utf8mb3_general_ci
|
||||
def sys sys_config_update_set_user UPDATE def sys sys_config 1 NULL BEGIN
|
||||
IF @sys.ignore_sys_config_triggers != true AND NEW.set_by IS NULL THEN
|
||||
SET NEW.set_by = USER();
|
||||
END IF;
|
||||
END ROW BEFORE NULL NULL OLD NEW # root@localhost utf8mb3 utf8mb3_general_ci utf8mb3_general_ci
|
||||
##################################################################################
|
||||
# Testcase 3.2.18.2 + 3.2.18.3: INFORMATION_SCHEMA.TRIGGERS accessible information
|
||||
##################################################################################
|
||||
|
@ -154,8 +154,6 @@ statement_performance_analyzer PROCEDURE
|
||||
table_exists PROCEDURE
|
||||
SELECT TRIGGER_NAME FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_SCHEMA = 'sys' ORDER BY TRIGGER_NAME;
|
||||
TRIGGER_NAME
|
||||
sys_config_insert_set_user
|
||||
sys_config_update_set_user
|
||||
SELECT sys_version FROM sys.version;
|
||||
sys_version
|
||||
1.5.1
|
||||
|
@ -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