Commit ce291052 authored by arjen@fred.bitbike.com's avatar arjen@fred.bitbike.com
Browse files

Merge arjen@work.mysql.com:/home/bk/mysql-4.0

into fred.bitbike.com:/home/arjen/mysql-4.0
parents e41fc926 3893920c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ bell@sanja.is.com.ua
davida@isil.mysql.com
heikki@donna.mysql.fi
heikki@hundin.mysql.fi
jani@dsl-jkl1657.dial.inet.fi
jani@hynda.mysql.fi
jani@janikt.pp.saunalahti.fi
jani@rhols221.adsl.netsonic.fi
@@ -40,6 +41,7 @@ paul@teton.kitebird.com
root@x3.internalnet
sasha@mysql.sashanet.com
serg@serg.mysql.com
serg@sergbook.mysql.com
sinisa@rhols221.adsl.netsonic.fi
tfr@sarvik.tfr.cafe.ee
tim@bitch.mysql.fi
@@ -56,4 +58,3 @@ tonu@x3.internalnet
venu@work.mysql.com
zak@balfor.local
zak@linux.local
jani@dsl-jkl1657.dial.inet.fi
+31 −27
Original line number Diff line number Diff line
@@ -22563,6 +22563,8 @@ used.)
@item  -q, --quick
Don't buffer query, dump directly to stdout. Uses @code{mysql_use_result()}
to do this.
@item -Q, --quote-names
Quote table and column names within @samp{`} characters.
@item -r, --result-file=...
Direct output to a given file. This option should be used in MSDOS,
because it prevents new line '\n' from being converted to '\n\r' (new
@@ -30477,10 +30479,10 @@ mysql> SELECT "a" ="A ";
@node Logical Operators, Control flow functions, Comparison Operators, Non-typed Operators
@subsubsection Logical Operators
@findex Logical functions
@findex Functions, logical
@findex Logical operators
@findex Operators, logical
All logical functions return @code{1} (TRUE), @code{0} (FALSE) or
All logical operators evaluate to @code{1} (TRUE), @code{0} (FALSE) or
@code{NULL} (unknown, which is in most cases the same as FALSE):
@table @code
@@ -30488,9 +30490,9 @@ All logical functions return @code{1} (TRUE), @code{0} (FALSE) or
@findex ! (logical NOT)
@item NOT
@itemx !
Logical NOT. Returns @code{1} if the argument is @code{0}, otherwise returns
@code{0}.
Exception: @code{NOT NULL} returns @code{NULL}:
Logical NOT. Evaluates to @code{1} if the operand is @code{0}, otherwise
evaluates to @code{0}.
Exception: @code{NOT NULL} evaluates to @code{NULL}:
@example
mysql> SELECT NOT 1;
        -> 0
@@ -30501,14 +30503,14 @@ mysql> SELECT ! (1+1);
mysql> SELECT ! 1+1;
        -> 1
@end example
The last example returns @code{1} because the expression evaluates
The last example produces @code{1} because the expression evaluates
the same way as @code{(!1)+1}.
@findex OR, logical
@findex || (logical OR)
@item OR
@itemx ||
Logical OR. Returns @code{1} if either argument is not @code{0} and not
Logical OR. Evaluates to @code{1} if either operand is not @code{0} and not
@code{NULL}:
@example
mysql> SELECT 1 || 0;
@@ -30524,13 +30526,16 @@ mysql> SELECT 1 || NULL;
@findex && (logical AND)
@item AND
@itemx &&
Logical AND. Returns @code{0} if either argument is @code{0} or @code{NULL},
otherwise returns @code{1}:
Logical AND. For non-@code{NULL} operands, evaluates to @code{1} if both
operands are non-zero and to @code{0} otherwise.
Produces @code{NULL} if either operand is @code{NULL}:
@example
mysql> SELECT 1 && NULL;
        -> 0
mysql> SELECT 1 && 1;
        -> 1
mysql> SELECT 1 && 0;
        -> 0
mysql> SELECT 1 && NULL;
        -> NULL
@end example
@end table
@@ -32295,10 +32300,10 @@ following specifiers may be used in the @code{format} string:
@item @code{%s} @tab Seconds (@code{00}..@code{59})
@item @code{%p} @tab @code{AM} or @code{PM}
@item @code{%w} @tab Day of the week (@code{0}=Sunday..@code{6}=Saturday)
@item @code{%U} @tab Week (@code{0}..@code{53}), where Sunday is the first day of the week
@item @code{%u} @tab Week (@code{0}..@code{53}), where Monday is the first day of the week
@item @code{%V} @tab Week (@code{1}..@code{53}), where Sunday is the first day of the week. Used with '%X'
@item @code{%v} @tab Week (@code{1}..@code{53}), where Monday is the first day of the week. Used with '%x'
@item @code{%U} @tab Week (@code{00}..@code{53}), where Sunday is the first day of the week
@item @code{%u} @tab Week (@code{00}..@code{53}), where Monday is the first day of the week
@item @code{%V} @tab Week (@code{01}..@code{53}), where Sunday is the first day of the week. Used with '%X'
@item @code{%v} @tab Week (@code{01}..@code{53}), where Monday is the first day of the week. Used with '%x'
@item @code{%%} @tab A literal @samp{%}.
@end multitable
@@ -36186,16 +36191,15 @@ SET [GLOBAL | SESSION] TRANSACTION ISOLATION LEVEL
Sets the transaction isolation level for the global, whole session or
the next transaction.
The default behavior is to set the isolation level for the next (not started)
transaction.
If you set the @code{GLOBAL} privilege it will affect all new created threads.
You will need the @strong{process} privilege to do do this.
Setting the @code{SESSION} privilege will affect the following and all
future transactions.
The default behavior is to set the isolation level for the next (not
started) transaction.  If you use the @code{GLOBAL} keyword, the statement
sets the default transaction level globally for all new connections
created from that point on.  You will need the @strong{process}
privilege to do do this.  Using the @code{SESSION} keyword sets the
default transaction level for all future transactions performed on the
current connection.
You can set the default isolation level for @code{mysqld} with
You can set the default global isolation level for @code{mysqld} with
@code{--transaction-isolation=...}. @xref{Command-line options}.
@node Fulltext Search, Query Cache, Transactional Commands, Reference
@@ -49676,7 +49680,7 @@ not yet 100% confident in this code.
@node News-3.23.51, News-3.23.50, News-3.23.x, News-3.23.x
@appendixsubsec Changes in release 3.23.51
@itemize @bullet
Fixed the result from @code{IF()} is case in-sensitive if the 2 and
Fixed the result from @code{IF()} to be case insensitive if the second and
third arguments are case-sensitive.
@end itemize
@@ -49684,7 +49688,7 @@ third arguments are case-sensitive.
@appendixsubsec Changes in release 3.23.50
@itemize @bullet
@item
Fixed problem with @code{crash-me} and gcc 3.0.4.
Fixed problem with @code{crash-me} and @code{gcc} 3.0.4.
@item
Fixed that @code{@@@@unknown_variable} doesn't hang server.
@item
+13 −42
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@
#include <signal.h>
#include <violite.h>

const char *VER= "12.4";
const char *VER= "12.5";

/* Don't try to make a nice table if the data is too big */
#define MAX_COLUMN_LENGTH	     1024
@@ -458,8 +458,8 @@ static struct my_option my_long_options[] =
  {"debug", '#', "Output debug log.", (gptr*) &default_dbug_option,
   (gptr*) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif
  {"database", 'D', "Database to use.", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0,
   0, 0, 0, 0},
  {"database", 'D', "Database to use.", (gptr*) &current_db,
   (gptr*) &current_db, 0, GET_STRALC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
  {"execute", 'e', "Execute command and quit. (Output like with --batch).", 0,
   0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
  {"vertical", 'E', "Print the output of a query (rows) vertically.",
@@ -478,10 +478,10 @@ static struct my_option my_long_options[] =
   GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
  {"local-infile", OPT_LOCAL_INFILE, "Enable/disable LOAD DATA LOCAL INFILE.",
   0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
  {"no-beep", 'b', "Turn off beep on error.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0,
   0, 0, 0, 0, 0}, 
  {"no-beep", 'b', "Turn off beep on error.", (gptr*) &opt_nobeep,
   (gptr*) &opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, 
  {"host", 'h', "Connect to host.", (gptr*) &current_host,
   (gptr*) &current_host, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
   (gptr*) &current_host, 0, GET_STRALC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
  {"html", 'H', "Produce HTML output.", (gptr*) &opt_html, (gptr*) &opt_html,
   0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
  {"xml", 'X', "Produce XML output", (gptr*) &opt_xml, (gptr*) &opt_xml, 0,
@@ -527,8 +527,9 @@ static struct my_option my_long_options[] =
  {"port", 'P', "Port number to use for connection.", (gptr*) &opt_mysql_port,
   (gptr*) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0,
   0},
  {"prompt", OPT_PROMPT, "Set the mysql prompt to this value.", 0, 0, 0,
   GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
  {"prompt", OPT_PROMPT, "Set the mysql prompt to this value.",
   (gptr*) &current_prompt, (gptr*) &current_prompt, 0, GET_STRALC,
   REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
  {"quick", 'q',
   "Don't cache result, print it row by row. This may slow down the server if the output is suspended. Doesn't use history file. ",
   (gptr*) &quick, (gptr*) &quick, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -538,7 +539,8 @@ static struct my_option my_long_options[] =
  {"silent", 's', "Be more silent.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0,
   0, 0},
  {"socket", 'S', "Socket file to use for connection.",
   0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
   (gptr*) &opt_mysql_unix_port, (gptr*) &opt_mysql_unix_port, 0, GET_STRALC,
   REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#include "sslopt-longopts.h"
  {"table", 't', "Output in table format.", (gptr*) &output_tables,
   (gptr*) &output_tables, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -549,7 +551,7 @@ static struct my_option my_long_options[] =
   0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#ifndef DONT_ALLOW_USER_CHANGE
  {"user", 'u', "User for login if not current user.", (gptr*) &current_user,
   (gptr*) &current_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
   (gptr*) &current_user, 0, GET_STRALC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#endif
  {"safe-updates", 'U', "Only allow UPDATE and DELETE that uses keys.",
   (gptr*) &safe_updates, (gptr*) &safe_updates, 0, GET_BOOL, OPT_ARG, 0, 0,
@@ -602,16 +604,13 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
	       char *argument)
{
  switch(optid) {
    case OPT_DEFAULT_CHARSET:
      default_charset= argument;
      break;
    case OPT_CHARSETS_DIR:
      strmov(mysql_charsets_dir, argument);
      charsets_dir = mysql_charsets_dir;
      break;
    case OPT_LOCAL_INFILE:
      using_opt_local_infile=1;
      opt_local_infile= test(!optarg || atoi(optarg)>0);
      opt_local_infile= test(!argument || atoi(argument)>0);
      break;
    case OPT_TEE:
      if (argument == disabled_my_option)
@@ -646,20 +645,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
      printf("WARNING: option depricated; use --disable-pager instead.\n");
      opt_nopager= 1;
      break;
    case OPT_PROMPT:
      my_free(current_prompt,MYF(MY_ALLOW_ZERO_PTR));
      current_prompt=my_strdup(optarg,MYF(MY_FAE));
      break;
    case 'A':
      rehash= 0;
      break;
    case 'b':
      opt_nobeep = 1;
      break;
    case 'D':
      my_free(current_db, MYF(MY_ALLOW_ZERO_PTR));      
      current_db= my_strdup(argument, MYF(MY_WME));
      break;
    case 'e':
      status.batch= 1;
      status.add_to_history= 0;
@@ -668,16 +656,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
	return 1;
      ignore_errors= 0;
      break;
    case 'h':
      my_free(current_host, MYF(MY_ALLOW_ZERO_PTR));
      current_host= my_strdup(argument, MYF(MY_WME));
      break;
#ifndef DONT_ALLOW_USER_CHANGE
    case 'u':
      my_free(current_user, MYF(MY_ALLOW_ZERO_PTR));
      current_user= my_strdup(argument, MYF(MY_WME));
      break;
#endif
    case 'o':
      if (argument == disabled_my_option)
	one_database= 0;
@@ -726,13 +704,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
	opt_silent++;				// more silent
      }
      break;
    case 'P':
      opt_mysql_port= (unsigned int) atoi(argument);
      break;
    case 'S':
      my_free(opt_mysql_unix_port, MYF(MY_ALLOW_ZERO_PTR));
      opt_mysql_unix_port= my_strdup(argument, MYF(0));
      break;
    case 'W':
#ifdef __WIN__
      opt_mysql_unix_port= my_strdup(MYSQL_NAMEDPIPE, MYF(0));
+4 −21
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@
#include <my_pthread.h>				/* because of signal()	*/
#endif

#define ADMIN_VERSION "8.31"
#define ADMIN_VERSION "8.32"
#define MAX_MYSQL_VAR 64
#define SHUTDOWN_DEF_TIMEOUT 3600		/* Wait for shutdown */
#define MAX_TRUNC_LENGTH 3
@@ -136,14 +136,15 @@ static struct my_option my_long_options[] =
  {"silent", 's', "Silently exit if one can't connect to server",
   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
  {"socket", 'S', "Socket file to use for connection.",
   0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
   (gptr*) &unix_port, (gptr*) &unix_port, 0, GET_STR, REQUIRED_ARG, 0, 0, 0,
   0, 0, 0},
  {"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"
#ifndef DONT_ALLOW_USER_CHANGE
  {"user", 'u', "User for login if not current user.", (gptr*) &user,
   (gptr*) &user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
   (gptr*) &user, 0, GET_STRALC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#endif
  {"verbose", 'v', "Write more information.", (gptr*) &opt_verbose,
   (gptr*) &opt_verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -174,10 +175,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
  int error = 0;

  switch(optid) {
  case 'h':
    host = argument;
    break;
  case 'q':					/* Allow old 'q' option */
  case 'p':
    if (argument)
    {
@@ -191,23 +188,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
    else
      tty_password=1;
    break;
#ifndef DONT_ALLOW_USER_CHANGE
  case 'u':
    user= my_strdup(argument,MYF(0));
    break;
#endif
  case 'i':
    interval=atoi(argument);
    break;
  case 'P':
    tcp_port= (unsigned int) atoi(argument);
    break;
  case 's':
    option_silent++;
    break;
  case 'S':
    unix_port= argument;
    break;
  case 'W':
#ifdef __WIN__
    unix_port=MYSQL_NAMEDPIPE;
+2 −23
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@

/* By Jani Tolonen, 2001-04-20, MySQL Development Team */

#define CHECK_VERSION "2.1"
#define CHECK_VERSION "2.2"

#include "client_priv.h"
#include <my_getopt.h>
@@ -94,7 +94,7 @@ static struct my_option my_long_options[] =
  {"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG,
   NO_ARG, 0, 0, 0, 0, 0, 0},
  {"host",'h', "Connect to host.", (gptr*) &current_host,
   (gptr*) &current_host, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
   (gptr*) &current_host, 0, GET_STRALC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
  {"medium-check", 'm',
   "Faster than extended-check, but only finds 99.99 percent of all errors. Should be good enough for most cases.",
   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -199,12 +199,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
  case 'a':
    what_to_do = DO_ANALYZE;
    break;
  case OPT_DEFAULT_CHARSET:
    default_charset = argument;
    break;
  case OPT_CHARSETS_DIR:
    charsets_dir = argument;
    break;
  case 'c':
    what_to_do = DO_CHECK;
    break;
@@ -216,10 +210,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
  case '?':
    usage();
    exit(0);
  case 'h':
    my_free(current_host, MYF(MY_ALLOW_ZERO_PTR));
    current_host = my_strdup(argument, MYF(MY_WME));
    break;
  case 'm':
    what_to_do = DO_CHECK;
    opt_medium_check = 1;
@@ -227,11 +217,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
  case 'o':
    what_to_do = DO_OPTIMIZE;
    break;
#ifndef DONT_ALLOW_USER_CHANGE
  case 'u':
    current_user = argument;
    break;
#endif
  case 'p':
    if (argument)
    {
@@ -245,15 +230,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
    else
      tty_password = 1;
    break;
  case 'P':
    opt_mysql_port = (unsigned int) atoi(argument);
    break;
  case 'r':
    what_to_do = DO_REPAIR;
    break;
  case 'S':
    opt_mysql_unix_port = argument;
    break;
  case 'W':
#ifdef __WIN__
    opt_mysql_unix_port = MYSQL_NAMEDPIPE;
Loading