summaryrefslogtreecommitdiff
path: root/mysys/my_static.c
diff options
context:
space:
mode:
authorMarc Alff <marc.alff@sun.com>2009-11-30 17:49:15 -0700
committerMarc Alff <marc.alff@sun.com>2009-11-30 17:49:15 -0700
commitf2d67abbc0fe05d0b97a63127ffc7f85c892cf98 (patch)
tree60c7ded488b2fdc27e6b1d0de6f621cf4503e7dd /mysys/my_static.c
parent3c11750e363da6e1017d5bc86e9e7e03b2c4e101 (diff)
downloadmariadb-git-f2d67abbc0fe05d0b97a63127ffc7f85c892cf98.tar.gz
WL#2360 Performance schema
Part 1: Instrumentation interface
Diffstat (limited to 'mysys/my_static.c')
-rw-r--r--mysys/my_static.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/mysys/my_static.c b/mysys/my_static.c
index 62e6d402315..fb62e92dfd1 100644
--- a/mysys/my_static.c
+++ b/mysys/my_static.c
@@ -111,3 +111,31 @@ my_bool NEAR my_disable_async_io=0;
my_bool NEAR my_disable_flush_key_blocks=0;
my_bool NEAR my_disable_symlinks=0;
my_bool NEAR mysys_uses_curses=0;
+
+/*
+ Note that PSI_hook and PSI_server are unconditionally
+ (no ifdef HAVE_PSI_INTERFACE) defined.
+ This is to ensure binary compatibility between the server and plugins,
+ in the case when:
+ - the server is not compiled with HAVE_PSI_INTERFACE
+ - a plugin is compiled with HAVE_PSI_INTERFACE
+ See the doxygen documentation for the performance schema.
+*/
+
+/**
+ Hook for the instrumentation interface.
+ Code implementing the instrumentation interface should register here.
+*/
+struct PSI_bootstrap *PSI_hook= NULL;
+
+/**
+ Instance of the instrumentation interface for the MySQL server.
+ @todo This is currently a global variable, which is handy when
+ compiling instrumented code that is bundled with the server.
+ When dynamic plugin are truly supported, this variable will need
+ to be replaced by a macro, so that each XYZ plugin can have it's own
+ xyz_psi_server variable, obtained from PSI_bootstrap::get_interface()
+ with the version used at compile time for plugin XYZ.
+*/
+PSI *PSI_server= NULL;
+