Skip to content

Commit 0ffef5d

Browse files
committed
MDEV-8052 abi detection incorrect with clang
don't include #include directives into .pp files
1 parent 8e7d665 commit 0ffef5d

File tree

8 files changed

+1
-48
lines changed

8 files changed

+1
-48
lines changed

cmake/do_abi_check.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ FOREACH(file ${ABI_HEADERS})
5858

5959
EXECUTE_PROCESS(
6060
COMMAND ${COMPILER}
61-
-E -nostdinc -dI -DMYSQL_ABI_CHECK -I${SOURCE_DIR}/include
61+
-E -nostdinc -DMYSQL_ABI_CHECK -I${SOURCE_DIR}/include
6262
-I${BINARY_DIR}/include -I${SOURCE_DIR}/include/mysql -I${SOURCE_DIR}/sql
6363
${file}
6464
ERROR_QUIET OUTPUT_FILE ${tmpfile})

include/mysql.h.pp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
typedef char my_bool;
22
typedef int my_socket;
3-
#include "mysql_version.h"
4-
#include "mysql_com.h"
53
enum enum_server_command
64
{
75
COM_SLEEP, COM_QUIT, COM_INIT_DB, COM_QUERY, COM_FIELD_LIST,
@@ -142,7 +140,6 @@
142140
const char *mysql_errno_to_sqlstate(unsigned int mysql_errno);
143141
my_bool my_thread_init(void);
144142
void my_thread_end(void);
145-
#include "mysql_time.h"
146143
enum enum_mysql_timestamp_type
147144
{
148145
MYSQL_TIMESTAMP_NONE= -2, MYSQL_TIMESTAMP_ERROR= -1,
@@ -155,7 +152,6 @@
155152
my_bool neg;
156153
enum enum_mysql_timestamp_type time_type;
157154
} MYSQL_TIME;
158-
#include "my_list.h"
159155
typedef struct st_list {
160156
struct st_list *prev,*next;
161157
void *data;
@@ -197,8 +193,6 @@
197193
typedef char **MYSQL_ROW;
198194
typedef unsigned int MYSQL_FIELD_OFFSET;
199195
typedef unsigned long long my_ulonglong;
200-
#include "typelib.h"
201-
#include "my_alloc.h"
202196
typedef struct st_used_mem
203197
{
204198
struct st_used_mem *next;
@@ -242,7 +236,6 @@
242236
unsigned long length;
243237
} MYSQL_ROWS;
244238
typedef MYSQL_ROWS *MYSQL_ROW_OFFSET;
245-
#include "my_alloc.h"
246239
typedef struct embedded_query_result EMBEDDED_QUERY_RESULT;
247240
typedef struct st_mysql_data {
248241
MYSQL_ROWS *data;

include/mysql/client_plugin.h.pp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
int type; unsigned int interface_version; const char *name; const char *author; const char *desc; unsigned int version[3]; const char *license; void *mysql_api; int (*init)(char *, size_t, int, va_list); int (*deinit)(); int (*options)(const char *option, const void *);
44
};
55
struct st_mysql;
6-
#include <mysql/plugin_auth_common.h>
76
typedef struct st_plugin_vio_info
87
{
98
enum { MYSQL_VIO_INVALID, MYSQL_VIO_TCP, MYSQL_VIO_SOCKET,
@@ -24,7 +23,6 @@
2423
int type; unsigned int interface_version; const char *name; const char *author; const char *desc; unsigned int version[3]; const char *license; void *mysql_api; int (*init)(char *, size_t, int, va_list); int (*deinit)(); int (*options)(const char *option, const void *);
2524
int (*authenticate_user)(MYSQL_PLUGIN_VIO *vio, struct st_mysql *mysql);
2625
};
27-
#include <mysql/auth_dialog_client.h>
2826
struct st_mysql;
2927
typedef char *(*mysql_authentication_dialog_ask_t)(struct st_mysql *mysql,
3028
int type, const char *prompt, char *buf, int buf_len);

include/mysql/plugin_audit.h.pp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
#include "plugin.h"
2-
#include <mysql/services.h>
3-
#include <mysql/service_my_snprintf.h>
41
extern struct my_snprintf_service_st {
52
size_t (*my_snprintf_type)(char*, size_t, const char*, ...);
63
size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list);
74
} *my_snprintf_service;
85
size_t my_snprintf(char* to, size_t n, const char* fmt, ...);
96
size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap);
10-
#include <mysql/service_thd_alloc.h>
117
struct st_mysql_lex_string
128
{
139
char *str;
@@ -31,7 +27,6 @@
3127
MYSQL_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_LEX_STRING *lex_str,
3228
const char *str, unsigned int size,
3329
int allocate_lex_string);
34-
#include <mysql/service_thd_wait.h>
3530
typedef enum _thd_wait_type_e {
3631
THD_WAIT_SLEEP= 1,
3732
THD_WAIT_DISKIO= 2,
@@ -51,15 +46,13 @@
5146
} *thd_wait_service;
5247
void thd_wait_begin(void* thd, int wait_type);
5348
void thd_wait_end(void* thd);
54-
#include <mysql/service_thread_scheduler.h>
5549
struct scheduler_functions;
5650
extern struct my_thread_scheduler_service {
5751
int (*set)(struct scheduler_functions *scheduler);
5852
int (*reset)();
5953
} *my_thread_scheduler_service;
6054
int my_thread_scheduler_set(struct scheduler_functions *scheduler);
6155
int my_thread_scheduler_reset();
62-
#include <mysql/service_progress_report.h>
6356
extern struct progress_report_service_st {
6457
void (*thd_progress_init_func)(void* thd, unsigned int max_stage);
6558
void (*thd_progress_report_func)(void* thd,
@@ -80,9 +73,7 @@
8073
void thd_progress_end(void* thd);
8174
const char *set_thd_proc_info(void*, const char * info, const char *func,
8275
const char *file, unsigned int line);
83-
#include <mysql/service_debug_sync.h>
8476
extern void (*debug_sync_C_callback_ptr)(void*, const char *, size_t);
85-
#include <mysql/service_kill_statement.h>
8677
enum thd_kill_levels {
8778
THD_IS_NOT_KILLED=0,
8879
THD_ABORT_SOFTLY=50,
@@ -92,7 +83,6 @@
9283
enum thd_kill_levels (*thd_kill_level_func)(const void*);
9384
} *thd_kill_statement_service;
9485
enum thd_kill_levels thd_kill_level(const void*);
95-
#include <mysql/service_logger.h>
9686
typedef struct logger_handle_st LOGGER_HANDLE;
9787
extern struct logger_service_st {
9888
void (*logger_init_mutexes)();
@@ -175,8 +165,6 @@
175165
const char *version_info;
176166
unsigned int maturity;
177167
};
178-
#include "plugin_ftparser.h"
179-
#include "plugin.h"
180168
enum enum_ftparser_mode
181169
{
182170
MYSQL_FTPARSER_SIMPLE_MODE= 0,

include/mysql/plugin_auth.h.pp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
#include <mysql/plugin.h>
2-
#include <mysql/services.h>
3-
#include <mysql/service_my_snprintf.h>
41
extern struct my_snprintf_service_st {
52
size_t (*my_snprintf_type)(char*, size_t, const char*, ...);
63
size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list);
74
} *my_snprintf_service;
85
size_t my_snprintf(char* to, size_t n, const char* fmt, ...);
96
size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap);
10-
#include <mysql/service_thd_alloc.h>
117
struct st_mysql_lex_string
128
{
139
char *str;
@@ -31,7 +27,6 @@
3127
MYSQL_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_LEX_STRING *lex_str,
3228
const char *str, unsigned int size,
3329
int allocate_lex_string);
34-
#include <mysql/service_thd_wait.h>
3530
typedef enum _thd_wait_type_e {
3631
THD_WAIT_SLEEP= 1,
3732
THD_WAIT_DISKIO= 2,
@@ -51,15 +46,13 @@
5146
} *thd_wait_service;
5247
void thd_wait_begin(void* thd, int wait_type);
5348
void thd_wait_end(void* thd);
54-
#include <mysql/service_thread_scheduler.h>
5549
struct scheduler_functions;
5650
extern struct my_thread_scheduler_service {
5751
int (*set)(struct scheduler_functions *scheduler);
5852
int (*reset)();
5953
} *my_thread_scheduler_service;
6054
int my_thread_scheduler_set(struct scheduler_functions *scheduler);
6155
int my_thread_scheduler_reset();
62-
#include <mysql/service_progress_report.h>
6356
extern struct progress_report_service_st {
6457
void (*thd_progress_init_func)(void* thd, unsigned int max_stage);
6558
void (*thd_progress_report_func)(void* thd,
@@ -80,9 +73,7 @@
8073
void thd_progress_end(void* thd);
8174
const char *set_thd_proc_info(void*, const char * info, const char *func,
8275
const char *file, unsigned int line);
83-
#include <mysql/service_debug_sync.h>
8476
extern void (*debug_sync_C_callback_ptr)(void*, const char *, size_t);
85-
#include <mysql/service_kill_statement.h>
8677
enum thd_kill_levels {
8778
THD_IS_NOT_KILLED=0,
8879
THD_ABORT_SOFTLY=50,
@@ -92,7 +83,6 @@
9283
enum thd_kill_levels (*thd_kill_level_func)(const void*);
9384
} *thd_kill_statement_service;
9485
enum thd_kill_levels thd_kill_level(const void*);
95-
#include <mysql/service_logger.h>
9686
typedef struct logger_handle_st LOGGER_HANDLE;
9787
extern struct logger_service_st {
9888
void (*logger_init_mutexes)();
@@ -175,8 +165,6 @@
175165
const char *version_info;
176166
unsigned int maturity;
177167
};
178-
#include "plugin_ftparser.h"
179-
#include "plugin.h"
180168
enum enum_ftparser_mode
181169
{
182170
MYSQL_FTPARSER_SIMPLE_MODE= 0,
@@ -266,7 +254,6 @@
266254
void *thd_get_ha_data(const void* thd, const struct handlerton *hton);
267255
void thd_set_ha_data(void* thd, const struct handlerton *hton,
268256
const void *ha_data);
269-
#include <mysql/plugin_auth_common.h>
270257
typedef struct st_plugin_vio_info
271258
{
272259
enum { MYSQL_VIO_INVALID, MYSQL_VIO_TCP, MYSQL_VIO_SOCKET,

include/mysql/plugin_ftparser.h.pp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
#include "plugin.h"
2-
#include <mysql/services.h>
3-
#include <mysql/service_my_snprintf.h>
41
extern struct my_snprintf_service_st {
52
size_t (*my_snprintf_type)(char*, size_t, const char*, ...);
63
size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list);
74
} *my_snprintf_service;
85
size_t my_snprintf(char* to, size_t n, const char* fmt, ...);
96
size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap);
10-
#include <mysql/service_thd_alloc.h>
117
struct st_mysql_lex_string
128
{
139
char *str;
@@ -31,7 +27,6 @@
3127
MYSQL_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_LEX_STRING *lex_str,
3228
const char *str, unsigned int size,
3329
int allocate_lex_string);
34-
#include <mysql/service_thd_wait.h>
3530
typedef enum _thd_wait_type_e {
3631
THD_WAIT_SLEEP= 1,
3732
THD_WAIT_DISKIO= 2,
@@ -51,15 +46,13 @@
5146
} *thd_wait_service;
5247
void thd_wait_begin(void* thd, int wait_type);
5348
void thd_wait_end(void* thd);
54-
#include <mysql/service_thread_scheduler.h>
5549
struct scheduler_functions;
5650
extern struct my_thread_scheduler_service {
5751
int (*set)(struct scheduler_functions *scheduler);
5852
int (*reset)();
5953
} *my_thread_scheduler_service;
6054
int my_thread_scheduler_set(struct scheduler_functions *scheduler);
6155
int my_thread_scheduler_reset();
62-
#include <mysql/service_progress_report.h>
6356
extern struct progress_report_service_st {
6457
void (*thd_progress_init_func)(void* thd, unsigned int max_stage);
6558
void (*thd_progress_report_func)(void* thd,
@@ -80,9 +73,7 @@
8073
void thd_progress_end(void* thd);
8174
const char *set_thd_proc_info(void*, const char * info, const char *func,
8275
const char *file, unsigned int line);
83-
#include <mysql/service_debug_sync.h>
8476
extern void (*debug_sync_C_callback_ptr)(void*, const char *, size_t);
85-
#include <mysql/service_kill_statement.h>
8677
enum thd_kill_levels {
8778
THD_IS_NOT_KILLED=0,
8879
THD_ABORT_SOFTLY=50,
@@ -92,7 +83,6 @@
9283
enum thd_kill_levels (*thd_kill_level_func)(const void*);
9384
} *thd_kill_statement_service;
9485
enum thd_kill_levels thd_kill_level(const void*);
95-
#include <mysql/service_logger.h>
9686
typedef struct logger_handle_st LOGGER_HANDLE;
9787
extern struct logger_service_st {
9888
void (*logger_init_mutexes)();
@@ -175,7 +165,6 @@
175165
const char *version_info;
176166
unsigned int maturity;
177167
};
178-
#include "plugin_ftparser.h"
179168
struct st_mysql_daemon
180169
{
181170
int interface_version;

include/mysql/psi/psi_abi_v1.h.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#include "mysql/psi/psi.h"
21
C_MODE_START
32
struct PSI_mutex;
43
struct PSI_rwlock;

include/mysql/psi/psi_abi_v2.h.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#include "mysql/psi/psi.h"
21
C_MODE_START
32
struct PSI_mutex;
43
struct PSI_rwlock;

0 commit comments

Comments
 (0)