| Bug #34366 | Insert into a partitioned MyISAM table gives ER_AUTOINC_READ_FAILED error | ||
|---|---|---|---|
| Submitted: | 7 Feb 2008 1:02 | Modified: | 11 Feb 2008 22:25 |
| Reporter: | Taha Yayci | ||
| Status: | Duplicate | ||
| Category: | Server: Partition | Severity: | S3 (Non-critical) |
| Version: | 5.1.22 | OS: | Any |
| Assigned to: | Mattias Jonsson | Target Version: | |
| Tags: | partition, Auto-increment | ||
| Triage: | D2 (Serious) | ||
[7 Feb 2008 1:02]
Taha Yayci
[7 Feb 2008 1:11]
Miguel Solorzano
Thank you for the bug report. Verified as described:
mysql> create table `test01` (
-> `rowid` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
-> `userid` smallint UNSIGNED NOT NULL,
-> `username` varchar (20) NOT NULL ,
-> PRIMARY KEY (`userid`, `rowid`))
-> PARTITION BY HASH (userid) PARTITIONS 2;
Query OK, 0 rows affected (0.08 sec)
mysql>
mysql> insert into `test01`(`rowid`,`userid`,`username`) values ( NULL,'1','name');
Query OK, 1 row affected (0.01 sec)
mysql> insert into `test01`(`rowid`,`userid`,`username`) values ( NULL,'1','name');
Query OK, 1 row affected (0.00 sec)
mysql> insert into `test01`(`rowid`,`userid`,`username`) values ( NULL,'1','name');
ERROR 1467 (HY000): Failed to read auto-increment value from storage engine
mysql>
[7 Feb 2008 3:54]
Taha Yayci
thanks for your quick reply.. i found that primary key (rowid, userid) and (userid, rowid) have same effects in my situation. All the selects use indexes and partitions correctly. But for other situations it can be a big problem such as another column in the index. so for my situation it is not severe now, but i am still waiting for the patch. thanks again...
[7 Feb 2008 3:55]
Taha Yayci
i found that primary key (rowid, userid) and (userid, rowid) have same effects in my situation. All the selects use indexes and partitions correctly. But for other situations it can be a big problem such as another column in the index. so for my situation it is not severe now, but i am still waiting for the patch. thanks again...
[11 Feb 2008 22:25]
Mattias Jonsson
This is a duplicate of Bug#33479 (there is a simple test case there).
