perfschema - various collateral cleanups and small changes

This commit is contained in:
Sergei Golubchik 2020-02-14 16:42:23 +01:00
parent 0ea717f51a
commit 2ac3121af2
25 changed files with 66 additions and 70 deletions

View File

@ -153,7 +153,6 @@ typedef struct st_heap_share
char * name; /* Name of "memory-file" */ char * name; /* Name of "memory-file" */
time_t create_time; time_t create_time;
THR_LOCK lock; THR_LOCK lock;
mysql_mutex_t intern_lock; /* Locking for use with _locking */
my_bool delete_on_close; my_bool delete_on_close;
my_bool internal; /* Internal temporary table */ my_bool internal; /* Internal temporary table */
LIST open_list; LIST open_list;

View File

@ -38,12 +38,6 @@
#include <table.h> #include <table.h>
#include <sql_list.h> #include <sql_list.h>
/* Needed to get access to scheduler variables */
void* thd_get_scheduler_data(THD *thd);
void thd_set_scheduler_data(THD *thd, void *data);
PSI_thread* thd_get_psi(THD *thd);
void thd_set_psi(THD *thd, PSI_thread *psi);
/* Interface to THD variables and functions */ /* Interface to THD variables and functions */
void thd_set_killed(THD *thd); void thd_set_killed(THD *thd);
void thd_clear_errors(THD *thd); void thd_clear_errors(THD *thd);

View File

@ -83,7 +83,7 @@ my_hash_init2(HASH *hash, uint growth_size, CHARSET_INFO *charset,
void (*free_element)(void*), uint flags) void (*free_element)(void*), uint flags)
{ {
my_bool res; my_bool res;
DBUG_ENTER("my_hash_init"); DBUG_ENTER("my_hash_init2");
DBUG_PRINT("enter",("hash:%p size: %u", hash, (uint) size)); DBUG_PRINT("enter",("hash:%p size: %u", hash, (uint) size));
hash->records=0; hash->records=0;

View File

@ -3925,10 +3925,8 @@ mariadb_dyncol_val_str(DYNAMIC_STRING *str, DYNAMIC_COLUMN_VALUE *val,
} }
if ((alloc= (char *)my_malloc(bufflen, MYF(0)))) if ((alloc= (char *)my_malloc(bufflen, MYF(0))))
{ {
len= my_convert(alloc, bufflen, cs, len= my_convert(alloc, bufflen, cs, from, (uint32)len,
from, (uint32)len, val->x.string.charset, &dummy_errors);
val->x.string.charset,
&dummy_errors);
from= alloc; from= alloc;
} }
else else

View File

@ -25,7 +25,7 @@
/* from my_init */ /* from my_init */
char * home_dir=0; char *home_dir=0;
char *mysql_data_home= (char*) "."; char *mysql_data_home= (char*) ".";
const char *my_progname= NULL, *my_progname_short= NULL; const char *my_progname= NULL, *my_progname_short= NULL;
char curr_dir[FN_REFLEN]= {0}, char curr_dir[FN_REFLEN]= {0},

View File

@ -1430,10 +1430,8 @@ Event_job_data::execute(THD *thd, bool drop)
if (parse_sql(thd, & parser_state, creation_ctx)) if (parse_sql(thd, & parser_state, creation_ctx))
{ {
sql_print_error("Event Scheduler: " sql_print_error("Event Scheduler: %serror during compilation of %s.%s",
"%serror during compilation of %s.%s", thd->is_fatal_error ? "fatal " : "", dbname.str, name.str);
thd->is_fatal_error ? "fatal " : "",
(const char *) dbname.str, (const char *) name.str);
goto end; goto end;
} }
} }

View File

@ -832,13 +832,12 @@ Events::fill_schema_events(THD *thd, TABLE_LIST *tables, COND * /* cond */)
*/ */
if (thd->lex->sql_command == SQLCOM_SHOW_EVENTS) if (thd->lex->sql_command == SQLCOM_SHOW_EVENTS)
{ {
DBUG_ASSERT(thd->lex->first_select_lex()->db.str); LEX_CSTRING *lexdb= &thd->lex->first_select_lex()->db;
if (!is_infoschema_db(&thd->lex->first_select_lex()->db) && // There is no events in I_S DBUG_ASSERT(lexdb);
check_access(thd, EVENT_ACL, thd->lex->first_select_lex()->db.str, if (!is_infoschema_db(lexdb) && !is_perfschema_db(lexdb) &&
NULL, NULL, 0, 0)) check_access(thd, EVENT_ACL, lexdb->str, NULL, NULL, 0, 0))
DBUG_RETURN(1); DBUG_RETURN(1);
db= normalize_db_name(thd->lex->first_select_lex()->db.str, db= normalize_db_name(lexdb->str, db_tmp, sizeof(db_tmp));
db_tmp, sizeof(db_tmp));
} }
ret= db_repository->fill_schema_events(thd, tables, db); ret= db_repository->fill_schema_events(thd, tables, db);

