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

MyISAM tables don't respect auto_increment_increment value

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.5.34-galera
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:
      Ubuntu 12.04 (32/64)

      Description

      Version: '5.5.34-MariaDB-wsrep-debug-log' Source distribution, wsrep_23.7.6.r3446

      Run the following queries on a MyISAM table:

      CREATE TABLE t1
      (
      id INT NOT NULL auto_increment,
      PRIMARY KEY (id),
      name VARCHAR(30)
      ) ENGINE=MyISAM;
      
      INSERT into t1(name) values('Record_1');
      SELECT * from t1;
      --echo ## Changing value of variable to 10 ##
      SET @@session.auto_increment_increment = 10;
      INSERT into t1(name) values('Record_2');
      SELECT * from t1;
      ALTER table t1 MODIFY id SMALLINT NOT NULL auto_increment;
      INSERT into t1(name) values('Record_3');
      SELECT * from t1;
      

      The last SELECT would result in :

      MariaDB [test]> SELECT * from t1;
      +----+----------+
      | id | name     |
      +----+----------+
      |  1 | Record_1 |
      | 11 | Record_2 |
      | 12 | Record_3 |
      +----+----------+
      3 rows in set (0.00 sec)
      

      While running the same set of command on an InnoDB table would result in :

      MariaDB [test]> SELECT * from t1;
      +----+----------+
      | id | name     |
      +----+----------+
      |  1 | Record_1 |
      | 11 | Record_2 |
      | 21 | Record_3 |
      +----+----------+
      3 rows in set (0.00 sec)
      

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            nirbhay_c Nirbhay Choubey added a comment -

            Not reproducible on 5.5.33a-galera.

            Show
            nirbhay_c Nirbhay Choubey added a comment - Not reproducible on 5.5.33a-galera.
            Hide
            nirbhay_c Nirbhay Choubey added a comment -

            Patch for following bug caused this : https://bugs.launchpad.net/codership-mysql/+bug/587170

            Show
            nirbhay_c Nirbhay Choubey added a comment - Patch for following bug caused this : https://bugs.launchpad.net/codership-mysql/+bug/587170
            Hide
            nirbhay_c Nirbhay Choubey added a comment -

            Updated the mtr test result files to reflect the changes made by
            https://bugs.launchpad.net/codership-mysql/+bug/587170

            Pushed to maria-5.5-galera.

            Show
            nirbhay_c Nirbhay Choubey added a comment - Updated the mtr test result files to reflect the changes made by https://bugs.launchpad.net/codership-mysql/+bug/587170 Pushed to maria-5.5-galera.

              People

              • Assignee:
                nirbhay_c Nirbhay Choubey
                Reporter:
                nirbhay_c Nirbhay Choubey
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: