Commit e390a995 authored by monty@hundin.mysql.fi's avatar monty@hundin.mysql.fi
Browse files

Added support of INSERT to MERGE tables

Fixes for embedded libary and openssl
parent b0953cfa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -8,6 +8,6 @@ c_warnings="$c_warnings $debug_extra_warnings"
cxx_warnings="$cxx_warnings $debug_extra_warnings"
extra_configs="$pentium_configs $debug_configs"

extra_configs="$extra_configs --with-berkeley-db --with-innodb --with-embedded-server"
extra_configs="$extra_configs --with-berkeley-db --with-innodb --with-vio --with-openssl --with-embedded-server"

. "$path/FINISH.sh"
+0 −1
Original line number Diff line number Diff line
@@ -65,7 +65,6 @@ aclocal; autoheader; aclocal; automake; autoconf
 --enable-thread-safe-client \
 --with-berkeley-db \
 --with-innodb \
 --with-openssl \
 --with-vio \
 --without-pstack \
 --with-extra-tools \
+3 −5
Original line number Diff line number Diff line
@@ -690,8 +690,7 @@ fi

AC_DEFUN(MYSQL_CHECK_VIO, [
  AC_ARG_WITH([vio],
              [\
  --with-vio          Include the Virtual IO support],
              [  --with-vio          Include the Virtual IO support],
              [vio="$withval"],
              [vio=no])

@@ -712,8 +711,7 @@ AC_DEFUN(MYSQL_CHECK_VIO, [
AC_DEFUN(MYSQL_CHECK_OPENSSL, [
AC_MSG_CHECKING(for OpenSSL)
  AC_ARG_WITH([openssl],
              [\
  --with-openssl          Include the OpenSSL support],
              [  --with-openssl          Include the OpenSSL support],
              [openssl="$withval"],
              [openssl=no])

@@ -722,7 +720,7 @@ AC_MSG_CHECKING(for OpenSSL)
    if test -n "$vio_dir"
    then
      AC_MSG_RESULT(yes)
      openssl_libs="-lssl -lcrypto -L/usr/local/ssl/lib"
      openssl_libs="-L/usr/local/ssl/lib -lssl -lcrypto"
      openssl_includes="-I/usr/local/ssl/include"
    else
      AC_MSG_ERROR([OpenSSL requires Virtual IO support (--with-vio)])
+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#include <my_global.h>
#include <my_sys.h> 
#include <m_string.h>
#include <mysql_embed.h>
#include <mysql.h>
#include <errmsg.h>
#include <getopt.h>
+11 −22
Original line number Diff line number Diff line
@@ -303,6 +303,7 @@ int main(int argc,char *argv[])
    exit(1);
  glob_buffer.realloc(512);
  completion_hash_init(&ht,50);
  bzero((char*) &mysql, sizeof(mysql));
  if (sql_connect(current_host,current_db,current_user,opt_password,
		  opt_silent))
  {
@@ -326,11 +327,13 @@ int main(int argc,char *argv[])
  put_info((char*) glob_buffer.ptr(),INFO_INFO);

#ifdef HAVE_OPENSSL
  if(mysql.net.vio->ssl_ && SSL_get_cipher(mysql.net.vio->ssl_)) {
  if (mysql.net.vio->ssl_ && SSL_get_cipher(mysql.net.vio->ssl_))
  {
    sprintf((char*) glob_buffer.ptr(),
	    "SSL cipher in use is %s\n", SSL_get_cipher(mysql.net.vio->ssl_));
    put_info((char*) glob_buffer.ptr(),INFO_INFO);
  } else
  }
  else
    put_info("SSL is not in use\n",INFO_INFO);
#endif /* HAVE_OPENSSL */

@@ -373,13 +376,7 @@ int main(int argc,char *argv[])

sig_handler mysql_end(int sig)
{
  if (connected)
  mysql_close(&mysql);
#ifdef HAVE_OPENSSL
  else
    mysql_ssl_clear(&mysql); /* SSL data structres should be freed 
				even if connection was not made */
#endif
#ifdef HAVE_READLINE
  if (!status.batch && !quick && !opt_html && !opt_xml)
  {
@@ -2208,16 +2205,8 @@ static int
sql_real_connect(char *host,char *database,char *user,char *password,
		 uint silent)
{
  if (connected)
  {					/* if old is open, close it first */
  mysql_close(&mysql);
  connected= 0;
  }
#ifdef HAVE_OPENSSL
  else
    mysql_ssl_clear(&mysql); /* SSL data structres should be freed 
				even if connection was not made */
#endif
  mysql_init(&mysql);
  if (opt_connect_timeout)
  {
@@ -2569,7 +2558,7 @@ static void mysql_end_timer(ulong start_time,char *buff)
  strmov(strend(buff),")");
}

#ifndef EMBEDDED_SERVER
#ifndef EMBEDDED_LIBRARY
/* Keep sql_string library happy */

gptr sql_alloc(unsigned int Size)
@@ -2581,4 +2570,4 @@ void sql_element_free(void *ptr)
{
  my_free((gptr) ptr,MYF(0));
}
#endif /* EMBEDDED_SERVER */
#endif /* EMBEDDED_LIBRARY */
Loading