MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:tim Date:March 6 2007 5:36pm
Subject:bk commit into 5.1 tree (tsmith:1.2492) BUG#26598
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tsmith. When tsmith does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-03-06 10:36:15-07:00, tsmith@stripped +6 -0
  Bug #26598: Create variable to allow turning off of statistic gathering on metadata commands
  
  Add innodb_stats_on_metadata option, which enables gathering
  index statistics when processing metadata commands such as
  SHOW TABLE STATUS.  Default behavior of the server does not
  change (this option is enabled by default).

  sql/mysqld.cc@stripped, 2007-03-06 10:36:06-07:00, tsmith@stripped +8 -1
    Add innodb_stats_on_metadata option, which enables gathering
    index statistics when processing metadata commands such as
    SHOW TABLE STATUS.  Default behavior of the server does not
    change (this option is enabled by default).

  sql/set_var.cc@stripped, 2007-03-06 10:36:06-07:00, tsmith@stripped +3 -1
    Add innodb_stats_on_metadata option, which enables gathering
    index statistics when processing metadata commands such as
    SHOW TABLE STATUS.  Default behavior of the server does not
    change (this option is enabled by default).

  storage/innobase/handler/ha_innodb.cc@stripped, 2007-03-06 10:36:06-07:00, tsmith@stripped +11 -6
    Add innodb_stats_on_metadata option, which enables gathering
    index statistics when processing metadata commands such as
    SHOW TABLE STATUS.  Default behavior of the server does not
    change (this option is enabled by default).

  storage/innobase/handler/ha_innodb.h@stripped, 2007-03-06 10:36:07-07:00, tsmith@stripped +2 -1
    Add innodb_stats_on_metadata option, which enables gathering
    index statistics when processing metadata commands such as
    SHOW TABLE STATUS.  Default behavior of the server does not
    change (this option is enabled by default).

  storage/innobase/include/srv0srv.h@stripped, 2007-03-06 10:36:07-07:00, tsmith@stripped +2 -0
    Add innodb_stats_on_metadata option, which enables gathering
    index statistics when processing metadata commands such as
    SHOW TABLE STATUS.  Default behavior of the server does not
    change (this option is enabled by default).

  storage/innobase/srv/srv0srv.c@stripped, 2007-03-06 10:36:07-07:00, tsmith@stripped +2 -0
    Add innodb_stats_on_metadata option, which enables gathering
    index statistics when processing metadata commands such as
    SHOW TABLE STATUS.  Default behavior of the server does not
    change (this option is enabled by default).

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	tsmith
# Host:	siva.hindu.god
# Root:	/home/tsmith/m/bk/maint/mar05-51

--- 1.623/sql/mysqld.cc	2007-03-01 06:53:30 -07:00
+++ 1.624/sql/mysqld.cc	2007-03-06 10:36:06 -07:00
@@ -399,6 +399,7 @@
                innobase_use_native_aio,
                innobase_file_per_table, innobase_locks_unsafe_for_binlog,
                innobase_rollback_on_timeout,
