Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL)
-
None
Description
The virtual member function handler::reset_auto_increment(ulonglong) is only ever invoked by the default implementation of handler::truncate():
virtual int truncate() |
{
|
int error= delete_all_rows(); |
return error ? error : reset_auto_increment(0); |
}
|
All derived implementations of handler::reset_auto_increment() as well as the wrapper handler::ha_reset_auto_increment() only seem to serve this use case.
The functions ha_innobase::innobase_reset_autoinc() and ha_innobase::reset_auto_increment() are actually unreachable, because ha_innobase::truncate() never invokes handler::truncate().
Also, ha_innobase::delete_all_rows() unnecessarily overrides handler::delete_all_rows().