diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-09-21 08:12:19 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-09-21 08:12:19 +0300 |
commit | e3d44f5d62672478c40294d6e46d9f066e418cac (patch) | |
tree | 44b4d1b9d94ced780d4f369f84eddc36791470be /include | |
parent | d176be8aeaecdb20a963fbd126929ddcd5bd98f3 (diff) | |
parent | f70865bc9e540767d8afc3cc2cbe0e1c92a8c0be (diff) | |
download | mariadb-git-e3d44f5d62672478c40294d6e46d9f066e418cac.tar.gz |
Merge bb-10.2-ext into 10.3
Diffstat (limited to 'include')
-rw-r--r-- | include/CMakeLists.txt | 19 | ||||
-rw-r--r-- | include/my_handler_errors.h | 26 | ||||
-rw-r--r-- | include/ssl_compat.h | 23 |
3 files changed, 54 insertions, 14 deletions
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index e47522a4931..8af7a1281b1 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -93,3 +93,22 @@ IF(NOT ${CMAKE_CURRENT_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) INSTALL_PRIVATE(${CMAKE_CURRENT_SOURCE_DIR}) ENDIF() +MACRO(INSTALL_COMPAT_HEADER file footer) + INSTALL(CODE "FILE(WRITE \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDEDIR}/${file} +\"/* Do not edit this file directly, it was auto-generated by cmake */ + +#warning This file should not be included by clients, include only <mysql.h> +${footer} +\")" COMPONENT Development) +ENDMACRO() + +INSTALL_COMPAT_HEADER(my_global.h "") +INSTALL_COMPAT_HEADER(my_config.h "") +INSTALL_COMPAT_HEADER(my_sys.h "") +INSTALL_COMPAT_HEADER(mysql_version.h " +#include <mariadb_version.h> +#define LIBMYSQL_VERSION MARIADB_CLIENT_VERSION_STR +") +INSTALL_COMPAT_HEADER(mysql_com.h " +#include <mariadb_com.h> +") diff --git a/include/my_handler_errors.h b/include/my_handler_errors.h index 4b85832a6de..f682861f3ab 100644 --- a/include/my_handler_errors.h +++ b/include/my_handler_errors.h @@ -24,11 +24,11 @@ static const char *handler_error_messages[]= { /* 120 */ - "Didn't find key on read or update", + "Didn't find the key on read or update", "Duplicate key on write or update", "Internal (unspecified) error in handler", - "Someone has changed the row since it was read (while the table was locked to prevent it)", - "Wrong index given to function", + "Someone has changed the row since it was read (even though the table was locked to prevent it)", + "Wrong index given to a function", "Undefined handler error 125", "Index is corrupted", "Table file is corrupted", @@ -36,7 +36,7 @@ static const char *handler_error_messages[]= "Undefined handler error 129", /* 130 */ "Incorrect file format", - "Command not supported by database", + "Command not supported by the engine", "Old database file", "No record read before update", "Record was already deleted (or record file crashed)", @@ -47,7 +47,7 @@ static const char *handler_error_messages[]= "Too big row", /* 140 */ "Wrong create options", - "Duplicate unique key or constraint on write or update", + "Duplicate unique key on write or update", "Unknown character set used in table", "Conflicting table definitions in sub-tables of MERGE table", "Table is crashed and last repair failed", @@ -62,13 +62,13 @@ static const char *handler_error_messages[]= "Cannot delete a parent row", "No savepoint with that name", "Non unique key block size", - "The table does not exist in engine", - "The table already existed in storage engine", - "Could not connect to storage engine", + "The table does not exist in the storage engine", + "The table already existed in the storage engine", + "Could not connect to the storage engine", "Unexpected null pointer found when using spatial index", - "The table changed in storage engine", + "The table changed in the storage engine", /* 160 */ - "There's no partition in table for the given value", + "There's no partition in the table for the given value", "Row-based binary logging of row failed", "Index needed in foreign key constraint", "Upholding foreign key constraints would lead to a duplicate key error in some other table", @@ -77,13 +77,13 @@ static const char *handler_error_messages[]= "Failed to get next auto increment value", "Failed to set row auto increment value", "Unknown (generic) error from engine", - "Record was not update. Original values was same as new values", + "Record was not updated. New values were the same as original values", /* 170 */ "It is not possible to log this statement", "The event was corrupt, leading to illegal data being read", "The table is of a new format not supported by this version", "The event could not be processed. No other handler error happened", - "Got a fatal error during initialization of handler", + "Fatal error during initialization of handler", "File too short; Expected more data in file", "Read page with wrong checksum", "Too many active concurrent transactions", @@ -105,7 +105,7 @@ static const char *handler_error_messages[]= "Too many words in a FTS phrase or proximity search", "Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.", "Foreign key cascade delete/update exceeds max depth", - "Tablespace is missing for table", + "Tablespace is missing for a table", "Sequence has been run out", "Sequence values are conflicting" }; diff --git a/include/ssl_compat.h b/include/ssl_compat.h index b0e3ed497cd..568af6e1db4 100644 --- a/include/ssl_compat.h +++ b/include/ssl_compat.h @@ -25,8 +25,8 @@ #if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) #define HAVE_OPENSSL11 1 +#define SSL_LIBRARY OpenSSL_version(OPENSSL_VERSION) #define ERR_remove_state(X) ERR_clear_error() -#define EVP_MD_CTX_cleanup(X) EVP_MD_CTX_reset(X) #define EVP_CIPHER_CTX_SIZE 168 #define EVP_MD_CTX_SIZE 48 #undef EVP_MD_CTX_init @@ -34,8 +34,23 @@ #undef EVP_CIPHER_CTX_init #define EVP_CIPHER_CTX_init(X) do { bzero((X), EVP_CIPHER_CTX_SIZE); EVP_CIPHER_CTX_reset(X); } while(0) +/* + Macros below are deprecated. OpenSSL 1.1 may define them or not, + depending on how it was built. +*/ +#undef ERR_free_strings +#define ERR_free_strings() +#undef EVP_cleanup +#define EVP_cleanup() +#undef CRYPTO_cleanup_all_ex_data +#define CRYPTO_cleanup_all_ex_data() +#undef SSL_load_error_strings +#define SSL_load_error_strings() + #else #define HAVE_OPENSSL10 1 +#define SSL_LIBRARY SSLeay_version(SSLEAY_VERSION) + /* Unfortunately RAND_bytes manual page does not provide any guarantees in relation to blocking behavior. Here we explicitly use SSLeay random @@ -51,6 +66,7 @@ #endif /* HAVE_OPENSSL11 */ #elif defined(HAVE_YASSL) +#define SSL_LIBRARY "YaSSL " YASSL_VERSION #define BN_free(X) do { } while(0) #endif /* !defined(HAVE_YASSL) */ @@ -62,6 +78,11 @@ #define EVP_CIPHER_CTX_encrypting(ctx) ((ctx)->encrypt) #define EVP_CIPHER_CTX_SIZE sizeof(EVP_CIPHER_CTX) #define EVP_MD_CTX_SIZE sizeof(EVP_MD_CTX) + +#define EVP_MD_CTX_reset(X) EVP_MD_CTX_cleanup(X) +#define EVP_CIPHER_CTX_reset(X) EVP_CIPHER_CTX_cleanup(X) +#define X509_get0_notBefore(X) X509_get_notBefore(X) +#define X509_get0_notAfter(X) X509_get_notAfter(X) #endif #ifdef __cplusplus |