summaryrefslogtreecommitdiff
path: root/storage/innobase
diff options
context:
space:
mode:
authorunknown <antony@pcg5ppc.xiphis.org>2007-09-08 20:26:12 -0700
committerunknown <antony@pcg5ppc.xiphis.org>2007-09-08 20:26:12 -0700
commitdb1f9468d4c4e4981fb4bc6e96de19766d0ca377 (patch)
tree5fe93bb7fb897e508920154ea011da88aa495e84 /storage/innobase
parent67a8e6a0c1a9d2b987db3b3e12eaf383e834ef0a (diff)
downloadmariadb-git-db1f9468d4c4e4981fb4bc6e96de19766d0ca377.tar.gz
Bug#30919
"Rows not deleted from innodb partitioned tables if --innodb_autoinc_lock_mode=0" Due to a previous bugfix which initializes a previously uninitialized variable, ha_partition::get_auto_increment() may fail to operate correctly when the storage engine reports that it is only reserving one value and one or more partitions have a different 'next-value'. Currently, only affects Innodb's new-style auto-increment code which reserves larger blocks of values and has less inter-thread contention. mysql-test/suite/rpl/r/rpl_innodb_bug28430.result: Fix results - previous results shows symptoms of Bug30919 sql/ha_partition.cc: Bug30919 ha_partition::write_row() Do not insert a row if a failure occurred while generating auto-increment value. ha_partition::get_auto_increment() If there is an empty 'intersection' of auto-increment values, perform a second pass before failing because partitions may have different auto-increment 'next-value' attributes. storage/innobase/handler/ha_innodb.cc: Bug30919 Only set *first_value if it is less than autoinc value. This allows a higher value to be hinted when operating as a partitioned table. mysql-test/suite/rpl/r/rpl_innodb_bug30919.result: New BitKeeper file ``mysql-test/suite/rpl/r/rpl_innodb_bug30919.result'' mysql-test/suite/rpl/t/rpl_innodb_bug30919-master.opt: New BitKeeper file ``mysql-test/suite/rpl/t/rpl_innodb_bug30919-master.opt'' mysql-test/suite/rpl/t/rpl_innodb_bug30919.test: New BitKeeper file ``mysql-test/suite/rpl/t/rpl_innodb_bug30919.test''
Diffstat (limited to 'storage/innobase')
-rw-r--r--storage/innobase/handler/ha_innodb.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 793e0f8e070..2129bf61818 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -7328,10 +7328,10 @@ ha_innobase::get_auto_increment(
trx->n_autoinc_rows = 1;
}
- *first_value = autoinc;
+ set_if_bigger(*first_value, autoinc);
/* Not in the middle of a mult-row INSERT. */
} else if (prebuilt->last_value == 0) {
- *first_value = autoinc;
+ set_if_bigger(*first_value, autoinc);
}
*nb_reserved_values = trx->n_autoinc_rows;