Merge from mysql-5.1 to mysql-5.5
This commit is contained in:
commit
0b6a2e75bf
@ -2529,18 +2529,18 @@ int handler::update_auto_increment()
|
||||
Note that in prelocked mode no estimation is given.
|
||||
*/
|
||||
|
||||
/*
|
||||
For multi-row inserts, if the bulk inserts cannot be started, the
|
||||
handler::estimation_rows_to_insert will not be set. Set it here.
|
||||
*/
|
||||
if ((estimation_rows_to_insert == 0) &&
|
||||
(thd->lex->many_values.elements > 0))
|
||||
{
|
||||
estimation_rows_to_insert= thd->lex->many_values.elements;
|
||||
}
|
||||
|
||||
if ((auto_inc_intervals_count == 0) && (estimation_rows_to_insert > 0))
|
||||
nb_desired_values= estimation_rows_to_insert;
|
||||
else if ((auto_inc_intervals_count == 0) &&
|
||||
(thd->lex->many_values.elements > 0))
|
||||
{
|
||||
/*
|
||||
For multi-row inserts, if the bulk inserts cannot be started, the
|
||||
handler::estimation_rows_to_insert will not be set. But we still
|
||||
want to reserve the autoinc values.
|
||||
*/
|
||||
nb_desired_values= thd->lex->many_values.elements;
|
||||
}
|
||||
else /* go with the increasing defaults */
|
||||
{
|
||||
/* avoid overflow in formula, with this if() */
|
||||
|
Loading…
x
Reference in New Issue
Block a user