summaryrefslogtreecommitdiff
path: root/storage/perfschema
diff options
context:
space:
mode:
authorMats Kindahl <mats@sun.com>2010-03-31 16:05:33 +0200
committerMats Kindahl <mats@sun.com>2010-03-31 16:05:33 +0200
commit23d8586dbfdfdf02fa2f801b9dad91db53025a64 (patch)
tree19f32879e77ada23d733f35173a25f410d655ebe /storage/perfschema
parentd7dd2fc92f042596c2e72a96934bb207270e7419 (diff)
downloadmariadb-git-23d8586dbfdfdf02fa2f801b9dad91db53025a64.tar.gz
WL#5030: Split and remove mysql_priv.h
This patch: - Moves all definitions from the mysql_priv.h file into header files for the component where the variable is defined - Creates header files if the component lacks one - Eliminates all include directives from mysql_priv.h - Eliminates all circular include cycles - Rename time.cc to sql_time.cc - Rename mysql_priv.h to sql_priv.h
Diffstat (limited to 'storage/perfschema')
-rw-r--r--storage/perfschema/ha_perfschema.cc3
-rw-r--r--storage/perfschema/ha_perfschema.h2
-rw-r--r--storage/perfschema/pfs.h3
-rw-r--r--storage/perfschema/pfs_check.cc2
-rw-r--r--storage/perfschema/pfs_column_values.cc2
-rw-r--r--storage/perfschema/pfs_column_values.h2
-rw-r--r--storage/perfschema/pfs_engine_table.cc5
-rw-r--r--storage/perfschema/pfs_engine_table.h1
-rw-r--r--storage/perfschema/pfs_instr.cc4
-rw-r--r--storage/perfschema/pfs_instr.h2
-rw-r--r--storage/perfschema/pfs_instr_class.h4
-rw-r--r--storage/perfschema/pfs_server.cc2
-rw-r--r--storage/perfschema/table_all_instr.cc3
-rw-r--r--storage/perfschema/table_events_waits.cc2
-rw-r--r--storage/perfschema/table_events_waits_summary.cc3
-rw-r--r--storage/perfschema/table_file_instances.cc3
-rw-r--r--storage/perfschema/table_file_summary.cc3
-rw-r--r--storage/perfschema/table_performance_timers.cc3
-rw-r--r--storage/perfschema/table_processlist.cc2
-rw-r--r--storage/perfschema/table_setup_consumers.cc2
-rw-r--r--storage/perfschema/table_setup_instruments.cc3
-rw-r--r--storage/perfschema/table_setup_objects.cc3
-rw-r--r--storage/perfschema/table_setup_timers.cc2
-rw-r--r--storage/perfschema/table_sync_instances.cc3
-rw-r--r--storage/perfschema/unittest/pfs-t.cc6
-rw-r--r--storage/perfschema/unittest/pfs_instr-oom-t.cc3
-rw-r--r--storage/perfschema/unittest/pfs_instr-t.cc5
-rw-r--r--storage/perfschema/unittest/pfs_instr_class-oom-t.cc3
-rw-r--r--storage/perfschema/unittest/pfs_instr_class-t.cc4
-rw-r--r--storage/perfschema/unittest/pfs_timer-t.cc2
30 files changed, 61 insertions, 26 deletions
diff --git a/storage/perfschema/ha_perfschema.cc b/storage/perfschema/ha_perfschema.cc
index 68e1f3f3a11..588ba5edec1 100644
--- a/storage/perfschema/ha_perfschema.cc
+++ b/storage/perfschema/ha_perfschema.cc
@@ -18,7 +18,8 @@
Performance schema storage engine (implementation).
*/
-#include "mysql_priv.h"
+#include "sql_priv.h"
+#include "unireg.h"
#include "ha_perfschema.h"
#include "mysql/plugin.h"
#include "pfs_engine_table.h"
diff --git a/storage/perfschema/ha_perfschema.h b/storage/perfschema/ha_perfschema.h
index 146b258ff47..92cc0476e73 100644
--- a/storage/perfschema/ha_perfschema.h
+++ b/storage/perfschema/ha_perfschema.h
@@ -16,6 +16,8 @@
#ifndef HA_PERFSCHEMA_H
#define HA_PERFSCHEMA_H
+#include "handler.h" /* class handler */
+
#ifdef USE_PRAGMA_INTERFACE
#pragma interface /* gcc class implementation */
#endif
diff --git a/storage/perfschema/pfs.h b/storage/perfschema/pfs.h
index 7af59ffce57..13d43cfce76 100644
--- a/storage/perfschema/pfs.h
+++ b/storage/perfschema/pfs.h
@@ -23,7 +23,8 @@
#define HAVE_PSI_1
-#include <mysql_priv.h>
+#include <sql_priv.h>
+#include <unireg.h>
#include <mysql/psi/psi.h>
extern struct PSI_bootstrap PFS_bootstrap;
diff --git a/storage/perfschema/pfs_check.cc b/storage/perfschema/pfs_check.cc
index 5d3746d371c..4ef4b8bdbc6 100644
--- a/storage/perfschema/pfs_check.cc
+++ b/storage/perfschema/pfs_check.cc
@@ -23,7 +23,7 @@
*/
#include "my_global.h"
-#include "mysql_priv.h"
+#include "sql_priv.h"
#include "pfs_server.h"
#include "pfs_engine_table.h"
diff --git a/storage/perfschema/pfs_column_values.cc b/storage/perfschema/pfs_column_values.cc
index 3143cd97e5d..6da1e04e63a 100644
--- a/storage/perfschema/pfs_column_values.cc
+++ b/storage/perfschema/pfs_column_values.cc
@@ -19,7 +19,7 @@
schema tables (implementation).
*/
-#include "mysql_priv.h"
+#include "sql_priv.h"
#include "pfs_column_values.h"
LEX_STRING PERFORMANCE_SCHEMA_str=
diff --git a/storage/perfschema/pfs_column_values.h b/storage/perfschema/pfs_column_values.h
index 6cd2e8687d1..0172ddd1d18 100644
--- a/storage/perfschema/pfs_column_values.h
+++ b/storage/perfschema/pfs_column_values.h
@@ -16,6 +16,8 @@
#ifndef PFS_COLUMN_VALUES_H
#define PFS_COLUMN_VALUES_H
+#include "m_string.h" /* LEX_STRING */
+
/**
@file storage/perfschema/pfs_column_values.h
Literal values for columns used in the
diff --git a/storage/perfschema/pfs_engine_table.cc b/storage/perfschema/pfs_engine_table.cc
index d0f5315ff36..857b8a66de7 100644
--- a/storage/perfschema/pfs_engine_table.cc
+++ b/storage/perfschema/pfs_engine_table.cc
@@ -18,7 +18,7 @@
Performance schema tables (implementation).
*/
-#include "mysql_priv.h"
+#include "sql_priv.h"
#include "pfs_engine_table.h"
#include "table_events_waits.h"
@@ -37,6 +37,9 @@
#include "pfs_column_values.h"
#include "pfs_instr.h"
+#include "sql_base.h" // close_thread_tables
+#include "lock.h" // MYSQL_LOCK_IGNORE_TIMEOUT
+
/**
@addtogroup Performance_schema_engine
@{
diff --git a/storage/perfschema/pfs_engine_table.h b/storage/perfschema/pfs_engine_table.h
index 6a826c9da7d..b4c7a4ee866 100644
--- a/storage/perfschema/pfs_engine_table.h
+++ b/storage/perfschema/pfs_engine_table.h
@@ -16,6 +16,7 @@
#ifndef PFS_ENGINE_TABLE_H
#define PFS_ENGINE_TABLE_H
+#include "sql_acl.h" /* struct ACL_* */
/**
@file storage/perfschema/pfs_engine_table.h
Performance schema tables (declarations).
diff --git a/storage/perfschema/pfs_instr.cc b/storage/perfschema/pfs_instr.cc
index fbaac621dfb..fb40db02ca3 100644
--- a/storage/perfschema/pfs_instr.cc
+++ b/storage/perfschema/pfs_instr.cc
@@ -18,8 +18,10 @@
Performance schema instruments (implementation).
*/
+#include <string.h>
+
#include "my_global.h"
-#include "mysql_priv.h"
+#include "sql_priv.h"
#include "my_sys.h"
#include "pfs_stat.h"
#include "pfs_instr.h"
diff --git a/storage/perfschema/pfs_instr.h b/storage/perfschema/pfs_instr.h
index a150a13fb75..a509d054d69 100644
--- a/storage/perfschema/pfs_instr.h
+++ b/storage/perfschema/pfs_instr.h
@@ -21,7 +21,7 @@
Performance schema instruments (declarations).
*/
-#include <mysql_priv.h>
+#include <sql_priv.h>
#include "pfs_lock.h"
#include "pfs_instr_class.h"
#include "pfs_events_waits.h"
diff --git a/storage/perfschema/pfs_instr_class.h b/storage/perfschema/pfs_instr_class.h
index 0a58095d612..4de9958033b 100644
--- a/storage/perfschema/pfs_instr_class.h
+++ b/storage/perfschema/pfs_instr_class.h
@@ -16,6 +16,8 @@
#ifndef PFS_INSTR_CLASS_H
#define PFS_INSTR_CLASS_H
+#include "mysql_com.h" /* NAME_LEN */
+
/**
@file storage/perfschema/pfs_instr_class.h
Performance schema instruments meta data (declarations).
@@ -36,7 +38,7 @@
*/
#define PFS_MAX_FULL_PREFIX_NAME_LENGTH 32
-#include <mysql_priv.h>
+#include <sql_priv.h>
#include <mysql/psi/psi.h>
#include "pfs_lock.h"
#include "pfs_stat.h"
diff --git a/storage/perfschema/pfs_server.cc b/storage/perfschema/pfs_server.cc
index 66b8a7fb22b..a1216c6ac30 100644
--- a/storage/perfschema/pfs_server.cc
+++ b/storage/perfschema/pfs_server.cc
@@ -21,7 +21,7 @@
#include "my_global.h"
#include "my_sys.h"
#include "mysys_err.h"
-#include "mysql_priv.h"
+#include "sql_priv.h"
#include "pfs_server.h"
#include "pfs.h"
#include "pfs_global.h"
diff --git a/storage/perfschema/table_all_instr.cc b/storage/perfschema/table_all_instr.cc
index e6cd7897f6f..18c0fcfafc6 100644
--- a/storage/perfschema/table_all_instr.cc
+++ b/storage/perfschema/table_all_instr.cc
@@ -18,7 +18,8 @@
Abstract tables for all instruments (implementation).
*/
-#include "mysql_priv.h"
+#include "sql_priv.h"
+#include "my_global.h"
#include "table_all_instr.h"
#include "pfs_global.h"
diff --git a/storage/perfschema/table_events_waits.cc b/storage/perfschema/table_events_waits.cc
index 3a12578597e..cb565373bd8 100644
--- a/storage/perfschema/table_events_waits.cc
+++ b/storage/perfschema/table_events_waits.cc
@@ -18,7 +18,7 @@
Table EVENTS_WAITS_xxx (implementation).
*/
-#include "mysql_priv.h"
+#include "sql_priv.h"
#include "table_events_waits.h"
#include "pfs_instr_class.h"
#include "pfs_instr.h"
diff --git a/storage/perfschema/table_events_waits_summary.cc b/storage/perfschema/table_events_waits_summary.cc
index c3d678d374c..0eca9f6722e 100644
--- a/storage/perfschema/table_events_waits_summary.cc
+++ b/storage/perfschema/table_events_waits_summary.cc
@@ -18,7 +18,8 @@
Table EVENTS_WAITS_SUMMARY_BY_xxx (implementation).
*/
-#include "mysql_priv.h"
+#include "sql_priv.h"
+#include "unireg.h"
#include "pfs_instr_class.h"
#include "pfs_column_types.h"
#include "pfs_column_values.h"
diff --git a/storage/perfschema/table_file_instances.cc b/storage/perfschema/table_file_instances.cc
index b6bc7ecbcf3..3de5cbe4b47 100644
--- a/storage/perfschema/table_file_instances.cc
+++ b/storage/perfschema/table_file_instances.cc
@@ -18,7 +18,8 @@
Table FILE_INSTANCES (implementation).
*/
-#include "mysql_priv.h"
+#include "sql_priv.h"
+#include "unireg.h"
#include "pfs_instr.h"
#include "pfs_column_types.h"
#include "pfs_column_values.h"
diff --git a/storage/perfschema/table_file_summary.cc b/storage/perfschema/table_file_summary.cc
index 0db4e08625a..16942e73916 100644
--- a/storage/perfschema/table_file_summary.cc
+++ b/storage/perfschema/table_file_summary.cc
@@ -18,7 +18,8 @@
Table FILE_SUMMARY_BY_xxx (implementation).
*/
-#include "mysql_priv.h"
+#include "sql_priv.h"
+#include "unireg.h"
#include "pfs_instr_class.h"
#include "pfs_column_types.h"
#include "pfs_column_values.h"
diff --git a/storage/perfschema/table_performance_timers.cc b/storage/perfschema/table_performance_timers.cc
index ab4e72b89fa..7a20e7e18e0 100644
--- a/storage/perfschema/table_performance_timers.cc
+++ b/storage/perfschema/table_performance_timers.cc
@@ -18,7 +18,8 @@
Table PERFORMANCE_TIMERS (implementation).
*/
-#include "mysql_priv.h"
+#include "sql_priv.h"
+#include "my_global.h"
#include "table_performance_timers.h"
#include "pfs_timer.h"
#include "pfs_global.h"
diff --git a/storage/perfschema/table_processlist.cc b/storage/perfschema/table_processlist.cc
index d0707b9df60..7518882ccea 100644
--- a/storage/perfschema/table_processlist.cc
+++ b/storage/perfschema/table_processlist.cc
@@ -18,7 +18,7 @@
Table PROCESSLIST (implementation).
*/
-#include "mysql_priv.h"
+#include "sql_priv.h"
#include "table_processlist.h"
#include "pfs_instr_class.h"
#include "pfs_instr.h"
diff --git a/storage/perfschema/table_setup_consumers.cc b/storage/perfschema/table_setup_consumers.cc
index f23dca8a675..ff74e7d3f28 100644
--- a/storage/perfschema/table_setup_consumers.cc
+++ b/storage/perfschema/table_setup_consumers.cc
@@ -18,7 +18,7 @@
Table SETUP_CONSUMERS (implementation).
*/
-#include "mysql_priv.h"
+#include "sql_priv.h"
#include "table_setup_consumers.h"
#include "pfs_instr.h"
#include "pfs_events_waits.h"
diff --git a/storage/perfschema/table_setup_instruments.cc b/storage/perfschema/table_setup_instruments.cc
index 6756e780d78..095299c4b69 100644
--- a/storage/perfschema/table_setup_instruments.cc
+++ b/storage/perfschema/table_setup_instruments.cc
@@ -18,7 +18,8 @@
Table SETUP_INSTRUMENTS (implementation).
*/
-#include "mysql_priv.h"
+#include "sql_priv.h"
+#include "unireg.h"
#include "pfs_instr_class.h"
#include "pfs_column_types.h"
#include "pfs_column_values.h"
diff --git a/storage/perfschema/table_setup_objects.cc b/storage/perfschema/table_setup_objects.cc
index 53a80782da0..b75bece83bd 100644
--- a/storage/perfschema/table_setup_objects.cc
+++ b/storage/perfschema/table_setup_objects.cc
@@ -18,7 +18,8 @@
Table SETUP_OBJECTS (implementation).
*/
-#include "mysql_priv.h"
+#include "sql_priv.h"
+#include "unireg.h"
#include "pfs_instr_class.h"
#include "pfs_column_types.h"
#include "pfs_column_values.h"
diff --git a/storage/perfschema/table_setup_timers.cc b/storage/perfschema/table_setup_timers.cc
index 2d57adb3a85..98e27808e0a 100644
--- a/storage/perfschema/table_setup_timers.cc
+++ b/storage/perfschema/table_setup_timers.cc
@@ -18,7 +18,7 @@
Table SETUP_TIMERS (implementation).
*/
-#include "mysql_priv.h"
+#include "sql_priv.h"
#include "table_setup_timers.h"
#include "pfs_column_values.h"
#include "pfs_timer.h"
diff --git a/storage/perfschema/table_sync_instances.cc b/storage/perfschema/table_sync_instances.cc
index a783b5b817b..c76c62cc9fd 100644
--- a/storage/perfschema/table_sync_instances.cc
+++ b/storage/perfschema/table_sync_instances.cc
@@ -19,7 +19,8 @@
and COND_INSTANCES (implementation).
*/
-#include "mysql_priv.h"
+#include "sql_priv.h"
+#include "unireg.h"
#include "pfs_instr.h"
#include "pfs_column_types.h"
#include "pfs_column_values.h"
diff --git a/storage/perfschema/unittest/pfs-t.cc b/storage/perfschema/unittest/pfs-t.cc
index 2b64aec3416..012c6e7d87a 100644
--- a/storage/perfschema/unittest/pfs-t.cc
+++ b/storage/perfschema/unittest/pfs-t.cc
@@ -13,13 +13,17 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#include <mysql_priv.h>
+#include <sql_priv.h>
+#include <my_global.h>
#include <pfs_server.h>
#include <pfs_instr_class.h>
#include <pfs_instr.h>
#include <pfs_global.h>
#include <tap.h>
+#include <string.h>
+#include <memory.h>
+
#include "stub_print_error.h"
/* test helpers, to simulate the setup */
diff --git a/storage/perfschema/unittest/pfs_instr-oom-t.cc b/storage/perfschema/unittest/pfs_instr-oom-t.cc
index d7810eedb04..4ea2e038b24 100644
--- a/storage/perfschema/unittest/pfs_instr-oom-t.cc
+++ b/storage/perfschema/unittest/pfs_instr-oom-t.cc
@@ -13,7 +13,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#include <mysql_priv.h>
+#include <sql_priv.h>
+#include <my_global.h>
#include <pfs_instr.h>
#include <pfs_stat.h>
#include <pfs_global.h>
diff --git a/storage/perfschema/unittest/pfs_instr-t.cc b/storage/perfschema/unittest/pfs_instr-t.cc
index f85de601579..4e73276b467 100644
--- a/storage/perfschema/unittest/pfs_instr-t.cc
+++ b/storage/perfschema/unittest/pfs_instr-t.cc
@@ -13,12 +13,15 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#include <mysql_priv.h>
+#include <sql_priv.h>
+#include <my_global.h>
#include <pfs_instr.h>
#include <pfs_stat.h>
#include <pfs_global.h>
#include <tap.h>
+#include <memory.h>
+
void test_no_instruments()
{
int rc;
diff --git a/storage/perfschema/unittest/pfs_instr_class-oom-t.cc b/storage/perfschema/unittest/pfs_instr_class-oom-t.cc
index 53100571323..9cab0d18b33 100644
--- a/storage/perfschema/unittest/pfs_instr_class-oom-t.cc
+++ b/storage/perfschema/unittest/pfs_instr_class-oom-t.cc
@@ -13,7 +13,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#include <mysql_priv.h>
+#include <sql_priv.h>
+#include <my_global.h>
#include <pfs_instr_class.h>
#include <pfs_global.h>
#include <tap.h>
diff --git a/storage/perfschema/unittest/pfs_instr_class-t.cc b/storage/perfschema/unittest/pfs_instr_class-t.cc
index 0a1e0c2d0b1..5d7e0bf734f 100644
--- a/storage/perfschema/unittest/pfs_instr_class-t.cc
+++ b/storage/perfschema/unittest/pfs_instr_class-t.cc
@@ -13,7 +13,9 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#include <mysql_priv.h>
+#include <sql_priv.h>
+#include <my_global.h>
+#include <string.h> // strncpy
#include <pfs_instr_class.h>
#include <pfs_instr.h>
#include <pfs_global.h>
diff --git a/storage/perfschema/unittest/pfs_timer-t.cc b/storage/perfschema/unittest/pfs_timer-t.cc
index 8fa29306982..a649257e0c5 100644
--- a/storage/perfschema/unittest/pfs_timer-t.cc
+++ b/storage/perfschema/unittest/pfs_timer-t.cc
@@ -14,7 +14,9 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <mysql_priv.h>
+#include <my_global.h>
#include <pfs_timer.h>
+#include "my_sys.h"
#include <tap.h>
void test_timers()