Skip to content
This repository was archived by the owner on Oct 5, 2021. It is now read-only.

Commit 3ace62e

Browse files
committed
Merge mysql-next-mr revno 3206 --> mysql-next-mr-wl4816
2 parents 248abbc + 49a81ce commit 3ace62e

File tree

1,328 files changed

+53677
-63296
lines changed

Some content is hidden

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

1,328 files changed

+53677
-63296
lines changed

.bzrignore

+8
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,19 @@
1010
*.core
1111
*.d
1212
*.da
13+
*.dll
1314
*.exe
15+
*.exp
1416
*.gcda
1517
*.gcno
1618
*.gcov
1719
*.idb
20+
*.ilk
1821
*.la
1922
*.lai
2023
*.lib
2124
*.lo
25+
*.manifest
2226
*.map
2327
*.o
2428
*.obj
@@ -149,6 +153,7 @@ Makefile
149153
Makefile.in
150154
Makefile.in'
151155
PENDING/*
156+
scripts/scripts
152157
TAGS
153158
VC++Files/client/mysql_amd64.dsp
154159
ac_available_languages_fragment
@@ -1983,6 +1988,7 @@ sql-bench/test-transactions
19831988
sql-bench/test-wisconsin
19841989
sql/*.cpp
19851990
sql/*.ds?
1991+
sql/*.def
19861992
sql/*.vcproj
19871993
sql/.deps/client.Po
19881994
sql/.deps/derror.Po
@@ -2118,6 +2124,7 @@ sql/.libs/udf_example.lai
21182124
sql/.libs/udf_example.so.0
21192125
sql/.libs/udf_example.so.0.0.0
21202126
sql/client.c
2127+
sql/cmake_dummy.cc
21212128
sql/Doxyfile
21222129
sql/cscope.out
21232130
sql/f.c
@@ -3049,6 +3056,7 @@ vio/viotest.cpp
30493056
win/configure.data
30503057
win/vs71cache.txt
30513058
win/vs8cache.txt
3059+
win/nmake_cache.txt
30523060
ylwrap
30533061
zlib/*.ds?
30543062
zlib/*.vcproj

BUILD/SETUP.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ else
111111
# C++ warnings
112112
cxx_warnings="$warnings -Wno-unused-parameter"
113113
# cxx_warnings="$cxx_warnings -Woverloaded-virtual -Wsign-promo"
114-
cxx_warnings="$cxx_warnings -Wctor-dtor-privacy -Wnon-virtual-dtor"
114+
cxx_warnings="$cxx_warnings -Wnon-virtual-dtor"
115115
debug_extra_cflags="-O0 -g3 -gdwarf-2"
116116
fi
117117

CMakeLists.txt

+18-2
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ SET(BUILDTYPE_DOCSTRING
6161

6262
IF(WITH_DEBUG)
6363
SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING ${BUILDTYPE_DOCSTRING} FORCE)
64+
SET(MYSQL_MAINTAINER_MODE ON CACHE BOOL
65+
"MySQL maintainer-specific development environment")
66+
IF(UNIX AND NOT APPLE)
67+
# Compiling with PIC speeds up embedded build, on PIC sensitive systems
68+
# Predefine it to ON, in case user chooses to build embedded.
69+
SET(WITH_PIC ON CACHE BOOL "Compile with PIC")
70+
ENDIF()
6471
SET(OLD_WITH_DEBUG 1 CACHE INTERNAL "" FORCE)
6572
ELSEIF(NOT HAVE_CMAKE_BUILD_TYPE OR OLD_WITH_DEBUG)
6673
IF(CUSTOM_C_FLAGS)
@@ -108,18 +115,27 @@ ENDIF()
108115
# Control aspects of the development environment which are
109116
# specific to MySQL maintainers and developers.
110117
#
118+
INCLUDE (CheckCCompilerFlag)
111119
OPTION(MYSQL_MAINTAINER_MODE "MySQL maintainer-specific development environment" OFF)
112120
# Whether the maintainer mode should be enabled.
113121
IF(MYSQL_MAINTAINER_MODE)
114122
IF(CMAKE_COMPILER_IS_GNUCC)
123+
CHECK_C_COMPILER_FLAG("-Wdeclaration-after-statement" HAVE_DECLARATION_AFTER_STATEMENT)
124+
IF(HAVE_DECLARATION_AFTER_STATEMENT)
125+
SET(MY_MAINTAINER_DECLARATION_AFTER_STATEMENT "-Wdeclaration-after-statement")
126+
ENDIF()
115127
SET(MY_MAINTAINER_C_WARNINGS
116-
"-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror"
117-
CACHE STRING "C warning options used in maintainer builds.")
128+
"-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror")
118129
ENDIF()
119130
IF(CMAKE_COMPILER_IS_GNUCXX)
120131
SET(MY_MAINTAINER_CXX_WARNINGS "${MY_MAINTAINER_C_WARNINGS} -Wno-unused-parameter"
121132
CACHE STRING "C++ warning options used in maintainer builds.")
122133
ENDIF()
134+
IF(CMAKE_COMPILER_IS_GNUCC)
135+
SET(MY_MAINTAINER_C_WARNINGS
136+
"${MY_MAINTAINER_C_WARNINGS} ${MY_MAINTAINER_DECLARATION_AFTER_STATEMENT}"
137+
CACHE STRING "C warning options used in maintainer builds.")
138+
ENDIF()
123139
# Do not make warnings in checks into errors.
124140
IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_COMPILER_IS_GNUCXX)
125141
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Wno-error")

Doxyfile-perfschema

+1-1
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ RECURSIVE = YES
613613
# excluded from the INPUT source files. This way you can easily exclude a
614614
# subdirectory from a directory tree whose root is specified with the INPUT tag.
615615

616-
EXCLUDE = extra libmysql libmysql_r libmysqld mysql-test pstack storage/ibmdb2i storage/innodb storage/ndb support-files unittest zlib
616+
EXCLUDE = extra libmysql libmysql_r libmysqld mysql-test storage/innodb storage/ndb support-files unittest zlib
617617

618618
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
619619
# directories that are symbolic links (a Unix filesystem feature) are excluded

Makefile.am

+7-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ EXTRA_DIST = INSTALL-SOURCE INSTALL-WIN-SOURCE \
2424

2525
SUBDIRS = . include @docs_dirs@ @zlib_dir@ \
2626
@readline_topdir@ sql-common scripts \
27-
@pstack_dir@ libservices \
27+
libservices \
2828
@sql_union_dirs@ \
2929
unittest/mytap \
3030
@sql_server@ unittest @man_dirs@ tests \
@@ -35,7 +35,7 @@ SUBDIRS = . include @docs_dirs@ @zlib_dir@ \
3535
cmake
3636
DIST_SUBDIRS = . include Docs zlib \
3737
cmd-line-utils sql-common scripts \
38-
pstack libservices \
38+
libservices \
3939
strings mysys dbug extra regex libmysql libmysql_r client unittest storage plugin \
4040
vio sql man tests \
4141
libmysqld \
@@ -264,12 +264,16 @@ test-full-qa:
264264
#
265265
# Headers which need to be checked for abi/api compatibility.
266266
#
267+
# Attention: do not forget to also add to cmake/abi_check.cmake
268+
#
267269

268270
API_PREPROCESSOR_HEADER = $(top_srcdir)/include/mysql/plugin_audit.h \
269271
$(top_srcdir)/include/mysql/plugin_ftparser.h \
270272
$(top_srcdir)/include/mysql.h \
271273
$(top_srcdir)/include/mysql/psi/psi_abi_v1.h \
272-
$(top_srcdir)/include/mysql/psi/psi_abi_v2.h
274+
$(top_srcdir)/include/mysql/psi/psi_abi_v2.h \
275+
$(top_srcdir)/include/mysql/client_plugin.h \
276+
$(top_srcdir)/include/mysql/plugin_auth.h
273277

274278
#
275279
# Rules for checking that the abi/api has not changed.

README

-94
Original file line numberDiff line numberDiff line change
@@ -2208,97 +2208,3 @@ library. If this is what you want to do, use the GNU Lesser General
22082208
Public License instead of this License.
22092209

22102210
***************************************************************************
2211-
2212-
%%The following software may be included in this product:
2213-
pstack (part of GNU Binutils)
2214-
2215-
Use of any of this software is governed by the terms of the license below:
2216-
2217-
pstack is comprised of various .c and .h files; all begin like this:
2218-
2219-
/* bucomm.h -- binutils common include file.
2220-
Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
2221-
2222-
This file is part of GNU Binutils.
2223-
2224-
This program is free software; you can redistribute it and/or modify
2225-
it under the terms of the GNU General Public License as published by
2226-
the Free Software Foundation; either version 2 of the License, or
2227-
(at your option) any later version.
2228-
2229-
This program is distributed in the hope that it will be useful,
2230-
but WITHOUT ANY WARRANTY; without even the implied warranty of
2231-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2232-
GNU General Public License for more details.
2233-
2234-
You should have received a copy of the GNU General Public License
2235-
along with this program; if not, write to the Free Software
2236-
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2237-
02111-1307, USA. */
2238-
2239-
***************************************************************************
2240-
2241-
%%The following software may be included in this product:
2242-
libiberty.h (part of pstack GNU Binutils)
2243-
2244-
Use of any of this software is governed by the terms of the license below:
2245-
2246-
See
2247-
http://www.koders.com/c/fid99F596804BBE22C076522B848D5575F142079064.aspx
2248-
2249-
/* Function declarations for libiberty.
2250-
Written by Cygnus Support, 1994.
2251-
2252-
The libiberty library provides a number of functions which are
2253-
missing on some operating systems. We do not declare those here,
2254-
to avoid conflicts with the system header files on operating
2255-
systems that do support those functions. In this file we only
2256-
declare those functions which are specific to libiberty. */
2257-
2258-
***************************************************************************
2259-
2260-
%%The following software may be included in this product:
2261-
ieee.h (part of pstack GNU Binutils)
2262-
2263-
Use of any of this software is governed by the terms of the license below:
2264-
2265-
See
2266-
http://src.opensolaris.org/source/xref//sfw/usr/src/cmd/gdb/gdb-6.3/include/ieee.h
2267-
2268-
2269-
/* IEEE Standard 695-1980 "Universal Format for Object Modules"
2270-
header file
2271-
Contributed by Cygnus Support. */
2272-
2273-
***************************************************************************
2274-
2275-
%%The following software may be included in this product:
2276-
pstack.c (part of pstack GNU Binutils)
2277-
2278-
Use of any of this software is governed by the terms of the license below:
2279-
2280-
/*
2281-
pstack.c -- asynchronous stack trace of a running process
2282-
Copyright (c) 1999 Ross Thompson
2283-
Author: Ross Thompson
2284-
Critical bug fix: Tim Waugh
2285-
*/
2286-
2287-
/*
2288-
This file is free software; you can redistribute it and/or modify
2289-
it under the terms of the GNU General Public License as published by
2290-
the Free Software Foundation; either version 2 of the License, or
2291-
(at your option) any later version.
2292-
2293-
This program is distributed in the hope that it will be useful,
2294-
but WITHOUT ANY WARRANTY; without even the implied warranty of
2295-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2296-
GNU General Public License for more details.
2297-
2298-
You should have received a copy of the GNU General Public License
2299-
along with this program; if not, write to the Free Software
2300-
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2301-
02111-1307, USA.
2302-
*/
2303-
2304-
***************************************************************************

