summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-05-03 19:10:10 +0300
committerMichael Widenius <monty@askmonty.org>2011-05-03 19:10:10 +0300
commit1be5462d59fa5fbd1ca92286c3a0a049c00f4bb9 (patch)
tree17ba1ed90233efa64bc83364ed1ffb74dd637ead /extra
parentce55d37929fc91b476541d3a77336a44b20317ac (diff)
parent90e058e0c623f770ee602ebab86e91303f08c90a (diff)
downloadmariadb-git-1be5462d59fa5fbd1ca92286c3a0a049c00f4bb9.tar.gz
Merge with MariaDB 5.1
Diffstat (limited to 'extra')
-rw-r--r--extra/perror.c31
-rw-r--r--extra/yassl/src/yassl_int.cpp2
2 files changed, 31 insertions, 2 deletions
diff --git a/extra/perror.c b/extra/perror.c
index c32ad2bc791..5162f5e03dc 100644
--- a/extra/perror.c
+++ b/extra/perror.c
@@ -32,7 +32,6 @@ static my_bool verbose, print_all_codes;
#include "../include/my_base.h"
#include "../mysys/my_handler_errors.h"
-#include "../include/my_handler.h"
#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
static my_bool ndb_code;
@@ -185,6 +184,36 @@ static const char *get_ha_error_msg(int code)
}
+/*
+ Register handler error messages for usage with my_error()
+
+ NOTES
+ This is safe to call multiple times as my_error_register()
+ will ignore calls to register already registered error numbers.
+*/
+void my_handler_error_register(void)
+{
+ /*
+ If you got compilation error here about compile_time_assert array, check
+ that every HA_ERR_xxx constant has a corresponding error message in
+ handler_error_messages[] list (check mysys/ma_handler_errors.h and
+ include/my_base.h).
+ */
+ compile_time_assert(HA_ERR_FIRST + array_elements(handler_error_messages) ==
+ HA_ERR_LAST + 1);
+ my_error_register(handler_error_messages, HA_ERR_FIRST,
+ HA_ERR_FIRST+ array_elements(handler_error_messages)-1);
+}
+
+
+void my_handler_error_unregister(void)
+{
+ my_error_unregister(HA_ERR_FIRST,
+ HA_ERR_FIRST+ array_elements(handler_error_messages)-1);
+}
+
+
+
#if defined(__WIN__)
static my_bool print_win_error_msg(DWORD error, my_bool verbose)
{
diff --git a/extra/yassl/src/yassl_int.cpp b/extra/yassl/src/yassl_int.cpp
index 8e4a9aa95ec..5af2f180bb1 100644
--- a/extra/yassl/src/yassl_int.cpp
+++ b/extra/yassl/src/yassl_int.cpp
@@ -308,7 +308,7 @@ SSL::SSL(SSL_CTX* ctx)
SetError(YasslError(err));
return;
}
- else if (serverSide) {
+ else if (serverSide && !(ctx->GetCiphers().setSuites_)) {
// remove RSA or DSA suites depending on cert key type
ProtocolVersion pv = secure_.get_connection().version_;