mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge MySQL 5.1.44 into MariaDB.
This commit is contained in:
@ -54,6 +54,9 @@ static char *server_version= NULL;
|
||||
/* Array of options to pass to libemysqld */
|
||||
#define MAX_SERVER_ARGS 64
|
||||
|
||||
/* Version numbers for deprecation messages */
|
||||
#define VER_CELOSIA "5.6"
|
||||
|
||||
void* sql_alloc(unsigned size); // Don't use mysqld alloc for these
|
||||
void sql_element_free(void *ptr);
|
||||
#include "sql_string.h"
|
||||
@ -1349,7 +1352,7 @@ static struct my_option my_long_options[] =
|
||||
(uchar**) &opt_rehash, (uchar**) &opt_rehash, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0,
|
||||
0, 0},
|
||||
{"no-auto-rehash", 'A',
|
||||
"No automatic rehashing. One has to use 'rehash' to get table and field completion. This gives a quicker start of mysql and disables rehashing on reconnect. WARNING: options deprecated; use --disable-auto-rehash instead.",
|
||||
"No automatic rehashing. One has to use 'rehash' to get table and field completion. This gives a quicker start of mysql and disables rehashing on reconnect.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"batch", 'B',
|
||||
"Don't use history file. Disable interactive behavior. (Enables --silent)", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
@ -1418,7 +1421,7 @@ static struct my_option my_long_options[] =
|
||||
{"line-numbers", OPT_LINE_NUMBERS, "Write line numbers for errors.",
|
||||
(uchar**) &line_numbers, (uchar**) &line_numbers, 0, GET_BOOL,
|
||||
NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"skip-line-numbers", 'L', "Don't write line number for errors. WARNING: -L is deprecated, use long version of this option instead.", 0, 0, 0, GET_NO_ARG,
|
||||
{"skip-line-numbers", 'L', "Don't write line number for errors.", 0, 0, 0, GET_NO_ARG,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"unbuffered", 'n', "Flush buffer after each query.", (uchar**) &unbuffered,
|
||||
(uchar**) &unbuffered, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
@ -1426,7 +1429,7 @@ static struct my_option my_long_options[] =
|
||||
(uchar**) &column_names, (uchar**) &column_names, 0, GET_BOOL,
|
||||
NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"skip-column-names", 'N',
|
||||
"Don't write column names in results. WARNING: -N is deprecated, use long version of this options instead.",
|
||||
"Don't write column names in results.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"set-variable", 'O',
|
||||
"Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value.",
|
||||
@ -1633,7 +1636,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
init_tee(argument);
|
||||
break;
|
||||
case OPT_NOTEE:
|
||||
printf("WARNING: option deprecated; use --disable-tee instead.\n");
|
||||
WARN_DEPRECATED(VER_CELOSIA, "--no-tee", "--disable-tee");
|
||||
if (opt_outfile)
|
||||
end_tee();
|
||||
break;
|
||||
@ -1656,7 +1659,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
}
|
||||
break;
|
||||
case OPT_NOPAGER:
|
||||
printf("WARNING: option deprecated; use --disable-pager instead.\n");
|
||||
WARN_DEPRECATED(VER_CELOSIA, "--no-pager", "--disable-pager");
|
||||
opt_nopager= 1;
|
||||
break;
|
||||
case OPT_MYSQL_PROTOCOL:
|
||||
@ -1702,12 +1705,18 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
if (!(status.line_buff= batch_readline_command(status.line_buff, argument)))
|
||||
return 1;
|
||||
break;
|
||||
case 'g':
|
||||
WARN_DEPRECATED(VER_CELOSIA, "-g, --no-named-commands", "--skip-named-commands");
|
||||
break;
|
||||
case 'o':
|
||||
if (argument == disabled_my_option)
|
||||
one_database= 0;
|
||||
else
|
||||
one_database= skip_updates= 1;
|
||||
break;
|
||||
case 'O':
|
||||
WARN_DEPRECATED(VER_CELOSIA, "-O, --set-variable", "--variable-name=value");
|
||||
break;
|
||||
case 'p':
|
||||
if (argument == disabled_my_option)
|
||||
argument= (char*) ""; // Don't require password
|
||||
@ -3530,7 +3539,8 @@ print_table_data_vertically(MYSQL_RES *result)
|
||||
for (uint off=0; off < mysql_num_fields(result); off++)
|
||||
{
|
||||
field= mysql_fetch_field(result);
|
||||
tee_fprintf(PAGER, "%*s: ",(int) max_length,field->name);
|
||||
if (column_names)
|
||||
tee_fprintf(PAGER, "%*s: ",(int) max_length,field->name);
|
||||
if (cur[off])
|
||||
{
|
||||
unsigned int i;
|
||||
@ -4215,7 +4225,7 @@ char *get_arg(char *line, my_bool get_next_arg)
|
||||
if (*ptr == '\\' && ptr[1]) // escaped character
|
||||
{
|
||||
// Remove the backslash
|
||||
strmov(ptr, ptr+1);
|
||||
strmov_overlapp(ptr, ptr+1);
|
||||
}
|
||||
else if ((!quoted && *ptr == ' ') || (quoted && *ptr == qtype))
|
||||
{
|
||||
|
Reference in New Issue
Block a user