Below is the list of changes that have just been committed into a local
5.1 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-05-02 14:13:33-04:00, cmiller@stripped +17 -0
Fix up merge. Some macros are now functions. Some functions are
renamed. Some new THD proc_info states are new. Directories must be
encountered in make in a specific order, to have symlinks already set.
Move community-server-specific tests into own tests, so that we can
exempt them from testing on enterprise servers.
BitKeeper/deleted/.del-profiling.inc@stripped, 2007-05-02 13:08:55-04:00, cmiller@stripped +0 -0
Delete: mysql-test/include/profiling.inc
BitKeeper/deleted/.del-profiling.require@stripped, 2007-05-02 13:09:09-04:00, cmiller@stripped +0 -0
Delete: mysql-test/r/profiling.require
configure.in@stripped, 2007-05-02 14:13:30-04:00, cmiller@stripped +3 -2
Set a new order of sql_client_dirs, so that the make directory traversal
doesn't miss symlink dependencies.
mysql-test/include/have_community_features.inc@stripped, 2007-05-02 14:13:30-04:00, cmiller@stripped +4 -0
New BitKeeper file ``mysql-test/include/have_community_features.inc''
mysql-test/include/have_community_features.inc@stripped, 2007-05-02 14:13:30-04:00, cmiller@stripped +0 -0
mysql-test/r/have_community_features.require@stripped, 2007-05-02 14:13:30-04:00, cmiller@stripped +2 -0
New BitKeeper file ``mysql-test/r/have_community_features.require''
mysql-test/r/have_community_features.require@stripped, 2007-05-02 14:13:30-04:00, cmiller@stripped +0 -0
mysql-test/r/not_embedded_server.result@stripped, 2007-05-02 14:13:30-04:00, cmiller@stripped +1 -1
Account for new "executing" state.
mysql-test/r/variables+c.result@stripped, 2007-05-02 14:13:30-04:00, cmiller@stripped +7 -0
New BitKeeper file ``mysql-test/r/variables+c.result''
mysql-test/r/variables+c.result@stripped, 2007-05-02 14:13:30-04:00, cmiller@stripped +0 -0
mysql-test/t/information_schema.test@stripped, 2007-05-02 14:13:30-04:00, cmiller@stripped +0 -8
Move community-feature test to another test file.
mysql-test/t/profiling.test@stripped, 2007-05-02 14:13:30-04:00, cmiller@stripped +1 -1
Make test more generic to community features.
mysql-test/t/variables+c.test@stripped, 2007-05-02 14:13:30-04:00, cmiller@stripped +11 -0
New BitKeeper file ``mysql-test/t/variables+c.test''
mysql-test/t/variables+c.test@stripped, 2007-05-02 14:13:30-04:00, cmiller@stripped +0 -0
sql/lex.h@stripped, 2007-05-02 14:13:30-04:00, cmiller@stripped +1 -0
Add symbol lost in manual merge.
sql/mysql_priv.h@stripped, 2007-05-02 14:13:30-04:00, cmiller@stripped +3 -0
Insert a preprocessor layer between setting the caller and the function
that sets the thread state, so we can get caller information.
sql/mysqld.cc@stripped, 2007-05-02 14:13:30-04:00, cmiller@stripped +10 -0
Add new server variable "have_community_features".
sql/set_var.cc@stripped, 2007-05-02 14:13:30-04:00, cmiller@stripped +2 -0
Add new server variable "have_community_features".
sql/sql_class.cc@stripped, 2007-05-02 14:13:30-04:00, cmiller@stripped +8 -1
Insert a preprocessor layer between setting the caller and the function
that sets the thread state, so we can get caller information.
sql/sql_profile.cc@stripped, 2007-05-02 14:13:30-04:00, cmiller@stripped +1 -1
Function name change, my_strndup()
sql/sql_profile.h@stripped, 2007-05-02 14:13:30-04:00, cmiller@stripped +1 -18
Insert a preprocessor layer between setting the caller and the function
that sets the thread state, so we can get caller information.
# 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.1-unified02
--- 1.458/configure.in 2007-04-27 16:37:15 -04:00
+++ 1.459/configure.in 2007-05-02 14:13:30 -04:00
@@ -2496,16 +2496,17 @@ thread_dirs=
dnl This probably should be cleaned up more - for now the threaded
dnl client is just using plain-old libs.
-sql_client_dirs="strings regex mysys libmysql client"
+sql_client_dirs="strings regex mysys libmysql"
AM_CONDITIONAL(THREAD_SAFE_CLIENT, test "$THREAD_SAFE_CLIENT" != "no")
if test "$THREAD_SAFE_CLIENT" != "no"
then
- sql_client_dirs="libmysql_r $sql_client_dirs"
+ sql_client_dirs="$sql_client_dirs libmysql_r"
AC_CONFIG_FILES(libmysql_r/Makefile)
AC_DEFINE([THREAD_SAFE_CLIENT], [1], [Should the client be thread safe])
fi
+sql_client_dirs="$sql_client_dirs client"
CLIENT_LIBS="$NON_THREADED_LIBS $openssl_libs $ZLIB_LIBS $STATIC_NSS_FLAGS"
--- 1.175/sql/lex.h 2007-04-27 16:43:23 -04:00
+++ 1.176/sql/lex.h 2007-05-02 14:13:30 -04:00
@@ -387,6 +387,7 @@ static SYMBOL symbols[] = {
{ "PACK_KEYS", SYM(PACK_KEYS_SYM)},
{ "PARSER", SYM(PARSER_SYM)},
{ "PARTIAL", SYM(PARTIAL)},
+ { "PAGE", SYM(PAGE_SYM)},
{ "PARTITION", SYM(PARTITION_SYM)},
{ "PARTITIONING", SYM(PARTITIONING_SYM)},
{ "PARTITIONS", SYM(PARTITIONS_SYM)},
--- 1.502/sql/mysql_priv.h 2007-04-27 16:43:23 -04:00
+++ 1.503/sql/mysql_priv.h 2007-05-02 14:13:30 -04:00
@@ -496,6 +496,8 @@ enum enum_parsing_place
};
struct st_table;
+
+#define thd_proc_info(thd, msg) set_thd_proc_info(thd, msg, __func__, __FILE__, __LINE__)
class THD;
/* Struct to handle simple linked lists */
@@ -1756,6 +1758,7 @@ extern SHOW_COMP_OPTION have_innodb;
extern SHOW_COMP_OPTION have_csv_db;
extern SHOW_COMP_OPTION have_ndbcluster;
extern SHOW_COMP_OPTION have_partition_db;
+extern SHOW_COMP_OPTION have_community_features;
extern handlerton *partition_hton;
extern handlerton *myisam_hton;
--- 1.637/sql/mysqld.cc 2007-04-27 16:43:23 -04:00
+++ 1.638/sql/mysqld.cc 2007-05-02 14:13:30 -04:00
@@ -576,6 +576,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;
/* Thread specific variables */
@@ -6529,6 +6530,7 @@ 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;
@@ -6536,6 +6538,7 @@ 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)
@@ -7089,7 +7092,9 @@ 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}
};
@@ -7313,6 +7318,11 @@ static void mysql_init_variables(void)
have_partition_db= SHOW_OPTION_YES;
#else
have_partition_db= SHOW_OPTION_NO;
+#endif
+#ifdef COMMUNITY_SERVER
+ have_community_features = SHOW_OPTION_YES;
+#else
+ have_community_features = SHOW_OPTION_NO;
#endif
#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
have_ndbcluster=SHOW_OPTION_DISABLED;
--- 1.333/sql/sql_class.cc 2007-04-27 16:37:18 -04:00
+++ 1.334/sql/sql_class.cc 2007-05-02 14:13:30 -04:00
@@ -181,9 +181,16 @@ my_bool thd_tablespace_op(const THD *thd
}
-const char *thd_proc_info(THD *thd, const char *info)
+const char *set_thd_proc_info(THD *thd, const char *info,
+ const char *calling_function,
+ const char *calling_file,
+ const unsigned int calling_line)
{
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)
+ thd->profiling.status_change(info, calling_function, calling_file, calling_line);
+#endif
thd->proc_info= info;
return old_info;
}
--- New file ---
+++ mysql-test/include/have_community_features.inc 07/05/02 14:13:30
--require r/have_community_features.require
--disable_query_log
show variables like "have_community_features";
--enable_query_log
--- New file ---
+++ mysql-test/r/have_community_features.require 07/05/02 14:13:30
Variable_name Value
have_community_features YES
--- New file ---
+++ mysql-test/r/variables+c.result 07/05/02 14:13:30
show global status like "Uptime_%";
Variable_name Value
Uptime_since_flush_status #
flush status;
show global status like "Uptime_%";
Variable_name Value
Uptime_since_flush_status #
--- 1.3/mysql-test/t/profiling.test 2007-04-24 18:11:51 -04:00
+++ 1.4/mysql-test/t/profiling.test 2007-05-02 14:13:30 -04:00
@@ -1,4 +1,4 @@
---source include/profiling.inc
+--source include/have_community_features.inc
# default is OFF
show session variables like 'profil%';
--- New file ---
+++ mysql-test/t/variables+c.test 07/05/02 14:13:30
--source include/have_community_features.inc
#
# Bug#24822: Patch: uptime_since_flush_status
#
--replace_column 2 #
show global status like "Uptime_%";
flush status;
--replace_column 2 #
show global status like "Uptime_%"; # Almost certainly zero
--- 1.10/sql/sql_profile.cc 2007-04-24 18:11:52 -04:00
+++ 1.11/sql/sql_profile.cc 2007-05-02 14:13:30 -04:00
@@ -177,7 +177,7 @@ void QUERY_PROFILE::set_query_source(cha
DBUG_ASSERT(query_source == NULL);
if (query_source_arg != NULL)
- query_source= my_strdup_with_length(query_source_arg, length, MYF(0));
+ query_source= my_strndup(query_source_arg, length, MYF(0));
}
QUERY_PROFILE::~QUERY_PROFILE()
--- 1.6/sql/sql_profile.h 2007-04-24 18:11:52 -04:00
+++ 1.7/sql/sql_profile.h 2007-05-02 14:13:30 -04:00
@@ -53,24 +53,7 @@ int fill_query_profile_statistics_info(T
#define PROFILE_ALL (~0)
-#if !defined(ENABLED_PROFILING) || !defined(COMMUNITY_SERVER)
-
-# define thd_proc_info(thd, msg) do { (thd)->proc_info= (msg); } while (0)
-
-#else
-
-# define thd_proc_info(thd, msg) \
- do { \
- if (unlikely(((thd)->options & OPTION_PROFILING) != 0)) \
- { \
- (thd)->profiling.status_change((msg), __func__, __FILE__, __LINE__); \
- } \
- else \
- { \
- (thd)->proc_info= (msg); \
- } \
- } while (0)
-
+#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
#include "mysql_priv.h"
#ifdef HAVE_SYS_RESOURCE_H
--- 1.99/mysql-test/t/information_schema.test 2007-04-27 16:37:16 -04:00
+++ 1.100/mysql-test/t/information_schema.test 2007-05-02 14:13:30 -04:00
@@ -1023,14 +1023,6 @@ where t.table_schema = 'information_sche
(c2.column_type = 'varchar(7)' or c2.column_type = 'varchar(20)')
group by c2.column_type order by num limit 1)
group by t.table_name order by num1, t.table_name;
-# Bug#24822: Patch: uptime_since_flush_status
-#
---replace_column 2 #
-show global status like "Uptime_%";
-flush status;
---replace_column 2 #
-show global status like "Uptime_%"; # Almost certainly zero
-
--echo End of 5.0 tests.
#
--- 1.230/sql/set_var.cc 2007-04-27 16:43:23 -04:00
+++ 1.231/sql/set_var.cc 2007-05-02 14:13:30 -04:00
@@ -692,6 +692,7 @@ sys_var_have_variable sys_have_query_cac
&have_query_cache);
sys_var_have_variable sys_have_rtree_keys("have_rtree_keys", &have_rtree_keys);
sys_var_have_variable sys_have_symlink("have_symlink", &have_symlink);
+sys_var_have_variable sys_have_community_features("have_community_features", &have_community_features);
/* Global read-only variable describing server license */
sys_var_const_str sys_license("license", STRINGIFY_ARG(LICENSE));
/* Global variables which enable|disable logging */
@@ -803,6 +804,7 @@ SHOW_VAR init_vars[]= {
{sys_var_general_log_path.name, (char*) &sys_var_general_log_path, SHOW_SYS},
{sys_group_concat_max_len.name, (char*) &sys_group_concat_max_len, SHOW_SYS},
{sys_hostname.name, (char*) &sys_hostname, SHOW_SYS},
+ {sys_have_community_features.name, (char*) &have_community_features, SHOW_HAVE},
{sys_have_compress.name, (char*) &have_compress, SHOW_HAVE},
{sys_have_crypt.name, (char*) &have_crypt, SHOW_HAVE},
{sys_have_csv_db.name, (char*) &have_csv_db, SHOW_HAVE},
--- 1.7/mysql-test/r/not_embedded_server.result 2006-09-06 08:32:43 -04:00
+++ 1.8/mysql-test/r/not_embedded_server.result 2007-05-02 14:13:30 -04:00
@@ -1,5 +1,5 @@
prepare stmt1 from ' SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND!=\'Daemon\' ';
execute stmt1;
ID USER HOST DB COMMAND TIME STATE INFO
-number root localhost test Query time preparing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND!='Daemon'
+number root localhost test Query time executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND!='Daemon'
deallocate prepare stmt1;
| Thread |
|---|
| • bk commit into 5.1 tree (cmiller:1.2478) | Chad MILLER | 2 May |