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

MyISAM tables don't respect auto_increment_increment value

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 5.5.34-galera
    • None
    • None
    • 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)

      Attachments

        Activity

          People

            nirbhay_c Nirbhay Choubey (Inactive)
            nirbhay_c Nirbhay Choubey (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.