diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-10-30 12:36:57 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-10-30 13:21:36 +0200 |
commit | d1e6b0bcff0148f474e38002d5c1198726fe7970 (patch) | |
tree | 028c4efa6f9085c7724c28f462513b27d6575c84 /mysql-test | |
parent | b8eff8bce4505478dcb1981d344d917782c6e226 (diff) | |
download | mariadb-git-d1e6b0bcff0148f474e38002d5c1198726fe7970.tar.gz |
MDEV-20927 Duplicate key with auto increment
Apply the changes to InnoDB and XtraDB that had been
inadvertently skipped in the merge
commit ae476868a5394041a00e75a29c7d45917e8dfae8
That merge failure sabotaged part of MDEV-20127:
>Revert a problematic auto_increment_increment 'fix' from 2014.
>This involves replacing the MDEV-8827 fix and in 10.1,
>removing some WSREP instrumentation.
The code changes were re-merged manually by executing the following:
# Get the parent of the problematic merge.
git checkout ae476868a5394041a00e75a29c7d45917e8dfae8^
# Perform the merge again.
git merge ae476868a5394041a00e75a29c7d45917e8dfae8^2
# Get the conflict resolution from that merge.
git checkout ae476868a5394041a00e75a29c7d45917e8dfae8 .
# Note: Any changes to these files were removed (empty diff)!
git diff HEAD storage/{innobase,xtradb}/handler/ha_innodb.cc
# Apply the code changes:
git diff cf40393471b10ca68cc1d2804c22ab9203900978^2..MERGE_HEAD \
storage/{innobase,xtradb}/handler/ha_innodb.cc|
patch -p1
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/suite/innodb/r/innodb-alter-autoinc.result | 6 | ||||
-rw-r--r-- | mysql-test/suite/innodb/r/innodb-autoinc.result | 24 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/innodb-autoinc.test | 2 |
3 files changed, 16 insertions, 16 deletions
diff --git a/mysql-test/suite/innodb/r/innodb-alter-autoinc.result b/mysql-test/suite/innodb/r/innodb-alter-autoinc.result index 82eb448fe45..c3ae453486a 100644 --- a/mysql-test/suite/innodb/r/innodb-alter-autoinc.result +++ b/mysql-test/suite/innodb/r/innodb-alter-autoinc.result @@ -148,7 +148,7 @@ t1 CREATE TABLE `t1` ( `id` int(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`), KEY `id` (`id`,`a`) -) ENGINE=InnoDB AUTO_INCREMENT=75 DEFAULT CHARSET=latin1 +) ENGINE=InnoDB AUTO_INCREMENT=70 DEFAULT CHARSET=latin1 INSERT INTO t1 SET a=123; INSERT INTO t1 VALUES(-123,-45); ALTER TABLE t1 AUTO_INCREMENT = 75; @@ -161,8 +161,8 @@ a id 123 55 347 60 33101 65 +123 70 123 75 -123 80 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -170,5 +170,5 @@ t1 CREATE TABLE `t1` ( `id` int(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`), KEY `id` (`id`,`a`) -) ENGINE=InnoDB AUTO_INCREMENT=85 DEFAULT CHARSET=latin1 +) ENGINE=InnoDB AUTO_INCREMENT=80 DEFAULT CHARSET=latin1 DROP TABLE t1; diff --git a/mysql-test/suite/innodb/r/innodb-autoinc.result b/mysql-test/suite/innodb/r/innodb-autoinc.result index 2c428b0ba1a..f2e2e087818 100644 --- a/mysql-test/suite/innodb/r/innodb-autoinc.result +++ b/mysql-test/suite/innodb/r/innodb-autoinc.result @@ -567,7 +567,7 @@ Variable_name Value auto_increment_increment 65535 auto_increment_offset 65535 INSERT INTO t1 VALUES (NULL),(NULL); -ERROR HY000: Failed to read auto-increment value from storage engine +ERROR 22003: Out of range value for column 'c1' at row 1 SELECT * FROM t1; c1 1 @@ -674,7 +674,7 @@ SELECT a,b FROM t; a b 1 S1 3 S2 -4 S2 +5 S2 # Client 1: Insert a record with auto_increment_increment=1 SET SESSION auto_increment_increment=1; SHOW CREATE TABLE t; @@ -683,14 +683,14 @@ t CREATE TABLE `t` ( `a` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `b` varchar(200) DEFAULT NULL, PRIMARY KEY (`a`) -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1 INSERT INTO t(b) VALUES('S1'); SELECT a,b FROM t; a b 1 S1 3 S2 -4 S2 -5 S1 +5 S2 +6 S1 DROP TABLE t; # Autoincrement behaviour with mixed insert. CREATE TABLE t( @@ -728,22 +728,22 @@ t CREATE TABLE `t` ( `a` tinyint(4) NOT NULL AUTO_INCREMENT, `b` varchar(200) DEFAULT NULL, PRIMARY KEY (`a`) -) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=latin1 +) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=latin1 INSERT INTO t(b) VALUES('S4'); SELECT * FROM t; a b 1 S0 11 S1 -22 S3 -23 S4 28 S2 +31 S3 +32 S4 SHOW CREATE TABLE t; Table Create Table t CREATE TABLE `t` ( `a` tinyint(4) NOT NULL AUTO_INCREMENT, `b` varchar(200) DEFAULT NULL, PRIMARY KEY (`a`) -) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=latin1 +) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=latin1 DROP TABLE t; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=5; DROP TABLE IF EXISTS t1; @@ -784,7 +784,7 @@ t2 CREATE TABLE `t2` ( `n` int(10) unsigned NOT NULL, `o` enum('FALSE','TRUE') DEFAULT NULL, PRIMARY KEY (`m`) -) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=latin1 +) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1 INSERT INTO t1 (b,c) SELECT n,o FROM t2 ; SHOW CREATE TABLE t1; Table Create Table @@ -1464,13 +1464,13 @@ SELECT * FROM t; i 1 301 -351 +601 SHOW CREATE TABLE t; Table Create Table t CREATE TABLE `t` ( `i` int(11) NOT NULL AUTO_INCREMENT, KEY `i` (`i`) -) ENGINE=InnoDB AUTO_INCREMENT=401 DEFAULT CHARSET=latin1 +) ENGINE=InnoDB AUTO_INCREMENT=651 DEFAULT CHARSET=latin1 DROP TABLE t; # # MDEV-14008 Assertion failing: `!is_set() || (m_status == DA_OK_BULK && is_bulk_op()) diff --git a/mysql-test/suite/innodb/t/innodb-autoinc.test b/mysql-test/suite/innodb/t/innodb-autoinc.test index 8b202f5db6b..b14d6db7f5d 100644 --- a/mysql-test/suite/innodb/t/innodb-autoinc.test +++ b/mysql-test/suite/innodb/t/innodb-autoinc.test @@ -349,7 +349,7 @@ INSERT INTO t1 VALUES (18446744073709551610); #-- 2^64 - 2 SELECT * FROM t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1152921504606846976, @@SESSION.AUTO_INCREMENT_OFFSET=1152921504606846976; SHOW VARIABLES LIKE "auto_inc%"; ---error 1467 +--error HA_ERR_AUTOINC_ERANGE INSERT INTO t1 VALUES (NULL),(NULL); SELECT * FROM t1; DROP TABLE t1; |