Skip to content

Commit 6e2fa95

Browse files
author
Steinar H. Gunderson
committed
Bug#24488219: INCLUDE WHAT YOU USE [noclose]
Add a few random missing #includes that were found by Clang while testing C++20 modules. Change-Id: I42f3336a2e9a1ccca3605b47dc9fb92176d99b84
1 parent 0bef4fd commit 6e2fa95

12 files changed

+17
-7
lines changed

client/dump/thread.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License, version 2.0,
@@ -28,6 +28,7 @@
2828
#include <exception>
2929

3030
#include "my_thread.h"
31+
#include "mysql/components/services/my_thread_bits.h"
3132

3233
namespace my_boost {
3334

include/my_dbug.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@
3434

3535
#include "my_compiler.h"
3636

37+
#include <string.h>
38+
3739
#if !defined(DBUG_OFF)
3840
#include <assert.h> // IWYU pragma: keep
3941
#include <stdio.h>
40-
#include <string.h>
4142
#endif
4243

4344
#if !defined(DBUG_OFF)

include/mysql/psi/mysql_socket.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
3333
#include <string.h>
3434

3535
/* For MY_STAT */
36+
#include "my_compiler.h"
3637
#include "my_dir.h"
3738
#include "my_io.h"
38-
/* For my_chsize */
39-
#include "my_sys.h"
4039
#include "mysql/psi/psi_socket.h"
4140
/* For socket api */
4241
#ifdef _WIN32

include/mysql_com.h

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
*/
4646
#ifndef my_socket_defined
4747
#include "my_io.h"
48+
#include "mysql/components/services/my_io_bits.h"
4849
#endif
4950

5051
#ifndef MYSQL_ABI_CHECK

include/pfs_thread_provider.h

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939

4040
#include "my_inttypes.h"
4141
#include "my_macros.h"
42-
#include "my_thread.h"
4342
#include "mysql/psi/psi_thread.h"
4443

4544
class THD;

mysys/my_thread.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2000, 2019, 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,
@@ -30,6 +30,7 @@
3030
*/
3131

3232
#include "my_thread.h"
33+
#include "mysql/components/services/my_thread_bits.h"
3334

3435
#ifdef _WIN32
3536
#include <errno.h>

sql/opt_trace_context.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2011, 2019, 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,6 +24,8 @@
2424
#define OPT_TRACE_CONTEXT_INCLUDED
2525

2626
#include "my_dbug.h"
27+
#include "my_inttypes.h"
28+
#include "mysql/psi/psi_base.h"
2729
#include "prealloced_array.h"
2830

2931
/**

sql/parse_file.cc

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <string.h>
2828

2929
#include "m_string.h"
30+
#include "my_alloc.h"
3031
#include "my_compiler.h"
3132
#include "my_dbug.h"
3233
#include "my_dir.h"

sql/sorting_iterator.h

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <string>
2828
#include <vector>
2929

30+
#include "my_alloc.h"
3031
#include "my_base.h"
3132
#include "sql/basic_row_iterators.h"
3233
#include "sql/row_iterator.h"

sql/sql_list.cc

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

2323
#include "sql/sql_list.h"
2424

25+
#include "my_alloc.h"
2526
#include "my_sys.h"
2627

2728
list_node end_of_list;

sql/ssl_acceptor_context.h

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <sql/sql_class.h>
2929
#include <violite.h>
3030
#include <atomic>
31+
#include "my_sys.h"
3132

3233
/** helper class to deal with optionally empty strings */
3334
class OptionalString {

sql/strfunc.cc

+2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
#include "sql/strfunc.h"
2626

2727
#include "m_ctype.h" // my_charset_latin1
28+
#include "my_alloc.h"
2829
#include "my_dbug.h"
30+
#include "my_sys.h"
2931
#include "sql/sql_class.h"
3032
#include "sql/sql_const.h"
3133
#include "sql_string.h"

0 commit comments

Comments
 (0)