@@ -251,10 +251,12 @@ mysql> select * from latest_file_io limit 5;
251251
252252Summarizes memory use by user using the 5.7 Performance Schema instrumentation.
253253
254+ When the user found is NULL, it is assumed to be a "background" thread.
255+
254256##### Example
255257
256258``` SQL
257- mysql> select * from memory_by_user_by_current_bytes WHERE user IS NOT NULL ;
259+ mysql> select * from memory_by_user_by_current_bytes;
258260+ -- ----+--------------------+-------------------+-------------------+-------------------+-----------------+
259261| user | current_count_used | current_allocated | current_avg_alloc | current_max_alloc | total_allocated |
260262+ -- ----+--------------------+-------------------+-------------------+-------------------+-----------------+
@@ -742,6 +744,8 @@ avg_tmp_tables_per_query: 189
742744
743745Summarizes statement activity, file IO and connections by user.
744746
747+ When the user found is NULL, it is assumed to be a "background" thread.
748+
745749##### Example
746750
747751```SQL
@@ -823,6 +827,8 @@ mysql> select * from user_summary_by_file_io_type;
823827
824828Summarizes stages by user, ordered by user and total latency per stage.
825829
830+ When the user found is NULL, it is assumed to be a "background" thread.
831+
826832##### Example
827833
828834```SQL
@@ -855,6 +861,8 @@ mysql> select * from user_summary_by_stages;
855861
856862Summarizes overall statement statistics by user.
857863
864+ When the user found is NULL, it is assumed to be a "background" thread.
865+
858866##### Example
859867
860868```SQL
@@ -872,6 +880,8 @@ mysql> select * from user_summary_by_statement_latency;
872880
873881Summarizes the types of statements executed by each user.
874882
883+ When the user found is NULL, it is assumed to be a "background" thread.
884+
875885##### Example
876886
877887```SQL
@@ -1206,7 +1216,7 @@ Currently relies on the fact that a table data file will be within a specified d
12061216
12071217##### Returns
12081218
1209- VARCHAR(512 )
1219+ VARCHAR(64 )
12101220
12111221##### Example
12121222```SQL
@@ -1233,7 +1243,7 @@ Useful for when interacting with Performance Schema data concerning IO statistic
12331243
12341244##### Returns
12351245
1236- VARCHAR(512 )
1246+ VARCHAR(64 )
12371247
12381248##### Example
12391249```SQL
@@ -1474,6 +1484,39 @@ mysql> SELECT sys.ps_is_instrument_default_timed('statement/sql/select');
147414841 row in set (0.00 sec)
14751485` ` `
14761486
1487+ # ### ps_thread_id
1488+
1489+ # #### Description
1490+
1491+ Return the Performance Schema THREAD_ID for the specified connection ID.
1492+
1493+ # #### Parameters
1494+
1495+ * in_connection_id (BIGINT UNSIGNED): The id of the connection to return the thread id for.
1496+
1497+ # #### Returns
1498+
1499+ BIGINT UNSIGNED
1500+
1501+ # #### Example
1502+ ` ` ` SQL
1503+ mysql> SELECT sys.ps_thread_id(79);
1504+ +----------------------+
1505+ | sys.ps_thread_id(79) |
1506+ +----------------------+
1507+ | 98 |
1508+ +----------------------+
1509+ 1 row in set (0.00 sec)
1510+
1511+ mysql> SELECT sys.ps_thread_id(CONNECTION_ID());
1512+ +-----------------------------------+
1513+ | sys.ps_thread_id(CONNECTION_ID()) |
1514+ +-----------------------------------+
1515+ | 98 |
1516+ +-----------------------------------+
1517+ 1 row in set (0.00 sec)
1518+ ` ` `
1519+
14771520# ### ps_thread_stack
14781521
14791522# #### Description
0 commit comments