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

TokuDB: Auto-increment on a secondary column is accepted, but causes gaps

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Trivial
    • Resolution: Fixed
    • 5.5.31
    • None
    • None

    Description

      CREATE TABLE t1 (a char(8), b int AUTO_INCREMENT, PRIMARY KEY (a,b)) ENGINE=TokuDB;
      INSERT INTO t1 (a) VALUES ('a'),('b'),('c'),('d'),('e'),('f'),('g'),('h'),('i'),('j');
      SELECT LAST_INSERT_ID();
      LAST_INSERT_ID()
      1
      SELECT a,b FROM t1;
      a	b
      a	1
      b	11
      c	21
      d	31
      e	41
      f	51
      g	61
      h	71
      i	81
      j	91

      Test case:

      install soname 'ha_tokudb.so';
       
      CREATE TABLE t1 (a char(8), b int AUTO_INCREMENT, PRIMARY KEY (a,b)) ENGINE=TokuDB;
      INSERT INTO t1 (a) VALUES ('a'),('b'),('c'),('d'),('e'),('f'),('g'),('h'),('i'),('j');
      SELECT LAST_INSERT_ID();
      SELECT a,b FROM t1;

      bzr version-info
      revision-id: holyfoot@askmonty.org-20130514121908-d6tp4zsdkim0q4dg
      revno: 3768
      branch-nick: 5.5-hf-tokudb

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              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.