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

Memory leakage is detected on running the test main.ps against the server 11.1

Details

    Description

      CREATE TABLE t1 (id INT, value INT);
      CREATE TABLE t2 (id INT);
       
      PREPARE stmt FROM 'UPDATE t1 t1 SET value = (SELECT 1 FROM t2 WHERE id = t1.id)';
      execute stmt;
      insert into t1 values (1,10),(2,10),(3,10);
      insert into t2 values (1),(2);
      execute stmt;  # <<=== Memory leak happens on running this statement
      select * from t1;
      deallocate prepare stmt;
      DROP TABLE t1,t2;
      

      The above use case doesn't show memory leaking on 10.11.

      The similar issue could take place on running the DELETE statement with the LIMIT clause in PS/SP mode. So, this task also about fixing a memory leak in the code that processes the DELETE statement.

      Attachments

        Issue Links

          Activity

            shulga Dmitry Shulga created issue -
            shulga Dmitry Shulga made changes -
            Field Original Value New Value
            Assignee Dmitry Shulga [ JIRAUSER47315 ]
            shulga Dmitry Shulga made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            shulga Dmitry Shulga made changes -
            Fix Version/s 11.0 [ 28320 ]
            shulga Dmitry Shulga made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            shulga Dmitry Shulga made changes -
            shulga Dmitry Shulga made changes -
            Fix Version/s 11.1 [ 28549 ]
            Fix Version/s 11.0 [ 28320 ]
            shulga Dmitry Shulga made changes -
            Summary Memory leakage is detected on running the test main.ps against the server 11.0 Memory leakage is detected on running the test main.ps against the server 11.1
            shulga Dmitry Shulga made changes -
            Assignee Dmitry Shulga [ JIRAUSER47315 ] Oleksandr Byelkin [ sanja ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            shulga Dmitry Shulga made changes -
            Description {format:sql}
            CREATE TABLE t1 (id INT, value INT);
            CREATE TABLE t2 (id INT);

            PREPARE stmt FROM 'UPDATE t1 t1 SET value = (SELECT 1 FROM t2 WHERE id = t1.id)';
            execute stmt;
            insert into t1 values (1,10),(2,10),(3,10);
            insert into t2 values (1),(2);
            execute stmt; # <<=== Memory leak happens on running this statement
            select * from t1;
            deallocate prepare stmt;
            DROP TABLE t1,t2;
            {format}

            The above use case doesn't show memory leaking on 10.11.
            {format:sql}
            CREATE TABLE t1 (id INT, value INT);
            CREATE TABLE t2 (id INT);

            PREPARE stmt FROM 'UPDATE t1 t1 SET value = (SELECT 1 FROM t2 WHERE id = t1.id)';
            execute stmt;
            insert into t1 values (1,10),(2,10),(3,10);
            insert into t2 values (1),(2);
            execute stmt; # <<=== Memory leak happens on running this statement
            select * from t1;
            deallocate prepare stmt;
            DROP TABLE t1,t2;
            {format}

            The above use case doesn't show memory leaking on 10.11.

            The similar issue could take place on running the DELETE statement with the LIMIT clause in PS/SP mode. So, this task also about fixing a memory leak in the code that processes the DELETE statement.
            sanja Oleksandr Byelkin made changes -
            Assignee Oleksandr Byelkin [ sanja ] Dmitry Shulga [ JIRAUSER47315 ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            shulga Dmitry Shulga made changes -
            Component/s Prepared Statements [ 10804 ]
            Fix Version/s 11.1.6 [ 29835 ]
            Fix Version/s 11.2.5 [ 29836 ]
            Fix Version/s 11.4.3 [ 29837 ]
            Fix Version/s 11.5.2 [ 29838 ]
            Fix Version/s 11.6.0 [ 29839 ]
            Fix Version/s 11.1 [ 28549 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            ycp Yuchen Pei made changes -
            ycp Yuchen Pei made changes -
            Roel Roel Van de Paar made changes -
            Description {format:sql}
            CREATE TABLE t1 (id INT, value INT);
            CREATE TABLE t2 (id INT);

            PREPARE stmt FROM 'UPDATE t1 t1 SET value = (SELECT 1 FROM t2 WHERE id = t1.id)';
            execute stmt;
            insert into t1 values (1,10),(2,10),(3,10);
            insert into t2 values (1),(2);
            execute stmt; # <<=== Memory leak happens on running this statement
            select * from t1;
            deallocate prepare stmt;
            DROP TABLE t1,t2;
            {format}

            The above use case doesn't show memory leaking on 10.11.

            The similar issue could take place on running the DELETE statement with the LIMIT clause in PS/SP mode. So, this task also about fixing a memory leak in the code that processes the DELETE statement.
            {code:sql}
            CREATE TABLE t1 (id INT, value INT);
            CREATE TABLE t2 (id INT);

            PREPARE stmt FROM 'UPDATE t1 t1 SET value = (SELECT 1 FROM t2 WHERE id = t1.id)';
            execute stmt;
            insert into t1 values (1,10),(2,10),(3,10);
            insert into t2 values (1),(2);
            execute stmt; # <<=== Memory leak happens on running this statement
            select * from t1;
            deallocate prepare stmt;
            DROP TABLE t1,t2;
            {code}

            The above use case doesn't show memory leaking on 10.11.

            The similar issue could take place on running the DELETE statement with the LIMIT clause in PS/SP mode. So, this task also about fixing a memory leak in the code that processes the DELETE statement.
            ycp Yuchen Pei made changes -
            Fix Version/s 10.5.27 [ 29902 ]
            Fix Version/s 10.6.20 [ 29903 ]
            Fix Version/s 10.11.10 [ 29904 ]
            elenst Elena Stepanova made changes -

            People

              shulga Dmitry Shulga
              shulga Dmitry Shulga
              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.