Bug #53945 ndb_autoincrement_prefetch_sz ignored for insert...select
Submitted: 24 May 2010 15:10 Modified: 20 Mar 2012 18:13
Reporter: Andrew Hutchings Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:mysql-5.1-telco-7.0 OS:Any
Assigned to: Jon Stephens CPU Architecture:Any

[24 May 2010 15:10] Andrew Hutchings
Description:
The ndb_autoincrement_prefetch_sz appears to be ignored for insert...select statements and a value of 32 appears to be used instead.

How to repeat:
mysql1> create table t1 (a int not null auto_increment primary key, b char(1) default null) engine ndb;
mysql1> create table t2 (a int not null auto_increment primary key, b char(1) default null) engine myisam;
mysql2> create table t2 (a int not null auto_increment primary key, b char(1) default null) engine myisam;
mysql1> insert into t2 (b) values (1),(2),(3);
mysql2> insert into t2 (b) values (4),(5),(6);
mysql1> set autocommit=0;
mysql2> set autocommit=0;
mysql1> insert into t1 (b) select (b) from t2;
mysql2> insert into t1 (b) select (b) from t2;
mysql1> commit;
mysql2> commit;
mysql1> select * from t1;
+----+------+
| a  | b    |
+----+------+
| 35 | 6    |
|  3 | 3    |
|  1 | 1    |
| 34 | 5    |
|  2 | 2    |
| 33 | 4    |
+----+------+
6 rows in set (0.00 sec)
[19 Mar 2012 9:20] Jon Stephens
This is actually a documentation issue. Updated category, etc. to reflect this. Assigned to myself for handing.

ETA: A few days.
[20 Mar 2012 18:13] Jon Stephens
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.