List:Commits« Previous MessageNext Message »
From:Jon Olav Hauglid Date:October 9 2009 1:59pm
Subject:bzr commit into mysql-5.4.5-next-mr-bugfixing branch (jon.hauglid:2897)
Bug#44651
View as plain text  
#At file:///export/home/z/mysql-next-mr-runtime/ based on revid:staale.smedseng@stripped

 2897 Jon Olav Hauglid	2009-10-09
      Bug #44651 "have_community_features" variable should be renamed 
                 "have_profiling"
      
      1) Renamed have_community_features server system variable to
      have_profiling.
      2) Removed eable-community-features configure option and
      ENABLE_COMMUNITY_FEATURES macro.
      3) Removed COMMUNITY_SERVER macro and replaced its usage by 
      ENABLED_PROFILING.
      
      Only --enable-profiling is now needed to enable profiling.
      It was the only existing "community feature", so there was
      no need for both configure options.
      
      Using --enable-community-features will give a warning message
      since it no longer exists.

    renamed:
      mysql-test/include/have_community_features.inc => mysql-test/include/have_profiling.inc
      mysql-test/r/have_community_features.require => mysql-test/r/have_profiling.require
    modified:
      configure.in
      include/config-win.h
      libmysqld/lib_sql.cc
      mysql-test/t/profiling.test
      mysql-test/t/variables+c.test
      sql/mysql_priv.h
      sql/mysqld.cc
      sql/set_var.cc
      sql/sp_head.cc
      sql/sql_class.cc
      sql/sql_class.h
      sql/sql_parse.cc
      sql/sql_prepare.cc
      sql/sql_profile.cc
      sql/sql_profile.h
      mysql-test/include/have_profiling.inc
      mysql-test/r/have_profiling.require
=== modified file 'configure.in'
--- a/configure.in	2009-10-09 09:23:23 +0000
+++ b/configure.in	2009-10-09 13:59:25 +0000
@@ -617,24 +617,6 @@ then
   fi
 fi
 
-AC_MSG_CHECKING(whether features provided by the user community should be included.)
-AC_ARG_ENABLE(community-features,
-    AC_HELP_STRING(
-        [--disable-community-features], 
-        [Disable additional features provided by the user community.]),
-    [ ENABLE_COMMUNITY_FEATURES=$enableval ],
-    [ ENABLE_COMMUNITY_FEATURES=yes ]
-    )
-
-if test "$ENABLE_COMMUNITY_FEATURES" = "yes"
-then
-  AC_DEFINE([COMMUNITY_SERVER], [1],
-            [Whether features provided by the user community should be included])
-  AC_MSG_RESULT([yes])
-else
-  AC_MSG_RESULT([no])
-fi
-
 AC_ARG_WITH(server-suffix,
     [  --with-server-suffix    Append value to the version string.],
     [ MYSQL_SERVER_SUFFIX=`echo "$withval" | sed -e  's/^\(...................................\)..*$/\1/'` ],
@@ -700,21 +682,14 @@ fi
 # Add query profiler
 AC_MSG_CHECKING(if SHOW PROFILE should be enabled.)
 AC_ARG_ENABLE(profiling,
-    AS_HELP_STRING([--enable-profiling], [Build a version with query profiling code (req. community-features)]),
+    AS_HELP_STRING([--enable-profiling], [Enable profiling of query lifetime.]),
     [ ENABLED_PROFILING=$enableval ],
-    [ ENABLED_PROFILING=$ENABLE_COMMUNITY_FEATURES ])
+    [ ENABLED_PROFILING=no ])
 
+AC_DEFINE([ENABLED_PROFILING], [1], [If SHOW PROFILE should be enabled])
 if test "$ENABLED_PROFILING" = "yes"
 then
-  if test "$ENABLE_COMMUNITY_FEATURES" = "yes";
-  then
-    AC_DEFINE([ENABLED_PROFILING], [1],
-              [If SHOW PROFILE should be enabled])
-    AC_MSG_RESULT([yes]) 
-  else
-    ENABLED_PROFILING="no"
-    AC_MSG_RESULT([no, overridden by community-features disabled])
-  fi
+  AC_MSG_RESULT([yes]) 
 else
   AC_MSG_RESULT([no])
 fi

