Details

    Description

      created after CONJ-948

      Synchronous connectors can rely on OK_Packet/EOF_Packet server status's SERVER_STATUS_IN_TRANS flag that explicitly indicate if a transaction is currently active.

      Java connector use that information to avoid issuing a rollback/commit command, skipping the command if there is no transaction.

      Problem concerns only MyISAM that never set SERVER_STATUS_IN_TRANS flag. Still there is some case when there is some kind of lock : ( example from serg: )

      create table t1 (a int)  engine=myisam;
       
      insert t1 values (1);
      

      and in another

      drop table t1;
      

      this DROP TABLE will wait until the transaction ends.

      • either MyISAM should return SERVER_STATUS_IN_TRANS flag, so connector know there is really a commit to be issued.
      • either MyISAM doesn't set any lock. (It may be just an issue : for some metadata locks are taken on the object name, before the table is opened, before we know it's a MyISAM table.)

      Either way is ok.

      (Another solution would be to always issue a COMMIT/ROLLBACK statement when there is no need, but that would degrade performance dramatically for some application. For example when connections are given back to pools, pools generally issues a connection.rollback() to ensure connection state, and there is lots of application where that command would represent 25% of the commands)

      Attachments

        Issue Links

          Activity

            diego dupin Diego Dupin created issue -
            diego dupin Diego Dupin made changes -
            Field Original Value New Value
            Priority Major [ 3 ] Critical [ 2 ]
            diego dupin Diego Dupin made changes -
            serg Sergei Golubchik made changes -
            Affects Version/s 10.3 [ 22126 ]
            Affects Version/s 10.4 [ 22408 ]
            Affects Version/s 10.5 [ 23123 ]
            Affects Version/s 10.6 [ 24028 ]
            Affects Version/s 10.7 [ 24805 ]
            Affects Version/s 10.8 [ 26121 ]
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s 10.7 [ 24805 ]
            Fix Version/s 10.8 [ 26121 ]
            julien.fritsch Julien Fritsch made changes -
            Assignee Oleksandr Byelkin [ sanja ]
            sanja Oleksandr Byelkin made changes -
            Description _created after CONJ-948_

            Synchronous connectors can rely on OK_Packet/EOF_Packet server status's [SERVER_STATUS_IN_TRANS |https://mariadb.com/kb/en/ok_packet/#server-status-flag] flag that explicitly indicate if a transaction is currently active.

            Java connector use that information to avoid issuing a rollback/commit command, skipping the command if there is no transaction.

            Problem concerns only MyISAM that never set SERVER_STATUS_IN_TRANS flag. Still there is some case when there is some kind of lock : ( example from serg: )
            {code:sql}
            create table t1 (a int) engine=myisam;
            start transaction;
            insert t1 values (1);
            {code}
            and in another
            {code:sql}
            drop table t1;
            {code}
            this {{DROP TABLE}} will wait until the transaction ends.

            * either MyISAM should return SERVER_STATUS_IN_TRANS flag, so connector know there is really a commit to be issued.
            * either MyISAM doesn't set any lock. (It may be just an issue : for some metadata locks are taken on the object *name*, before the table is opened, before we know it's a MyISAM table.)

            Either way is ok.

            (Another solution would be to always issue a COMMIT/ROLLBACK statement when there is no need, but that would degrade performance dramatically for some application. For example when connections are given back to pools, pools generally issues a connection.rollback() to ensure connection state, and there is lots of application where that command would represent 25% of the commands)
            _created after CONJ-948_

            Synchronous connectors can rely on OK_Packet/EOF_Packet server status's [SERVER_STATUS_IN_TRANS |https://mariadb.com/kb/en/ok_packet/#server-status-flag] flag that explicitly indicate if a transaction is currently active.

            Java connector use that information to avoid issuing a rollback/commit command, skipping the command if there is no transaction.

            Problem concerns only MyISAM that never set SERVER_STATUS_IN_TRANS flag. Still there is some case when there is some kind of lock : ( example from serg: )
            {code:sql}
            create table t1 (a int) engine=myisam;
            set autocommit=0;
            insert t1 values (1);
            {code}
            and in another
            {code:sql}
            drop table t1;
            {code}
            this {{DROP TABLE}} will wait until the transaction ends.

            * either MyISAM should return SERVER_STATUS_IN_TRANS flag, so connector know there is really a commit to be issued.
            * either MyISAM doesn't set any lock. (It may be just an issue : for some metadata locks are taken on the object *name*, before the table is opened, before we know it's a MyISAM table.)

            Either way is ok.

            (Another solution would be to always issue a COMMIT/ROLLBACK statement when there is no need, but that would degrade performance dramatically for some application. For example when connections are given back to pools, pools generally issues a connection.rollback() to ensure connection state, and there is lots of application where that command would represent 25% of the commands)
            serg Sergei Golubchik made changes -
            Summary MyISAM wrong server status flags. MyISAM wrong server status flags
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 10.7 [ 24805 ]
            sanja Oleksandr Byelkin made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 10.3 [ 22126 ]
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 10.8 [ 26121 ]
            sanja Oleksandr Byelkin made changes -
            sanja Oleksandr Byelkin made changes -
            Status In Progress [ 3 ] Stalled [ 10000 ]
            sanja Oleksandr Byelkin made changes -
            Status Stalled [ 10000 ] In Progress [ 3 ]
            sanja Oleksandr Byelkin made changes -
            Status In Progress [ 3 ] Stalled [ 10000 ]
            serg Sergei Golubchik made changes -
            Assignee Oleksandr Byelkin [ sanja ] Sergei Golubchik [ serg ]
            serg Sergei Golubchik made changes -
            Status Stalled [ 10000 ] In Progress [ 3 ]
            serg Sergei Golubchik made changes -
            Status In Progress [ 3 ] Stalled [ 10000 ]
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ] Oleksandr Byelkin [ sanja ]
            Status Stalled [ 10000 ] In Review [ 10002 ]
            sanja Oleksandr Byelkin made changes -
            Assignee Oleksandr Byelkin [ sanja ] Sergei Golubchik [ serg ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            serg Sergei Golubchik made changes -
            Component/s Protocol [ 14604 ]
            Fix Version/s 10.4.32 [ 29300 ]
            Fix Version/s 10.5.23 [ 29012 ]
            Fix Version/s 10.6.16 [ 29014 ]
            Fix Version/s 10.10.7 [ 29018 ]
            Fix Version/s 10.11.6 [ 29020 ]
            Fix Version/s 11.0.4 [ 29021 ]
            Fix Version/s 11.1.3 [ 29023 ]
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Component/s Locking [ 10900 ]
            serg Sergei Golubchik made changes -
            Component/s Storage Engine - MyISAM [ 10600 ]
            monty Michael Widenius made changes -
            Description _created after CONJ-948_

            Synchronous connectors can rely on OK_Packet/EOF_Packet server status's [SERVER_STATUS_IN_TRANS |https://mariadb.com/kb/en/ok_packet/#server-status-flag] flag that explicitly indicate if a transaction is currently active.

            Java connector use that information to avoid issuing a rollback/commit command, skipping the command if there is no transaction.

            Problem concerns only MyISAM that never set SERVER_STATUS_IN_TRANS flag. Still there is some case when there is some kind of lock : ( example from serg: )
            {code:sql}
            create table t1 (a int) engine=myisam;
            set autocommit=0;
            insert t1 values (1);
            {code}
            and in another
            {code:sql}
            drop table t1;
            {code}
            this {{DROP TABLE}} will wait until the transaction ends.

            * either MyISAM should return SERVER_STATUS_IN_TRANS flag, so connector know there is really a commit to be issued.
            * either MyISAM doesn't set any lock. (It may be just an issue : for some metadata locks are taken on the object *name*, before the table is opened, before we know it's a MyISAM table.)

            Either way is ok.

            (Another solution would be to always issue a COMMIT/ROLLBACK statement when there is no need, but that would degrade performance dramatically for some application. For example when connections are given back to pools, pools generally issues a connection.rollback() to ensure connection state, and there is lots of application where that command would represent 25% of the commands)
            _created after CONJ-948_

            Synchronous connectors can rely on OK_Packet/EOF_Packet server status's [SERVER_STATUS_IN_TRANS |https://mariadb.com/kb/en/ok_packet/#server-status-flag] flag that explicitly indicate if a transaction is currently active.

            Java connector use that information to avoid issuing a rollback/commit command, skipping the command if there is no transaction.

            Problem concerns only MyISAM that never set SERVER_STATUS_IN_TRANS flag. Still there is some case when there is some kind of lock : ( example from serg: )
            {code:sql}
            create table t1 (a int) engine=myisam;

            insert t1 values (1);
            {code}
            and in another
            {code:sql}
            drop table t1;
            {code}
            this {{DROP TABLE}} will wait until the transaction ends.

            * either MyISAM should return SERVER_STATUS_IN_TRANS flag, so connector know there is really a commit to be issued.
            * either MyISAM doesn't set any lock. (It may be just an issue : for some metadata locks are taken on the object *name*, before the table is opened, before we know it's a MyISAM table.)

            Either way is ok.

            (Another solution would be to always issue a COMMIT/ROLLBACK statement when there is no need, but that would degrade performance dramatically for some application. For example when connections are given back to pools, pools generally issues a connection.rollback() to ensure connection state, and there is lots of application where that command would represent 25% of the commands)
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 171314

            People

              serg Sergei Golubchik
              diego dupin Diego Dupin
              Votes:
              0 Vote for this issue
              Watchers:
              6 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.