Skip to content

Commit e363c28

Browse files
author
Steinar H. Gunderson
committed
Bug #24710065: SPLIT MY_GLOBAL.H
Run include-what-you-use limited to adding "my_io.h" and then re-sorting the #includes (and nothing else); then remove "my_io.h" from my_global.h. Change-Id: I69dc6b94d53c722427239f28b3639488ca4890d0
1 parent 7fc4fd3 commit e363c28

File tree

186 files changed

+308
-76
lines changed

Some content is hidden

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

186 files changed

+308
-76
lines changed

client/mysql.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
#include "my_dbug.h"
4646
#include "my_default.h"
4747
#include "my_inttypes.h"
48+
#include "my_io.h"
4849
#include "my_loglevel.h"
4950
#include "my_readline.h"
5051
#include "mysql/service_my_snprintf.h"

client/mysql_config_editor.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "my_default_priv.h"
3737
#include "my_dir.h"
3838
#include "my_inttypes.h"
39+
#include "my_io.h"
3940
#include "my_rnd.h"
4041
#include "mysql/service_mysql_alloc.h"
4142
#include "print_version.h"

client/mysql_ssl_rsa_setup.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include "my_compiler.h"
3939
#include "my_dbug.h"
4040
#include "my_inttypes.h"
41+
#include "my_io.h"
4142
#include "mysql/service_mysql_alloc.h"
4243
#include "path.h"
4344
#include "print_version.h"

client/mysqladmin.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include "my_dbug.h"
3434
#include "my_default.h"
3535
#include "my_inttypes.h"
36+
#include "my_io.h"
3637
#include "mysql/service_mysql_alloc.h"
3738
#include "print_version.h"
3839
#include "typelib.h"

client/mysqlbinlog.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#include "my_decimal.h"
4444
#include "my_default.h"
4545
#include "my_dir.h"
46+
#include "my_io.h"
4647
#include "my_time.h"
4748
#include "mysql/service_my_snprintf.h"
4849
#include "prealloced_array.h"

client/mysqldump.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
#include "my_dbug.h"
5959
#include "my_default.h"
6060
#include "my_inttypes.h"
61+
#include "my_io.h"
6162
#include "mysql.h"
6263
#include "mysql/service_my_snprintf.h"
6364
#include "mysql/service_mysql_alloc.h"

client/mysqlimport.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include "my_dbug.h"
2828
#include "my_default.h"
2929
#include "my_inttypes.h"
30+
#include "my_io.h"
3031
#include "my_systime.h"
3132
#include "mysql/service_my_snprintf.h"
3233
#include "mysql/service_mysql_alloc.h"

client/mysqlslap.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
#include "my_dbug.h"
100100
#include "my_default.h"
101101
#include "my_inttypes.h"
102+
#include "my_io.h"
102103
#include "my_systime.h"
103104
#include "mysql/service_my_snprintf.h"
104105
#include "mysql/service_mysql_alloc.h"

client/mysqltest.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#include "my_dbug.h"
4343
#include "my_default.h"
4444
#include "my_inttypes.h"
45+
#include "my_io.h"
4546
#include "my_pointer_arithmetic.h"
4647
#include "my_regex.h" /* Our own version of regex */
4748
#include "my_thread_local.h"

client/path.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "my_dir.h"
2222
#include "my_global.h"
2323
#include "my_inttypes.h"
24+
#include "my_io.h"
2425
#include "my_sys.h"
2526

2627
#ifndef _WIN32

client/readline.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
#include "my_dbug.h"
2727
#include "my_inttypes.h"
28+
#include "my_io.h"
2829
#include "my_readline.h"
2930
#include "my_thread_local.h"
3031
#include "mysql/service_mysql_alloc.h"

client/upgrade/program.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include "check/mysqlcheck.h"
3838
#include "my_default.h"
3939
#include "my_inttypes.h"
40+
#include "my_io.h"
4041
#include "mysqld_error.h"
4142
#include "sql_string.h"
4243

components/mysql_server/dynamic_loader_path_filter.cc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2016, 2017, 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 as published by
@@ -13,14 +13,16 @@ You should have received a copy of the GNU General Public License
1313
along with this program; if not, write to the Free Software
1414
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA */
1515

16-
#include <string>
1716
#include <my_global.h> // needed by mysql_com.h
18-
#include <mysql_com.h> // NAME_CHAR_LEN
1917
#include <mysql/components/service_implementation.h>
2018
#include <mysql/components/services/dynamic_loader_scheme_file.h>
19+
#include <mysql_com.h> // NAME_CHAR_LEN
20+
#include <string>
21+
2122
#include "../../../sql/sql_plugin.h" // opt_plugin_dir
2223
#include "dynamic_loader_path_filter.h"
2324
#include "dynamic_loader_scheme_file.h"
25+
#include "my_io.h"
2426
#include "server_component.h"
2527

2628
typedef std::string my_string;
@@ -132,4 +134,4 @@ bool
132134
out_path+= path_buff;
133135

134136
return false;
135-
}
137+
}

dbug/dbug.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
#include "my_compiler.h"
9090
#include "my_dbug.h"
9191
#include "my_inttypes.h"
92+
#include "my_io.h"
9293
#include "my_sys.h"
9394
#include "my_thread_local.h"
9495
#include "mysql/service_my_snprintf.h"

include/my_global.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
#include <crtdbg.h>
4242
#endif
4343

44-
#include "my_io.h"
4544
#include "my_macros.h"
4645
#include "my_sharedlib.h"
4746
#include "my_shm_defaults.h"

include/my_sys.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "my_compiler.h"
2727
#include "my_global.h"
2828
#include "my_inttypes.h"
29+
#include "my_io.h"
2930
#include "my_psi_config.h" /* IWYU pragma: keep */
3031

3132
#ifdef HAVE_ALLOCA_H

include/myisam.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "my_check_opt.h"
3030
#include "my_compare.h"
3131
#include "my_inttypes.h"
32+
#include "my_io.h"
3233

3334
#ifdef __cplusplus
3435
extern "C" {

include/mysql/psi/psi_abi_file_v0.h.pp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
#include "mysql/psi/psi_file.h"
22
#include "my_global.h"
3+
#include "my_io.h"
4+
#include "my_config.h"
5+
static inline int is_directory_separator(char c)
6+
{
7+
return c == '/';
8+
}
9+
typedef int File;
10+
typedef mode_t MY_MODE;
11+
typedef socklen_t socket_len_t;
12+
typedef int my_socket;
313
#include "my_psi_config.h"
414
#include "psi_base.h"
515
#include "my_psi_config.h"

include/mysql/psi/psi_abi_file_v1.h.pp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
#include "mysql/psi/psi_file.h"
22
#include "my_global.h"
3+
#include "my_io.h"
4+
#include "my_config.h"
5+
static inline int is_directory_separator(char c)
6+
{
7+
return c == '/';
8+
}
9+
typedef int File;
10+
typedef mode_t MY_MODE;
11+
typedef socklen_t socket_len_t;
12+
typedef int my_socket;
313
#include "my_psi_config.h"
414
#include "psi_base.h"
515
#include "my_psi_config.h"

include/mysql/psi/psi_abi_file_v2.h.pp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
#include "mysql/psi/psi_file.h"
22
#include "my_global.h"
3+
#include "my_io.h"
4+
#include "my_config.h"
5+
static inline int is_directory_separator(char c)
6+
{
7+
return c == '/';
8+
}
9+
typedef int File;
10+
typedef mode_t MY_MODE;
11+
typedef socklen_t socket_len_t;
12+
typedef int my_socket;
313
#include "my_psi_config.h"
414
#include "psi_base.h"
515
#include "my_psi_config.h"
@@ -20,7 +30,7 @@
2030
typedef struct PSI_file PSI_file;
2131
struct PSI_file_bootstrap
2232
{
23-
void* (*get_interface)(int version);
33+
void *(*get_interface)(int version);
2434
};
2535
typedef struct PSI_file_bootstrap PSI_file_bootstrap;
2636
typedef struct PSI_placeholder PSI_file_service_t;

include/mysql/psi/psi_abi_socket_v0.h.pp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
#include "mysql/psi/psi_socket.h"
22
#include "my_global.h"
3+
#include "my_io.h"
4+
#include "my_config.h"
5+
static inline int is_directory_separator(char c)
6+
{
7+
return c == '/';
8+
}
9+
typedef int File;
10+
typedef mode_t MY_MODE;
11+
typedef socklen_t socket_len_t;
12+
typedef int my_socket;
313
#include "my_psi_config.h"
414
#include "psi_base.h"
515
#include "my_psi_config.h"

include/mysql/psi/psi_abi_socket_v1.h.pp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
#include "mysql/psi/psi_socket.h"
22
#include "my_global.h"
3+
#include "my_io.h"
4+
#include "my_config.h"
5+
static inline int is_directory_separator(char c)
6+
{
7+
return c == '/';
8+
}
9+
typedef int File;
10+
typedef mode_t MY_MODE;
11+
typedef socklen_t socket_len_t;
12+
typedef int my_socket;
313
#include "my_psi_config.h"
414
#include "psi_base.h"
515
#include "my_psi_config.h"

include/mysql/psi/psi_abi_socket_v2.h.pp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
#include "mysql/psi/psi_socket.h"
22
#include "my_global.h"
3+
#include "my_io.h"
4+
#include "my_config.h"
5+
static inline int is_directory_separator(char c)
6+
{
7+
return c == '/';
8+
}
9+
typedef int File;
10+
typedef mode_t MY_MODE;
11+
typedef socklen_t socket_len_t;
12+
typedef int my_socket;
313
#include "my_psi_config.h"
414
#include "psi_base.h"
515
#include "my_psi_config.h"
@@ -20,7 +30,7 @@
2030
typedef struct PSI_socket PSI_socket;
2131
struct PSI_socket_bootstrap
2232
{
23-
void* (*get_interface)(int version);
33+
void *(*get_interface)(int version);
2434
};
2535
typedef struct PSI_socket_bootstrap PSI_socket_bootstrap;
2636
typedef struct PSI_placeholder PSI_socket_service_t;

include/mysql/psi/psi_file.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2008, 2017, 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 as published by
@@ -26,6 +26,7 @@
2626
*/
2727

2828
#include "my_global.h"
29+
#include "my_io.h"
2930
#include "my_psi_config.h" // IWYU pragma: keep
3031
#include "psi_base.h"
3132

include/mysql/psi/psi_socket.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2008, 2017, 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 as published by
@@ -26,6 +26,7 @@
2626
*/
2727

2828
#include "my_global.h"
29+
#include "my_io.h"
2930
#include "my_psi_config.h" // IWYU pragma: keep
3031
#include "psi_base.h"
3132

libbinlogevents/include/binlog_event.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2011, 2017, 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 as published by
@@ -40,6 +40,7 @@
4040
*/
4141
#include "byteorder.h"
4242
#include "debug_vars.h"
43+
#include "my_io.h"
4344
#include "wrapper_functions.h"
4445

4546
#if defined(_WIN32)

libbinlogevents/src/control_events.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2014, 2017, 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 as published by
@@ -13,14 +13,14 @@
1313
along with this program; if not, write to the Free Software
1414
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
1515

16-
#include "binary_log_types.h"
17-
18-
#include "statement_events.h"
19-
2016
#include <algorithm>
2117
#include <cstdio>
2218
#include <string>
2319

20+
#include "binary_log_types.h"
21+
#include "my_io.h"
22+
#include "statement_events.h"
23+
2424
namespace binary_log
2525
{
2626

libmysql/libmysql.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include "my_dbug.h"
3333
#include "my_double2ulonglong.h"
3434
#include "my_inttypes.h"
35+
#include "my_io.h"
3536
#include "my_pointer_arithmetic.h"
3637
#include "my_thread_local.h"
3738
#include "mysql.h"

mysys/mf_tempdir.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "mutex_lock.h"
2020
#include "my_dbug.h"
2121
#include "my_inttypes.h"
22+
#include "my_io.h"
2223
#include "mysys_priv.h"
2324
#include "prealloced_array.h"
2425

mysys_ssl/my_default.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
#include "my_default.h"
5252
#include "my_default_priv.h"
5353
#include "my_inttypes.h"
54+
#include "my_io.h"
5455
#include "my_loglevel.h"
5556
#include "my_psi_config.h"
5657
#include "mysql/psi/mysql_file.h"

mysys_ssl/my_getopt.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include "my_dbug.h"
3232
#include "my_default.h"
3333
#include "my_inttypes.h"
34+
#include "my_io.h"
3435
#include "my_loglevel.h"
3536
#include "mysql/service_mysql_alloc.h"
3637
#include "typelib.h"

plugin/daemon_example/daemon_example.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "m_string.h" // strlen
2626
#include "my_dbug.h"
2727
#include "my_inttypes.h"
28+
#include "my_io.h"
2829
#include "my_psi_config.h"
2930
#include "my_sys.h" // my_write, my_malloc
3031
#include "my_thread.h"

plugin/keyring/buffered_file_io.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "keyring_memory.h"
2929
#include "logger.h"
3030
#include "my_inttypes.h"
31+
#include "my_io.h"
3132

3233
namespace keyring {
3334

plugin/keyring/checker/checker.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "keyring_memory.h"
2323
#include "logger.h"
2424
#include "my_inttypes.h"
25+
#include "my_io.h"
2526

2627
namespace keyring {
2728

0 commit comments

Comments
 (0)