Sundry changes to fix merge problems. Most of these are duplicated
in 5.0-community, but pulling to merge was very hard.
This commit is contained in:
parent
44ba122726
commit
872d65a547
@ -648,6 +648,7 @@ inline THD *_current_thd(void)
|
||||
The meat of thd_proc_info(THD*, char*), a macro that packs the last
|
||||
three calling-info parameters.
|
||||
*/
|
||||
extern "C"
|
||||
const char *set_thd_proc_info(THD *thd, const char *info,
|
||||
const char *calling_func,
|
||||
const char *calling_file,
|
||||
@ -1912,7 +1913,7 @@ extern handlerton *myisam_hton;
|
||||
extern handlerton *heap_hton;
|
||||
|
||||
extern SHOW_COMP_OPTION have_ssl, have_symlink, have_dlopen;
|
||||
uextern SHOW_COMP_OPTION have_query_cache;
|
||||
extern SHOW_COMP_OPTION have_query_cache;
|
||||
extern SHOW_COMP_OPTION have_geometry, have_rtree_keys;
|
||||
extern SHOW_COMP_OPTION have_crypt;
|
||||
extern SHOW_COMP_OPTION have_compress;
|
||||
|
@ -5654,8 +5654,8 @@ master-ssl",
|
||||
(uchar**) &mysqld_port_timeout, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#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,
|
||||
(uchar**) &global_system_variables.profiling_history_size,
|
||||
(uchar**) &max_system_variables.profiling_history_size,
|
||||
0, GET_ULONG, REQUIRED_ARG, 15, 0, 100, 0, 0, 0},
|
||||
#endif
|
||||
{"relay-log", OPT_RELAY_LOG,
|
||||
@ -7204,7 +7204,6 @@ static void mysql_init_variables(void)
|
||||
"d:t:i:o,/tmp/mysqld.trace");
|
||||
#endif
|
||||
opt_error_log= IF_WIN(1,0);
|
||||
#endif
|
||||
#ifdef COMMUNITY_SERVER
|
||||
have_community_features = SHOW_OPTION_YES;
|
||||
#else
|
||||
|
@ -583,9 +583,10 @@ static sys_var_thd_bit sys_unique_checks(&vars, "unique_checks", 0,
|
||||
OPTION_RELAXED_UNIQUE_CHECKS,
|
||||
1);
|
||||
#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
|
||||
static sys_var_thd_bit sys_profiling("profiling", NULL, set_option_bit,
|
||||
static sys_var_thd_bit sys_profiling(&vars, "profiling", NULL,
|
||||
set_option_bit,
|
||||
ulonglong(OPTION_PROFILING));
|
||||
static sys_var_thd_ulong sys_profiling_history_size("profiling_history_size",
|
||||
static sys_var_thd_ulong sys_profiling_history_size(&vars, "profiling_history_size",
|
||||
&SV::profiling_history_size);
|
||||
#endif
|
||||
|
||||
@ -699,10 +700,6 @@ static SHOW_VAR fixed_vars[]= {
|
||||
{"pid_file", (char*) pidfile_name, SHOW_CHAR},
|
||||
{"plugin_dir", (char*) opt_plugin_dir, SHOW_CHAR},
|
||||
{"port", (char*) &mysqld_port, SHOW_INT},
|
||||
#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
|
||||
{"protocol_version", (char*) &protocol_version, SHOW_INT},
|
||||
#ifdef HAVE_SMEM
|
||||
{"shared_memory", (char*) &opt_enable_shared_memory, SHOW_MY_BOOL},
|
||||
|
@ -1455,7 +1455,6 @@ void Query_cache::invalidate(THD *thd, TABLE_LIST *tables_used,
|
||||
|
||||
void Query_cache::invalidate(CHANGED_TABLE_LIST *tables_used)
|
||||
{
|
||||
THD *thd= current_thd;
|
||||
DBUG_ENTER("Query_cache::invalidate (changed table list)");
|
||||
THD *thd= current_thd;
|
||||
for (; tables_used; tables_used= tables_used->next)
|
||||
|
@ -28,7 +28,7 @@ const char * const _unknown_func_ = "<unknown>";
|
||||
/**
|
||||
Connects Information_Schema and Profiling.
|
||||
*/
|
||||
int fill_query_profile_statistics_info(THD *thd, struct st_table_list *tables,
|
||||
int fill_query_profile_statistics_info(THD *thd, TABLE_LIST *tables,
|
||||
Item *cond)
|
||||
{
|
||||
#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
|
||||
@ -40,26 +40,26 @@ int fill_query_profile_statistics_info(THD *thd, struct st_table_list *tables,
|
||||
|
||||
ST_FIELD_INFO query_profile_statistics_info[]=
|
||||
{
|
||||
/* name, length, type, value, maybe_null, old_name */
|
||||
{"QUERY_ID", 20, MYSQL_TYPE_LONG, 0, false, NULL},
|
||||
{"SEQ", 20, MYSQL_TYPE_LONG, 0, false, NULL},
|
||||
{"STATE", 30, MYSQL_TYPE_STRING, 0, false, NULL},
|
||||
{"DURATION", TIME_FLOAT_DIGITS, MYSQL_TYPE_DOUBLE, 0, false, NULL},
|
||||
{"CPU_USER", TIME_FLOAT_DIGITS, MYSQL_TYPE_DOUBLE, 0, true, NULL},
|
||||
{"CPU_SYSTEM", TIME_FLOAT_DIGITS, MYSQL_TYPE_DOUBLE, 0, true, NULL},
|
||||
{"CONTEXT_VOLUNTARY", 20, MYSQL_TYPE_LONG, 0, true, NULL},
|
||||
{"CONTEXT_INVOLUNTARY", 20, MYSQL_TYPE_LONG, 0, true, NULL},
|
||||
{"BLOCK_OPS_IN", 20, MYSQL_TYPE_LONG, 0, true, NULL},
|
||||
{"BLOCK_OPS_OUT", 20, MYSQL_TYPE_LONG, 0, true, NULL},
|
||||
{"MESSAGES_SENT", 20, MYSQL_TYPE_LONG, 0, true, NULL},
|
||||
{"MESSAGES_RECEIVED", 20, MYSQL_TYPE_LONG, 0, true, NULL},
|
||||
{"PAGE_FAULTS_MAJOR", 20, MYSQL_TYPE_LONG, 0, true, NULL},
|
||||
{"PAGE_FAULTS_MINOR", 20, MYSQL_TYPE_LONG, 0, true, NULL},
|
||||
{"SWAPS", 20, MYSQL_TYPE_LONG, 0, true, NULL},
|
||||
{"SOURCE_FUNCTION", 30, MYSQL_TYPE_STRING, 0, true, NULL},
|
||||
{"SOURCE_FILE", 20, MYSQL_TYPE_STRING, 0, true, NULL},
|
||||
{"SOURCE_LINE", 20, MYSQL_TYPE_LONG, 0, true, NULL},
|
||||
{NULL, 0, MYSQL_TYPE_STRING, 0, true, NULL}
|
||||
/* name, length, type, value, maybe_null, old_name, open_method */
|
||||
{"QUERY_ID", 20, MYSQL_TYPE_LONG, 0, false, NULL, SKIP_OPEN_TABLE},
|
||||
{"SEQ", 20, MYSQL_TYPE_LONG, 0, false, NULL, SKIP_OPEN_TABLE},
|
||||
{"STATE", 30, MYSQL_TYPE_STRING, 0, false, NULL, SKIP_OPEN_TABLE},
|
||||
{"DURATION", TIME_FLOAT_DIGITS, MYSQL_TYPE_DOUBLE, 0, false, NULL, SKIP_OPEN_TABLE},
|
||||
{"CPU_USER", TIME_FLOAT_DIGITS, MYSQL_TYPE_DOUBLE, 0, true, NULL, SKIP_OPEN_TABLE},
|
||||
{"CPU_SYSTEM", TIME_FLOAT_DIGITS, MYSQL_TYPE_DOUBLE, 0, true, NULL, SKIP_OPEN_TABLE},
|
||||
{"CONTEXT_VOLUNTARY", 20, MYSQL_TYPE_LONG, 0, true, NULL, SKIP_OPEN_TABLE},
|
||||
{"CONTEXT_INVOLUNTARY", 20, MYSQL_TYPE_LONG, 0, true, NULL, SKIP_OPEN_TABLE},
|
||||
{"BLOCK_OPS_IN", 20, MYSQL_TYPE_LONG, 0, true, NULL, SKIP_OPEN_TABLE},
|
||||
{"BLOCK_OPS_OUT", 20, MYSQL_TYPE_LONG, 0, true, NULL, SKIP_OPEN_TABLE},
|
||||
{"MESSAGES_SENT", 20, MYSQL_TYPE_LONG, 0, true, NULL, SKIP_OPEN_TABLE},
|
||||
{"MESSAGES_RECEIVED", 20, MYSQL_TYPE_LONG, 0, true, NULL, SKIP_OPEN_TABLE},
|
||||
{"PAGE_FAULTS_MAJOR", 20, MYSQL_TYPE_LONG, 0, true, NULL, SKIP_OPEN_TABLE},
|
||||
{"PAGE_FAULTS_MINOR", 20, MYSQL_TYPE_LONG, 0, true, NULL, SKIP_OPEN_TABLE},
|
||||
{"SWAPS", 20, MYSQL_TYPE_LONG, 0, true, NULL, SKIP_OPEN_TABLE},
|
||||
{"SOURCE_FUNCTION", 30, MYSQL_TYPE_STRING, 0, true, NULL, SKIP_OPEN_TABLE},
|
||||
{"SOURCE_FILE", 20, MYSQL_TYPE_STRING, 0, true, NULL, SKIP_OPEN_TABLE},
|
||||
{"SOURCE_LINE", 20, MYSQL_TYPE_LONG, 0, true, NULL, SKIP_OPEN_TABLE},
|
||||
{NULL, 0, MYSQL_TYPE_STRING, 0, true, NULL, NULL}
|
||||
};
|
||||
|
||||
#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
|
||||
@ -663,7 +663,7 @@ bool PROFILING::show_last(uint options)
|
||||
/**
|
||||
Fill the information schema table, "query_profile", as defined in show.cc .
|
||||
*/
|
||||
int PROFILING::fill_statistics_info(THD *thd, struct st_table_list *tables, Item *cond)
|
||||
int PROFILING::fill_statistics_info(THD *thd, TABLE_LIST *tables, Item *cond)
|
||||
{
|
||||
DBUG_ENTER("PROFILING::fill_statistics_info");
|
||||
TABLE *table= tables->table;
|
||||
|
@ -38,7 +38,7 @@ extern const char * const _unknown_func_;
|
||||
#endif
|
||||
|
||||
extern ST_FIELD_INFO query_profile_statistics_info[];
|
||||
int fill_query_profile_statistics_info(THD *thd, struct st_table_list *tables, Item *cond);
|
||||
int fill_query_profile_statistics_info(THD *thd, TABLE_LIST *tables, Item *cond);
|
||||
|
||||
|
||||
#define PROFILE_NONE 0
|
||||
@ -322,7 +322,7 @@ public:
|
||||
bool show_last(uint options);
|
||||
|
||||
/* ... from INFORMATION_SCHEMA.PROFILING ... */
|
||||
int fill_statistics_info(THD *thd, struct st_table_list *tables, Item *cond);
|
||||
int fill_statistics_info(THD *thd, TABLE_LIST *tables, Item *cond);
|
||||
};
|
||||
|
||||
# endif /* HAVE_PROFILING */
|
||||
|
Loading…
x
Reference in New Issue
Block a user