Skip to content

Commit

Permalink
remove unneded #include's that had a dubious explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
vuvova committed Oct 24, 2015
1 parent 2c0bcff commit fb87133
Show file tree
Hide file tree
Showing 30 changed files with 15 additions and 28 deletions.
8 changes: 8 additions & 0 deletions include/decimal.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
#ifndef _decimal_h
#define _decimal_h

#ifdef __cplusplus
extern "C" {
#endif

typedef enum
{TRUNCATE=0, HALF_EVEN, HALF_UP, CEILING, FLOOR}
decimal_round_mode;
Expand Down Expand Up @@ -112,5 +116,9 @@ void max_decimal(int precision, int frac, decimal_t *to);
#define E_DEC_ERROR 31
#define E_DEC_FATAL_ERROR 30

#ifdef __cplusplus
}
#endif

#endif

1 change: 0 additions & 1 deletion sql/filesort.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <my_global.h>
#include "sql_priv.h"
#include "filesort.h"
#include "unireg.h" // REQUIRED by other includes
#ifdef HAVE_STDDEF_H
#include <stddef.h> /* for macro offsetof */
#endif
Expand Down
1 change: 1 addition & 0 deletions sql/hostname.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
*/
#include <my_global.h>
#include "sql_priv.h"
#include "unireg.h" // SPECIAL_NO_HOST_CACHE
#include "hostname.h"
#include "my_global.h"
#ifndef __WIN__
Expand Down
1 change: 0 additions & 1 deletion sql/item.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#endif
#include <my_global.h> /* NO_EMBEDDED_ACCESS_CHECKS */
#include "sql_priv.h"
#include "unireg.h" // REQUIRED: for other includes
#include <mysql.h>
#include <m_ctype.h>
#include "my_dir.h"
Expand Down
1 change: 0 additions & 1 deletion sql/item.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "sql_priv.h" /* STRING_BUFFER_USUAL_SIZE */
#include "unireg.h"
#include "sql_const.h" /* RAND_TABLE_BIT, MAX_FIELD_NAME */
#include "unireg.h" // REQUIRED: for other includes
#include "thr_malloc.h" /* sql_calloc */
#include "field.h" /* Derivation */

Expand Down
1 change: 0 additions & 1 deletion sql/key.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#include <my_global.h>
#include "sql_priv.h"
#include "unireg.h" // REQUIRED: by includes later
#include "key.h" // key_rec_cmp
#include "field.h" // Field

Expand Down
1 change: 0 additions & 1 deletion sql/lock.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
#include <my_global.h>
#include "sql_priv.h"
#include "debug_sync.h"
#include "unireg.h" // REQUIRED: for other includes
#include "lock.h"
#include "sql_base.h" // close_tables_for_reopen
#include "sql_parse.h" // is_log_table_write_query
Expand Down
1 change: 0 additions & 1 deletion sql/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#ifndef LOG_H
#define LOG_H

#include "unireg.h" // REQUIRED: for other includes
#include "handler.h" /* my_xid */

class Relay_log_info;
Expand Down
1 change: 0 additions & 1 deletion sql/protocol.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

#include <my_global.h>
#include "sql_priv.h"
#include "unireg.h" // REQUIRED: for other includes
#include "protocol.h"
#include "sql_class.h" // THD
#include <stdarg.h>
Expand Down
1 change: 0 additions & 1 deletion sql/rpl_injector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

#include <my_global.h>
#include "sql_priv.h"
#include "unireg.h" // REQUIRED by later includes
#include "rpl_injector.h"
#include "transaction.h"
#include "sql_parse.h" // begin_trans, end_trans, COMMIT
Expand Down
1 change: 0 additions & 1 deletion sql/rpl_mi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <my_global.h> // For HAVE_REPLICATION
#include "sql_priv.h"
#include <my_dir.h>
#include "unireg.h" // REQUIRED by other includes
#include "rpl_mi.h"
#include "slave.h" // SLAVE_MAX_HEARTBEAT_PERIOD
#include "strfunc.h"
Expand Down
1 change: 0 additions & 1 deletion sql/rpl_record_old.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

#include <my_global.h>
#include "sql_priv.h"
#include "unireg.h" // REQUIRED by other includes
#include "rpl_rli.h"
#include "rpl_record_old.h"
#include "log_event.h" // Log_event_type
Expand Down
1 change: 0 additions & 1 deletion sql/sql_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#ifndef SQL_BASE_INCLUDED
#define SQL_BASE_INCLUDED

#include "unireg.h" // REQUIRED: for other includes
#include "sql_trigger.h" /* trg_event_type */
#include "sql_class.h" /* enum_mark_columns */
#include "mysqld.h" /* key_map */
Expand Down
1 change: 0 additions & 1 deletion sql/sql_class.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@

#include <my_global.h> /* NO_EMBEDDED_ACCESS_CHECKS */
#include "sql_priv.h"
#include "unireg.h" // REQUIRED: for other includes
#include "sql_class.h"
#include "sql_cache.h" // query_cache_abort
#include "sql_base.h" // close_thread_tables
Expand Down
3 changes: 0 additions & 3 deletions sql/sql_class.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
/* Classes in mysql */

