Below is the list of changes that have just been committed into a local
6.0 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-12-20 11:05:32-05:00, cmiller@stripped +11 -0
Community 5.0/5.1 features merged to 6.0 as native features.
--enable-community-features is no longer a prerequisite for presence
of these features.
configure.in@stripped, 2007-12-20 11:05:28-05:00, cmiller@stripped +4 -10
Community 5.0/5.1 features merged to 6.0 as native features.
libmysqld/lib_sql.cc@stripped, 2007-12-20 11:05:28-05:00, cmiller@stripped +2 -2
Community 5.0/5.1 features merged to 6.0 as native features.
sql/mysqld.cc@stripped, 2007-12-20 11:05:28-05:00, cmiller@stripped +1 -9
Community 5.0/5.1 features merged to 6.0 as native features.
sql/set_var.cc@stripped, 2007-12-20 11:05:28-05:00, cmiller@stripped +1 -1
Community 5.0/5.1 features merged to 6.0 as native features.
sql/sp_head.cc@stripped, 2007-12-20 11:05:28-05:00, cmiller@stripped +5 -5
Community 5.0/5.1 features merged to 6.0 as native features.
sql/sql_class.cc@stripped, 2007-12-20 11:05:28-05:00, cmiller@stripped +2 -2
Community 5.0/5.1 features merged to 6.0 as native features.
sql/sql_class.h@stripped, 2007-12-20 11:05:28-05:00, cmiller@stripped +1 -1
Community 5.0/5.1 features merged to 6.0 as native features.
sql/sql_parse.cc@stripped, 2007-12-20 11:05:28-05:00, cmiller@stripped +7 -7
Community 5.0/5.1 features merged to 6.0 as native features.
sql/sql_prepare.cc@stripped, 2007-12-20 11:05:29-05:00, cmiller@stripped +1 -1
Community 5.0/5.1 features merged to 6.0 as native features.
sql/sql_profile.cc@stripped, 2007-12-20 11:05:29-05:00, cmiller@stripped +2 -2
Community 5.0/5.1 features merged to 6.0 as native features.
sql/sql_profile.h@stripped, 2007-12-20 11:05:29-05:00, cmiller@stripped +1 -1
Community 5.0/5.1 features merged to 6.0 as native features.
diff -Nrup a/configure.in b/configure.in
--- a/configure.in 2007-12-19 08:34:58 -05:00
+++ b/configure.in 2007-12-20 11:05:28 -05:00
@@ -715,19 +715,13 @@ AC_MSG_CHECKING(if SHOW PROFILE should b
AC_ARG_ENABLE(profiling,
AS_HELP_STRING([--enable-profiling], [Build a version with query profiling code (req. community-features)]),
[ ENABLED_PROFILING=$enableval ],
- [ ENABLED_PROFILING=$ENABLE_COMMUNITY_FEATURES ])
+ [ ENABLED_PROFILING=no ])
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_DEFINE([ENABLED_PROFILING], [1],
+ [If SHOW PROFILE should be enabled])
+ AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
diff -Nrup a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
--- a/libmysqld/lib_sql.cc 2007-12-19 08:34:58 -05:00
+++ b/libmysqld/lib_sql.cc 2007-12-20 11:05:28 -05:00
@@ -78,7 +78,7 @@ emb_advanced_command(MYSQL *mysql, enum
THD *thd=(THD *) mysql->thd;
NET *net= &mysql->net;
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
thd->profiling.start_new_query();
#endif
@@ -122,7 +122,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;
diff -Nrup a/sql/mysqld.cc b/sql/mysqld.cc
--- a/sql/mysqld.cc 2007-12-19 08:35:01 -05:00
+++ b/sql/mysqld.cc 2007-12-20 11:05:28 -05:00
@@ -5706,7 +5706,7 @@ thread is in the master's binlogs.",
"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,
@@ -6484,7 +6484,6 @@ static int show_starttime(THD *thd, SHOW
return 0;
}
-#ifdef COMMUNITY_SERVER
static int show_flushstatustime(THD *thd, SHOW_VAR *var, char *buff)
{
var->type= SHOW_LONG;
@@ -6492,7 +6491,6 @@ static int show_flushstatustime(THD *thd
*((long *)buff)= (long) (thd->query_start() - flush_status_time);
return 0;
}
-#endif
#ifdef HAVE_REPLICATION
static int show_rpl_status(THD *thd, SHOW_VAR *var, char *buff)
@@ -7046,9 +7044,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
{"Uptime_since_flush_status",(char*) &show_flushstatustime, SHOW_FUNC},
-#endif
{NullS, NullS, SHOW_LONG}
};
@@ -7252,9 +7248,7 @@ static void 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;
-#else
have_community_features = SHOW_OPTION_NO;
global_system_variables.ndb_index_stat_enable=FALSE;
max_system_variables.ndb_index_stat_enable=TRUE;
@@ -8263,9 +8257,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);
/*
diff -Nrup a/sql/set_var.cc b/sql/set_var.cc
--- a/sql/set_var.cc 2007-12-19 08:35:02 -05:00
+++ b/sql/set_var.cc 2007-12-20 11:05:28 -05:00
@@ -602,7 +602,7 @@ static sys_var_thd_bit sys_unique_checks
set_option_bit,
OPTION_RELAXED_UNIQUE_CHECKS,
1);
-#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));
diff -Nrup a/sql/sp_head.cc b/sql/sp_head.cc
--- a/sql/sp_head.cc 2007-12-19 08:35:02 -05:00
+++ b/sql/sp_head.cc 2007-12-20 11:05:28 -05:00
@@ -1161,7 +1161,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
@@ -1170,7 +1170,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
@@ -1183,7 +1183,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;
@@ -1262,7 +1262,7 @@ sp_head::execute(THD *thd)
}
} while (!err_status && !thd->killed);
-#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
@@ -2777,7 +2777,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
diff -Nrup a/sql/sql_class.cc b/sql/sql_class.cc
--- a/sql/sql_class.cc 2007-12-19 08:35:03 -05:00
+++ b/sql/sql_class.cc 2007-12-20 11:05:28 -05:00
@@ -254,7 +254,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));
-#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;
@@ -580,7 +580,7 @@ THD::THD()
init();
/* Initialize sub structures */
init_sql_alloc(&warn_root, WARN_ALLOC_BLOCK_SIZE, WARN_ALLOC_PREALLOC_SIZE);
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
profiling.set_thd(this);
#endif
user_connect=(USER_CONN *)0;
diff -Nrup a/sql/sql_class.h b/sql/sql_class.h
--- a/sql/sql_class.h 2007-12-20 10:57:06 -05:00
+++ b/sql/sql_class.h 2007-12-20 11:05:28 -05:00
@@ -1546,7 +1546,7 @@ public:
uint warn_count[(uint) MYSQL_ERROR::WARN_LEVEL_END];
uint total_warn_count;
Diagnostics_area main_da;
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
PROFILING profiling;
#endif
diff -Nrup a/sql/sql_parse.cc b/sql/sql_parse.cc
--- a/sql/sql_parse.cc 2007-12-19 08:41:36 -05:00
+++ b/sql/sql_parse.cc 2007-12-20 11:05:28 -05:00
@@ -427,7 +427,7 @@ pthread_handler_t handle_bootstrap(void
QUERY_CACHE_FLAGS_SIZE);
thd->query[length] = '\0';
DBUG_PRINT("query",("%-.4096s",thd->query));
-#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+#if defined(ENABLED_PROFILING)
thd->profiling.set_query_source(thd->query, length);
#endif
@@ -654,7 +654,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)
@@ -714,7 +714,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);
@@ -1014,7 +1014,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
@@ -1044,7 +1044,7 @@ bool dispatch_command(enum enum_server_c
length--;
}
-#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);
@@ -1551,7 +1551,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;
@@ -2040,7 +2040,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)
diff -Nrup a/sql/sql_prepare.cc b/sql/sql_prepare.cc
--- a/sql/sql_prepare.cc 2007-12-19 08:35:04 -05:00
+++ b/sql/sql_prepare.cc 2007-12-20 11:05:29 -05:00
@@ -2285,7 +2285,7 @@ void mysql_stmt_execute(THD *thd, char *
if (!(stmt= find_prepared_statement(thd, stmt_id, "mysql_stmt_execute")))
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));
diff -Nrup a/sql/sql_profile.cc b/sql/sql_profile.cc
--- a/sql/sql_profile.cc 2007-11-13 09:46:15 -05:00
+++ b/sql/sql_profile.cc 2007-12-20 11:05:29 -05:00
@@ -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)))
diff -Nrup a/sql/sql_profile.h b/sql/sql_profile.h
--- a/sql/sql_profile.h 2007-12-14 08:57:32 -05:00
+++ b/sql/sql_profile.h 2007-12-20 11:05:29 -05:00
@@ -54,7 +54,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
| Thread |
|---|
| • bk commit into 6.0 tree (cmiller:1.2502) | Chad MILLER | 20 Dec |