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

Killed CREATE SEQUENCE leaves sequence in unusable state

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.3(EOL)
    • 10.3.8
    • Sequences
    • None

    Description

      Note: Run with --repeat=N if it's not reproducible right away.

      --connect (con1,localhost,root,,test)
      --let $conid= `SELECT CONNECTION_ID()`
      --send
      	CREATE SEQUENCE s;
      --connection default
      --eval KILL $conid
      --error 0,ER_NO_SUCH_TABLE
      SELECT NEXTVAL(s);
       
      # Cleanup
      DROP SEQUENCE s;
      

      The test case above kills a connection in the process of creating a sequence. Expected outcomes are that the sequence either doesn't get created, or is fully functional. However, most often it's created, but remains unusable, attempts to refer to it end up with ER_KEY_NOT_FOUND:

      10.3 96cee524fe

      mysqltest: At line 8: query 'SELECT NEXTVAL(s)' failed with wrong errno 1032: 'Can't find record in 's'', instead of 0...
      

      It fails nearly every time for me, but it's still a race condition, so sometimes it misses the mark. Run with --repeat if it doesn't fail for you.

      Attachments

        Activity

          elenst Elena Stepanova created issue -
          elenst Elena Stepanova made changes -
          Field Original Value New Value
          Description _Note: Run with {{--repeat=N}} if it's not reproducible right away.
          {code:sql}
          --connect (con1,localhost,root,,test)
          --let $conid= `SELECT CONNECTION_ID()`
          --send
          CREATE SEQUENCE s;
          --connection default
          --eval KILL $conid
          --error 0,ER_NO_SUCH_TABLE
          SELECT NEXTVAL(s);

          # Cleanup
          DROP SEQUENCE s;
          {code}

          The test case above kills a connection in the process of creating a sequence. Expected outcomes are that the sequence either doesn't get created, or is fully functional. However, most often it's created, but remains unusable, attempts to refer to it end up with ER_KEY_NOT_FOUND:

          {noformat:title=10.3 96cee524fe}
          mysqltest: At line 8: query 'SELECT NEXTVAL(s)' failed with wrong errno 1032: 'Can't find record in 's'', instead of 0...
          {noformat}

          It fails nearly every time for me, but it's still a race condition, so sometimes it misses the mark. Run with --repeat if it doesn't fail for you.
          _Note: Run with {{--repeat=N}} if it's not reproducible right away._
          {code:sql}
          --connect (con1,localhost,root,,test)
          --let $conid= `SELECT CONNECTION_ID()`
          --send
          CREATE SEQUENCE s;
          --connection default
          --eval KILL $conid
          --error 0,ER_NO_SUCH_TABLE
          SELECT NEXTVAL(s);

          # Cleanup
          DROP SEQUENCE s;
          {code}

          The test case above kills a connection in the process of creating a sequence. Expected outcomes are that the sequence either doesn't get created, or is fully functional. However, most often it's created, but remains unusable, attempts to refer to it end up with ER_KEY_NOT_FOUND:

          {noformat:title=10.3 96cee524fe}
          mysqltest: At line 8: query 'SELECT NEXTVAL(s)' failed with wrong errno 1032: 'Can't find record in 's'', instead of 0...
          {noformat}

          It fails nearly every time for me, but it's still a race condition, so sometimes it misses the mark. Run with --repeat if it doesn't fail for you.
          monty Michael Widenius made changes -
          issue.field.resolutiondate 2018-05-27 20:40:51.0 2018-05-27 20:40:51.585
          monty Michael Widenius made changes -
          Component/s Admin statements [ 11400 ]
          Fix Version/s 10.3.8 [ 23113 ]
          Fix Version/s 10.3 [ 22126 ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 87447 ] MariaDB v4 [ 154423 ]

          People

            monty Michael Widenius
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.