mariadb/mysql-test/t/rpl_auto_increment.test
unknown 8646be88a1 Fix for BUG#20524 "auto_increment_* not observed when inserting
a too large value": the bug was that if MySQL generated a value for an
auto_increment column, based on auto_increment_* variables, and this value
was bigger than the column's max possible value, then that max possible
value was inserted (after issuing a warning). But this didn't honour
auto_increment_* variables (and so could cause conflicts in a master-master
replication where one master is supposed to generated only even numbers,
and the other only odd numbers), so now we "round down" this max possible
value to honour auto_increment_* variables, before inserting it.


mysql-test/r/rpl_auto_increment.result:
  result update. Before the fix, the result was that master inserted 127 in t1
  (which didn't honour auto_increment_* variables!),
  instead of failing with "duplicate key 125" like now.
mysql-test/t/rpl_auto_increment.test:
  Test for BUG#20524 "auto_increment_* not observed when inserting
  a too large value".
  We also check the pathological case (table t2) where it's impossible to
  "round down".
  The fixer of BUG#20573 will be able to use table t2 for testing his fix.
sql/handler.cc:
  If handler::update_auto_increment() generates a value larger than the field's
  max possible value, we used to simply insert this max possible value
  (after pushing a warning). Now we "round down" this max possible value to
  honour auto_increment_* variables (if at all possible), before trying the
  insertion.
2006-07-06 14:37:09 +02:00

12 lines
516 B
Text

#####################################
# Wrapper for rpl_auto_increment.test#
#####################################
########################################################
# By JBM 2005-02-15 Wrapped to allow reuse of test code#
# Added to skip if ndb is default #
########################################################
-- source include/not_ndb_default.inc
-- source include/have_innodb.inc
let $engine_type=innodb;
let $engine_type2=myisam;
-- source extra/rpl_tests/rpl_auto_increment.test