Skip to content

Commit 94c1dc5

Browse files
author
Alexander Nozdrin
committed
Auto-merge from mysql-trunk.
2 parents c0b41c8 + 4c8fd3c commit 94c1dc5

File tree

210 files changed

+6931
-1136
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

210 files changed

+6931
-1136
lines changed

client/client_priv.h

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@
3131
# endif
3232
#endif
3333

34+
/* Version numbers for deprecation messages */
35+
#define VER_CELOSIA "5.6"
36+
37+
#define WARN_DEPRECATED(Ver,Old,New) \
38+
do { \
39+
printf("Warning: The option '%s' is deprecated and will be removed " \
40+
"in a future release. Please use %s instead.\n", (Old), (New)); \
41+
} while(0);
42+
3443
enum options_client
3544
{
3645
OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET,
@@ -48,8 +57,8 @@ enum options_client
4857
OPT_PROMPT, OPT_IGN_LINES,OPT_TRANSACTION,OPT_MYSQL_PROTOCOL,
4958
OPT_SHARED_MEMORY_BASE_NAME, OPT_FRM, OPT_SKIP_OPTIMIZATION,
5059
OPT_COMPATIBLE, OPT_RECONNECT, OPT_DELIMITER, OPT_SECURE_AUTH,
51-
OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET, OPT_CREATE_OPTIONS, OPT_SERVER_ARG,
52-
OPT_START_POSITION, OPT_STOP_POSITION, OPT_START_DATETIME, OPT_STOP_DATETIME,
60+
OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET, OPT_SERVER_ARG,
61+
OPT_POSITION, OPT_STOP_POSITION, OPT_START_DATETIME, OPT_STOP_DATETIME,
5362
OPT_SIGINT_IGNORE, OPT_HEXBLOB, OPT_ORDER_BY_PRIMARY, OPT_COUNT,
5463
#ifdef HAVE_NDBCLUSTER_DB
5564
OPT_NDBCLUSTER, OPT_NDB_CONNECTSTRING,
@@ -81,5 +90,7 @@ enum options_client
8190
OPT_DEBUG_INFO, OPT_DEBUG_CHECK, OPT_COLUMN_TYPES, OPT_ERROR_LOG_FILE,
8291
OPT_WRITE_BINLOG, OPT_DUMP_DATE,
8392
OPT_INIT_COMMAND,
93+
OPT_FIRST_SLAVE,
94+
OPT_ALL,
8495
OPT_MAX_CLIENT_OPTION
8596
};

client/mysql.cc

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ static char *server_version= NULL;
5454
/* Array of options to pass to libemysqld */
5555
#define MAX_SERVER_ARGS 64
5656

