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

Error Function doen't exist in trigger

Details

    Description

      I use 10.2.24 mariadb on debian stretch and I've got this error:

      SET NAMES utf8;
      SET time_zone = '+00:00';
      SET foreign_key_checks = 0;
      SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
       
      DROP TABLE IF EXISTS `t1`;
      CREATE TABLE `t1` (
        `col1` int(11) NOT NULL
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
       
      INSERT INTO `t1` (`col1`) VALUES (3);
       
      DELIMITER ;;
       
      CREATE TRIGGER `t1_bu` BEFORE UPDATE ON `t1` FOR EACH ROW
      BEGIN 
          DECLARE TEST INT(11) DEFAULT 0;
       
      SET TEST=yopyop();
      END;;
       
      DELIMITER ;
       
      DROP TABLE IF EXISTS `t2`;
      CREATE TABLE `t2` (
        `col1` int(11) NOT NULL
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
       
      INSERT INTO `t2` (`col1`) VALUES
      (3);
       
      UPDATE t1,t2 SET t1.col1=4 WHERE t1.col1=3 AND t1.col1=t2.col1; 
      Error (1305): FUNCTION yop.yopyop does not exist 
      

      Attachments

        Issue Links

          Activity

            Emmanuel Emmanuel created issue -
            alice Alice Sherepa made changes -
            Field Original Value New Value
            alice Alice Sherepa made changes -
            Component/s N/A [ 14411 ]
            Fix Version/s N/A [ 14700 ]
            Resolution Duplicate [ 3 ]
            Status Open [ 1 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 5.5.65 [ 23402 ]
            Fix Version/s 10.1.41 [ 23406 ]
            Fix Version/s 10.2.25 [ 23408 ]
            Fix Version/s 10.3.16 [ 23410 ]
            Fix Version/s 10.4.6 [ 23412 ]
            Fix Version/s N/A [ 14700 ]
            serg Sergei Golubchik made changes -
            Description I use 10.2.24 mariadb on debian stretch and I've got this error:

            SET NAMES utf8;
            SET time_zone = '+00:00';
            SET foreign_key_checks = 0;
            SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';

            DROP TABLE IF EXISTS `t1`;
            CREATE TABLE `t1` (
              `col1` int(11) NOT NULL
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

            INSERT INTO `t1` (`col1`) VALUES
            (3);

            DELIMITER ;;

            CREATE TRIGGER `t1_bu` BEFORE UPDATE ON `t1` FOR EACH ROW
            BEGIN
                DECLARE TEST INT(11) DEFAULT 0;

            SET TEST=yopyop();
            END;;

            DELIMITER ;

            DROP TABLE IF EXISTS `t2`;
            CREATE TABLE `t2` (
              `col1` int(11) NOT NULL
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

            INSERT INTO `t2` (`col1`) VALUES
            (3);


            UPDATE t1,t2 SET t1.col1=4 WHERE t1.col1=3 AND t1.col1=t2.col1;
            Error (1305): FUNCTION yop.yopyop does not exist
            I use 10.2.24 mariadb on debian stretch and I've got this error:
            {code:sql}
            SET NAMES utf8;
            SET time_zone = '+00:00';
            SET foreign_key_checks = 0;
            SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';

            DROP TABLE IF EXISTS `t1`;
            CREATE TABLE `t1` (
              `col1` int(11) NOT NULL
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

            INSERT INTO `t1` (`col1`) VALUES (3);

            DELIMITER ;;

            CREATE TRIGGER `t1_bu` BEFORE UPDATE ON `t1` FOR EACH ROW
            BEGIN
                DECLARE TEST INT(11) DEFAULT 0;

            SET TEST=yopyop();
            END;;

            DELIMITER ;

            DROP TABLE IF EXISTS `t2`;
            CREATE TABLE `t2` (
              `col1` int(11) NOT NULL
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

            INSERT INTO `t2` (`col1`) VALUES
            (3);

            UPDATE t1,t2 SET t1.col1=4 WHERE t1.col1=3 AND t1.col1=t2.col1;
            Error (1305): FUNCTION yop.yopyop does not exist
            {code}
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ]
            serg Sergei Golubchik made changes -
            Component/s Data Manipulation - Update [ 10805 ]
            Component/s N/A [ 14411 ]
            serg Sergei Golubchik made changes -
            Component/s Triggers [ 10109 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 96893 ] MariaDB v4 [ 156241 ]

            People

              serg Sergei Golubchik
              Emmanuel Emmanuel
              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.