MDEV-24610 Check for partition auto increment overflow
When ha_partition::info() is called with a flag containing HA_STATUS_AUTO, it may iterate partitions and call info() on them with HA_STATUS_AUTO, and update its own auto increment value with the maximum of the partitions. When info() is called on the MEMORY SE, it could cause an overflow when its internal auto increment value is already ULONGLONG_MAX, thereby setting the table stats auto increment value to 0. If such an overflow happens, we return an error in ha_partition::info() indicating so. Note that callsites of ha_partition::update_next_auto_inc_val(), which calls ha_partition::info() with HA_STATUS_AUTO, do not handle any returned error.
Showing
Please register or sign in to comment