 UPDATE LOGDATA.CONF_LOGGERS_EFFECTIVE
   SET PARENT_ID = NULL
   WHERE LOGGER_ID = PREVIOUS VALUE FOR LOGDATA.LOGGER_ID_SEQ;
-IF (RAISED_LG0E1 = FALSE) THEN
+IF (RAISED_LGAE1 = FALSE) THEN
  INSERT INTO LOGDATA.LOGS (LEVEL_ID, MESSAGE) VALUES (2, 'Exception not raised');
 ELSE
  INSERT INTO LOGDATA.LOGS (LEVEL_ID, MESSAGE) VALUES (5, 'Exception raised LG0E1');
 END IF;
-SET RAISED_LG0E1 = FALSE;
+SET RAISED_LGAE1 = FALSE;
 COMMIT;
 
 -- Test24: Updates a logger with an null level.

   INSERT INTO LOGDATA.LOGS (LEVEL_ID, MESSAGE) VALUES (5, 'SQLState ' || SQLSTATE);
   SET RAISED_407 = TRUE;
  END;
-- For any other SQL State.
DECLARE CONTINUE HANDLER FOR SQLWARNING
  INSERT INTO LOGDATA.LOGS (LEVEL_ID, MESSAGE) VALUES (4, 'Warning SQLCode ' || SQLCODE || '-SQLState ' || SQLSTATE);
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
  INSERT INTO LOGDATA.LOGS (LEVEL_ID, MESSAGE) VALUES (4, 'Exception SQLCode ' || SQLCODE || '-SQLState ' || SQLSTATE);
DECLARE CONTINUE HANDLER FOR NOT FOUND
  INSERT INTO LOGDATA.LOGS (LEVEL_ID, MESSAGE) VALUES (4, 'Not found SQLCode ' || SQLCODE || '-SQLState ' || SQLSTATE);

-- Prepares the environment.
INSERT INTO LOGDATA.LOGS (LEVEL_ID, MESSAGE) VALUES (3, 'TestsConfLoggersEffective: Preparing environment');

UPDATE LOGDATA.CONFIGURATION
  SET VALUE = 'false'
  WHERE KEY = 'internalCache';
UPDATE LOGDATA.CONFIGURATION
  SET VALUE = 'false'
  WHERE KEY = 'logInternals';
UPDATE LOGDATA.CONF_LOGGERS_EFFECTIVE
  SET LEVEL_ID = 3
  WHERE LOGGER_ID = 0;
COMMIT;

-- Test1: Inserts a normal logger.
