summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Widenius <monty@mariadb.org>2017-11-22 08:01:43 +0200
committerMichael Widenius <monty@mariadb.org>2017-11-23 09:49:45 +0200
commit8a24be6e74e7086fe6180433b42075cb6559c17e (patch)
tree39b913ba8934c481cdff2dee4b72b850448c638c
parent166056f744ac66920a0777b8a4327fd4ebb1e5be (diff)
downloadmariadb-git-8a24be6e74e7086fe6180433b42075cb6559c17e.tar.gz
Less dependencies in include files
-rw-r--r--include/m_string.h1
-rw-r--r--sql/filesort.cc3
-rw-r--r--sql/item.h2
-rw-r--r--sql/sql_array.h2
-rw-r--r--sql/sql_class.h9
-rw-r--r--sql/sql_lex.h1
-rw-r--r--sql/sql_tvc.h4
-rw-r--r--sql/sql_type.h1
-rw-r--r--sql/sql_window.h1
-rw-r--r--storage/tokudb/PerconaFT/portability/toku_debug_sync.h3
10 files changed, 11 insertions, 16 deletions
diff --git a/include/m_string.h b/include/m_string.h
index f06acbea358..c50d37a361b 100644
--- a/include/m_string.h
+++ b/include/m_string.h
@@ -22,7 +22,6 @@
#ifndef _m_string_h
#define _m_string_h
-#include "my_global.h" /* HAVE_* */
#include "my_decimal_limits.h"
#ifndef __USE_GNU
diff --git a/sql/filesort.cc b/sql/filesort.cc
index d2e167ce7bf..3c33f06d6cf 100644
--- a/sql/filesort.cc
+++ b/sql/filesort.cc
@@ -25,9 +25,6 @@
#include "mariadb.h"
#include "sql_priv.h"
#include "filesort.h"
-#ifdef HAVE_STDDEF_H
-#include <stddef.h> /* for macro offsetof */
-#endif
#include <m_ctype.h>
#include "sql_sort.h"
#include "probes_mysql.h"
diff --git a/sql/item.h b/sql/item.h
index 017c0b82456..8aec1b34b94 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -128,8 +128,6 @@ enum precedence {
HIGHEST_PRECEDENCE
};
-typedef Bounds_checked_array<Item*> Ref_ptr_array;
-
bool mark_unsupported_function(const char *where, void *store, uint result);
/* convenience helper for mark_unsupported_function() above */
diff --git a/sql/sql_array.h b/sql/sql_array.h
index bbaa653b177..341ea9a651b 100644
--- a/sql/sql_array.h
+++ b/sql/sql_array.h
@@ -258,4 +258,6 @@ public:
}
};
+typedef Bounds_checked_array<Item*> Ref_ptr_array;
+
#endif /* SQL_ARRAY_INCLUDED */
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 1358fe09f4c..306c13e9b5b 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -2052,11 +2052,6 @@ typedef struct
extern "C" void my_message_sql(uint error, const char *str, myf MyFlags);
-class THD;
-#ifndef DBUG_OFF
-void dbug_serve_apcs(THD *thd, int n_calls);
-#endif
-
/**
@class THD
For each client connection we create a separate thread with THD serving as
@@ -6292,6 +6287,10 @@ public:
};
+#ifndef DBUG_OFF
+void dbug_serve_apcs(THD *thd, int n_calls);
+#endif
+
#endif /* MYSQL_SERVER */
#endif /* SQL_CLASS_INCLUDED */
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index d4e438ab98c..6233417bb80 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -31,6 +31,7 @@
#include "sql_trigger.h"
#include "sp.h" // enum stored_procedure_type
#include "sql_tvc.h"
+#include "item.h"
/* YACC and LEX Definitions */
diff --git a/sql/sql_tvc.h b/sql/sql_tvc.h
index 7861f6fd16b..420311cccb2 100644
--- a/sql/sql_tvc.h
+++ b/sql/sql_tvc.h
@@ -16,14 +16,14 @@
#ifndef SQL_TVC_INCLUDED
#define SQL_TVC_INCLUDED
#include "sql_type.h"
-#include "item.h"
typedef List<Item> List_item;
class select_result;
-
class Explain_select;
class Explain_query;
class Item_func_in;
+class st_select_lex_unit;
+typedef class st_select_lex SELECT_LEX;
/**
@class table_value_constr
diff --git a/sql/sql_type.h b/sql/sql_type.h
index d94c5a87811..7c6d1a69f23 100644
--- a/sql/sql_type.h
+++ b/sql/sql_type.h
@@ -73,7 +73,6 @@ struct Schema_specification_st;
struct TABLE;
struct SORT_FIELD_ATTR;
-
/*
Flags for collation aggregation modes, used in TDCollation::agg():
diff --git a/sql/sql_window.h b/sql/sql_window.h
index 4cb9c1362f5..392f89e8f03 100644
--- a/sql/sql_window.h
+++ b/sql/sql_window.h
@@ -17,7 +17,6 @@
#ifndef SQL_WINDOW_INCLUDED
#define SQL_WINDOW_INCLUDED
-#include "item.h"
#include "filesort.h"
#include "records.h"
diff --git a/storage/tokudb/PerconaFT/portability/toku_debug_sync.h b/storage/tokudb/PerconaFT/portability/toku_debug_sync.h
index b5394e58d68..cbe72b16912 100644
--- a/storage/tokudb/PerconaFT/portability/toku_debug_sync.h
+++ b/storage/tokudb/PerconaFT/portability/toku_debug_sync.h
@@ -43,13 +43,14 @@ struct tokutxn;
#if defined(ENABLED_DEBUG_SYNC)
/*
- the below macros are defined in my_global.h, which is included in m_string.h,
+ the below macros are defined in my_global.h
the same macros are defined in TokuSetupCompiler.cmake as compiler options,
undefine them here to avoid build errors
*/
#undef __STDC_FORMAT_MACROS
#undef __STDC_LIMIT_MACROS
+#include "my_global.h"
#include "m_string.h"
#include "debug_sync.h"