diff options
author | unknown <knielsen@knielsen-hq.org> | 2010-03-04 09:03:07 +0100 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2010-03-04 09:03:07 +0100 |
commit | 4bf849c23c2fe2174016da630705a362f76d3922 (patch) | |
tree | f39b89f218ff81ceb62349eb225a455d52c3ba78 /client/mysql.cc | |
parent | f04cf03f75ffca0b99562c027c1c57340d375f66 (diff) | |
parent | 62db6839b82d824567979ef3e05caccd67ed11ec (diff) | |
download | mariadb-git-4bf849c23c2fe2174016da630705a362f76d3922.tar.gz |
Merge MySQL 5.1.44 into MariaDB.
Diffstat (limited to 'client/mysql.cc')
-rw-r--r-- | client/mysql.cc | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index aac4dc66719..6203e51d73e 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -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)) { |