mysql-5.6 icon indicating copy to clipboard operation
mysql-5.6 copied to clipboard

issue-907 : Debug assertion "last_val > 0" when auto_inc_inc > 1 and …

Open george-lorch opened this issue 6 years ago • 1 comments

…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.

george-lorch avatar Nov 27 '18 22:11 george-lorch

@georgelorchpercona has updated the pull request. Re-import the pull request

facebook-github-bot avatar Nov 29 '18 00:11 facebook-github-bot