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

regression on 10.2.18 COM_RESET_CONNECTION doesn't reset temporary table

    XMLWordPrintable

    Details

      Description

      COM_RESET_CONNECTION doesn't reset temporary table anymore, this is a regression on 10.2.18,
      This works well on 10.2.17 and 10.3.

      COM_RESET still reset user variables, current transaction, ...

      example :

          base
            .createConnection()
            .then(conn => {
              conn
                .query("CREATE TEMPORARY TABLE ttt(t varchar(128))")
                .then(() => {
                  return conn.query("select * from ttt");
                })
                .then(rows => {
                  assert.deepEqual(rows, []);
                  return conn.reset();
                })
                .then(() => {
                  return conn.query("select * from ttt");
                })
                .then(rows => {
                  done(new Error("temporary table must not exist !")); // => THROW THIS ERROR, BECAUSE QUERY WORKS.
                })
                .catch(err => {
                  if (
                    (conn.info.isMariaDB() && conn.info.hasMinVersion(10, 2, 4)) ||
                    (!conn.info.isMariaDB() && conn.info.hasMinVersion(5, 7, 3))
                  ) {
                    assert.equal(err.errno, 1146);
                  }
                  conn.end();
                  done();
                });
            })
            .catch(done);
      
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            diego dupin Diego Dupin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: