Commit 89903803 authored by Marc Alff's avatar Marc Alff

Bug#58798 SHOW ENGINE PERFORMANCE_SCHEMA STATUS: incorrect table lettercase

Before this fix, the output of SHOW ENGINE PERFORMANCE_SCHEMA STATUS
used uppercase to name performance schema tables.

This is inconsistent since performance schema tables have been renamed to lowercase.

Also, an old table 'PROCESSLIST' was still visible, 
even after this table got renamed to 'threads'.

This fix:
- correctly uses lowercases in the output, to match the current naming.
- replaced 'PROCESSLIST' with 'threads'.

Tested the output of SHOW ENGINE PERFORMANCE_SCHEMA STATUS manually.
No automated test cases can be written for this, 
since the output is too platform dependent (sizes).
parent 7e4961bd
...@@ -519,9 +519,9 @@ bool pfs_show_status(handlerton *hton, THD *thd, ...@@ -519,9 +519,9 @@ bool pfs_show_status(handlerton *hton, THD *thd,
/* /*
Note about naming conventions: Note about naming conventions:
- Internal buffers exposed as a table in the performance schema are named - Internal buffers exposed as a table in the performance schema are named
after the table, as in 'EVENTS_WAITS_CURRENT' after the table, as in 'events_waits_current'
- Internal buffers not exposed by a table are named with parenthesis, - Internal buffers not exposed by a table are named with parenthesis,
as in '(PFS_MUTEX_CLASS)'. as in '(pfs_mutex_class)'.
*/ */
if (stat != HA_ENGINE_STATUS) if (stat != HA_ENGINE_STATUS)
DBUG_RETURN(false); DBUG_RETURN(false);
...@@ -532,219 +532,219 @@ bool pfs_show_status(handlerton *hton, THD *thd, ...@@ -532,219 +532,219 @@ bool pfs_show_status(handlerton *hton, THD *thd,
{ {
switch (i){ switch (i){
case 0: case 0:
name= "EVENTS_WAITS_CURRENT.ROW_SIZE"; name= "events_waits_current.row_size";
size= sizeof(PFS_wait_locker); size= sizeof(PFS_wait_locker);
break; break;
case 1: case 1:
name= "EVENTS_WAITS_CURRENT.ROW_COUNT"; name= "events_waits_current.row_count";
size= LOCKER_STACK_SIZE * thread_max; size= LOCKER_STACK_SIZE * thread_max;
break; break;
case 2: case 2:
name= "EVENTS_WAITS_HISTORY.ROW_SIZE"; name= "events_waits_history.row_size";
size= sizeof(PFS_events_waits); size= sizeof(PFS_events_waits);
break; break;
case 3: case 3:
name= "EVENTS_WAITS_HISTORY.ROW_COUNT"; name= "events_waits_history.row_count";
size= events_waits_history_per_thread * thread_max; size= events_waits_history_per_thread * thread_max;
break; break;
case 4: case 4:
name= "EVENTS_WAITS_HISTORY.MEMORY"; name= "events_waits_history.memory";
size= events_waits_history_per_thread * thread_max size= events_waits_history_per_thread * thread_max
* sizeof(PFS_events_waits); * sizeof(PFS_events_waits);
total_memory+= size; total_memory+= size;
break; break;
case 5: case 5:
name= "EVENTS_WAITS_HISTORY_LONG.ROW_SIZE"; name= "events_waits_history_long.row_size";
size= sizeof(PFS_events_waits); size= sizeof(PFS_events_waits);
break; break;
case 6: case 6:
name= "EVENTS_WAITS_HISTORY_LONG.ROW_COUNT"; name= "events_waits_history_long.row_count";
size= events_waits_history_long_size; size= events_waits_history_long_size;
break; break;
case 7: case 7:
name= "EVENTS_WAITS_HISTORY_LONG.MEMORY"; name= "events_waits_history_long.memory";
size= events_waits_history_long_size * sizeof(PFS_events_waits); size= events_waits_history_long_size * sizeof(PFS_events_waits);
total_memory+= size; total_memory+= size;
break; break;
case 8: case 8:
name= "(PFS_MUTEX_CLASS).ROW_SIZE"; name= "(pfs_mutex_class).row_size";
size= sizeof(PFS_mutex_class); size= sizeof(PFS_mutex_class);
break; break;
case 9: case 9:
name= "(PFS_MUTEX_CLASS).ROW_COUNT"; name= "(pfs_mutex_class).row_count";
size= mutex_class_max; size= mutex_class_max;
break; break;
case 10: case 10:
name= "(PFS_MUTEX_CLASS).MEMORY"; name= "(pfs_mutex_class).memory";
size= mutex_class_max * sizeof(PFS_mutex_class); size= mutex_class_max * sizeof(PFS_mutex_class);
total_memory+= size; total_memory+= size;
break; break;
case 11: case 11:
name= "(PFS_RWLOCK_CLASS).ROW_SIZE"; name= "(pfs_rwlock_class).row_size";
size= sizeof(PFS_rwlock_class); size= sizeof(PFS_rwlock_class);
break; break;
case 12: case 12:
name= "(PFS_RWLOCK_CLASS).ROW_COUNT"; name= "(pfs_rwlock_class).row_count";
size= rwlock_class_max; size= rwlock_class_max;
break; break;
case 13: case 13:
name= "(PFS_RWLOCK_CLASS).MEMORY"; name= "(pfs_rwlock_class).memory";
size= rwlock_class_max * sizeof(PFS_rwlock_class); size= rwlock_class_max * sizeof(PFS_rwlock_class);
total_memory+= size; total_memory+= size;
break; break;
case 14: case 14:
name= "(PFS_COND_CLASS).ROW_SIZE"; name= "(pfs_cond_class).row_size";
size= sizeof(PFS_cond_class); size= sizeof(PFS_cond_class);
break; break;
case 15: case 15:
name= "(PFS_COND_CLASS).ROW_COUNT"; name= "(pfs_cond_class).row_count";
size= cond_class_max; size= cond_class_max;
break; break;
case 16: case 16:
name= "(PFS_COND_CLASS).MEMORY"; name= "(pfs_cond_class).memory";
size= cond_class_max * sizeof(PFS_cond_class); size= cond_class_max * sizeof(PFS_cond_class);
total_memory+= size; total_memory+= size;
break; break;
case 17: case 17:
name= "(PFS_THREAD_CLASS).ROW_SIZE"; name= "(pfs_thread_class).row_size";
size= sizeof(PFS_thread_class); size= sizeof(PFS_thread_class);
break; break;
case 18: case 18:
name= "(PFS_THREAD_CLASS).ROW_COUNT"; name= "(pfs_thread_class).row_count";
size= thread_class_max; size= thread_class_max;
break; break;
case 19: case 19:
name= "(PFS_THREAD_CLASS).MEMORY"; name= "(pfs_thread_class).memory";
size= thread_class_max * sizeof(PFS_thread_class); size= thread_class_max * sizeof(PFS_thread_class);
total_memory+= size; total_memory+= size;
break; break;
case 20: case 20:
name= "(PFS_FILE_CLASS).ROW_SIZE"; name= "(pfs_file_class).row_size";
size= sizeof(PFS_file_class); size= sizeof(PFS_file_class);
break; break;
case 21: case 21:
name= "(PFS_FILE_CLASS).ROW_COUNT"; name= "(pfs_file_class).row_count";
size= file_class_max; size= file_class_max;
break; break;
case 22: case 22:
name= "(PFS_FILE_CLASS).MEMORY"; name= "(pfs_file_class).memory";
size= file_class_max * sizeof(PFS_file_class); size= file_class_max * sizeof(PFS_file_class);
total_memory+= size; total_memory+= size;
break; break;
case 23: case 23:
name= "MUTEX_INSTANCES.ROW_SIZE"; name= "mutex_instances.row_size";
size= sizeof(PFS_mutex); size= sizeof(PFS_mutex);
break; break;
case 24: case 24:
name= "MUTEX_INSTANCES.ROW_COUNT"; name= "mutex_instances.row_count";
size= mutex_max; size= mutex_max;
break; break;
case 25: case 25:
name= "MUTEX_INSTANCES.MEMORY"; name= "mutex_instances.memory";
size= mutex_max * sizeof(PFS_mutex); size= mutex_max * sizeof(PFS_mutex);
total_memory+= size; total_memory+= size;
break; break;
case 26: case 26:
name= "RWLOCK_INSTANCES.ROW_SIZE"; name= "rwlock_instances.row_size";
size= sizeof(PFS_rwlock); size= sizeof(PFS_rwlock);
break; break;
case 27: case 27:
name= "RWLOCK_INSTANCES.ROW_COUNT"; name= "rwlock_instances.row_count";
size= rwlock_max; size= rwlock_max;
break; break;
case 28: case 28:
name= "RWLOCK_INSTANCES.MEMORY"; name= "rwlock_instances.memory";
size= rwlock_max * sizeof(PFS_rwlock); size= rwlock_max * sizeof(PFS_rwlock);
total_memory+= size; total_memory+= size;
break; break;
case 29: case 29:
name= "COND_INSTANCES.ROW_SIZE"; name= "cond_instances.row_size";
size= sizeof(PFS_cond); size= sizeof(PFS_cond);
break; break;
case 30: case 30:
name= "COND_INSTANCES.ROW_COUNT"; name= "cond_instances.row_count";
size= cond_max; size= cond_max;
break; break;
case 31: case 31:
name= "COND_INSTANCES.MEMORY"; name= "cond_instances.memory";
size= cond_max * sizeof(PFS_cond); size= cond_max * sizeof(PFS_cond);
total_memory+= size; total_memory+= size;
break; break;
case 32: case 32:
name= "PROCESSLIST.ROW_SIZE"; name= "threads.row_size";
size= sizeof(PFS_thread); size= sizeof(PFS_thread);
break; break;
case 33: case 33:
name= "PROCESSLIST.ROW_COUNT"; name= "threads.row_count";
size= thread_max; size= thread_max;
break; break;
case 34: case 34:
name= "PROCESSLIST.MEMORY"; name= "threads.memory";
size= thread_max * sizeof(PFS_thread); size= thread_max * sizeof(PFS_thread);
total_memory+= size; total_memory+= size;
break; break;
case 35: case 35:
name= "FILE_INSTANCES.ROW_SIZE"; name= "file_instances.row_size";
size= sizeof(PFS_file); size= sizeof(PFS_file);
break; break;
case 36: case 36:
name= "FILE_INSTANCES.ROW_COUNT"; name= "file_instances.row_count";
size= file_max; size= file_max;
break; break;
case 37: case 37:
name= "FILE_INSTANCES.MEMORY"; name= "file_instances.memory";
size= file_max * sizeof(PFS_file); size= file_max * sizeof(PFS_file);
total_memory+= size; total_memory+= size;
break; break;
case 38: case 38:
name= "(PFS_FILE_HANDLE).ROW_SIZE"; name= "(pfs_file_handle).row_size";
size= sizeof(PFS_file*); size= sizeof(PFS_file*);
break; break;
case 39: case 39:
name= "(PFS_FILE_HANDLE).ROW_COUNT"; name= "(pfs_file_handle).row_count";
size= file_handle_max; size= file_handle_max;
break; break;
case 40: case 40:
name= "(PFS_FILE_HANDLE).MEMORY"; name= "(pfs_file_handle).memory";
size= file_handle_max * sizeof(PFS_file*); size= file_handle_max * sizeof(PFS_file*);
total_memory+= size; total_memory+= size;
break; break;
case 41: case 41:
name= "EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME.ROW_SIZE"; name= "events_waits_summary_by_thread_by_event_name.row_size";
size= sizeof(PFS_single_stat_chain); size= sizeof(PFS_single_stat_chain);
break; break;
case 42: case 42:
name= "EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME.ROW_COUNT"; name= "events_waits_summary_by_thread_by_event_name.row_count";
size= thread_max * instr_class_per_thread; size= thread_max * instr_class_per_thread;
break; break;
case 43: case 43:
name= "EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME.MEMORY"; name= "events_waits_summary_by_thread_by_event_name.memory";
size= thread_max * instr_class_per_thread * sizeof(PFS_single_stat_chain); size= thread_max * instr_class_per_thread * sizeof(PFS_single_stat_chain);
total_memory+= size; total_memory+= size;
break; break;
case 44: case 44:
name= "(PFS_TABLE_SHARE).ROW_SIZE"; name= "(pfs_table_share).row_size";
size= sizeof(PFS_table_share); size= sizeof(PFS_table_share);
break; break;
case 45: case 45:
name= "(PFS_TABLE_SHARE).ROW_COUNT"; name= "(pfs_table_share).row_count";
size= table_share_max; size= table_share_max;
break; break;
case 46: case 46:
name= "(PFS_TABLE_SHARE).MEMORY"; name= "(pfs_table_share).memory";
size= table_share_max * sizeof(PFS_table_share); size= table_share_max * sizeof(PFS_table_share);
total_memory+= size; total_memory+= size;
break; break;
case 47: case 47:
name= "(PFS_TABLE).ROW_SIZE"; name= "(pfs_table).row_size";
size= sizeof(PFS_table); size= sizeof(PFS_table);
break; break;
case 48: case 48:
name= "(PFS_TABLE).ROW_COUNT"; name= "(pfs_table).row_count";
size= table_max; size= table_max;
break; break;
case 49: case 49:
name= "(PFS_TABLE).MEMORY"; name= "(pfs_table).memory";
size= table_max * sizeof(PFS_table); size= table_max * sizeof(PFS_table);
total_memory+= size; total_memory+= size;
break; break;
...@@ -753,7 +753,7 @@ bool pfs_show_status(handlerton *hton, THD *thd, ...@@ -753,7 +753,7 @@ bool pfs_show_status(handlerton *hton, THD *thd,
for aggregation in total_memory. for aggregation in total_memory.
*/ */
case 50: case 50:
name= "PERFORMANCE_SCHEMA.MEMORY"; name= "performance_schema.memory";
size= total_memory; size= total_memory;
/* This will fail if something is not advertised here */ /* This will fail if something is not advertised here */
DBUG_ASSERT(size == pfs_allocated_memory); DBUG_ASSERT(size == pfs_allocated_memory);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment