MySQL 9.3 Reference Manual Including MySQL NDB Cluster 9.3

7.5.8.4 Option Tracker Functions

The Option Tracker provides the functions shown in the next table. More detailed information about each function is provided in the list following the table.

These functions provide safe interfaces for reading and updating the mysql_option.option_usage table (see Section 7.5.8.1, “Option Tracker Tables”) and performance_schema.mysql_option table; in addition, changes made using the functions are propagated to Group Replication secondaries whereas changes made using SQL are not. For these reasons, you should always use the Option Tracker functions for modifying option usage data instead of attempting to update either of these tables directly.

Table 7.10 Option Tracker Functions

Name Description
option_tracker_option_register() Register an option with the Option Tracker
option_tracker_option_unregister() Deregister an option from the Option Tracker
option_tracker_usage_get() Get usage data for an option registered with the Option Tracker
option_tracker_usage_set() Set usage data for an option registered with the Option Tracker

option_tracker_usage_set() requires that the user calling the function be granted the OPTION_TRACKER_UPDATER privilege explicitly; option_tracker_usage_get() requires either of OPTION_TRACKER_UPDATER or OPTION_TRACKER_OBSERVER. This is true even for the MySQL root user.