View File

@ -1459,9 +1459,7 @@ int ha_commit_trans(THD *thd, bool all)
thd->transaction.cleanup(); thd->transaction.cleanup();
#ifdef WITH_WSREP #ifdef WITH_WSREP
if (wsrep_is_active(thd) && is_real_trans && !error) if (wsrep_is_active(thd) && is_real_trans && !error)
{
wsrep_commit_empty(thd, all); wsrep_commit_empty(thd, all);
}
#endif /* WITH_WSREP */ #endif /* WITH_WSREP */
DBUG_RETURN(0); DBUG_RETURN(0);
} }

View File

@ -4299,7 +4299,7 @@ static PSI_mutex_key key_LOCK_item_func_sleep;
static PSI_mutex_info item_func_sleep_mutexes[]= static PSI_mutex_info item_func_sleep_mutexes[]=
{ {
{ &key_LOCK_item_func_sleep, "LOCK_user_locks", PSI_FLAG_GLOBAL} { &key_LOCK_item_func_sleep, "LOCK_item_func_sleep", PSI_FLAG_GLOBAL}
}; };
@ -4682,8 +4682,7 @@ update_hash(user_var_entry *entry, bool set_null, void *ptr, size_t length,
entry->value=0; entry->value=0;
entry->value= (char*) my_realloc(entry->value, length, entry->value= (char*) my_realloc(entry->value, length,
MYF(MY_ALLOW_ZERO_PTR | MY_WME | MYF(MY_ALLOW_ZERO_PTR | MY_WME |
ME_FATAL | ME_FATAL | MY_THREAD_SPECIFIC));
MY_THREAD_SPECIFIC));
if (!entry->value) if (!entry->value)
return 1; return 1;
} }

View File

@ -1723,7 +1723,8 @@ static int binlog_close_connection(handlerton *hton, THD *thd)
if (len > 0) wsrep_dump_rbr_buf(thd, buf, len); if (len > 0) wsrep_dump_rbr_buf(thd, buf, len);
} }
#endif /* WITH_WSREP */ #endif /* WITH_WSREP */
DBUG_ASSERT(cache_mngr->trx_cache.empty() && cache_mngr->stmt_cache.empty()); DBUG_ASSERT(cache_mngr->trx_cache.empty());
DBUG_ASSERT(cache_mngr->stmt_cache.empty());
cache_mngr->~binlog_cache_mngr(); cache_mngr->~binlog_cache_mngr();
my_free(cache_mngr); my_free(cache_mngr);
DBUG_RETURN(0); DBUG_RETURN(0);

View File

