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

Unable to create a function in mariadb even when function in deterministic

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Not a Bug
    • Affects Version/s: 10.2.15
    • Fix Version/s: N/A
    • Component/s: Stored routines
    • Labels:
      None

      Description

      While creating a function in mariadb, I am getting the error - SQL Error (1419): You do not have the SUPER privilege and binary logging is enabled (you might want to use the less safe log_bin_trust_function_creators variable)

      DELIMITER $$
       
      USE `sbldprod`$$
       
      DROP FUNCTION IF EXISTS `NULLIFZERO`$$
       
      CREATE FUNCTION `NULLIFZERO`(STRING_INPUT VARCHAR(255)) RETURNS VARCHAR(255) 
      	LANGUAGE SQL
      	DETERMINISTIC 
      	CONTAINS SQL
      	sql security invoker
      BEGIN
      	RETURN NULLIF(STRING_INPUT, 0);
      END$$
       
      DELIMITER ;
      

      I am using mariadb on AWS RDS, it's version is 10.2.15.

      *Following are the server params - *
      log_bin_trust_function_creators - 0
      log_bin - 1
      binlog_format - MIXED

      grants on the users creating this function -
      GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, TRIGGER

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            anupb anup b
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: