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

Lost connection on update trigger

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 10.3(EOL), 10.4(EOL)
    • 10.3.19, 10.4.9
    • Sequences, Server
    • None
    • Ubuntu 18.04 and Ubuntu 19.04

    Description

      Test:

      drop database if exists test1;
      create database test1;
      use test1;
       
      create sequence seq_a_id increment by 1 start with 1;
      create table p (p_id integer, p_name varchar(128), p_first_name varchar(128));
      create table archiv (a_id integer default nextval(seq_a_id), a_p_name varchar(128), a_p_first_name varchar(128), t timestamp default current_timestamp);
       
      insert into p values
      (1, 'Luo','Frank'),(2, 'Xe','Emma'),(3, 'Li','Anna'),(4, 'Lun','Serg'),(5, 'Xu','Nils'),(6, 'Ja','Ute'),(7, 'Jin','Mike'),(8, 'Lio','Carl'),(9, 'Lang','Kevin'),(10, 'Ling','Lisa'),(11, 'Fang','Frank'),(12, 'Feng','Emma'),(13, 'Tuo','Anna'),(14, 'Tua','Serg'),(15, 'Moa','Nils'),(16, 'Hua','Ute'),(17, 'Xufa','Mike'),(18, 'Lulu','Carl'),(19, 'Hoho','Kevin'),(20, 'Tata','Lisa');
       
      DELIMITER $$
       
      CREATE TRIGGER tr_upd
      BEFORE UPDATE on p
      FOR EACH ROW
      BEGIN
      INSERT INTO archiv(a_p_name, a_p_first_name) VALUES(old.p_name, old.p_first_name);
      END;
      $$
      DELIMITER ;
      

      MariaDB [test1]> update p set p_first_name='Yunxi' where p_id=1;
      ERROR 2013 (HY000): Lost connection to MySQL server during query
      

      It is also not working when using AFTER UPDATE.
      And it is also not working on BEFORE/AFTER DELETE

      Best Regards,

      Susanne

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              miracee miracee
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.