Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-28004

ha_innobase::reset_auto_increment() is never executed

    XMLWordPrintable

Details

    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().

      Attachments

        Activity

          People

            marko Marko Mäkelä
            marko Marko Mäkelä
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.