+               innobase_stats_on_metadata,
                innobase_create_status_file;
 extern "C" {
 extern ulong srv_max_buf_pool_modified_pct;
@@ -4966,6 +4967,7 @@
   OPT_INNODB_SYNC_SPIN_LOOPS,
   OPT_INNODB_CONCURRENCY_TICKETS,
   OPT_INNODB_THREAD_SLEEP_DELAY,
+  OPT_INNODB_STATS_ON_METADATA,
   OPT_BDB_CACHE_SIZE,
   OPT_BDB_CACHE_PARTS,
   OPT_BDB_LOG_BUFFER_SIZE,
@@ -5311,6 +5313,10 @@
    "Enable SHOW INNODB STATUS output in the innodb_status.<pid> file",
    (gptr*) &innobase_create_status_file, (gptr*) &innobase_create_status_file,
    0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
+  {"innodb_stats_on_metadata", OPT_INNODB_STATS_ON_METADATA,
+   "Enable statistics gathering for metadata commands such as SHOW TABLE STATUS (on by default)",
+   (gptr*) &innobase_stats_on_metadata, (gptr*) &innobase_stats_on_metadata,
+   0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
   {"innodb_support_xa", OPT_INNODB_SUPPORT_XA,
    "Enable InnoDB support for the XA two-phase commit",
    (gptr*) &global_system_variables.innodb_support_xa,
@@ -8348,7 +8354,8 @@
         innobase_use_checksums,
         innobase_file_per_table,
         innobase_locks_unsafe_for_binlog,
-        innobase_rollback_on_timeout;
+        innobase_rollback_on_timeout,
+        innobase_stats_on_metadata;
 
 extern "C" {
 ulong srv_max_buf_pool_modified_pct;

--- 1.63/storage/innobase/include/srv0srv.h	2006-07-28 21:17:30 -06:00
+++ 1.64/storage/innobase/include/srv0srv.h	2007-03-06 10:36:07 -07:00
@@ -124,6 +124,8 @@
 					 transactions). */
 extern ibool	srv_innodb_status;
 
+extern ibool	srv_stats_on_metadata;
+
 extern ibool	srv_use_doublewrite_buf;
 extern ibool	srv_use_checksums;
 

--- 1.103/storage/innobase/srv/srv0srv.c	2006-09-21 01:38:54 -06:00
+++ 1.104/storage/innobase/srv/srv0srv.c	2007-03-06 10:36:07 -07:00
@@ -317,6 +317,8 @@
 /* Generate a innodb_status.<pid> file */
 ibool	srv_innodb_status	= FALSE;
 
+ibool	srv_stats_on_metadata	= TRUE;
+
 ibool	srv_use_doublewrite_buf	= TRUE;
 ibool	srv_use_checksums = TRUE;
 

--- 1.322/storage/innobase/handler/ha_innodb.cc	2007-02-23 04:27:26 -07:00
+++ 1.323/storage/innobase/handler/ha_innodb.cc	2007-03-06 10:36:06 -07:00
@@ -179,6 +179,7 @@
 my_bool innobase_locks_unsafe_for_binlog	= FALSE;
 my_bool innobase_rollback_on_timeout		= FALSE;
 my_bool innobase_create_status_file		= FALSE;
+my_bool innobase_stats_on_metadata		= TRUE;
 
 static char *internal_innobase_data_file_path	= NULL;
 
@@ -1564,6 +1565,8 @@
 	srv_max_n_open_files = (ulint) innobase_open_files;
 	srv_innodb_status = (ibool) innobase_create_status_file;
 
+	srv_stats_on_metadata = (ibool) innobase_stats_on_metadata;
+
 	srv_print_verbose_log = mysqld_embedded ? 0 : 1;
 
 	/* Store the default charset-collation number of this MySQL
@@ -5522,15 +5525,17 @@
 	ib_table = prebuilt->table;
 
 	if (flag & HA_STATUS_TIME) {
-		/* In sql_show we call with this flag: update then statistics
-		so that they are up-to-date */
+		if (srv_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 = (char*)"updating table statistics";
+			prebuilt->trx->op_info = (char*)"updating table statistics";
 
-		dict_update_statistics(ib_table);
+			dict_update_statistics(ib_table);
 
-		prebuilt->trx->op_info = (char*)
-					  "returning various info to MySQL";
+			prebuilt->trx->op_info = (char*)
+						  "returning various info to MySQL";
+		}
 
 		my_snprintf(path, sizeof(path), "%s/%s%s",
 				mysql_data_home, ib_table->name, reg_ext);

--- 1.133/storage/innobase/handler/ha_innodb.h	2007-01-21 20:30:46 -07:00
+++ 1.134/storage/innobase/handler/ha_innodb.h	2007-03-06 10:36:07 -07:00
@@ -224,7 +224,8 @@
 	innobase_use_native_aio,
 	innobase_file_per_table, innobase_locks_unsafe_for_binlog,
 	innobase_rollback_on_timeout,
-	innobase_create_status_file;
+	innobase_create_status_file,
+	innobase_stats_on_metadata;
 extern "C" {
 extern ulong srv_max_buf_pool_modified_pct;
 extern ulong srv_max_purge_lag;

--- 1.218/sql/set_var.cc	2007-03-01 06:41:27 -07:00
+++ 1.219/sql/set_var.cc	2007-03-06 10:36:06 -07:00
@@ -78,7 +78,8 @@
                innobase_use_checksums,
                innobase_file_per_table,
                innobase_locks_unsafe_for_binlog,
-               innobase_rollback_on_timeout;
+               innobase_rollback_on_timeout,
+               innobase_stats_on_metadata;
 
 extern "C" {
 extern ulong srv_max_buf_pool_modified_pct;
@@ -835,6 +836,7 @@
   {"innodb_mirrored_log_groups", (char*) &innobase_mirrored_log_groups, SHOW_LONG},
   {"innodb_open_files", (char*) &innobase_open_files, SHOW_LONG },
   {"innodb_rollback_on_timeout", (char*) &innobase_rollback_on_timeout, SHOW_MY_BOOL},
+  {"innodb_stats_on_metadata", (char*) &innobase_stats_on_metadata, SHOW_MY_BOOL},
   {sys_innodb_support_xa.name, (char*) &sys_innodb_support_xa, SHOW_SYS},
   {sys_innodb_sync_spin_loops.name, (char*) &sys_innodb_sync_spin_loops, SHOW_SYS},
   {sys_innodb_table_locks.name, (char*) &sys_innodb_table_locks, SHOW_SYS},
Thread
bk commit into 5.1 tree (tsmith:1.2492) BUG#26598tim6 Mar