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

Packets out of order on a SELECT after calling a procedure with DELETE .. RETURNING

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.0.5
    • Component/s: None
    • Labels:
      None

      Description

      CREATE TABLE t1 (i INT);
      INSERT INTO t1 VALUES (1),(2);
      --delimiter |
      CREATE PROCEDURE p (a INT) 
      BEGIN
        DELETE FROM t1 WHERE i = a RETURNING *;
        INSERT INTO t1 VALUES (a);
      END |
      --delimiter ;
       
      CALL p(1);
      SELECT * FROM t1;

      MariaDB [test]> CALL p(1);
      +------+
      | i    |
      +------+
      |    1 |
      +------+
      1 row in set (0.03 sec)
       
      MariaDB [test]> SELECT * FROM t1;
      Error: Packets out of order (Found: 6, expected 1)
      ERROR 2013 (HY000): Lost connection to MySQL server during query
      MariaDB [test]> 

      The "Lost connection ..." error does not signify a server crash, only that the client got disconnected:

      ERROR 2013 (HY000): Lost connection to MySQL server during query
      MariaDB [test]> SELECT * FROM t1;
      ERROR 2006 (HY000): MySQL server has gone away
      No connection. Trying to reconnect...
      Connection id:    7
      Current database: test
       
      +------+
      | i    |
      +------+
      |    2 |
      |    1 |
      +------+
      2 rows in set (0.03 sec)

      bzr version-info

      revision-id: knielsen@knielsen-hq.org-20130816131025-etjrvmfvupsjzq83
      revno: 3674
      branch-nick: 10.0-base

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              psergey Sergei Petrunia
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: