summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2009-09-08 00:50:10 +0400
committerSergey Petrunya <psergey@askmonty.org>2009-09-08 00:50:10 +0400
commit29f0dcb56337a3e352ad7a70dcff6b25bb605325 (patch)
tree84935c21dc958724ae7dcbeeca0c0f08986fc430 /extra
parent915a624cbcb58a10a2cfb2e2e4fd5029191fa86a (diff)
parent8a2454f8e9fce648272577fcf8006ae6e6806cf9 (diff)
downloadmariadb-git-29f0dcb56337a3e352ad7a70dcff6b25bb605325.tar.gz
Merge MySQL->MariaDB
* Finished Monty and Jani's merge * Some InnoDB tests still fail (because it's old xtradb code run against newer testsuite). They are expected to go after mergning with the latest xtradb.
Diffstat (limited to 'extra')
-rw-r--r--extra/innochecksum.c2
-rw-r--r--extra/perror.c2
-rw-r--r--extra/yassl/src/handshake.cpp6
-rw-r--r--extra/yassl/src/yassl_imp.cpp2
-rw-r--r--extra/yassl/taocrypt/include/modes.hpp2
-rw-r--r--extra/yassl/taocrypt/src/asn.cpp6
6 files changed, 17 insertions, 3 deletions
diff --git a/extra/innochecksum.c b/extra/innochecksum.c
index 524637a1729..9bd4bfcc0cd 100644
--- a/extra/innochecksum.c
+++ b/extra/innochecksum.c
@@ -224,7 +224,7 @@ int main(int argc, char **argv)
}
else if (verbose)
{
- printf("file %s= %llu bytes (%lu pages)...\n", argv[1], size, pages);
+ printf("file %s = %llu bytes (%lu pages)...\n", argv[optind], size, pages);
printf("checking pages in range %lu to %lu\n", start_page, use_end_page ? end_page : (pages - 1));
}
diff --git a/extra/perror.c b/extra/perror.c
index 80eb2af2dae..a98a4fc3d1b 100644
--- a/extra/perror.c
+++ b/extra/perror.c
@@ -115,7 +115,7 @@ static void usage(void)
{
print_version();
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
- printf("Print a description for a system error code or an error code from\na MyISAM/ISAM/BDB table handler.\n");
+ printf("Print a description for a system error code or a MySQL error code.\n");
printf("If you want to get the error for a negative error code, you should use\n-- before the first error code to tell perror that there was no more options.\n\n");
printf("Usage: %s [OPTIONS] [ERRORCODE [ERRORCODE...]]\n",my_progname);
my_print_help(my_long_options);
diff --git a/extra/yassl/src/handshake.cpp b/extra/yassl/src/handshake.cpp
index 262b5cb3b8b..b4d9005af15 100644
--- a/extra/yassl/src/handshake.cpp
+++ b/extra/yassl/src/handshake.cpp
@@ -790,15 +790,17 @@ void processReply(SSL& ssl)
if (ssl.GetError()) return;
if (DoProcessReply(ssl))
+ {
// didn't complete process
if (!ssl.getSocket().IsNonBlocking()) {
// keep trying now, blocking ok
while (!ssl.GetError())
if (DoProcessReply(ssl) == 0) break;
- }
+ }
else
// user will have try again later, non blocking
ssl.SetError(YasslError(SSL_ERROR_WANT_READ));
+ }
}
@@ -873,10 +875,12 @@ void sendServerKeyExchange(SSL& ssl, BufferOutput buffer)
void sendChangeCipher(SSL& ssl, BufferOutput buffer)
{
if (ssl.getSecurity().get_parms().entity_ == server_end)
+ {
if (ssl.getSecurity().get_resuming())
ssl.verifyState(clientKeyExchangeComplete);
else
ssl.verifyState(clientFinishedComplete);
+ }
if (ssl.GetError()) return;
ChangeCipherSpec ccs;
diff --git a/extra/yassl/src/yassl_imp.cpp b/extra/yassl/src/yassl_imp.cpp
index 20dfe50f132..f079df8c7ce 100644
--- a/extra/yassl/src/yassl_imp.cpp
+++ b/extra/yassl/src/yassl_imp.cpp
@@ -1305,6 +1305,7 @@ void ServerHello::Process(input_buffer&, SSL& ssl)
ssl.useSecurity().use_connection().sessionID_Set_ = false;
if (ssl.getSecurity().get_resuming())
+ {
if (memcmp(session_id_, ssl.getSecurity().get_resume().GetID(),
ID_LEN) == 0) {
ssl.set_masterSecret(ssl.getSecurity().get_resume().GetSecret());
@@ -1319,6 +1320,7 @@ void ServerHello::Process(input_buffer&, SSL& ssl)
ssl.useSecurity().set_resuming(false);
ssl.useLog().Trace("server denied resumption");
}
+ }
if (ssl.CompressionOn() && !compression_method_)
ssl.UnSetCompression(); // server isn't supporting yaSSL zlib request
diff --git a/extra/yassl/taocrypt/include/modes.hpp b/extra/yassl/taocrypt/include/modes.hpp
index d1ebce7568b..4575fe1414b 100644
--- a/extra/yassl/taocrypt/include/modes.hpp
+++ b/extra/yassl/taocrypt/include/modes.hpp
@@ -96,10 +96,12 @@ inline void Mode_BASE::Process(byte* out, const byte* in, word32 sz)
if (mode_ == ECB)
ECB_Process(out, in, sz);
else if (mode_ == CBC)
+ {
if (dir_ == ENCRYPTION)
CBC_Encrypt(out, in, sz);
else
CBC_Decrypt(out, in, sz);
+ }
}
diff --git a/extra/yassl/taocrypt/src/asn.cpp b/extra/yassl/taocrypt/src/asn.cpp
index 3b1c1c2136a..78200841bda 100644
--- a/extra/yassl/taocrypt/src/asn.cpp
+++ b/extra/yassl/taocrypt/src/asn.cpp
@@ -781,10 +781,12 @@ void CertDecoder::GetDate(DateType dt)
source_.advance(length);
if (!ValidateDate(date, b, dt) && verify_)
+ {
if (dt == BEFORE)
source_.SetError(BEFORE_DATE_E);
else
source_.SetError(AFTER_DATE_E);
+ }
// save for later use
if (dt == BEFORE) {
@@ -1062,6 +1064,7 @@ word32 DecodeDSA_Signature(byte* decoded, const byte* encoded, word32 sz)
}
word32 rLen = GetLength(source);
if (rLen != 20)
+ {
if (rLen == 21) { // zero at front, eat
source.next();
--rLen;
@@ -1074,6 +1077,7 @@ word32 DecodeDSA_Signature(byte* decoded, const byte* encoded, word32 sz)
source.SetError(DSA_SZ_E);
return 0;
}
+ }
memcpy(decoded, source.get_buffer() + source.get_index(), rLen);
source.advance(rLen);
@@ -1084,6 +1088,7 @@ word32 DecodeDSA_Signature(byte* decoded, const byte* encoded, word32 sz)
}
word32 sLen = GetLength(source);
if (sLen != 20)
+ {
if (sLen == 21) {
source.next(); // zero at front, eat
--sLen;
@@ -1096,6 +1101,7 @@ word32 DecodeDSA_Signature(byte* decoded, const byte* encoded, word32 sz)
source.SetError(DSA_SZ_E);
return 0;
}
+ }
memcpy(decoded + rLen, source.get_buffer() + source.get_index(), sLen);
source.advance(sLen);