=== modified file 'include/config-win.h'
--- a/include/config-win.h	2009-09-30 20:10:22 +0000
+++ b/include/config-win.h	2009-10-09 13:59:25 +0000
@@ -353,7 +353,6 @@ inline ulonglong double2ulonglong(double
 #define HAVE_OPENSSL 1
 #define HAVE_YASSL 1
 
-#define COMMUNITY_SERVER 1
 #define ENABLED_PROFILING 1
 
 /*

=== modified file 'libmysqld/lib_sql.cc'
--- a/libmysqld/lib_sql.cc	2009-10-08 07:42:38 +0000
+++ b/libmysqld/lib_sql.cc	2009-10-09 13:59:25 +0000
@@ -98,7 +98,7 @@ emb_advanced_command(MYSQL *mysql, enum 
     thd= (THD *) mysql->thd;
   }
 
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
   thd->profiling.start_new_query();
 #endif
 
@@ -142,7 +142,7 @@ emb_advanced_command(MYSQL *mysql, enum 
   if (!skip_check)
     result= thd->is_error() ? -1 : 0;
 
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
   thd->profiling.finish_current_query();
 #endif
   return result;

=== renamed file 'mysql-test/include/have_community_features.inc' => 'mysql-test/include/have_profiling.inc'
--- a/mysql-test/include/have_community_features.inc	2008-07-04 18:48:25 +0000
+++ b/mysql-test/include/have_profiling.inc	2009-10-09 13:59:25 +0000
@@ -1,4 +1,4 @@
---require r/have_community_features.require
+--require r/have_profiling.require
 --disable_query_log
-show variables like 'have_community_features';
+show variables like 'have_profiling';
 --enable_query_log

=== renamed file 'mysql-test/r/have_community_features.require' => 'mysql-test/r/have_profiling.require'
--- a/mysql-test/r/have_community_features.require	2007-05-02 18:13:33 +0000
+++ b/mysql-test/r/have_profiling.require	2009-10-09 13:59:25 +0000
@@ -1,2 +1,2 @@
 Variable_name	Value
-have_community_features	YES
+have_profiling  YES

=== modified file 'mysql-test/t/profiling.test'
--- a/mysql-test/t/profiling.test	2009-05-15 12:57:51 +0000
+++ b/mysql-test/t/profiling.test	2009-10-09 13:59:25 +0000
@@ -1,4 +1,4 @@
---source include/have_community_features.inc
+--source include/have_profiling.inc
 
 # Verify that the protocol isn't violated if we ask for profiling info
 # before profiling has recorded anything.

=== modified file 'mysql-test/t/variables+c.test'
--- a/mysql-test/t/variables+c.test	2007-05-02 18:13:33 +0000
+++ b/mysql-test/t/variables+c.test	2009-10-09 13:59:25 +0000
@@ -1,4 +1,4 @@
---source include/have_community_features.inc
+--source include/have_profiling.inc
 
 #
 # Bug#24822: Patch: uptime_since_flush_status

=== modified file 'sql/mysql_priv.h'
--- a/sql/mysql_priv.h	2009-09-17 09:20:11 +0000
+++ b/sql/mysql_priv.h	2009-10-09 13:59:25 +0000
@@ -2082,7 +2082,7 @@ extern uint sql_command_flags[];
 extern TYPELIB log_output_typelib;
 
 /* optional things, have_* variables */
-extern SHOW_COMP_OPTION have_community_features;
+extern SHOW_COMP_OPTION have_profiling;
 
 extern handlerton *partition_hton;
 extern handlerton *myisam_hton;

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2009-10-09 09:06:41 +0000
+++ b/sql/mysqld.cc	2009-10-09 13:59:25 +0000
@@ -635,7 +635,7 @@ MY_LOCALE *my_default_lc_time_names;
 SHOW_COMP_OPTION have_ssl, have_symlink, have_dlopen, have_query_cache;
 SHOW_COMP_OPTION have_geometry, have_rtree_keys;
 SHOW_COMP_OPTION have_crypt, have_compress;
-SHOW_COMP_OPTION have_community_features;
+SHOW_COMP_OPTION have_profiling;
 
 /* Thread specific variables */
 
@@ -6230,7 +6230,7 @@ master-ssl",
    "Maximum time in seconds to wait for the port to become free. "
    "(Default: no wait)", (uchar**) &mysqld_port_timeout,
    (uchar**) &mysqld_port_timeout, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
   {"profiling_history_size", OPT_PROFILING, "Limit of query profiling memory",
    (uchar**) &global_system_variables.profiling_history_size,
    (uchar**) &max_system_variables.profiling_history_size,
@@ -7028,7 +7028,7 @@ static int show_starttime(THD *thd, SHOW
   return 0;
 }
 
-#ifdef COMMUNITY_SERVER
+#ifdef ENABLED_PROFILING
 static int show_flushstatustime(THD *thd, SHOW_VAR *var, char *buff)
 {
   var->type= SHOW_LONG;
@@ -7486,7 +7486,7 @@ SHOW_VAR status_vars[]= {
   {"Threads_created",	       (char*) &thread_created,		SHOW_LONG_NOFLUSH},
   {"Threads_running",          (char*) &thread_running,         SHOW_INT},
   {"Uptime",                   (char*) &show_starttime,         SHOW_FUNC},
-#ifdef COMMUNITY_SERVER
+#ifdef ENABLED_PROFILING
   {"Uptime_since_flush_status",(char*) &show_flushstatustime,   SHOW_FUNC},
 #endif
   {NullS, NullS, SHOW_LONG}
@@ -7719,10 +7719,10 @@ static int mysql_init_variables(void)
 			     "d:t:i:o,/tmp/mysqld.trace");
 #endif
   opt_error_log= IF_WIN(1,0);
-#ifdef COMMUNITY_SERVER
-    have_community_features = SHOW_OPTION_YES;
+#ifdef ENABLED_PROFILING
+    have_profiling = SHOW_OPTION_YES;
 #else
-    have_community_features = SHOW_OPTION_NO;
+    have_profiling = SHOW_OPTION_NO;
 #endif
   global_system_variables.ndb_index_stat_enable=FALSE;
   max_system_variables.ndb_index_stat_enable=TRUE;
@@ -8826,9 +8826,7 @@ void refresh_status(THD *thd)
 
   /* Reset the counters of all key caches (default and named). */
   process_key_caches(reset_key_cache_counters);
-#ifdef COMMUNITY_SERVER
   flush_status_time= time((time_t*) 0);
-#endif
   pthread_mutex_unlock(&LOCK_status);
 
   /*

=== modified file 'sql/set_var.cc'
--- a/sql/set_var.cc	2009-10-09 09:50:49 +0000
+++ b/sql/set_var.cc	2009-10-09 13:59:25 +0000
@@ -762,7 +762,7 @@ static sys_var_thd_bit	sys_unique_checks
 					  OPTION_RELAXED_UNIQUE_CHECKS,
                                           1,
                                           sys_var::SESSION_VARIABLE_IN_BINLOG);
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
 static sys_var_thd_bit  sys_profiling(&vars, "profiling", NULL, 
                                       set_option_bit,
                                       ulonglong(OPTION_PROFILING));
@@ -864,9 +864,9 @@ static sys_var_have_plugin sys_have_ndbc
 static sys_var_have_variable sys_have_openssl(&vars, "have_openssl", &have_ssl);
 static sys_var_have_variable sys_have_ssl(&vars, "have_ssl", &have_ssl);
 static sys_var_have_plugin sys_have_partition_db(&vars, "have_partitioning", C_STRING_WITH_LEN("partition"), MYSQL_STORAGE_ENGINE_PLUGIN);
+static sys_var_have_variable sys_have_profiling(&vars, "have_profiling", &have_profiling);
 static sys_var_have_variable sys_have_query_cache(&vars, "have_query_cache",
                                            &have_query_cache);
-static sys_var_have_variable sys_have_community_features(&vars, "have_community_features", &have_community_features);
 static sys_var_have_variable sys_have_rtree_keys(&vars, "have_rtree_keys", &have_rtree_keys);
 static sys_var_have_variable sys_have_symlink(&vars, "have_symlink", &have_symlink);
 /* Global read-only variable describing server license */

=== modified file 'sql/sp_head.cc'
--- a/sql/sp_head.cc	2009-09-10 09:18:29 +0000
+++ b/sql/sp_head.cc	2009-10-09 13:59:25 +0000
@@ -1207,7 +1207,7 @@ sp_head::execute(THD *thd)
   */
   thd->spcont->callers_arena= &backup_arena;
 
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
   /* Discard the initial part of executing routines. */
   thd->profiling.discard_current_query();
 #endif
@@ -1216,7 +1216,7 @@ sp_head::execute(THD *thd)
     sp_instr *i;
     uint hip;			// Handler ip
 
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
     /* 
      Treat each "instr" of a routine as discrete unit that could be profiled.
      Profiling only records information for segments of code that set the
@@ -1229,7 +1229,7 @@ sp_head::execute(THD *thd)
     i = get_instr(ip);	// Returns NULL when we're done.
     if (i == NULL)
     {
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
       thd->profiling.discard_current_query();
 #endif
       break;
@@ -1312,7 +1312,7 @@ sp_head::execute(THD *thd)
     }
   } while (!err_status && !thd->killed && !thd->is_fatal_error);
 
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
   thd->profiling.finish_current_query();
   thd->profiling.start_new_query("tail end of routine");
 #endif
@@ -2844,7 +2844,7 @@ sp_instr_stmt::execute(THD *thd, uint *n
 
   query= thd->query;
   query_length= thd->query_length;
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
   /* This s-p instr is profilable and will be captured. */
   thd->profiling.set_query_source(m_query.str, m_query.length);
 #endif

=== modified file 'sql/sql_class.cc'
--- a/sql/sql_class.cc	2009-09-17 09:20:11 +0000
+++ b/sql/sql_class.cc	2009-10-09 13:59:25 +0000
@@ -257,7 +257,7 @@ const char *set_thd_proc_info(THD *thd, 
   const char *old_info= thd->proc_info;
   DBUG_PRINT("proc_info", ("%s:%d  %s", calling_file, calling_line, 
                            (info != NULL) ? info : "(null)"));
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
   thd->profiling.status_change(info, calling_function, calling_file, calling_line);
 #endif
   thd->proc_info= info;
@@ -522,7 +522,7 @@ THD::THD()
   *scramble= '\0';
 
   init();
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
   profiling.set_thd(this);
 #endif
   user_connect=(USER_CONN *)0;

=== modified file 'sql/sql_class.h'
--- a/sql/sql_class.h	2009-09-28 07:21:25 +0000
+++ b/sql/sql_class.h	2009-10-09 13:59:25 +0000
@@ -1644,7 +1644,7 @@ public:
   CHARSET_INFO *db_charset;
   Warning_info *warning_info;
   Diagnostics_area *stmt_da;
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
   PROFILING  profiling;
 #endif
 

=== modified file 'sql/sql_parse.cc'
--- a/sql/sql_parse.cc	2009-09-17 09:20:11 +0000
+++ b/sql/sql_parse.cc	2009-10-09 13:59:25 +0000
@@ -375,7 +375,7 @@ void execute_init_command(THD *thd, sys_
   Vio* save_vio;
   ulong save_client_capabilities;
 
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
   thd->profiling.start_new_query();
   thd->profiling.set_query_source(init_command_var->value,
                                   init_command_var->value_length);
@@ -403,7 +403,7 @@ void execute_init_command(THD *thd, sys_
   thd->client_capabilities= save_client_capabilities;
   thd->net.vio= save_vio;
 
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
   thd->profiling.finish_current_query();
 #endif
 }
@@ -479,7 +479,7 @@ static void handle_bootstrap_impl(THD *t
                                       QUERY_CACHE_FLAGS_SIZE);
     thd->set_query(query, length);
     DBUG_PRINT("query",("%-.4096s",thd->query));
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
     thd->profiling.start_new_query();
     thd->profiling.set_query_source(thd->query, length);
 #endif
@@ -496,7 +496,7 @@ static void handle_bootstrap_impl(THD *t
     bootstrap_error= thd->is_error();
     net_end_statement(thd);
 
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
     thd->profiling.finish_current_query();
 #endif
 
@@ -806,7 +806,7 @@ bool do_command(THD *thd)
   net_new_transaction(net);
 
   packet_length= my_net_read(net);
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
   thd->profiling.start_new_query();
 #endif
   if (packet_length == packet_error)
@@ -866,7 +866,7 @@ bool do_command(THD *thd)
   return_value= dispatch_command(command, thd, packet+1, (uint) (packet_length-1));
 
 out:
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
   thd->profiling.finish_current_query();
 #endif
   DBUG_RETURN(return_value);
@@ -1223,7 +1223,7 @@ bool dispatch_command(enum enum_server_c
 
     general_log_write(thd, command, thd->query, thd->query_length);
     DBUG_PRINT("query",("%-.4096s",thd->query));
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
     thd->profiling.set_query_source(thd->query, thd->query_length);
 #endif
 
@@ -1258,7 +1258,7 @@ bool dispatch_command(enum enum_server_c
         MYSQL_QUERY_DONE(thd->is_error());
       }
 
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
       thd->profiling.finish_current_query();
       thd->profiling.start_new_query("continuing");
       thd->profiling.set_query_source(beginning_of_next_stmt, length);
@@ -1778,7 +1778,7 @@ int prepare_schema_table(THD *thd, LEX *
       Mark this current profiling record to be discarded.  We don't
       wish to have SHOW commands show up in profiling.
     */
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
     thd->profiling.discard_current_query();
 #endif
     break;
@@ -2333,7 +2333,7 @@ mysql_execute_command(THD *thd)
   }
   case SQLCOM_SHOW_PROFILES:
   {
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
     thd->profiling.discard_current_query();
     res= thd->profiling.show_profiles();
     if (res)

=== modified file 'sql/sql_prepare.cc'
--- a/sql/sql_prepare.cc	2009-09-17 09:20:11 +0000
+++ b/sql/sql_prepare.cc	2009-10-09 13:59:25 +0000
@@ -2459,7 +2459,7 @@ void mysqld_stmt_execute(THD *thd, char 
     DBUG_VOID_RETURN;
   }
 
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
   thd->profiling.set_query_source(stmt->query, stmt->query_length);
 #endif
   DBUG_PRINT("exec_query", ("%s", stmt->query));

=== modified file 'sql/sql_profile.cc'
--- a/sql/sql_profile.cc	2009-07-16 12:43:17 +0000
+++ b/sql/sql_profile.cc	2009-10-09 13:59:25 +0000
@@ -47,7 +47,7 @@ const char * const _unknown_func_ = "<un
 int fill_query_profile_statistics_info(THD *thd, TABLE_LIST *tables,
                                        Item *cond)
 {
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
   return(thd->profiling.fill_statistics_info(thd, tables, cond));
 #else
   my_error(ER_FEATURE_DISABLED, MYF(0), "SHOW PROFILE", "enable-profiling");
@@ -129,7 +129,7 @@ int make_profile_table_for_show(THD *thd
 }
 
 
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
 
 #define RUSAGE_USEC(tv)  ((tv).tv_sec*1000*1000 + (tv).tv_usec)
 #define RUSAGE_DIFF_USEC(tv1, tv2) (RUSAGE_USEC((tv1))-RUSAGE_USEC((tv2)))

=== modified file 'sql/sql_profile.h'
--- a/sql/sql_profile.h	2009-06-10 08:59:49 +0000
+++ b/sql/sql_profile.h	2009-10-09 13:59:25 +0000
@@ -41,7 +41,7 @@ int make_profile_table_for_show(THD *thd
 #define PROFILE_ALL          (uint)(~0)
 
 
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
 #include "mysql_priv.h"
 
 #ifdef HAVE_SYS_RESOURCE_H


Attachment: [text/bzr-bundle] bzr/jon.hauglid@sun.com-20091009135925-xq1sv01mrqza5n0z.bundle
Thread
bzr commit into mysql-5.4.5-next-mr-bugfixing branch (jon.hauglid:2897)Bug#44651Jon Olav Hauglid9 Oct