Below is the list of changes that have just been committed into a local
5.0-community repository of cmiller. When cmiller 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-04-24 18:11:55-04:00, cmiller@stripped +13 -0
Wrap code specific to the comunity-server in additional CPP #ifdef .
Add a new autoconf paremeter --{en,dis}able-community-features . The
default is disable for enterprise servers.
Though this is a 5.0 tree, it is only to be merged into the 5.0-community
tree and the global 5.1 tree, never to the 5.0-enterprise tree.
configure.in@stripped, 2007-04-24 18:11:51-04:00, cmiller@stripped +29 -4
Add a new configure parameter, --enable-community-features for community
features.
mysql-test/include/profiling.inc@stripped, 2007-04-24 18:11:52-04:00, cmiller@stripped +4 -0
Add testing for whether profiling is enabled or not.
mysql-test/include/profiling.inc@stripped, 2007-04-24 18:11:52-04:00, cmiller@stripped +0 -0
mysql-test/r/profiling.require@stripped, 2007-04-24 18:11:52-04:00, cmiller@stripped +2 -0
Add testing for whether profiling is enabled or not.
mysql-test/r/profiling.require@stripped, 2007-04-24 18:11:52-04:00, cmiller@stripped +0 -0
mysql-test/t/profiling.test@stripped, 2007-04-24 18:11:51-04:00, cmiller@stripped +2 -0
Add testing for whether profiling is enabled or not.
sql/mysqld.cc@stripped, 2007-04-24 18:11:52-04:00, cmiller@stripped +3 -1
Add additional "COMMUNITY_SERVER" cpp definition test.
sql/set_var.cc@stripped, 2007-04-24 18:11:52-04:00, cmiller@stripped +3 -3
Add additional "COMMUNITY_SERVER" cpp definition test.
sql/sql_class.cc@stripped, 2007-04-24 18:11:52-04:00, cmiller@stripped +1 -1
Add additional "COMMUNITY_SERVER" cpp definition test.
sql/sql_class.h@stripped, 2007-04-24 18:11:52-04:00, cmiller@stripped +1 -1
Add additional "COMMUNITY_SERVER" cpp definition test.
sql/sql_parse.cc@stripped, 2007-04-24 18:11:52-04:00, cmiller@stripped +4 -4
Add additional "COMMUNITY_SERVER" cpp definition test.
sql/sql_prepare.cc@stripped, 2007-04-24 18:11:52-04:00, cmiller@stripped +1 -1
Add additional "COMMUNITY_SERVER" cpp definition test.
sql/sql_profile.cc@stripped, 2007-04-24 18:11:52-04:00, cmiller@stripped +2 -2
Add additional "COMMUNITY_SERVER" cpp definition test.
sql/sql_profile.h@stripped, 2007-04-24 18:11:52-04:00, cmiller@stripped +1 -1
Add additional "COMMUNITY_SERVER" cpp definition test.
sql/sql_show.cc@stripped, 2007-04-24 18:11:52-04:00, cmiller@stripped +2 -0
Add "COMMUNITY_SERVER" cpp definition test.
# 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: cmiller
# Host: zippy.cornsilk.net
# Root: /home/cmiller/work/mysql/mysql-5.0-community-formerge51
--- 1.425/configure.in 2007-04-04 07:44:10 -04:00
+++ 1.426/configure.in 2007-04-24 18:11:51 -04:00
@@ -9,6 +9,7 @@ AC_CANONICAL_SYSTEM
# remember to also change ndb version below and update version.c in ndb
AM_INIT_AUTOMAKE(mysql, 5.0.39)
AM_CONFIG_HEADER(config.h)
+is_this_community_tree=yes
PROTOCOL_VERSION=10
DOT_FRM_VERSION=6
@@ -612,6 +613,23 @@ then
fi
fi
+AC_MSG_CHECKING(whether features provided by the user community should be included.)
+AC_ARG_ENABLE(community-features,
+ AC_HELP_STRING(
+ [--enable-community-features],
+ [Enable additional features provided by the user community.]),
+ [ ENABLE_COMMUNITY_FEATURES=$enableval ],
+ [ ENABLE_COMMUNITY_FEATURES=$is_this_community_tree ]
+ )
+
+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, community server])
+else
+ AC_MSG_RESULT([no, enterprise server])
+fi
AC_ARG_WITH(server-suffix,
[ --with-server-suffix Append value to the version string.],
@@ -676,16 +694,23 @@ else
fi
# Add query profiler
+AC_MSG_CHECKING(if SHOW PROFILE should be enabled.)
AC_ARG_ENABLE(profiling,
AS_HELP_STRING([--disable-profiling], [Build a version without query profiling code]),
[ ENABLED_PROFILING=$enableval ],
- [ ENABLED_PROFILING=yes ])
+ [ ENABLED_PROFILING=$is_this_community_tree ])
if test "$ENABLED_PROFILING" = "yes"
then
- AC_DEFINE([ENABLED_PROFILING], [1],
- [If SHOW PROFILE should be enabled])
- AC_MSG_RESULT([yes])
+ 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
else
AC_MSG_RESULT([no])
fi
--- 1.599/sql/mysqld.cc 2007-04-03 09:20:18 -04:00
+++ 1.600/sql/mysqld.cc 2007-04-24 18:11:52 -04:00
@@ -5346,7 +5346,7 @@ Disable with --skip-ndbcluster (will sav
"Maximum time in seconds to wait for the port to become free. "
"(Default: no wait)", (gptr*) &mysqld_port_timeout,
(gptr*) &mysqld_port_timeout, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-#ifdef ENABLED_PROFILING
+#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
{"profiling_history_size", OPT_PROFILING, "Limit of query profiling memory",
(gptr*) &global_system_variables.profiling_history_size,
(gptr*) &max_system_variables.profiling_history_size,
@@ -7685,7 +7685,9 @@ 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);
/*
--- 1.260/sql/sql_class.cc 2007-04-03 09:05:20 -04:00
+++ 1.261/sql/sql_class.cc 2007-04-24 18:11:52 -04:00
@@ -253,7 +253,7 @@ THD::THD()
init();
/* Initialize sub structures */
init_sql_alloc(&warn_root, WARN_ALLOC_BLOCK_SIZE, WARN_ALLOC_PREALLOC_SIZE);
-#ifdef ENABLED_PROFILING
+#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
profiling.set_thd(this);
#endif
user_connect=(USER_CONN *)0;
--- 1.318/sql/sql_class.h 2007-04-03 09:05:20 -04:00
+++ 1.319/sql/sql_class.h 2007-04-24 18:11:52 -04:00
@@ -1360,7 +1360,7 @@ public:
List <MYSQL_ERROR> warn_list;
uint warn_count[(uint) MYSQL_ERROR::WARN_LEVEL_END];
uint total_warn_count;
-#ifdef ENABLED_PROFILING
+#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
PROFILING profiling;
#endif
--- 1.598/sql/sql_parse.cc 2007-04-03 09:20:19 -04:00
+++ 1.599/sql/sql_parse.cc 2007-04-24 18:11:52 -04:00
@@ -2746,7 +2746,7 @@ mysql_execute_command(THD *thd)
}
case SQLCOM_SHOW_PROFILES:
{
-#ifdef ENABLED_PROFILING
+#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
thd->profiling.store();
thd->profiling.discard();
res= thd->profiling.show_profiles();
@@ -2760,7 +2760,7 @@ mysql_execute_command(THD *thd)
}
case SQLCOM_SHOW_PROFILE:
{
-#ifdef ENABLED_PROFILING
+#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
thd->profiling.store();
thd->profiling.discard(); // will get re-enabled by reset()
if (lex->profile_query_id != 0)
@@ -5730,7 +5730,7 @@ mysql_init_query(THD *thd, uchar *buf, u
DBUG_ENTER("mysql_init_query");
lex_start(thd, buf, length);
mysql_reset_thd_for_next_command(thd);
-#ifdef ENABLED_PROFILING
+#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
thd->profiling.reset();
#endif
DBUG_VOID_RETURN;
@@ -5774,7 +5774,7 @@ void mysql_reset_thd_for_next_command(TH
thd->total_warn_count=0; // Warnings for this query
thd->rand_used= 0;
thd->sent_row_count= thd->examined_row_count= 0;
-#ifdef ENABLED_PROFILING
+#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
thd->profiling.reset();
#endif
}
--- 1.343/sql/sql_show.cc 2007-04-03 19:47:17 -04:00
+++ 1.344/sql/sql_show.cc 2007-04-24 18:11:52 -04:00
@@ -1496,10 +1496,12 @@ static bool show_status_array(THD *thd,
nr= (long) (thd->query_start() - server_start_time);
end= int10_to_str(nr, buff, 10);
break;
+#ifdef COMMUNITY_SERVER
case SHOW_FLUSHTIME:
nr= (long) (thd->query_start() - flush_status_time);
end= int10_to_str(nr, buff, 10);
break;
+#endif
case SHOW_QUESTION:
end= int10_to_str((long) thd->query_id, buff, 10);
break;
--- New file ---
+++ mysql-test/include/profiling.inc 07/04/24 18:11:52
-- require r/profiling.require
disable_query_log;
show variables like "profiling";
enable_query_log;
--- New file ---
+++ mysql-test/r/profiling.require 07/04/24 18:11:52
Variable_name Value
profiling OFF
--- 1.2/mysql-test/t/profiling.test 2007-04-03 14:04:58 -04:00
+++ 1.3/mysql-test/t/profiling.test 2007-04-24 18:11:51 -04:00
@@ -1,3 +1,5 @@
+--source include/profiling.inc
+
# default is OFF
show session variables like 'profil%';
select @@profiling;
--- 1.9/sql/sql_profile.cc 2007-04-06 09:15:16 -04:00
+++ 1.10/sql/sql_profile.cc 2007-04-24 18:11:52 -04:00
@@ -31,7 +31,7 @@ const char * const _unknown_func_ = "<un
int fill_query_profile_statistics_info(THD *thd, struct st_table_list *tables,
Item *cond)
{
-#ifdef ENABLED_PROFILING
+#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
return(thd->profiling.fill_statistics_info(thd, tables, cond));
#else
return(1);
@@ -62,7 +62,7 @@ ST_FIELD_INFO query_profile_statistics_i
{NULL, 0, MYSQL_TYPE_STRING, 0, true, NULL}
};
-#ifdef ENABLED_PROFILING
+#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
#define RUSAGE_USEC(tv) ((tv).tv_sec*1000*1000 + (tv).tv_usec)
#define RUSAGE_DIFF_USEC(tv1, tv2) (RUSAGE_USEC((tv1))-RUSAGE_USEC((tv2)))
--- 1.5/sql/sql_profile.h 2007-04-06 09:15:16 -04:00
+++ 1.6/sql/sql_profile.h 2007-04-24 18:11:52 -04:00
@@ -53,7 +53,7 @@ int fill_query_profile_statistics_info(T
#define PROFILE_ALL (~0)
-#ifndef ENABLED_PROFILING
+#if !defined(ENABLED_PROFILING) || !defined(COMMUNITY_SERVER)
# define thd_proc_info(thd, msg) do { (thd)->proc_info= (msg); } while (0)
--- 1.182/sql/set_var.cc 2007-04-03 09:05:20 -04:00
+++ 1.183/sql/set_var.cc 2007-04-24 18:11:52 -04:00
@@ -544,7 +544,7 @@ static sys_var_thd_bit sys_unique_checks
set_option_bit,
OPTION_RELAXED_UNIQUE_CHECKS,
1);
-#ifdef ENABLED_PROFILING
+#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
static sys_var_thd_bit sys_profiling("profiling", NULL, set_option_bit,
ulonglong(OPTION_PROFILING));
static sys_var_thd_ulong sys_profiling_history_size("profiling_history_size",
@@ -706,7 +706,7 @@ sys_var *sys_variables[]=
&sys_optimizer_prune_level,
&sys_optimizer_search_depth,
&sys_preload_buff_size,
-#ifdef ENABLED_PROFILING
+#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
&sys_profiling,
&sys_profiling_history_size,
#endif
@@ -1021,7 +1021,7 @@ struct show_var_st init_vars[]= {
{"pid_file", (char*) pidfile_name, SHOW_CHAR},
{"port", (char*) &mysqld_port, SHOW_INT},
{sys_preload_buff_size.name, (char*) &sys_preload_buff_size, SHOW_SYS},
-#ifdef ENABLED_PROFILING
+#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
{sys_profiling.name, (char*) &sys_profiling, SHOW_SYS},
{sys_profiling_history_size.name, (char*) &sys_profiling_history_size, SHOW_SYS},
#endif
--- 1.197/sql/sql_prepare.cc 2007-04-03 09:05:21 -04:00
+++ 1.198/sql/sql_prepare.cc 2007-04-24 18:11:52 -04:00
@@ -2231,7 +2231,7 @@ void mysql_stmt_execute(THD *thd, char *
if (!(stmt= find_prepared_statement(thd, stmt_id, "mysql_stmt_execute")))
DBUG_VOID_RETURN;
-#ifdef ENABLED_PROFILING
+#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
thd->profiling.set_query_source(stmt->query, stmt->query_length);
#endif
DBUG_PRINT("exec_query", ("%s", stmt->query));
| Thread |
|---|
| • bk commit into 5.0-community tree (cmiller:1.2510) | Chad MILLER | 25 Apr |