#include "my_global.h" /* NO_EMBEDDED_ACCESS_CHECKS */
#ifdef MYSQL_SERVER
#include "unireg.h" // REQUIRED: for other includes
#endif
#include <waiting_threads.h>
#include "sql_const.h"
#include <mysql/plugin_audit.h>
Expand Down
1 change: 0 additions & 1 deletion sql/sql_connect.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "sql_audit.h"
#include "sql_connect.h"
#include "probes_mysql.h"
#include "unireg.h" // REQUIRED: for other includes
#include "sql_parse.h" // sql_command_flags,
// execute_init_command,
// do_command
Expand Down
4 changes: 3 additions & 1 deletion sql/sql_const.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@
@file
File containing constants that can be used throughout the server.
@note This file shall not contain any includes of any kinds.
@note This file shall not contain or include any declarations of any kinds.
*/

#ifndef SQL_CONST_INCLUDED
#define SQL_CONST_INCLUDED

#include <mysql_version.h>

#define LIBLEN FN_REFLEN-FN_LEN /* Max l{ngd p} dev */
/* extra 4+4 bytes for slave tmp tables */
#define MAX_DBKEY_LENGTH (NAME_LEN*2+1+1+4+4)
Expand Down
1 change: 0 additions & 1 deletion sql/sql_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
#include <my_global.h>
#include "sql_priv.h"
#include "sql_handler.h"
#include "unireg.h" // REQUIRED: for other includes
#include "sql_base.h" // close_thread_tables
#include "lock.h" // mysql_unlock_tables
#include "key.h" // key_copy
Expand Down
1 change: 0 additions & 1 deletion sql/sql_insert.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@

#include <my_global.h> /* NO_EMBEDDED_ACCESS_CHECKS */
#include "sql_priv.h"
#include "unireg.h" // REQUIRED: for other includes
#include "sql_insert.h"
#include "sql_update.h" // compare_record
#include "sql_base.h" // close_thread_tables
Expand Down
1 change: 0 additions & 1 deletion sql/sql_lex.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#define MYSQL_LEX 1
#include <my_global.h>
#include "sql_priv.h"
#include "unireg.h" // REQUIRED: for other includes
#include "sql_class.h" // sql_lex.h: SQLCOM_END
#include "sql_lex.h"
#include "sql_parse.h" // add_to_list
Expand Down
1 change: 0 additions & 1 deletion sql/sql_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <my_global.h>
#include "sql_priv.h"
#include "sql_manager.h"
#include "unireg.h" // REQUIRED: for other includes
#include "sql_base.h" // flush_tables

static bool volatile manager_thread_in_use;
Expand Down
1 change: 0 additions & 1 deletion sql/sql_parse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#define MYSQL_LEX 1
#include <my_global.h>
#include "sql_priv.h"
#include "unireg.h" // REQUIRED: for other includes
#include "sql_parse.h" // sql_kill, *_precheck, *_prepare
#include "lock.h" // try_transactional_lock,
// check_transactional_lock,
Expand Down
1 change: 0 additions & 1 deletion sql/sql_partition.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
#define MYSQL_LEX 1
#include <my_global.h>
#include "sql_priv.h"
#include "unireg.h" // REQUIRED: for other includes
#include "sql_partition.h"
#include "key.h" // key_restore
#include "sql_parse.h" // parse_sql
Expand Down
1 change: 0 additions & 1 deletion sql/sql_profile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

#include <my_global.h>
#include "sql_priv.h"
#include "unireg.h" // REQUIRED: for other includes
#include "sql_profile.h"
#include <my_sys.h>
#include "sql_show.h" // schema_table_store_record
Expand Down
1 change: 0 additions & 1 deletion sql/sql_time.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

#include <my_global.h>
#include "sql_priv.h"
#include "unireg.h" // REQUIRED by other includes
#include "sql_time.h"
#include "tztime.h" // struct Time_zone
#include "sql_class.h" // THD
Expand Down
2 changes: 2 additions & 0 deletions sql/sql_trigger.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */

#include <mysqld_error.h>

/* Forward declarations */

class Item_trigger_field;
Expand Down
1 change: 0 additions & 1 deletion sql/sql_update.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

#include <my_global.h> /* NO_EMBEDDED_ACCESS_CHECKS */
#include "sql_priv.h"
#include "unireg.h" // REQUIRED: for other includes
#include "sql_update.h"
#include "sql_cache.h" // query_cache_*
#include "sql_base.h" // close_tables_for_reopen
Expand Down
1 change: 0 additions & 1 deletion sql/sql_yacc.yy
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#define Select Lex->current_select
#include <my_global.h>
#include "sql_priv.h"
#include "unireg.h" // REQUIRED: for other includes
#include "sql_parse.h" /* comp_*_creator */
#include "sql_table.h" /* primary_key_name */
#include "sql_partition.h" /* mem_alloc_error, partition_info, HASH_PARTITION */
Expand Down
1 change: 0 additions & 1 deletion sql/table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

#include <my_global.h> /* NO_EMBEDDED_ACCESS_CHECKS */
#include "sql_priv.h"
#include "unireg.h" // REQUIRED: for other includes
#include "table.h"
#include "key.h" // find_ref_key
#include "sql_table.h" // build_table_filename,
Expand Down
1 change: 1 addition & 0 deletions storage/federatedx/federatedx_io_mysql.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ha_federatedx.h"

#include "m_string.h"
#include "mysqld_error.h"
#include "sql_servers.h"

#ifdef USE_PRAGMA_IMPLEMENTATION
Expand Down

0 comments on commit fb87133

Please sign in to comment.