Skip to content

Commit 00d1db7

Browse files
committed
Merge branch '10.1' into 10.2
2 parents 0485328 + 0251232 commit 00d1db7

File tree

372 files changed

+10982
-4519
lines changed

Some content is hidden

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

372 files changed

+10982
-4519
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ include/mysql_version.h
5959
include/mysqld_ername.h
6060
include/mysqld_error.h
6161
include/sql_state.h
62+
include/probes_mysql.d
63+
include/probes_mysql_dtrace.h
64+
include/probes_mysql_nodtrace.h
6265
info_macros.cmake
6366
libmysql*/libmysql*_exports_file.cc
6467
libmysql*/merge_archives_mysql*.cmake

CMakeLists.txt

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -348,11 +348,9 @@ IF(WITH_UNIT_TESTS)
348348
ENDIF()
349349
ENDIF()
350350

351-
IF(NOT WITHOUT_SERVER)
352-
SET (MYSQLD_STATIC_PLUGIN_LIBS "" CACHE INTERNAL "")
353-
# Add storage engines and plugins.
354-
CONFIGURE_PLUGINS()
355-
ENDIF()
351+
SET (MYSQLD_STATIC_PLUGIN_LIBS "" CACHE INTERNAL "")
352+
# Add storage engines and plugins.
353+
CONFIGURE_PLUGINS()
356354

357355
ADD_SUBDIRECTORY(include)
358356
ADD_SUBDIRECTORY(dbug)
@@ -382,6 +380,10 @@ IF(NOT WITHOUT_SERVER)
382380
ADD_SUBDIRECTORY(mysql-test)
383381
ADD_SUBDIRECTORY(mysql-test/lib/My/SafeProcess)
384382
ADD_SUBDIRECTORY(sql-bench)
383+
IF(WIN32)
384+
ADD_SUBDIRECTORY(win/upgrade_wizard)
385+
ADD_SUBDIRECTORY(win/packaging)
386+
ENDIF()
385387
ENDIF()
386388

387389
IF(UNIX)
@@ -391,10 +393,7 @@ ENDIF()
391393
INCLUDE(cmake/abi_check.cmake)
392394
INCLUDE(cmake/tags.cmake)
393395

394-
IF(WIN32)
395-
ADD_SUBDIRECTORY(win/upgrade_wizard)
396-
ADD_SUBDIRECTORY(win/packaging)
397-
ENDIF()
396+
398397

399398

400399
INCLUDE(for_clients)

CREDITS

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,30 @@
1-
MariaDB is brought to you by the MariaDB foundation, a USA non profit
2-
organization.
1+
MariaDB is brought to you by the MariaDB Foundation, a non profit
2+
organization registered in the USA.
33

4-
The current main members and sponsors of the MariaDB foundation are:
4+
The current main members and sponsors of the MariaDB Foundation are:
55

6-
Automattic http://automattic.com (2014)
7-
SkySQL Ab http://www.skysql.com (2013, 2014)
8-
Booking.com http://www.booking.com (2013)
9-
Parallels http://www.parallels.com/products/plesk (2013)
6+
MariaDB Corporation http://www.mariadb.com (2013 - 2016)
7+
Booking.com http://www.booking.com (2013 - 2016)
8+
Parallels http://www.parallels.com/products/plesk (2013 - 2016)
9+
Automattic http://automattic.com (2014 - 2016)
10+
Verkkokauppa.com http://verkkokauppa.com (2015 - 2016)
11+
Visma http://visma.com/ (2015 - 2016)
12+
Webyog http://webyog.com (2015 - 2016)
13+
Wikimedia Foundation http://wikimedia.org (2015 - 2016)
14+
Acronis http://acronis.com (2016)
1015

1116
For a full list of supporters and sponsors see
12-
https://mariadb.org/en/supporters/
17+
https://mariadb.org/about/supporters/
1318

14-
You can also do this by doing SHOW CONTRIBUTORS.
19+
You can also do this by running SHOW CONTRIBUTORS.
1520

1621
For all corporate memberships and sponsorships please contact the
17-
MariaDB foundation Board via foundation@mariadb.org.
22+
MariaDB Foundation Board via foundation@mariadb.org.
1823

19-
The MariaDB foundation is responsible for the MariaDB source
24+
The MariaDB Foundation is responsible for the MariaDB source
2025
repository, the official MariaDB binaries and http://mariadb.org.
2126

22-
The MariaDB foundation provides also, among other things, the
27+
The MariaDB Foundation also provides, among other things, the
2328
following services to the MariaDB community:
2429

2530
- Code reviews and applying patches for MariaDB
@@ -28,17 +33,19 @@ following services to the MariaDB community:
2833
- Bug fixing in MariaDB (for bugs that affects a large part of the community)
2934
- Building the official MariaDB binaries
3035
- Maintaining http://mariadb.org
36+
- Documenting MariaDB in the MariaDB Knowledge Base http://mariadb.com/kb
3137

32-
To be able to do the above we need help from cooperations and individuals!
38+
To be able to do the above we need help from corporations and individuals!
3339

34-
You can help support MariaDB by be becoming a MariaDB developer or a
35-
member or sponsor of the MariaDB foundation!
40+
You can help support MariaDB by becoming a MariaDB developer or a
41+
member or sponsor of the MariaDB Foundation. To donate or sponsor,
42+
go to https://mariadb.org/donate/
3643

37-
You can get a list of all main authors of MariaDB / MySQL by doing
44+
You can get a list of all the main authors of MariaDB / MySQL by running
3845
SHOW AUTHORS;
3946

40-
You can get a list sponsors and contributors by doing
47+
You can get a list sponsors and contributors by running
4148
SHOW CONTRIBUTORS;
4249

43-
You can read more about the MariaDB foundation at:
44-
https://mariadb.org/en/foundation/
50+
You can read more about the MariaDB Foundation at:
51+
https://mariadb.org/about/

README

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
MariaDB is designed as a drop-in replacement of MySQL(R) with more
22
features, new storage engines, fewer bugs, and better performance.
33

4-
MariaDB is brought to you by the MariaDB foundation.
5-
Please read the file CREDITS for details about the MariaDB foundation,
4+
MariaDB is brought to you by the MariaDB Foundation.
5+
Please read the CREDITS file for details about the MariaDB Foundation,
66
and who is developing MariaDB.
77

88
MariaDB is developed by many of the original developers of MySQL who
9-
now work for MariadB foundation and SkySQL Ab, and by many people in
9+
now work for the MariadB Foundation and the MariaDB Corporation, and by many people in
1010
the community.
1111

1212
MySQL, which is the base of MariaDB, is a product and trademark of Oracle
1313
Corporation, Inc. For a list of developers and other contributors,
14-
see the Credits appendix. You can also do 'SHOW authors' to get a
14+
see the Credits appendix. You can also run 'SHOW authors' to get a
1515
list of active contributors.
1616

1717
A description of the MariaDB project and a manual can be found at:

client/mysql.cc

Lines changed: 41 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,6 +1344,44 @@ sig_handler mysql_end(int sig)
13441344
exit(status.exit_status);
13451345
}
13461346

1347+
/*
1348+
set connection-specific options and call mysql_real_connect
1349+
*/
1350+
static bool do_connect(MYSQL *mysql, const char *host, const char *user,
1351+
const char *password, const char *database, ulong flags)
1352+
{
1353+
if (opt_secure_auth)
1354+
mysql_options(mysql, MYSQL_SECURE_AUTH, (char *) &opt_secure_auth);
1355+
#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
1356+
if (opt_use_ssl)
1357+
{
1358+
mysql_ssl_set(mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
1359+
opt_ssl_capath, opt_ssl_cipher);
1360+
mysql_options(mysql, MYSQL_OPT_SSL_CRL, opt_ssl_crl);
1361+
mysql_options(mysql, MYSQL_OPT_SSL_CRLPATH, opt_ssl_crlpath);
1362+
}
1363+
mysql_options(mysql,MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
1364+
(char*)&opt_ssl_verify_server_cert);
1365+
#endif
1366+
if (opt_protocol)
1367+
mysql_options(mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
1368+
#ifdef HAVE_SMEM
1369+
if (shared_memory_base_name)
1370+
mysql_options(mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
1371+
#endif
1372+
if (opt_plugin_dir && *opt_plugin_dir)
1373+
mysql_options(mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir);
1374+
1375+
if (opt_default_auth && *opt_default_auth)
1376+
mysql_options(mysql, MYSQL_DEFAULT_AUTH, opt_default_auth);
1377+
1378+
mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_RESET, 0);
1379+
mysql_options4(mysql, MYSQL_OPT_CONNECT_ATTR_ADD,
1380+
"program_name", "mysql");
1381+
return mysql_real_connect(mysql, host, user, password, database,
1382+
opt_mysql_port, opt_mysql_unix_port, flags);
1383+
}
1384+
13471385

13481386
/*
13491387
This function handles sigint calls
@@ -1365,11 +1403,7 @@ sig_handler handle_sigint(int sig)
13651403
}
13661404

13671405
kill_mysql= mysql_init(kill_mysql);
1368-
mysql_options(kill_mysql, MYSQL_OPT_CONNECT_ATTR_RESET, 0);
1369-
mysql_options4(kill_mysql, MYSQL_OPT_CONNECT_ATTR_ADD,
1370-
"program_name", "mysql");
1371-
if (!mysql_real_connect(kill_mysql,current_host, current_user, opt_password,
1372-
"", opt_mysql_port, opt_mysql_unix_port,0))
1406+
if (!do_connect(kill_mysql,current_host, current_user, opt_password, "", 0))
13731407
{
13741408
tee_fprintf(stdout, "Ctrl-C -- sorry, cannot connect to server to kill query, giving up ...\n");
13751409
goto err;
@@ -4575,27 +4609,8 @@ sql_real_connect(char *host,char *database,char *user,char *password,
45754609
}
45764610
if (opt_compress)
45774611
mysql_options(&mysql,MYSQL_OPT_COMPRESS,NullS);
4578-
if (opt_secure_auth)
4579-
mysql_options(&mysql, MYSQL_SECURE_AUTH, (char *) &opt_secure_auth);
45804612
if (using_opt_local_infile)
45814613
mysql_options(&mysql,MYSQL_OPT_LOCAL_INFILE, (char*) &opt_local_infile);
4582-
#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
4583-
if (opt_use_ssl)
4584-
{
4585-
mysql_ssl_set(&mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
4586-
opt_ssl_capath, opt_ssl_cipher);
4587-
mysql_options(&mysql, MYSQL_OPT_SSL_CRL, opt_ssl_crl);
4588-
mysql_options(&mysql, MYSQL_OPT_SSL_CRLPATH, opt_ssl_crlpath);
4589-
}
4590-
mysql_options(&mysql,MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
4591-
(char*)&opt_ssl_verify_server_cert);
4592-
#endif
4593-
if (opt_protocol)
4594-
mysql_options(&mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
4595-
#ifdef HAVE_SMEM
4596-
if (shared_memory_base_name)
4597-
mysql_options(&mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
4598-
#endif
45994614
if (safe_updates)
46004615
{
46014616
char init_command[100];
@@ -4607,18 +4622,8 @@ sql_real_connect(char *host,char *database,char *user,char *password,
46074622

46084623
mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);
46094624

4610-
if (opt_plugin_dir && *opt_plugin_dir)
4611-
mysql_options(&mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir);
4612-
4613-
if (opt_default_auth && *opt_default_auth)
4614-
mysql_options(&mysql, MYSQL_DEFAULT_AUTH, opt_default_auth);
4615-
4616-
mysql_options(&mysql, MYSQL_OPT_CONNECT_ATTR_RESET, 0);
4617-
mysql_options4(&mysql, MYSQL_OPT_CONNECT_ATTR_ADD,
4618-
"program_name", "mysql");
4619-
if (!mysql_real_connect(&mysql, host, user, password,
4620-
database, opt_mysql_port, opt_mysql_unix_port,
4621-
connect_flag | CLIENT_MULTI_STATEMENTS))
4625+
if (!do_connect(&mysql, host, user, password, database,
4626+
connect_flag | CLIENT_MULTI_STATEMENTS))
46224627
{
46234628
if (!silent ||
46244629
(mysql_errno(&mysql) != CR_CONN_HOST_ERROR &&

client/mysql_upgrade.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,8 @@ static const char *load_default_groups[]=
184184
static void free_used_memory(void)
185185
{
186186
/* Free memory allocated by 'load_defaults' */
187-
free_defaults(defaults_argv);
187+
if (defaults_argv)
188+
free_defaults(defaults_argv);
188189

189190
dynstr_free(&ds_args);
190191
dynstr_free(&conn_args);
@@ -1110,7 +1111,6 @@ int main(int argc, char **argv)
11101111
if (opt_systables_only && !opt_silent)
11111112
printf("The --upgrade-system-tables option was used, user tables won't be touched.\n");
11121113

1113-
11141114
/*
11151115
Read the mysql_upgrade_info file to check if mysql_upgrade
11161116
already has been run for this installation of MySQL

cmake/build_configurations/mysql_release.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ ELSEIF(DEB)
9494
ELSE()
9595
SET(WITH_SSL bundled CACHE STRING "")
9696
SET(WITH_ZLIB bundled CACHE STRING "")
97+
SET(WITH_JEMALLOC static CACHE STRING "")
9798
ENDIF()
9899

99100
IF(NOT COMPILATION_COMMENT)

cmake/dtrace.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ IF(ENABLE_DTRACE)
8686
${CMAKE_BINARY_DIR}/include/probes_mysql_dtrace.h
8787
${CMAKE_BINARY_DIR}/include/probes_mysql_nodtrace.h
8888
)
89+
ELSE()
90+
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/probes_mysql_nodtrace.h.in
91+
${CMAKE_BINARY_DIR}/include/probes_mysql_nodtrace.h COPYONLY)
8992
ENDIF()
9093

9194
FUNCTION(DTRACE_INSTRUMENT target)

cmake/for_clients.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ MACRO(EXTRACT_LINK_LIBRARIES target var)
2525
# Filter out "general", it is not a library, just CMake hint
2626
# Also, remove duplicates
2727
IF(NOT lib STREQUAL "general" AND NOT ${var} MATCHES "-l${lib} ")
28-
IF (lib MATCHES "^\\-l")
28+
IF (lib MATCHES "^\\-")
2929
SET(${var} "${${var}} ${lib} ")
3030
ELSEIF(lib MATCHES "^/")
3131
IF (lib MATCHES "\\.(a|so([0-9.]*)|lib|dll|dylib)$")

cmake/install_layout.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ SET(INSTALL_SCRIPTDIR_RPM "bin")
137137
SET(INSTALL_SYSCONFDIR_RPM "/etc")
138138
SET(INSTALL_SYSCONF2DIR_RPM "/etc/my.cnf.d")
139139
#
140-
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
140+
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
141141
SET(INSTALL_LIBDIR_RPM "lib64")
142142
SET(INSTALL_PLUGINDIR_RPM "lib64/mysql/plugin")
143143
ELSE()

0 commit comments

Comments
 (0)