mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
5.2 merge.
two tests still fail: main.innodb_icp and main.range_vs_index_merge_innodb call records_in_range() with both range ends being open (which triggers an assert)
This commit is contained in:
@@ -2505,8 +2505,19 @@ int handler::update_auto_increment()
|
||||
reservation means potentially losing unused values).
|
||||
Note that in prelocked mode no estimation is given.
|
||||
*/
|
||||
|
||||
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() */
|
||||
@@ -4943,6 +4954,8 @@ int handler::ha_write_row(uchar *buf)
|
||||
rows_changed++;
|
||||
if (unlikely(error= binlog_log_row(table, 0, buf, log_func)))
|
||||
DBUG_RETURN(error); /* purecov: inspected */
|
||||
|
||||
DEBUG_SYNC_C("ha_write_row_end");
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user