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

LP:655186 - disabling innobase_stats_on_metadata disables ANALYZE

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      ha_innobase::analyze(
      /*=================*/
      	THD*		thd,		/*!< in: connection thread handle */
      	HA_CHECK_OPT*	check_opt)	/*!< in: currently ignored */
      {
      	/* Simply call ::info() with all the flags */
      	info(HA_STATUS_TIME | HA_STATUS_CONST | HA_STATUS_VARIABLE);
       
      	return(0);
      }

      versus this code in ::info():

      	if (flag & HA_STATUS_TIME) {
      		if (innobase_stats_on_metadata) {
      			/* In sql_show we call with this flag: update
      			then statistics so that they are up-to-date */
       
      			prebuilt->trx->op_info = "updating table statistics";
       
      			dict_update_statistics(ib_table);
       
      			prebuilt->trx->op_info = "returning various info to MySQL";
      		}

      The solution is pretty simple, in ::info() do something like the following:

      if (! innobase_stats_on_metadata)
          dict_update_statistics(prebuilt->table);

      It does not seem like it was the intention of innobase_stats_on_metadata to also disable ANALYZE

      Attachments

        Activity

          People

            Unassigned Unassigned
            stewart Stewart Smith
            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.