Commit 7f55d926 authored by monty@mashka.mysql.fi's avatar monty@mashka.mysql.fi
Browse files

fixed so that --ssl and --skip-ssl works with the MySQL clients.

Fixed core dump bug when sending wrong string to AES_DECRYPT()
parent 3bb2660d
Loading
Loading
Loading
Loading
+20 −11
Original line number Diff line number Diff line
@@ -2304,12 +2304,14 @@ to do and is a powerful way to get information about any table in a database
that will help us create a situation matching the one you have.
@item
For speed-related bugs or problems with @code{SELECT} statements, you should
always include the output of @code{EXPLAIN SELECT ...}, and at least the
number of rows that the @code{SELECT} statement produces.  The more
information you give about your situation, the more likely it is that someone
can help you!  For example, the following is an example of a very good bug
report (it should of course be posted with the @code{mysqlbug} script):
For speed-related bugs or problems with @code{SELECT} statements, you
should always include the output of @code{EXPLAIN SELECT ...}, and at
least the number of rows that the @code{SELECT} statement produces.  You
should also include the output from @code{SHOW CREATE TABLE table_name}
for each involved table. The more information you give about your
situation, the more likely it is that someone can help you!  For
example, the following is an example of a very good bug report (it
should of course be posted with the @code{mysqlbug} script):
Example run using the @code{mysql} command-line tool (note the use of the
@code{\G} statement terminator for statements whose output width would
@@ -50440,6 +50442,12 @@ each individual 4.0.x release.
@itemize @bullet
@item
Fixed overrun bug when calling @code{AES_DECRYPT()} with wrong arguments
@item
@code{--skip-ssl} can now be used to disable SSL in the MySQL clients,
even if one is using other ssl options in a options file or previously
on the command line.
@item
Added @code{LOCK TABLES} and @code{CREATE TEMPORARY TABLES} privilege on
the database level.  One must run the @code{ mysql_fix_privilege_tables}
script on old installations to activate these.
@@ -50494,12 +50502,13 @@ This affected at least @code{default-table-type} option.
Fixed a bug that caused @code{REPAIR TABLE} to fail on tables
with duplicates in a unique key.
@item
Fixed a bug in guessing a field type out of the function. The error was 
introduced in 4.0.3 so that field type depended on the first argument to
the function instead of the function itself
Fixed a bug from 4.0.3 in calculating the default field type for some
functions. This affected queries of type @code{CREATE TABLE table_name
SELECT expression(),...}
@item
Fixed a bug with wildcarded fields in select list, which led to the wrong 
number of elements in a list containing all fields
Fixed bug in queries of type
@code{SELECT * FROM table-list GROUP BY ...} and
@code{SELECT DISTINCT * FROM ...}.
@item
Fixed bug with the @code{--slow-log} when logging an administrator command
(like @code{FLUSH TABLES}).
+0 −3
Original line number Diff line number Diff line
@@ -2209,9 +2209,6 @@ sql_real_connect(char *host,char *database,char *user,char *password,
  if (using_opt_local_infile)
    mysql_options(&mysql,MYSQL_OPT_LOCAL_INFILE, (char*) &opt_local_infile);
#ifdef HAVE_OPENSSL
  if (opt_ssl_key || opt_ssl_cert || opt_ssl_ca || opt_ssl_capath ||
      opt_ssl_cipher)
    opt_use_ssl= 1;
  if (opt_use_ssl)
    mysql_ssl_set(&mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
		  opt_ssl_capath, opt_ssl_cipher);
+3 −5
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ static uint ex_val_max_len[MAX_MYSQL_VAR];
static my_bool ex_status_printed = 0; /* First output is not relative. */
static uint ex_var_count, max_var_length, max_val_length;

#include "sslopt-vars.h"
#include <sslopt-vars.h>

static void print_version(void);
static void usage(void);
@@ -150,7 +150,7 @@ static struct my_option my_long_options[] =
  {"sleep", 'i', "Execute commands again and again with a sleep between.",
   (gptr*) &interval, (gptr*) &interval, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0,
   0, 0},
#include "sslopt-longopts.h"
#include <sslopt-longopts.h>
#ifndef DONT_ALLOW_USER_CHANGE
  {"user", 'u', "User for login if not current user.", (gptr*) &user,
   (gptr*) &user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -211,6 +211,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
  case '#':
    DBUG_PUSH(argument ? argument : "d:t:o,/tmp/mysqladmin.trace");
    break;
#include <sslopt-case.h>
  case 'V':
    print_version();
    exit(0);
@@ -279,9 +280,6 @@ int main(int argc,char *argv[])
    mysql_options(&mysql,MYSQL_OPT_CONNECT_TIMEOUT, (char*) &tmp);
  }
#ifdef HAVE_OPENSSL
  if (opt_ssl_key || opt_ssl_cert || opt_ssl_ca || opt_ssl_capath ||
      opt_ssl_cipher)
    opt_use_ssl= 1;
  if (opt_use_ssl)
    mysql_ssl_set(&mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
		  opt_ssl_capath, opt_ssl_cipher);
+5 −7
Original line number Diff line number Diff line
@@ -20,9 +20,9 @@

#include "client_priv.h"
#include <m_ctype.h>
#include "mysql_version.h"
#include "mysqld_error.h"
#include "sslopt-vars.h"
#include <mysql_version.h>
#include <mysqld_error.h>
#include <sslopt-vars.h>

/* Exit codes */

@@ -121,7 +121,7 @@ static struct my_option my_long_options[] =
  {"socket", 'S', "Socket file to use for connection.",
   (gptr*) &opt_mysql_unix_port, (gptr*) &opt_mysql_unix_port, 0, GET_STR,
   REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#include "sslopt-longopts.h"
#include <sslopt-longopts.h>
  {"tables", OPT_TABLES, "Overrides option --databases (-B).", 0, 0, 0,
   GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
#ifndef DONT_ALLOW_USER_CHANGE
@@ -239,6 +239,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
  case '#':
    DBUG_PUSH(argument ? argument : "d:t:o");
    break;
#include <sslopt-case.h>
  case OPT_TABLES:
    opt_databases = 0;
    break;
@@ -529,9 +530,6 @@ static int dbConnect(char *host, char *user, char *passwd)
  if (opt_compress)
    mysql_options(&mysql_connection, MYSQL_OPT_COMPRESS, NullS);
#ifdef HAVE_OPENSSL
  if (opt_ssl_key || opt_ssl_cert || opt_ssl_ca || opt_ssl_capath ||
      opt_ssl_cipher)
    opt_use_ssl= 1;
  if (opt_use_ssl)
    mysql_ssl_set(&mysql_connection, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
		  opt_ssl_capath, opt_ssl_cipher);
+3 −5
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ static my_string opt_mysql_unix_port=0;
static int   first_error=0;
extern ulong net_buffer_length;
static DYNAMIC_STRING extended_row;
#include "sslopt-vars.h"
#include <sslopt-vars.h>
FILE  *md_result_file;

static struct my_option my_long_options[] =
@@ -211,7 +211,7 @@ static struct my_option my_long_options[] =
  {"socket", 'S', "Socket file to use for connection.",
   (gptr*) &opt_mysql_unix_port, (gptr*) &opt_mysql_unix_port, 0, GET_STR,
   REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#include "sslopt-longopts.h"
#include <sslopt-longopts.h>
  {"tab",'T',
   "Creates tab separated textfile for each table to given path. (creates .sql and .txt files). NOTE: This only works if mysqldump is run on the same machine as the mysqld daemon.",
   (gptr*) &path, (gptr*) &path, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -335,6 +335,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
  case '#':
    DBUG_PUSH(argument ? argument : "d:t:o");
    break;
#include <sslopt-case.h>
  case 'V': print_version(); exit(0);
  case 'X':
    opt_xml = 1;
@@ -457,9 +458,6 @@ static int dbConnect(char *host, char *user,char *passwd)
  if (opt_compress)
    mysql_options(&mysql_connection,MYSQL_OPT_COMPRESS,NullS);
#ifdef HAVE_OPENSSL
  if (opt_ssl_key || opt_ssl_cert || opt_ssl_ca || opt_ssl_capath ||
      opt_ssl_cipher)
    opt_use_ssl= 1;
  if (opt_use_ssl)
    mysql_ssl_set(&mysql_connection, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
		  opt_ssl_capath, opt_ssl_cipher);
Loading