mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 02:51:44 +01:00
Merge work:/home/bk/mysql-4.0 into hundin.mysql.fi:/my/bk/mysql-4.0
This commit is contained in:
commit
80d8898feb
4 changed files with 26 additions and 12 deletions
|
@ -159,7 +159,7 @@ if ($opt_stage <= 1)
|
|||
}
|
||||
if ($opt_with_other_libc)
|
||||
{
|
||||
$opt_with_other_libc = "--with-other-libc=$opt_with_other_libc";
|
||||
$opt_with_other_libc = "--with-other-libc=$opt_with_other_libc";
|
||||
}
|
||||
if (!$opt_enable_shared)
|
||||
{
|
||||
|
@ -254,7 +254,7 @@ if (!$opt_no_test)
|
|||
$extra="";
|
||||
if ($opt_bdb)
|
||||
{
|
||||
$extra.=" -O bdb_cache_size=16M";
|
||||
$extra.=" --bdb_cache_size=16M --bdb_max_lock=60000"
|
||||
}
|
||||
if ($opt_innodb)
|
||||
{
|
||||
|
|
|
@ -1315,11 +1315,11 @@ AC_CHECK_LIB(pthread,strtok_r)
|
|||
LIBS="$my_save_LIBS"
|
||||
if test "$ac_cv_lib_pthread_strtok_r" = "no"
|
||||
then
|
||||
my_save_LIBS="$LIBS"
|
||||
AC_CHECK_LIB(c_r,strtok_r)
|
||||
case "$with_osf32_threads---$target_os" in
|
||||
# Don't keep -lc_r in LIBS; -pthread handles it magically
|
||||
yes---* | *---freebsd* ) LIBS="$my_save_LIBS" ;;
|
||||
yes---* | *---freebsd* | *---hpux*) LIBS="$my_save_LIBS" ;;
|
||||
|
||||
esac
|
||||
AC_CHECK_FUNCS(strtok_r pthread_init)
|
||||
else
|
||||
|
|
|
@ -1444,11 +1444,6 @@ mysql_ssl_set(MYSQL *mysql __attribute__((unused)) ,
|
|||
mysql->options.ssl_ca= strdup_if_not_null(ca);
|
||||
mysql->options.ssl_capath= strdup_if_not_null(capath);
|
||||
mysql->options.ssl_cipher= strdup_if_not_null(cipher);
|
||||
mysql->connector_fd = (gptr) new_VioSSLConnectorFd(key, cert, ca, capath,
|
||||
cipher);
|
||||
DBUG_PRINT("info",("mysql_ssl_set, context: %p",
|
||||
((struct st_VioSSLConnectorFd *) (mysql->connector_fd))->
|
||||
ssl_context_));
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
@ -1863,6 +1858,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
|
|||
*/
|
||||
if (client_flag & CLIENT_SSL)
|
||||
{
|
||||
struct st_mysql_options *options= &mysql->options;
|
||||
if (my_net_write(net,buff,(uint) (2)) || net_flush(net))
|
||||
{
|
||||
net->last_errno= CR_SERVER_LOST;
|
||||
|
@ -1870,9 +1866,22 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
|
|||
goto error;
|
||||
}
|
||||
/* Do the SSL layering. */
|
||||
if (!(mysql->connector_fd=
|
||||
(gptr) new_VioSSLConnectorFd(options->ssl_key,
|
||||
options->ssl_cert,
|
||||
options->ssl_ca,
|
||||
options->ssl_capath,
|
||||
options->ssl_cipher)))
|
||||
{
|
||||
/* TODO: Change to SSL error */
|
||||
net->last_errno= CR_SERVER_LOST;
|
||||
strmov(net->last_error,ER(net->last_errno));
|
||||
goto error;
|
||||
}
|
||||
DBUG_PRINT("info", ("IO layer change in progress..."));
|
||||
DBUG_PRINT("info", ("IO context %p",((struct st_VioSSLConnectorFd*)mysql->connector_fd)->ssl_context_));
|
||||
sslconnect((struct st_VioSSLConnectorFd*)(mysql->connector_fd),mysql->net.vio, (long)(mysql->options.connect_timeout));
|
||||
/* TODO: Add proper error checking here, with return error message */
|
||||
sslconnect((struct st_VioSSLConnectorFd*)(mysql->connector_fd),
|
||||
mysql->net.vio, (long) (mysql->options.connect_timeout));
|
||||
DBUG_PRINT("info", ("IO layer change done!"));
|
||||
}
|
||||
#endif /* HAVE_OPENSSL */
|
||||
|
|
|
@ -123,7 +123,6 @@ int vio_blocking(Vio * vio __attribute__((unused)), my_bool set_blocking_mode,
|
|||
#if !defined(HAVE_OPENSSL)
|
||||
#if !defined(___WIN__) && !defined(__EMX__)
|
||||
#if !defined(NO_FCNTL_NONBLOCK)
|
||||
|
||||
if (vio->sd >= 0)
|
||||
{
|
||||
int old_fcntl=vio->fcntl_mode;
|
||||
|
@ -134,6 +133,8 @@ int vio_blocking(Vio * vio __attribute__((unused)), my_bool set_blocking_mode,
|
|||
if (old_fcntl != vio->fcntl_mode)
|
||||
r = fcntl(vio->sd, F_SETFL, vio->fcntl_mode);
|
||||
}
|
||||
#else
|
||||
r= set_blocking_mode ? 0 : 1;
|
||||
#endif /* !defined(NO_FCNTL_NONBLOCK) */
|
||||
#else /* !defined(__WIN__) && !defined(__EMX__) */
|
||||
#ifndef __EMX__
|
||||
|
@ -155,6 +156,10 @@ int vio_blocking(Vio * vio __attribute__((unused)), my_bool set_blocking_mode,
|
|||
if (old_fcntl != vio->fcntl_mode)
|
||||
r = ioctlsocket(vio->sd,FIONBIO,(void*) &arg, sizeof(arg));
|
||||
}
|
||||
#ifndef __EMX__
|
||||
else
|
||||
r= test(!(vio->fcntl_mode & O_NONBLOCK)) != set_blocking_mode;
|
||||
#endif /* __EMX__ */
|
||||
#endif /* !defined(__WIN__) && !defined(__EMX__) */
|
||||
#endif /* !defined (HAVE_OPENSSL) */
|
||||
DBUG_PRINT("exit", ("%d", r));
|
||||
|
|
Loading…
Add table
Reference in a new issue