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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 5.5.31
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      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
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              elenst Elena Stepanova added a comment -

              Not reproducible on MariaDB-5.5.30-TokuDB-7.0.1

              Show
              elenst Elena Stepanova added a comment - Not reproducible on MariaDB-5.5.30-TokuDB-7.0.1

                People

                • Assignee:
                  serg Sergei Golubchik
                  Reporter:
                  elenst Elena Stepanova
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: