Skip to content

Commit bfab909

Browse files
author
Steinar H. Gunderson
committed
Bug #26927386: REDUCE COMPILATION TIME [noclose]
Remove the top remaining #include links (those whose removal slims away at least 100k total parsed lines over a full build, each) that IWYU has identified as unused. Change-Id: I3735954f8825e2d8f9fcb16756ee4e7264d6e90d
1 parent 19766f4 commit bfab909

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+148
-47
lines changed

plugin/group_replication/include/plugin_handlers/primary_election_utils.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@
2323
#ifndef PRIMARY_ELECTION_UTILS_INCLUDED
2424
#define PRIMARY_ELECTION_UTILS_INCLUDED
2525

26-
#include "plugin/group_replication/include/plugin.h"
26+
#include <string>
27+
28+
#include "plugin/group_replication/include/member_version.h"
29+
30+
class Plugin_gcs_message;
2731

2832
class Election_member_info {
2933
public:

plugin/group_replication/src/plugin_handlers/primary_election_invocation_handler.cc

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
2222

2323
#include "plugin/group_replication/include/plugin_handlers/primary_election_invocation_handler.h"
24+
#include "plugin/group_replication/include/plugin.h"
2425
#include "plugin/group_replication/include/plugin_handlers/primary_election_utils.h"
2526

2627
Primary_election_handler::Primary_election_handler()

plugin/group_replication/src/plugin_handlers/primary_election_primary_process.cc

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
2222

2323
#include "plugin/group_replication/include/plugin_handlers/primary_election_primary_process.h"
24+
#include "plugin/group_replication/include/plugin.h"
2425
#include "plugin/group_replication/include/plugin_handlers/primary_election_utils.h"
2526

2627
static void *launch_handler_thread(void *arg) {

plugin/group_replication/src/plugin_handlers/primary_election_secondary_process.cc

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
2222

2323
#include "plugin/group_replication/include/plugin_handlers/primary_election_secondary_process.h"
24+
#include "plugin/group_replication/include/plugin.h"
2425
#include "plugin/group_replication/include/plugin_handlers/primary_election_utils.h"
2526
#include "plugin/group_replication/include/plugin_handlers/read_mode_handler.h"
2627

plugin/group_replication/src/plugin_handlers/primary_election_utils.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323
#include "plugin/group_replication/include/plugin_handlers/primary_election_utils.h"
2424

25+
#include "plugin/group_replication/include/plugin.h"
26+
2527
Election_member_info::Election_member_info(const std::string uuid,
2628
const Member_version &version,
2729
bool is_primary)
@@ -164,4 +166,4 @@ void kill_transactions_and_leave_on_election_error(std::string &err_msg) {
164166
}
165167

166168
DBUG_VOID_RETURN;
167-
}
169+
}

plugin/group_replication/src/plugin_handlers/primary_election_validation_handler.cc

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
2222

2323
#include "plugin/group_replication/include/plugin_handlers/primary_election_validation_handler.h"
24+
25+
#include "plugin/group_replication/include/plugin.h"
2426
#include "plugin/group_replication/include/plugin_messages/group_validation_message.h"
2527

2628
int send_validation_message(Group_validation_message *message) {

plugin/x/src/xpl_server.cc

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
#include "plugin/x/src/udf/registrator.h"
5858
#include "plugin/x/src/xpl_client.h"
5959
#include "plugin/x/src/xpl_error.h"
60+
#include "plugin/x/src/xpl_log.h"
6061
#include "plugin/x/src/xpl_session.h"
6162
#include "plugin/x/src/xpl_system_variables.h"
6263

plugin/x/src/xpl_system_variables.cc

+3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
#include <stdlib.h>
2828

2929
#include "my_inttypes.h"
30+
#include "my_sys.h"
31+
#include "mysql/psi/psi_base.h"
32+
#include "mysql/service_mysql_alloc.h"
3033

3134
namespace xpl {
3235

plugin/x/src/xpl_system_variables.h

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include <vector>
3030

3131
#include "plugin/x/ngs/include/ngs_common/bind.h"
32-
#include "plugin/x/src/xpl_log.h"
3332

3433
#ifdef max_allowed_packet
3534
#undef max_allowed_packet

sql/dd/dd_table.h

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
#include "sql/dd/types/column.h" // dd::enum_column_types
3535
#include "sql/handler.h" // legacy_db_type
3636
#include "sql/sql_alter.h" // Alter_info::enum_enable_or_disable
37-
#include "sql/system_variables.h"
3837

3938
class Create_field;
4039
class FOREIGN_KEY;

sql/dd/impl/system_registry.h

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
#include "sql/dd/string_type.h" // dd::String_type
3636
#include "sql/dd/types/object_table.h"
3737
#include "sql/dd/types/system_view.h"
38-
#include "sql/handler.h"
3938
#include "sql/plugin_table.h"
4039

4140
namespace dd {

sql/dd/impl/types/object_table_definition_impl.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License, version 2.0,
@@ -24,17 +24,16 @@
2424
#define DD__OBJECT_TABLE_DEFINITION_IMPL_INCLUDED
2525

2626
#include <map>
27+
#include <memory>
2728
#include <vector>
2829

2930
#include "m_string.h" // my_stpcpy
3031
#include "my_dbug.h"
31-
#include "sql/dd/impl/system_registry.h" // System_tablespaces
3232
#include "sql/dd/properties.h" // dd::tables::DD_properties
3333
#include "sql/dd/string_type.h" // dd::String_type
3434
#include "sql/dd/types/object_table_definition.h" // dd::Object_table_definition
3535
#include "sql/dd/types/table.h" // dd::Table
3636
#include "sql/mysqld.h" // lower_case_table_names
37-
#include "sql/table.h" // MYSQL_TABLESPACE_NAME
3837

3938
namespace dd {
4039

sql/dd/impl/types/object_table_impl.cc

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
#include "sql/dd/impl/bootstrap_ctx.h" // DD_bootstrap_ctx
2626
#include "sql/dd/impl/types/object_table_impl.h" // Object_table_impl
27+
#include "sql/table.h"
2728

2829
namespace dd {
2930

sql/handler.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@
5353
#include "my_sys.h"
5454
#include "my_thread_local.h" // my_errno
5555
#include "mysql/components/services/psi_table_bits.h"
56-
#include "sql/dd/object_id.h" // dd::Object_id
57-
#include "sql/dd/properties.h" // dd::Properties
56+
#include "sql/dd/object_id.h" // dd::Object_id
5857
#include "sql/dd/string_type.h"
5958
#include "sql/dd/types/object_table.h" // dd::Object_table
6059
#include "sql/discrete_interval.h" // Discrete_interval

sql/protocol.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#include "mysql/mysql_lex_string.h" // LEX_STRING
2828
#include "mysql_com.h" // mysql_enum_shutdown_level
2929
#include "mysql_time.h" // MYSQL_TIME
30-
#include "sql/my_decimal.h" // my_decimal
3130
#include "sql_string.h" // String
3231
#include "violite.h" /* SSL && enum_vio_type */
3332
#ifdef HAVE_OPENSSL
@@ -45,6 +44,7 @@ class THD;
4544

4645
#include "mysql/com_data.h"
4746

47+
class my_decimal;
4848
class Send_field;
4949
class Proto_field;
5050
class Item_param;
@@ -215,10 +215,10 @@ class Protocol {
215215
| end_row(...)
216216
... same for each row, until all rows are sent ...
217217
| send_ok/eof/error(...)
218-
However, a protocol implementation might use different schema. For
219-
example, Protocol_callback ignores start/end_row when metadata is being
220-
sent.
221-
*/
218+
However, a protocol implementation might use different schema. For
219+
example, Protocol_callback ignores start/end_row when metadata is being
220+
sent.
221+
*/
222222

223223
virtual void start_row() = 0;
224224
virtual bool end_row() = 0;

sql/rpl_utility.h

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License, version 2.0,
@@ -43,8 +43,7 @@ struct MY_BITMAP;
4343

4444
#include "map_helpers.h"
4545
#include "prealloced_array.h" // Prealloced_array
46-
#include "sql/handler.h"
47-
#include "sql/table.h" // TABLE_LIST
46+
#include "sql/table.h" // TABLE_LIST
4847

4948
class Log_event;
5049
class Relay_log_info;
@@ -324,7 +323,7 @@ class table_def {
324323
/*
325324
This type has not been used since before row-based replication,
326325
so we can safely assume that it really is MYSQL_TYPE_NEWDATE.
327-
*/
326+
*/
328327
case MYSQL_TYPE_DATE:
329328
source_type = MYSQL_TYPE_NEWDATE;
330329
break;

sql/sql_admin.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,16 @@
2626
#include <stddef.h>
2727
#include <set>
2828

29-
#include "clone_handler.h"
3029
#include "lex_string.h"
3130
#include "my_dbug.h"
3231
#include "my_sqlcommand.h"
3332
#include "sql/histograms/histogram.h"
3433
#include "sql/memroot_allocator.h"
3534
#include "sql/sql_cmd.h" // Sql_cmd
3635
#include "sql/sql_cmd_ddl_table.h" // Sql_cmd_ddl_table
36+
#include "sql/sql_plugin_ref.h"
3737

38+
class Clone_handler;
3839
class String;
3940
class THD;
4041

sql/sql_tablespace.cc

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#include "sql/dd/cache/dictionary_client.h" // dd::Dictionary_client
4141
#include "sql/dd/dd.h" // dd::create_object
4242
#include "sql/dd/impl/sdi_utils.h" // dd::sdi_utils::make_guard
43+
#include "sql/dd/properties.h"
4344
#include "sql/dd/string_type.h"
4445
#include "sql/dd/types/tablespace.h" // dd::fetch_tablespace_table_refs
4546
#include "sql/dd/types/tablespace_file.h" // dd::Tablespace_file

storage/innobase/dict/dict0crea.cc

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ this program; if not, write to the Free Software Foundation, Inc.,
3434
#include "btr0btr.h"
3535
#include "btr0pcur.h"
3636
#include "dict0boot.h"
37+
#include "dict0dd.h"
3738
#include "dict0dict.h"
3839
#include "dict0priv.h"
3940
#include "dict0stats.h"

storage/innobase/dict/dict0mem.cc

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ this program; if not, write to the Free Software Foundation, Inc.,
3838

3939
#include "data0type.h"
4040
#endif /* !UNIV_HOTBACKUP */
41+
#include "dict0dd.h"
4142
#include "dict0dict.h"
4243
#include "dict0mem.h"
4344
#ifndef UNIV_HOTBACKUP

storage/innobase/fts/fts0sql.cc

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ this program; if not, write to the Free Software Foundation, Inc.,
3232

3333
#include <sys/types.h>
3434

35+
#include "dict0dd.h"
3536
#include "dict0dict.h"
3637
#include "fts0priv.h"
3738
#include "fts0types.h"

storage/innobase/include/row0mysql.h

+36-1
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,51 @@ this program; if not, write to the Free Software Foundation, Inc.,
3838
#include "ha_prototypes.h"
3939
#endif /* !UNIV_HOTBACKUP */
4040

41+
#include <stddef.h>
42+
#include <sys/types.h>
43+
4144
#include "btr0pcur.h"
4245
#include "data0data.h"
43-
#include "dict0dd.h"
46+
#include "data0type.h"
47+
#include "db0err.h"
4448
#include "dict0types.h"
49+
#include "fts0fts.h"
50+
#include "gis0type.h"
4551
#include "lob0undo.h"
52+
#include "lock0types.h"
53+
#include "mem0mem.h"
54+
#include "my_compiler.h"
55+
#include "my_inttypes.h"
4656
#include "que0types.h"
57+
#include "rem0types.h"
4758
#include "row0types.h"
4859
#include "sess0sess.h"
4960
#include "sql_cmd.h"
5061
#include "trx0types.h"
62+
#include "univ.i"
63+
64+
class THD;
65+
class ha_innobase;
66+
class innodb_session_t;
67+
namespace dd {
68+
class Table;
69+
}
70+
struct TABLE;
71+
struct btr_pcur_t;
72+
struct dfield_t;
73+
struct dict_field_t;
74+
struct dict_foreign_t;
75+
struct dict_index_t;
76+
struct dict_table_t;
77+
struct dict_v_col_t;
78+
struct dtuple_t;
79+
struct ins_node_t;
80+
struct mtr_t;
81+
struct que_fork_t;
82+
struct que_thr_t;
83+
struct trx_t;
84+
struct upd_node_t;
85+
struct upd_t;
5186

5287
#ifndef UNIV_HOTBACKUP
5388
extern ibool row_rollback_on_timeout;

storage/innobase/include/trx0trx.h

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ this program; if not, write to the Free Software Foundation, Inc.,
3939
#include "ha_prototypes.h"
4040

4141
#include "dict0types.h"
42-
#include "sql/handler.h"
4342
#include "trx0types.h"
4443
#include "ut0new.h"
4544

storage/innobase/log/log0ddl.cc

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ this program; if not, write to the Free Software Foundation, Inc.,
4343
#include <sql_thd_internal_api.h>
4444

4545
#include "btr0sea.h"
46+
#include "dict0dd.h"
4647
#include "dict0mem.h"
4748
#include "dict0stats.h"
4849
#include "ha_innodb.h"

storage/innobase/row/row0merge.cc

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ this program; if not, write to the Free Software Foundation, Inc.,
3838
#include <sql_class.h>
3939
#include "btr0bulk.h"
4040
#include "dict0crea.h"
41+
#include "dict0dd.h"
4142
#include "fsp0sysspace.h"
4243
#include "ha_prototypes.h"
4344
#include "handler0alter.h"
@@ -58,6 +59,7 @@ this program; if not, write to the Free Software Foundation, Inc.,
5859
#include "ut0stage.h"
5960

6061
#include "my_dbug.h"
62+
#include "sql/table.h"
6163

6264
/* Ignore posix_fadvise() on those platforms where it does not exist */
6365
#if defined _WIN32

storage/innobase/row/row0quiesce.cc

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ this program; if not, write to the Free Software Foundation, Inc.,
3333
#include <errno.h>
3434
#include <my_aes.h>
3535

36+
#include "dict0dd.h"
3637
#include "fsp0sysspace.h"
3738
#include "ha_prototypes.h"
3839
#include "ibuf0ibuf.h"

storage/innobase/srv/srv0start.cc

+6-3
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ this program; if not, write to the Free Software Foundation, Inc.,
5858
#include "current_thd.h"
5959
#include "data0data.h"
6060
#include "data0type.h"
61+
#include "dict0dd.h"
6162
#include "dict0dict.h"
6263
#include "fil0fil.h"
6364
#include "fsp0fsp.h"
@@ -731,9 +732,11 @@ static dberr_t srv_undo_tablespace_fixup_num(space_id_t space_num) {
731732
return (DB_READ_ONLY);
732733
}
733734

734-
/* Search for a file that is using any of the space IDs assigned to this
735-
undo number. The directory scan assured that there are no duplicate files
736-
with the same space_id or with the same undo space number. */
735+
/*
736+
Search for a file that is using any of the space IDs assigned to this
737+
undo number. The directory scan assured that there are no duplicate files
738+
with the same space_id or with the same undo space number.
739+
*/
737740
space_id_t space_id = SPACE_UNKNOWN;
738741
std::string scanned_name;
739742
for (size_t ndx = 0;

storage/myisam/ft_boolean_search.cc

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
#include "my_inttypes.h"
6868
#include "my_macros.h"
6969
#include "storage/myisam/ftdefs.h"
70+
#include "storage/myisam/myisamdef.h"
7071
#include "template_utils.h"
7172

7273
/* search with boolean queries */

storage/myisam/ft_nlq_search.cc

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include "my_inttypes.h"
3333
#include "my_macros.h"
3434
#include "storage/myisam/ftdefs.h"
35+
#include "storage/myisam/myisamdef.h"
3536

3637
/* search with natural language queries */
3738

storage/myisam/ft_parser.cc

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "my_dbug.h"
3030
#include "my_inttypes.h"
3131
#include "storage/myisam/ftdefs.h"
32+
#include "storage/myisam/myisamdef.h"
3233

3334
struct FT_DOCSTAT {
3435
FT_WORD *list;

0 commit comments

Comments
 (0)