Commit 82f56328 authored by Sergei Golubchik's avatar Sergei Golubchik

after merge fixes:

* adjust viossl.c to take account the new code
  (SSL_get_error is used now, cannot simply remap it)
* remove unnecessary version check
* update the test to 10.0
parent 4e2973b4
......@@ -1576,11 +1576,9 @@ Warning 1260 Row 1 was cut by GROUP_CONCAT()
# MDEV-6865 Merge Bug#18935421 RPAD DIES WITH CERTAIN PADSTR INTPUTS..
#
DO RPAD(_utf16 0x0061 COLLATE utf16_unicode_ci, 10000, 0x0061DE989999);
Warnings:
Warning 1300 Invalid utf16 character string: 'DE9899'
ERROR HY000: Invalid utf16 character string: 'DE9899'
DO LPAD(_utf16 0x0061 COLLATE utf16_unicode_ci, 10000, 0x0061DE989999);
Warnings:
Warning 1300 Invalid utf16 character string: 'DE9899'
ERROR HY000: Invalid utf16 character string: 'DE9899'
#
# End of 5.5 tests
#
......
......@@ -790,7 +790,9 @@ SELECT 'a' AS id, REPEAT('bla bla', 100) AS body) t1;
--echo #
--echo # MDEV-6865 Merge Bug#18935421 RPAD DIES WITH CERTAIN PADSTR INTPUTS..
--echo #
--error ER_INVALID_CHARACTER_STRING
DO RPAD(_utf16 0x0061 COLLATE utf16_unicode_ci, 10000, 0x0061DE989999);
--error ER_INVALID_CHARACTER_STRING
DO LPAD(_utf16 0x0061 COLLATE utf16_unicode_ci, 10000, 0x0061DE989999);
--echo #
......
......@@ -3274,18 +3274,6 @@ String *Item_func_lpad::val_str(String *str)
res->set_charset(&my_charset_bin);
pad->set_charset(&my_charset_bin);
}
#if MARIADB_VERSION_ID < 1000000
/*
Well-formedness is handled on a higher level in 10.0,
no needs to check it here again.
*/ else
{
// This will chop off any trailing illegal characters from pad.
String *well_formed_pad= args[2]->check_well_formed_result(pad, false);
if (!well_formed_pad)
goto err;
}
#endif
res_char_length= res->numchars();
......
......@@ -26,7 +26,7 @@
#ifdef HAVE_OPENSSL
#ifndef HAVE_YASSL
#ifdef HAVE_YASSL
/*
yassl seem to be different here, SSL_get_error() value can be
directly passed to ERR_error_string(), and these errors don't go
......@@ -35,7 +35,9 @@
namespace, one needs to use ERR_get_error() as an argument
for ERR_error_string().
*/
#define SSL_get_error(X,Y) ERR_get_error()
#define SSL_errno(X,Y) SSL_get_error(X,Y)
#else
#define SSL_errno(X,Y) ERR_get_error()
#endif
#ifndef DBUG_OFF
......@@ -60,8 +62,8 @@ report_errors(SSL* ssl)
if (ssl)
{
#ifndef DBUG_OFF
int error= SSL_get_error(ssl, l);
DBUG_PRINT("error", ("error: %s (%d)",
ulong error= SSL_errno(ssl, l);
DBUG_PRINT("error", ("error: %s (%lu)",
ERR_error_string(error, buf), error));
#endif
}
......@@ -288,7 +290,7 @@ int vio_ssl_close(Vio *vio)
break;
default: /* Shutdown failed */
DBUG_PRINT("vio_error", ("SSL_shutdown() failed, error: %d",
(int)SSL_get_error(ssl, r)));
SSL_get_error(ssl, r)));
break;
}
}
......@@ -402,7 +404,7 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
if ((r= ssl_handshake_loop(vio, ssl, func)) < 1)
{
DBUG_PRINT("error", ("SSL_connect/accept failure"));
*errptr= SSL_get_error(ssl, r);
*errptr= SSL_errno(ssl, r);
SSL_free(ssl);
vio_blocking(vio, was_blocking, &unused);
DBUG_RETURN(1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment