WL#13439: Sys Schema, Replace Stored Functions With Native Functions

Affects: Server-8.0   —   Status: Complete

WL#7803 "Performance Schema, Native Functions" introduces four native functions to format or retrieve data from the Performance Schema:

  • format_pico_time() - Format picosecond time
  • format_bytes() - Format a number of bytes
  • PS_current_thread_id() - Get the Performance Schema thread id for the current thread
  • PS_thread_id() - Get the Performance Schema thread id for another thread

Views and stored procedures in the Sys Schema now call these native functions instead of the corresponding stored functions, specifically:

  • Calls to sys.format_bytes() are replaced with format_bytes()
  • Calls to sys.format_time() are replaced with format_pico_time()
  • Calls to sys.ps_thread_id(NULL) are replaced with ps_current_thread_id()
  • Calls to sys.ps_thread_id(connection_id) are replaced with ps_thread_id(connection_id).

The original Sys Schema functions, sys.format_bytes(), sys.format_time() and sys.thread_id(), will be removed in a future release.