@ -424,7 +424,7 @@ class MYSQL_BIN_LOG: public TC_LOG, private MYSQL_LOG
/** The instrumentation key to use for opening the log index file. */ /** The instrumentation key to use for opening the log index file. */
PSI_file_key m_key_file_log_index; PSI_file_key m_key_file_log_index;
PSI_file_key m_key_COND_queue_busy; PSI_cond_key m_key_COND_queue_busy;
/** The instrumentation key to use for LOCK_binlog_end_pos. */ /** The instrumentation key to use for LOCK_binlog_end_pos. */
PSI_mutex_key m_key_LOCK_binlog_end_pos; PSI_mutex_key m_key_LOCK_binlog_end_pos;
#endif #endif
@ -675,7 +675,7 @@ public:
PSI_cond_key key_bin_log_update, PSI_cond_key key_bin_log_update,
PSI_file_key key_file_log, PSI_file_key key_file_log,
PSI_file_key key_file_log_index, PSI_file_key key_file_log_index,
PSI_file_key key_COND_queue_busy, PSI_cond_key key_COND_queue_busy,
PSI_mutex_key key_LOCK_binlog_end_pos) PSI_mutex_key key_LOCK_binlog_end_pos)
{ {
m_key_LOCK_index= key_LOCK_index; m_key_LOCK_index= key_LOCK_index;

View File

@ -9180,10 +9180,10 @@ PSI_stage_info stage_invalidating_query_cache_entries_table= { 0, "Invalidating
PSI_stage_info stage_invalidating_query_cache_entries_table_list= { 0, "Invalidating query cache entries (table list)", 0}; PSI_stage_info stage_invalidating_query_cache_entries_table_list= { 0, "Invalidating query cache entries (table list)", 0};
PSI_stage_info stage_killing_slave= { 0, "Killing slave", 0}; PSI_stage_info stage_killing_slave= { 0, "Killing slave", 0};
PSI_stage_info stage_logging_slow_query= { 0, "Logging slow query", 0}; PSI_stage_info stage_logging_slow_query= { 0, "Logging slow query", 0};
PSI_stage_info stage_making_temp_file_append_before_load_data= { 0, "Making temporary file (append) before replaying LOAD DATA INFILE.", 0}; PSI_stage_info stage_making_temp_file_append_before_load_data= { 0, "Making temporary file (append) before replaying LOAD DATA INFILE", 0};
PSI_stage_info stage_making_temp_file_create_before_load_data= { 0, "Making temporary file (create) before replaying LOAD DATA INFILE.", 0}; PSI_stage_info stage_making_temp_file_create_before_load_data= { 0, "Making temporary file (create) before replaying LOAD DATA INFILE", 0};
PSI_stage_info stage_manage_keys= { 0, "Manage keys", 0}; PSI_stage_info stage_manage_keys= { 0, "Manage keys", 0};
PSI_stage_info stage_master_has_sent_all_binlog_to_slave= { 0, "Master has sent all binlog to slave; waiting for binlog to be updated", 0}; PSI_stage_info stage_master_has_sent_all_binlog_to_slave= { 0, "Master has sent all binlog to slave; waiting for more updates", 0};
PSI_stage_info stage_opening_tables= { 0, "Opening tables", 0}; PSI_stage_info stage_opening_tables= { 0, "Opening tables", 0};
PSI_stage_info stage_optimizing= { 0, "Optimizing", 0}; PSI_stage_info stage_optimizing= { 0, "Optimizing", 0};
PSI_stage_info stage_preparing= { 0, "Preparing", 0}; PSI_stage_info stage_preparing= { 0, "Preparing", 0};
@ -9210,7 +9210,7 @@ PSI_stage_info stage_sending_cached_result_to_client= { 0, "Sending cached resul
PSI_stage_info stage_sending_data= { 0, "Sending data", 0}; PSI_stage_info stage_sending_data= { 0, "Sending data", 0};
PSI_stage_info stage_setup= { 0, "Setup", 0}; PSI_stage_info stage_setup= { 0, "Setup", 0};
PSI_stage_info stage_show_explain= { 0, "Show explain", 0}; PSI_stage_info stage_show_explain= { 0, "Show explain", 0};
PSI_stage_info stage_slave_has_read_all_relay_log= { 0, "Slave has read all relay log; waiting for the slave I/O thread to update it", 0}; PSI_stage_info stage_slave_has_read_all_relay_log= { 0, "Slave has read all relay log; waiting for more updates", 0};
PSI_stage_info stage_sorting= { 0, "Sorting", 0}; PSI_stage_info stage_sorting= { 0, "Sorting", 0};
PSI_stage_info stage_sorting_for_group= { 0, "Sorting for group", 0}; PSI_stage_info stage_sorting_for_group= { 0, "Sorting for group", 0};
PSI_stage_info stage_sorting_for_order= { 0, "Sorting for order", 0}; PSI_stage_info stage_sorting_for_order= { 0, "Sorting for order", 0};
@ -9258,7 +9258,7 @@ PSI_stage_info stage_binlog_processing_checkpoint_notify= { 0, "Processing binlo
PSI_stage_info stage_binlog_stopping_background_thread= { 0, "Stopping binlog background thread", 0}; PSI_stage_info stage_binlog_stopping_background_thread= { 0, "Stopping binlog background thread", 0};
PSI_stage_info stage_waiting_for_work_from_sql_thread= { 0, "Waiting for work from SQL thread", 0}; PSI_stage_info stage_waiting_for_work_from_sql_thread= { 0, "Waiting for work from SQL thread", 0};
PSI_stage_info stage_waiting_for_prior_transaction_to_commit= { 0, "Waiting for prior transaction to commit", 0}; PSI_stage_info stage_waiting_for_prior_transaction_to_commit= { 0, "Waiting for prior transaction to commit", 0};
PSI_stage_info stage_waiting_for_prior_transaction_to_start_commit= { 0, "Waiting for prior transaction to start commit before starting next transaction", 0}; PSI_stage_info stage_waiting_for_prior_transaction_to_start_commit= { 0, "Waiting for prior transaction to start commit", 0};
PSI_stage_info stage_waiting_for_room_in_worker_thread= { 0, "Waiting for room in worker thread event queue", 0}; PSI_stage_info stage_waiting_for_room_in_worker_thread= { 0, "Waiting for room in worker thread event queue", 0};
PSI_stage_info stage_waiting_for_workers_idle= { 0, "Waiting for worker threads to be idle", 0}; PSI_stage_info stage_waiting_for_workers_idle= { 0, "Waiting for worker threads to be idle", 0};
PSI_stage_info stage_waiting_for_ftwrl= { 0, "Waiting due to global read lock", 0}; PSI_stage_info stage_waiting_for_ftwrl= { 0, "Waiting due to global read lock", 0};
@ -9266,7 +9266,7 @@ PSI_stage_info stage_waiting_for_ftwrl_threads_to_pause= { 0, "Waiting for worke
PSI_stage_info stage_waiting_for_rpl_thread_pool= { 0, "Waiting while replication worker thread pool is busy", 0}; PSI_stage_info stage_waiting_for_rpl_thread_pool= { 0, "Waiting while replication worker thread pool is busy", 0};
PSI_stage_info stage_master_gtid_wait_primary= { 0, "Waiting in MASTER_GTID_WAIT() (primary waiter)", 0}; PSI_stage_info stage_master_gtid_wait_primary= { 0, "Waiting in MASTER_GTID_WAIT() (primary waiter)", 0};
PSI_stage_info stage_master_gtid_wait= { 0, "Waiting in MASTER_GTID_WAIT()", 0}; PSI_stage_info stage_master_gtid_wait= { 0, "Waiting in MASTER_GTID_WAIT()", 0};
PSI_stage_info stage_gtid_wait_other_connection= { 0, "Waiting for other master connection to process GTID received on multiple master connections", 0}; PSI_stage_info stage_gtid_wait_other_connection= { 0, "Waiting for other master connection to process the same GTID", 0};
PSI_stage_info stage_slave_background_process_request= { 0, "Processing requests", 0}; PSI_stage_info stage_slave_background_process_request= { 0, "Processing requests", 0};
PSI_stage_info stage_slave_background_wait_request= { 0, "Waiting for requests", 0}; PSI_stage_info stage_slave_background_wait_request= { 0, "Waiting for requests", 0};
PSI_stage_info stage_waiting_for_deadlock_kill= { 0, "Waiting for parallel replication deadlock handling to complete", 0}; PSI_stage_info stage_waiting_for_deadlock_kill= { 0, "Waiting for parallel replication deadlock handling to complete", 0};

View File

@ -27,6 +27,8 @@ extern const LEX_CSTRING rpl_gtid_slave_state_table_name;
class String; class String;
#define GTID_MAX_STR_LENGTH (10+1+10+1+20)
struct rpl_gtid struct rpl_gtid
{ {
uint32 domain_id; uint32 domain_id;

View File

@ -1570,6 +1570,8 @@ uint any_slave_sql_running(bool already_locked)
if (!already_locked) if (!already_locked)
mysql_mutex_lock(&LOCK_active_mi); mysql_mutex_lock(&LOCK_active_mi);
else
mysql_mutex_assert_owner(&LOCK_active_mi);
if (unlikely(abort_loop || !master_info_index)) if (unlikely(abort_loop || !master_info_index))
count= 1; count= 1;
else else

View File

@ -3444,7 +3444,7 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp,
thd->mdl_context.release_statement_locks(); thd->mdl_context.release_statement_locks();
} }
} }
//TODO: why is this here if log_slow_query is in sp_instr_stmt_execute? //TODO: why is this here if log_slow_query is in sp_instr_stmt::execute?
delete_explain_query(m_lex); delete_explain_query(m_lex);
if (m_lex->query_tables_own_last) if (m_lex->query_tables_own_last)

View File

@ -68,6 +68,15 @@ const uint max_hostname_length= 60;
const uint max_dbname_length= 64; const uint max_dbname_length= 64;
#endif #endif
const char *safe_vio_type_name(Vio *vio)
{
int unused;
#ifdef EMBEDDED_LIBRARY
if (!vio) return "Internal";
#endif
return vio_type_name(vio_type(vio), &unused);
}
#include "sql_acl_getsort.ic" #include "sql_acl_getsort.ic"
static LEX_CSTRING native_password_plugin_name= { static LEX_CSTRING native_password_plugin_name= {
@ -13994,17 +14003,9 @@ bool acl_authenticate(THD *thd, uint com_change_user_pkt_len)
*/ */
if (sctx->user) if (sctx->user)
{ {
if (strcmp(sctx->priv_user, sctx->user)) general_log_print(thd, command, (char*) "%s@%s on %s using %s",
{ sctx->user, sctx->host_or_ip,
general_log_print(thd, command, "%s@%s as %s on %s", safe_str(mpvio.db.str), safe_vio_type_name(thd->net.vio));
sctx->user, sctx->host_or_ip,
sctx->priv_user[0] ? sctx->priv_user : "anonymous",
safe_str(mpvio.db.str));
}
else
general_log_print(thd, command, (char*) "%s@%s on %s",
sctx->user, sctx->host_or_ip,
safe_str(mpvio.db.str));
} }
if (res > CR_OK && mpvio.status != MPVIO_EXT::SUCCESS) if (res > CR_OK && mpvio.status != MPVIO_EXT::SUCCESS)

View File

@ -170,6 +170,11 @@ public:
return ((const Elem*)array.buffer) + array.elements - 1; return ((const Elem*)array.buffer) + array.elements - 1;
} }
const Elem *end() const
{
return back() + 1;
}
/// @returns pointer to n-th element /// @returns pointer to n-th element
Elem *get_pos(size_t idx) Elem *get_pos(size_t idx)
{ {
@ -182,7 +187,6 @@ public:
return ((const Elem*)array.buffer) + idx; return ((const Elem*)array.buffer) + idx;
} }
/** /**
@retval false ok @retval false ok
@retval true OOM, @c my_error() has been called. @retval true OOM, @c my_error() has been called.
@ -240,10 +244,16 @@ public:
freeze_size(&array); freeze_size(&array);
} }
bool reserve(size_t new_size)
{
return allocate_dynamic(&array, (uint)new_size);
}
bool resize(size_t new_size, Elem default_val) bool resize(size_t new_size, Elem default_val)
{ {
size_t old_size= elements(); size_t old_size= elements();
if (unlikely(allocate_dynamic(&array, (uint)new_size))) if (reserve(new_size))
return true; return true;
if (new_size > old_size) if (new_size > old_size)

View File

@ -13495,8 +13495,7 @@ bool JOIN_TAB::preread_init()
if ((!derived->get_unit()->executed || if ((!derived->get_unit()->executed ||
derived->is_recursive_with_table() || derived->is_recursive_with_table() ||
derived->get_unit()->uncacheable) && derived->get_unit()->uncacheable) &&
mysql_handle_single_derived(join->thd->lex, mysql_handle_single_derived(join->thd->lex, derived, DT_CREATE | DT_FILL))
derived, DT_CREATE | DT_FILL))
return TRUE; return TRUE;
if (!(derived->get_unit()->uncacheable & UNCACHEABLE_DEPENDENT) || if (!(derived->get_unit()->uncacheable & UNCACHEABLE_DEPENDENT) ||

View File

@ -247,13 +247,13 @@ class SplM_opt_info;
typedef struct st_join_table { typedef struct st_join_table {
TABLE *table; TABLE *table;
TABLE_LIST *tab_list; TABLE_LIST *tab_list;
KEYUSE *keyuse; /**< pointer to first used key */ KEYUSE *keyuse; /**< pointer to first used key */
KEY *hj_key; /**< descriptor of the used best hash join key KEY *hj_key; /**< descriptor of the used best hash join key
not supported by any index */ not supported by any index */
SQL_SELECT *select; SQL_SELECT *select;
COND *select_cond; COND *select_cond;
COND *on_precond; /**< part of on condition to check before COND *on_precond; /**< part of on condition to check before
accessing the first inner table */ accessing the first inner table */
QUICK_SELECT_I *quick; QUICK_SELECT_I *quick;
/* /*
The value of select_cond before we've attempted to do Index Condition The value of select_cond before we've attempted to do Index Condition

View File

@ -273,7 +273,7 @@ TABLE_CATEGORY get_table_category(const LEX_CSTRING *db,
if (is_infoschema_db(db)) if (is_infoschema_db(db))
return TABLE_CATEGORY_INFORMATION; return TABLE_CATEGORY_INFORMATION;
if (lex_string_eq(&PERFORMANCE_SCHEMA_DB_NAME, db)) if (is_perfschema_db(db))
return TABLE_CATEGORY_PERFORMANCE; return TABLE_CATEGORY_PERFORMANCE;
if (lex_string_eq(&MYSQL_SCHEMA_NAME, db)) if (lex_string_eq(&MYSQL_SCHEMA_NAME, db))

View File

@ -3060,9 +3060,12 @@ extern LEX_CSTRING MYSQL_PROC_NAME;
inline bool is_infoschema_db(const LEX_CSTRING *name) inline bool is_infoschema_db(const LEX_CSTRING *name)
{ {
return (INFORMATION_SCHEMA_NAME.length == name->length && return lex_string_eq(&INFORMATION_SCHEMA_NAME, name);
!my_strcasecmp(system_charset_info, }
INFORMATION_SCHEMA_NAME.str, name->str));
inline bool is_perfschema_db(const LEX_CSTRING *name)
{
return lex_string_eq(&PERFORMANCE_SCHEMA_DB_NAME, name);
} }
inline void mark_as_null_row(TABLE *table) inline void mark_as_null_row(TABLE *table)

View File

@ -245,18 +245,12 @@ bool trans_commit(THD *thd)
if res is non-zero, then ha_commit_trans has rolled back the if res is non-zero, then ha_commit_trans has rolled back the
transaction, so the hooks for rollback will be called. transaction, so the hooks for rollback will be called.
*/ */
#ifdef HAVE_REPLICATION
if (res) if (res)
{
#ifdef HAVE_REPLICATION
repl_semisync_master.wait_after_rollback(thd, FALSE); repl_semisync_master.wait_after_rollback(thd, FALSE);
#endif
}
else else
{
#ifdef HAVE_REPLICATION
repl_semisync_master.wait_after_commit(thd, FALSE); repl_semisync_master.wait_after_commit(thd, FALSE);
#endif #endif
}
thd->variables.option_bits&= ~(OPTION_BEGIN | OPTION_KEEP_LOG); thd->variables.option_bits&= ~(OPTION_BEGIN | OPTION_KEEP_LOG);
thd->transaction.all.reset(); thd->transaction.all.reset();
thd->lex->start_transaction_opt= 0; thd->lex->start_transaction_opt= 0;

View File

@ -22,7 +22,7 @@
/*************************************************************************** /***************************************************************************
Handling of XA id cacheing Handling of XA id caching
***************************************************************************/ ***************************************************************************/
enum xa_states { XA_ACTIVE= 0, XA_IDLE, XA_PREPARED, XA_ROLLBACK_ONLY }; enum xa_states { XA_ACTIVE= 0, XA_IDLE, XA_PREPARED, XA_ROLLBACK_ONLY };

View File

@ -41,8 +41,6 @@ Created Nov 12, 2014 Vasil Dimov
#ifdef HAVE_PSI_STAGE_INTERFACE #ifdef HAVE_PSI_STAGE_INTERFACE
typedef void PSI_stage_progress;
/** Class used to report ALTER TABLE progress via performance_schema. /** Class used to report ALTER TABLE progress via performance_schema.
The only user of this class is the ALTER TABLE code and it calls the methods The only user of this class is the ALTER TABLE code and it calls the methods
in the following order in the following order

View File

@ -1740,6 +1740,7 @@ void pfs_register_stage_v1(const char *category,
DBUG_ASSERT(info != NULL); DBUG_ASSERT(info != NULL);
DBUG_ASSERT(info->m_name != NULL); DBUG_ASSERT(info->m_name != NULL);
len= (int)strlen(info->m_name); len= (int)strlen(info->m_name);
DBUG_ASSERT(len <= 64); // see table_threads.cc near PROCESSLIST_STATE
full_length= prefix_length + len; full_length= prefix_length + len;
if (likely(full_length <= PFS_MAX_INFO_NAME_LENGTH)) if (likely(full_length <= PFS_MAX_INFO_NAME_LENGTH))
{ {