Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 10.0.7
-
Fix Version/s: 10.0.8
-
Component/s: None
-
Labels:None
-
Environment:PRETTY_NAME="Debian GNU/Linux 7 (wheezy)"
NAME="Debian GNU/Linux"
VERSION_ID="7"
VERSION="7 (wheezy)"
ID=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support/"
BUG_REPORT_URL="http://bugs.debian.org/"
Linux version 3.2.43-grsec-sma (root@admin.sma.hu) (gcc version 4.7.2 (Debian 4.7.2-5) ) #1 SMP Mon Jun 17 14:23:20 CEST 2013PRETTY_NAME="Debian GNU/Linux 7 (wheezy)" NAME="Debian GNU/Linux" VERSION_ID="7" VERSION="7 (wheezy)" ID=debian ANSI_COLOR="1;31" HOME_URL=" http://www.debian.org/ " SUPPORT_URL=" http://www.debian.org/support/ " BUG_REPORT_URL=" http://bugs.debian.org/ " Linux version 3.2.43-grsec-sma ( root@admin.sma.hu ) (gcc version 4.7.2 (Debian 4.7.2-5) ) #1 SMP Mon Jun 17 14:23:20 CEST 2013
Description
Setting AUTO_INCREMENT is prohibited to value that smaller than the max value of the AUTO_INCREMENT column, but MariaDB 10.0.7 doing this:
mysql> select version();
+-------------------------+
| version() |
+-------------------------+
| 10.0.7-MariaDB-1~wheezy |
+-------------------------+
1 row in set (0.00 sec)
mysql>
mysql> CREATE TABLE test(
-> id int(10)unsigned NOT NULL AUTO_INCREMENT,
-> duma varchar(255)NOT NULL,
-> PRIMARY KEY(id)
-> )ENGINE=InnoDB DEFAULT CHARSET=utf8;
Query OK, 0 rows affected (0.01 sec)
mysql>
mysql> INSERT INTO test(id,duma)VALUES(1,'aaa'),(2,'bbb');
Query OK, 2 rows affected (0.00 sec)
Records: 2 Duplicates: 0 Warnings: 0
mysql>
mysql> ALTER TABLE test AUTO_INCREMENT=1;
Query OK, 0 rows affected (0.01 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql>
mysql> INSERT INTO test(duma)VALUES('ccc');
ERROR 1062 (23000): Duplicate entry '1' for key 'PRIMARY'
mysql>
The AUTO_INCREMENT must be set to 3, not 1.
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
It works correctly with XtraDB (5.6.14), but fails with InnoDB (5.6.10). I suspect it's some innodb bug that was fixed upstream between 5.6.10 and 5.6.14. I'll upgrade our InnoDB to 5.6.14