mysql-5.6
mysql-5.6 copied to clipboard
issue-907 : Debug assertion "last_val > 0" when auto_inc_inc > 1 and …
…ullong_max underflow
-
Fixed a minor logic problem in ha_rocksdb::get_auto_increment when the auto_increment_increment is > 1 and we run into the condition where the next auto increment value is ullong_max+1, which is 0. When this occurs, the next call into ha_rocksdb::get_auto_increment will debug assert on 'last_val > 0'.
-
Added an autoincrement overflow test that runs through a 10*10 matrix of auto_increment_increment and auto_increment_offset values that all bump up against the ullong_max overflow. Without the logic fix in place, a vast majority of the combinations within the matrix would hit the debug assertion.
@georgelorchpercona has updated the pull request. Re-import the pull request