57+
/* Version numbers for deprecation messages */
58+
#define VER_CELOSIA "5.6"
59+
5760
void* sql_alloc(unsigned size); // Don't use mysqld alloc for these
5861
void sql_element_free(void *ptr);
5962
#include "sql_string.h"
@@ -1344,7 +1347,7 @@ static struct my_option my_long_options[] =
13441347
(uchar**) &opt_rehash, (uchar**) &opt_rehash, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0,
13451348
0, 0},
13461349
{"no-auto-rehash", 'A',
1347-
"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.",
1350+
"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.",
13481351
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
13491352
{"batch", 'B',
13501353
"Don't use history file. Disable interactive behavior. (Enables --silent)", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -1417,15 +1420,15 @@ static struct my_option my_long_options[] =
14171420
{"line-numbers", OPT_LINE_NUMBERS, "Write line numbers for errors.",
14181421
(uchar**) &line_numbers, (uchar**) &line_numbers, 0, GET_BOOL,
14191422
NO_ARG, 1, 0, 0, 0, 0, 0},
1420-
{"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,
1423+
{"skip-line-numbers", 'L', "Don't write line number for errors.", 0, 0, 0, GET_NO_ARG,
14211424
NO_ARG, 0, 0, 0, 0, 0, 0},
14221425
{"unbuffered", 'n', "Flush buffer after each query.", (uchar**) &unbuffered,
14231426
(uchar**) &unbuffered, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
14241427
{"column-names", OPT_COLUMN_NAMES, "Write column names in results.",
14251428
(uchar**) &column_names, (uchar**) &column_names, 0, GET_BOOL,
14261429
NO_ARG, 1, 0, 0, 0, 0, 0},
14271430
{"skip-column-names", 'N',
1428-
"Don't write column names in results. WARNING: -N is deprecated, use long version of this options instead.",
1431+
"Don't write column names in results.",
14291432
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
14301433
{"set-variable", 'O',
14311434
"Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value.",
@@ -1629,7 +1632,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
16291632
init_tee(argument);
16301633
break;
16311634
case OPT_NOTEE:
1632-
printf("WARNING: option deprecated; use --disable-tee instead.\n");
1635+
WARN_DEPRECATED(VER_CELOSIA, "--no-tee", "--disable-tee");
16331636
if (opt_outfile)
16341637
end_tee();
16351638
break;
@@ -1652,7 +1655,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
16521655
}
16531656
break;
16541657
case OPT_NOPAGER:
1655-
printf("WARNING: option deprecated; use --disable-pager instead.\n");
1658+
WARN_DEPRECATED(VER_CELOSIA, "--no-pager", "--disable-pager");
16561659
opt_nopager= 1;
16571660
break;
16581661
case OPT_MYSQL_PROTOCOL:
@@ -1698,12 +1701,18 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
16981701
if (!(status.line_buff= batch_readline_command(status.line_buff, argument)))
16991702
return 1;
17001703
break;
1704+
case 'g':
1705+
WARN_DEPRECATED(VER_CELOSIA, "-g, --no-named-commands", "--skip-named-commands");
1706+
break;
17011707
case 'o':
17021708
if (argument == disabled_my_option)
17031709
one_database= 0;
17041710
else
17051711
one_database= skip_updates= 1;
17061712
break;
1713+
case 'O':
1714+
WARN_DEPRECATED(VER_CELOSIA, "-O, --set-variable", "--variable-name=value");
1715+
break;
17071716
case 'p':
17081717
if (argument == disabled_my_option)
17091718
argument= (char*) ""; // Don't require password
@@ -3521,7 +3530,8 @@ print_table_data_vertically(MYSQL_RES *result)
35213530
for (uint off=0; off < mysql_num_fields(result); off++)
35223531
{
35233532
field= mysql_fetch_field(result);
3524-
tee_fprintf(PAGER, "%*s: ",(int) max_length,field->name);
3533+
if (column_names)
3534+
tee_fprintf(PAGER, "%*s: ",(int) max_length,field->name);
35253535
if (cur[off])
35263536
{
35273537
unsigned int i;
@@ -4191,7 +4201,7 @@ char *get_arg(char *line, my_bool get_next_arg)
41914201
if (*ptr == '\\' && ptr[1]) // escaped character
41924202
{
41934203
// Remove the backslash
4194-
strmov(ptr, ptr+1);
4204+
strmov_overlapp(ptr, ptr+1);
41954205
}
41964206
else if ((!quoted && *ptr == ' ') || (quoted && *ptr == qtype))
41974207
{

client/mysqladmin.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
282282
charsets_dir = argument;
283283
#endif
284284
break;
285+
case 'O':
286+
WARN_DEPRECATED(VER_CELOSIA, "--set-variable", "--variable-name=value");
287+
break;
285288
case OPT_MYSQL_PROTOCOL:
286289
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
287290
opt->name);

client/mysqlbinlog.cc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141

4242
#define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG | CLIENT_LOCAL_FILES)
4343

44+
4445
char server_version[SERVER_VERSION_LENGTH];
4546
ulong server_id = 0;
4647

@@ -1060,7 +1061,7 @@ static struct my_option my_long_options[] =
10601061
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
10611062
(uchar**) &port, (uchar**) &port, 0, GET_INT, REQUIRED_ARG,
10621063
0, 0, 0, 0, 0, 0},
1063-
{"position", 'j', "Deprecated. Use --start-position instead.",
1064+
{"position", OPT_POSITION, "Deprecated. Use --start-position instead.",
10641065
(uchar**) &start_position, (uchar**) &start_position, 0, GET_ULL,
10651066
REQUIRED_ARG, BIN_LOG_HEADER_SIZE, BIN_LOG_HEADER_SIZE,
10661067
/* COM_BINLOG_DUMP accepts only 4 bytes for the position */
@@ -1103,7 +1104,7 @@ static struct my_option my_long_options[] =
11031104
"(you should probably use quotes for your shell to set it properly).",
11041105
(uchar**) &start_datetime_str, (uchar**) &start_datetime_str,
11051106
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1106-
{"start-position", OPT_START_POSITION,
1107+
{"start-position", 'j',
11071108
"Start reading the binlog at position N. Applies to the first binlog "
11081109
"passed on the command line.",
11091110
(uchar**) &start_position, (uchar**) &start_position, 0, GET_ULL,
@@ -1314,6 +1315,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
13141315
case 'R':
13151316
remote_opt= 1;
13161317
break;
1318+
case OPT_POSITION:
1319+
WARN_DEPRECATED(VER_CELOSIA, "--position", "--start-position");
1320+
break;
13171321
case OPT_MYSQL_PROTOCOL:
13181322
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
13191323
opt->name);

client/mysqldump.c

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ HASH ignore_table;
179179

180180
static struct my_option my_long_options[] =
181181
{
182-
{"all", 'a', "Deprecated. Use --create-options instead.",
182+
{"all", OPT_ALL, "Deprecated. Use --create-options instead.",
183183
(uchar**) &create_options, (uchar**) &create_options, 0, GET_BOOL, NO_ARG, 1,
184184
0, 0, 0, 0, 0},
185185
{"all-databases", 'A',
@@ -230,7 +230,7 @@ static struct my_option my_long_options[] =
230230
{"compress", 'C', "Use compression in server/client protocol.",
231231
(uchar**) &opt_compress, (uchar**) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
232232
0, 0, 0},
233-
{"create-options", OPT_CREATE_OPTIONS,
233+
{"create-options", 'a',
234234
"Include all MySQL specific create options.",
235235
(uchar**) &create_options, (uchar**) &create_options, 0, GET_BOOL, NO_ARG, 1,
236236
0, 0, 0, 0, 0},
@@ -268,7 +268,7 @@ static struct my_option my_long_options[] =
268268
(uchar**) &opt_events, (uchar**) &opt_events, 0, GET_BOOL,
269269
NO_ARG, 0, 0, 0, 0, 0, 0},
270270
{"extended-insert", 'e',
271-
"Allows utilization of the new, much faster INSERT syntax.",
271+
"Use multiple-row INSERT syntax that include several VALUES lists.",
272272
(uchar**) &extended_insert, (uchar**) &extended_insert, 0, GET_BOOL, NO_ARG,
273273
1, 0, 0, 0, 0, 0},
274274
{"fields-terminated-by", OPT_FTB,
@@ -282,7 +282,7 @@ static struct my_option my_long_options[] =
282282
(uchar**) &opt_enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0 ,0, 0},
283283
{"fields-escaped-by", OPT_ESC, "Fields in the i.file are escaped by ...",
284284
(uchar**) &escaped, (uchar**) &escaped, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
285-
{"first-slave", 'x', "Deprecated, renamed to --lock-all-tables.",
285+
{"first-slave", OPT_FIRST_SLAVE, "Deprecated, renamed to --lock-all-tables.",
286286
(uchar**) &opt_lock_all_tables, (uchar**) &opt_lock_all_tables, 0, GET_BOOL, NO_ARG,
287287
0, 0, 0, 0, 0, 0},
288288
{"flush-logs", 'F', "Flush logs file in server before starting dump. "
@@ -366,8 +366,7 @@ static struct my_option my_long_options[] =
366366
NO_ARG, 0, 0, 0, 0, 0, 0},
367367
{"no-data", 'd', "No row information.", (uchar**) &opt_no_data,
368368
(uchar**) &opt_no_data, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
369-
{"no-set-names", 'N',
370-
"Deprecated. Use --skip-set-charset instead.",
369+
{"no-set-names", 'N',"Suppress the SET NAMES statement",
371370
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
372371
{"opt", OPT_OPTIMIZE,
373372
"Same as --add-drop-table, --add-locks, --create-options, --quick, --extended-insert, --lock-tables, --set-charset, and --disable-keys. Enabled by default, disable with --skip-opt.",
@@ -760,6 +759,15 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
760759
case '?':
761760
usage();
762761
exit(0);
762+
case 'O':
763+
WARN_DEPRECATED(VER_CELOSIA, "--set-variable", "--variable-name=value");
764+
break;
765+
case (int) OPT_ALL:
766+
WARN_DEPRECATED(VER_CELOSIA, "--all", "--create-options");
767+
break;
768+
case (int) OPT_FIRST_SLAVE:
769+
WARN_DEPRECATED(VER_CELOSIA, "--first-slave", "--lock-all-tables");
770+
break;
763771
case (int) OPT_MASTER_DATA:
764772
if (!argument) /* work like in old versions */
765773
opt_master_data= MYSQL_OPT_MASTER_DATA_EFFECTIVE_SQL;
@@ -808,7 +816,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
808816
&err_ptr, &err_len);
809817
if (err_len)
810818
{
811-
strmake(buff, err_ptr, min(sizeof(buff), err_len));
819+
strmake(buff, err_ptr, min(sizeof(buff) - 1, err_len));
812820
fprintf(stderr, "Invalid mode to --compatible: %s\n", buff);
813821
exit(1);
814822
}
@@ -4452,7 +4460,7 @@ static ulong find_set(TYPELIB *lib, const char *x, uint length,
44524460

44534461
for (; pos != end && *pos != ','; pos++) ;
44544462
var_len= (uint) (pos - start);
4455-
strmake(buff, start, min(sizeof(buff), var_len));
4463+
strmake(buff, start, min(sizeof(buff) - 1, var_len));
44564464
find= find_type(buff, lib, var_len);
44574465
if (!find)
44584466
{

configure.in

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
dnl -*- ksh -*-
22
dnl Process this file with autoconf to produce a configure script.
33

4-
AC_PREREQ(2.52)dnl Minimum Autoconf version required.
4+
# Minimum Autoconf version required.
5+
AC_PREREQ(2.59)
56

6-
AC_INIT(sql/mysqld.cc)
7-
AC_CANONICAL_SYSTEM
8-
# The Docs Makefile.am parses this line!
9-
# remember to also update version.c in ndb
10-
#
7+
# Remember to also update version.c in ndb.
118
# When changing major version number please also check switch statement
129
# in client/mysqlbinlog.cc:check_master_version().
13-
AM_INIT_AUTOMAKE(mysql, 5.5.1-m2)
14-
AM_CONFIG_HEADER([include/config.h:config.h.in])
10+
AC_INIT([MySQL Server], [5.5.2-m2], [], [mysql])
11+
AC_CONFIG_SRCDIR([sql/mysqld.cc])
12+
AC_CANONICAL_SYSTEM
13+
# USTAR format gives us the possibility to store longer path names in
14+
# TAR files, the path name is split into two parts, a 155 chacater
15+
# first part and a 100 character second part.
16+
AM_INIT_AUTOMAKE([1.9 tar-ustar])
17+
LT_INIT
18+
LT_PREREQ([1.5.6])
19+
20+
AM_CONFIG_HEADER([include/config.h])
1521

1622
# Request support for automake silent-rules if available.
1723
# Default to verbose output. One can use the configure-time
@@ -31,12 +37,14 @@ NDB_SHARED_LIB_VERSION=$NDB_SHARED_LIB_MAJOR_VERSION:0:0
3137
# Remember that regexps needs to quote [ and ] since this is run through m4
3238
# We take some made up examples
3339
#
34-
# VERSION 5.1.40sp1-alpha 5.0.34a
35-
# MYSQL_NO_DASH_VERSION 5.1.40sp1 5.0.34a
36-
# MYSQL_NUMERIC_VERSION 5.1.40 5.0.34
37-
# MYSQL_BASE_VERSION 5.1 5.0
38-
# MYSQL_VERSION_ID 50140 50034
40+
# VERSION 5.1.40sp1-alpha 5.0.34a 5.5.1-m2
41+
# MYSQL_U_SCORE_VERSION 5.1.40sp1_alpha 5.0.34a 5.5.1_m2
42+
# MYSQL_NO_DASH_VERSION 5.1.40sp1 5.0.34a 5.5.1
43+
# MYSQL_NUMERIC_VERSION 5.1.40 5.0.34 5.5.1
44+
# MYSQL_BASE_VERSION 5.1 5.0 5.5
45+
# MYSQL_VERSION_ID 50140 50034 50501
3946
#
47+
MYSQL_U_SCORE_VERSION=`echo $VERSION | sed -e "s|-|_|"`
4048
MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|-.*$||"`
4149
MYSQL_NUMERIC_VERSION=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|[[a-z]][[a-z0-9]]*$||"`
4250
MYSQL_BASE_VERSION=`echo $MYSQL_NUMERIC_VERSION | sed -e "s|\.[[^.]]*$||"`
@@ -74,6 +82,7 @@ romanian russian serbian slovak spanish swedish ukrainian"
7482
#####
7583
#####
7684

85+
AC_SUBST(MYSQL_U_SCORE_VERSION)
7786
AC_SUBST(MYSQL_NO_DASH_VERSION)
7887
AC_SUBST(MYSQL_BASE_VERSION)
7988
AC_SUBST(MYSQL_VERSION_ID)

extra/yassl/taocrypt/include/asn.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ class CertDecoder : public BER_Decoder {
305305
bool ValidateSignature(SignerList*);
306306
bool ConfirmSignature(Source&);
307307
void GetKey();
308+
char* AddTag(char*, const char*, const char*, word32, word32);
308309
void GetName(NameType);
309310
void GetValidity();
310311
void GetDate(DateType);

0 commit comments

Comments
 (0)