Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-31388

Error in PROCEDURE in v.10.6.13 with RELEASE_LOCK

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 10.6.13
    • N/A
    • Events, Galera, Locking
    • None
    • Description: Ubuntu 22.04.2 LTS
      Release: 22.04
      Codename: jammy

    Description

      After upgrading MariaDB from 10.6.12 to 10.6.13 we started to get these kinds of errors:

      2023-06-02 12:01:21 5510 [ERROR] Event Scheduler: [sa@%][my_table.session_scheduler_event] Failed to load routine my_table.event_scheduler_update (internal code -6). For more details, run SHOW WARNINGS
      2023-06-02 12:01:21 5510 [Note] Event Scheduler: [sa@%][my_table.session_scheduler_event] At line 1 in my_table.session_scheduler_event
      2023-06-02 12:01:21 5510 [Note] Event Scheduler: [sa@%].[my_table.session_scheduler_event] event execution failed.
      2023-06-02 12:01:21 5511 [ERROR] Event Scheduler: [sa@%][my_table.session_scheduler_event] This version of MariaDB doesn't yet support 'RELEASE_LOCK in cluster (WSREP_ON=ON)'
      

      This is how is defined the EVENT in the table

      CREATE DEFINER=`sa`@`%` EVENT `session_scheduler_event`
      	ON SCHEDULE
      		EVERY 30 SECOND STARTS '2023-06-01 01:04:11'
      	ON COMPLETION NOT PRESERVE
      	ENABLE
      	COMMENT ''
      	DO CALL event_scheduler_update()
      

      And the PROCEDURE event_scheduler_update

      CREATE DEFINER=`sa`@`%` PROCEDURE `event_scheduler_update`()
      LANGUAGE SQL
      NOT DETERMINISTIC
      CONTAINS SQL
      SQL SECURITY DEFINER
      COMMENT ''
      BEGIN 
      DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
                      BEGIN
                          DO RELEASE_LOCK("my_table_event_lock");
                      END;
                  
                      BEGIN
                          DECLARE inqueue_count INT;
                          DECLARE scheduled_count INT;
                          
                          IF IS_FREE_LOCK("my_table_event_lock") AND GET_LOCK("my_table_event_lock", 0) THEN
                              CALL main_queue_update(1822);
                          END IF;
                          
                          DO RELEASE_LOCK("my_table_event_lock");
                      END;
      END
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              moik78 Moises Garcia
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.