client/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,5 @@ ENDIF(WIN32)
7272
SET_TARGET_PROPERTIES (mysqlcheck mysqldump mysqlimport mysql_upgrade mysqlshow mysqlslap
7373
PROPERTIES HAS_CXX TRUE)
7474

75+
ADD_DEFINITIONS(-DHAVE_DLOPEN)
76+

client/client_priv.h

+2
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ enum options_client
8484
OPT_DEBUG_INFO, OPT_DEBUG_CHECK, OPT_COLUMN_TYPES, OPT_ERROR_LOG_FILE,
8585
OPT_WRITE_BINLOG, OPT_DUMP_DATE,
8686
OPT_INIT_COMMAND,
87+
OPT_PLUGIN_DIR,
88+
OPT_DEFAULT_PLUGIN,
8789
OPT_RAW_OUTPUT, OPT_WAIT_SERVER_ID, OPT_STOP_NEVER,
8890
OPT_BINLOG_ROWS_EVENT_MAX_SIZE,
8991
OPT_MAX_CLIENT_OPTION

client/mysql.cc

+29-14
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@
1313
along with this program; if not, write to the Free Software
1414
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
1515

16-
#define COPYRIGHT_NOTICE "\
17-
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.\n\
18-
This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n\
19-
and you are welcome to modify and redistribute it under the GPL v2 license\n"
20-
2116
/* mysql command tool
2217
* Commands compatible with mSQL by David J. Hughes
2318
*
@@ -110,6 +105,7 @@ extern "C" {
110105
#endif
111106

112107
#include "completion_hash.h"
108+
#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
113109

114110
#define PROMPT_CHAR '\\'
115111
#define DEFAULT_DELIMITER ";"
@@ -167,6 +163,7 @@ static int wait_time = 5;
167163
static STATUS status;
168164
static ulong select_limit,max_join_size,opt_connect_timeout=0;
169165
static char mysql_charsets_dir[FN_REFLEN+1];
166+
static char *opt_plugin_dir= 0, *opt_default_auth;
170167
static const char *xmlmeta[] = {
171168
"&", "&amp;",
172169
"<", "&lt;",
@@ -1177,7 +1174,7 @@ int main(int argc,char *argv[])
11771174
mysql_thread_id(&mysql), server_version_string(&mysql));
11781175
put_info((char*) glob_buffer.ptr(),INFO_INFO);
11791176

1180-
put_info(COPYRIGHT_NOTICE, INFO_INFO);
1177+
put_info(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"), INFO_INFO);
11811178

11821179
#ifdef HAVE_READLINE
11831180
initialize_readline((char*) my_progname);
@@ -1568,6 +1565,13 @@ static struct my_option my_long_options[] =
15681565
{"show-warnings", OPT_SHOW_WARNINGS, "Show warnings after every statement.",
15691566
&show_warnings, &show_warnings, 0, GET_BOOL, NO_ARG,
15701567
0, 0, 0, 0, 0, 0},
1568+
{"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
1569+
(uchar**) &opt_plugin_dir, (uchar**) &opt_plugin_dir, 0,
1570+
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1571+
{"default_auth", OPT_PLUGIN_DIR,
1572+
"Default authentication client-side plugin to use.",
1573+
(uchar**) &opt_default_auth, (uchar**) &opt_default_auth, 0,
1574+
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
15711575
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
15721576
};
15731577

@@ -1591,7 +1595,7 @@ static void usage(int version)
15911595

15921596
if (version)
15931597
return;
1594-
printf("%s", COPYRIGHT_NOTICE);
1598+
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
15951599
printf("Usage: %s [OPTIONS] [database]\n", my_progname);
15961600
my_print_help(my_long_options);
15971601
print_defaults("my", load_default_groups);
@@ -3739,7 +3743,8 @@ print_tab_data(MYSQL_RES *result)
37393743
}
37403744

37413745
static int
3742-
com_tee(String *buffer, char *line __attribute__((unused)))
3746+
com_tee(String *buffer __attribute__((unused)),
3747+
char *line __attribute__((unused)))
37433748
{
37443749
char file_name[FN_REFLEN], *end, *param;
37453750

@@ -3798,7 +3803,8 @@ com_notee(String *buffer __attribute__((unused)),
37983803

37993804
#ifdef USE_POPEN
38003805
static int
3801-
com_pager(String *buffer, char *line __attribute__((unused)))
3806+
com_pager(String *buffer __attribute__((unused)),
3807+
char *line __attribute__((unused)))
38023808
{
38033809
char pager_name[FN_REFLEN], *end, *param;
38043810

@@ -3923,7 +3929,8 @@ com_rehash(String *buffer __attribute__((unused)),
39233929

39243930
#ifdef USE_POPEN
39253931
static int
3926-
com_shell(String *buffer, char *line __attribute__((unused)))
3932+
com_shell(String *buffer __attribute__((unused)),
3933+
char *line __attribute__((unused)))
39273934
{
39283935
char *shell_cmd;
39293936

@@ -4015,7 +4022,8 @@ com_connect(String *buffer, char *line)
40154022
}
40164023

40174024

4018-
static int com_source(String *buffer, char *line)
4025+
static int com_source(String *buffer __attribute__((unused)),
4026+
char *line)
40194027
{
40204028
char source_name[FN_REFLEN], *end, *param;
40214029
LINE_BUFFER *line_buff;
@@ -4301,9 +4309,15 @@ sql_real_connect(char *host,char *database,char *user,char *password,
43014309

43024310
mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);
43034311

4312+
if (opt_plugin_dir && *opt_plugin_dir)
4313+
mysql_options(&mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir);
4314+
4315+
if (opt_default_auth && *opt_default_auth)
4316+
mysql_options(&mysql, MYSQL_DEFAULT_AUTH, opt_default_auth);
4317+
43044318
if (!mysql_real_connect(&mysql, host, user, password,
4305-
database, opt_mysql_port, opt_mysql_unix_port,
4306-
connect_flag | CLIENT_MULTI_STATEMENTS))
4319+
database, opt_mysql_port, opt_mysql_unix_port,
4320+
connect_flag | CLIENT_MULTI_STATEMENTS))
43074321
{
43084322
if (!silent ||
43094323
(mysql_errno(&mysql) != CR_CONN_HOST_ERROR &&
@@ -4925,7 +4939,8 @@ static void init_username()
49254939
}
49264940
}
49274941

4928-
static int com_prompt(String *buffer, char *line)
4942+
static int com_prompt(String *buffer __attribute__((unused)),
4943+
char *line)
49294944
{
49304945
char *ptr=strchr(line, ' ');
49314946
prompt_counter = 0;

0 commit comments

Comments
 (0)