diff options
Diffstat (limited to 'include/mysql.h')
-rw-r--r-- | include/mysql.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/include/mysql.h b/include/mysql.h index 87def05dc7e..a42ae085e0c 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -140,6 +140,8 @@ typedef unsigned long long my_ulonglong; #define ER_WRONG_FK_OPTION_FOR_VIRTUAL_COLUMN ER_WRONG_FK_OPTION_FOR_GENERATED_COLUMN #define ER_UNSUPPORTED_ACTION_ON_VIRTUAL_COLUMN ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN #define ER_UNSUPPORTED_ENGINE_FOR_VIRTUAL_COLUMNS ER_UNSUPPORTED_ENGINE_FOR_GENERATED_COLUMNS +#define ER_KEY_COLUMN_DOES_NOT_EXITS ER_KEY_COLUMN_DOES_NOT_EXIST +#define ER_DROP_PARTITION_NON_EXISTENT ER_PARTITION_DOES_NOT_EXIST typedef struct st_mysql_rows { struct st_mysql_rows *next; /* list of rows */ @@ -322,7 +324,15 @@ typedef struct st_mysql_res { } MYSQL_RES; -#if !defined(MYSQL_SERVER) && !defined(MYSQL_CLIENT) +/* + We should not define MYSQL_CLIENT when the mysql.h is included + by the server or server plugins. + Now it is important only for the SQL service to work so we rely on + the MYSQL_SERVICE_SQL to check we're compiling the server/plugin + related file. +*/ + +#if !defined(MYSQL_SERVICE_SQL) && !defined(MYSQL_CLIENT) #define MYSQL_CLIENT #endif @@ -354,7 +364,7 @@ typedef struct st_mysql_parameters */ #define MYSQL_WAIT_TIMEOUT 8 -#if !defined(MYSQL_SERVER) && !defined(EMBEDDED_LIBRARY) +#if !defined(MYSQL_SERVICE_SQL) #define max_allowed_packet (*mysql_get_parameters()->p_max_allowed_packet) #define net_buffer_length (*mysql_get_parameters()->p_net_buffer_length) #endif |