Skip to content

Commit 5210c69

Browse files
committed
Merge 10.2 into bb-10.2-mariarocks
2 parents c29336f + a0c79bc commit 5210c69

File tree

1,996 files changed

+38837
-27772
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,996 files changed

+38837
-27772
lines changed

BUILD/compile-bintar

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#
1515
# You should have received a copy of the GNU General Public License
1616
# along with this program; if not, write to the Free Software
17-
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA.
1818

1919

2020
# This script's purpose is to build the binary tarball packages for MariaDB

BUILD/compile-pentium64-wsrep

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
#
1515
# You should have received a copy of the GNU Library General Public
1616
# License along with this library; if not, write to the Free
17-
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
18-
# MA 02111-1307, USA
17+
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18+
# MA 02111-1301, USA
1919

2020
path=`dirname $0`
2121
. "$path/SETUP.sh"

BUILD/util.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#
1313
# You should have received a copy of the GNU General Public License
1414
# along with this program; if not, write to the Free Software
15-
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
15+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA.
1616

1717
# Setting cpu options.
1818
get_cpuopt () {

CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ INCLUDE(ssl)
154154
INCLUDE(readline)
155155
INCLUDE(libutils)
156156
INCLUDE(dtrace)
157-
INCLUDE(jemalloc)
158157
INCLUDE(pcre)
159158
INCLUDE(ctest)
160159
INCLUDE(plugin)
@@ -313,12 +312,15 @@ IF(NOT HAVE_CXX_NEW)
313312
ENDIF()
314313

315314
# Find header files from the bundled libraries
316-
# (jemalloc, yassl, readline, pcre, etc)
315+
# (yassl, readline, pcre, etc)
317316
# before the ones installed in the system
318317
SET(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
319318

320319
# Common defines and includes
321320
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
321+
IF(_FILE_OFFSET_BITS)
322+
ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=${_FILE_OFFSET_BITS})
323+
ENDIF()
322324
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/include)
323325

324326
# Add bundled or system zlib.
@@ -329,7 +331,6 @@ MYSQL_CHECK_SSL()
329331
MYSQL_CHECK_READLINE()
330332

331333
SET(MALLOC_LIBRARY "system")
332-
CHECK_JEMALLOC()
333334

334335
CHECK_PCRE()
335336

@@ -453,8 +454,9 @@ ADD_CUSTOM_TARGET(INFO_BIN ALL
453454
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
454455
)
455456

456-
INSTALL_DOCUMENTATION(README.md CREDITS COPYING COPYING.LESSER COPYING.thirdparty
457+
INSTALL_DOCUMENTATION(README.md CREDITS COPYING COPYING.thirdparty
457458
EXCEPTIONS-CLIENT COMPONENT Readme)
459+
458460
# MDEV-6526 these files are not installed anymore
459461
#INSTALL_DOCUMENTATION(${CMAKE_BINARY_DIR}/Docs/INFO_SRC
460462
# ${CMAKE_BINARY_DIR}/Docs/INFO_BIN)

COPYING.LESSER

Lines changed: 0 additions & 516 deletions
This file was deleted.

COPYING.thirdparty

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,7 @@ Use of any of this software is governed by the terms of the license below:
11871187

11881188
You should have received a copy of the GNU General Public License
11891189
along with this program; if not, write to the Free Software
1190-
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
1190+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
11911191

11921192
/*
11931193
* Copyright (c) 1997, 1999 Kungliga Tekniska H366gskolan

CREDITS

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@ organization registered in the USA.
33

44
The current main sponsors of the MariaDB Foundation are:
55

6-
Booking.com http://www.booking.com (2013 - 2016)
7-
Development Bank of Singapore http://dbs.com (2016)
8-
MariaDB Corporation https://www.mariadb.com (2013 - 2016)
9-
Visma http://visma.com (2015 - 2016)
10-
Acronis http://acronis.com (2016)
11-
Nexedi https://www.nexedi.com (2016)
12-
Automattic https://automattic.com (2014 - 2016)
13-
Tencent Game DBA http://tencentdba.com/about (2016)
14-
Verkkokauppa.com https://www.verkkokauppa.com (2015 - 2016)
15-
Virtuozzo https://virtuozzo.com (2016)
6+
Alibaba Cloud https://intl.aliyun.com (2017)
7+
Booking.com https://www.booking.com (2013 - 2017)
8+
Development Bank of Singapore https://dbs.com (2016 - 2017)
9+
MariaDB Corporation https://www.mariadb.com (2013 - 2017)
10+
Visma https://visma.com (2015 - 2017)
11+
Acronis http://acronis.com (2016 - 2017)
12+
Nexedi https://www.nexedi.com (2016 - 2017)
13+
Automattic https://automattic.com (2014 - 2017)
14+
Tencent Game DBA http://tencentdba.com/about (2016 - 2017)
15+
Tencent TDSQL http://tdsql.org/ (2016 - 2017)
16+
Verkkokauppa.com https://www.verkkokauppa.com (2015 - 2017)
17+
Virtuozzo https://virtuozzo.com (2016 - 2017)
1618

1719
For a full list of sponsors, see
1820
https://mariadb.org/about/supporters/

client/mysql.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
You should have received a copy of the GNU General Public License
1515
along with this program; if not, write to the Free Software
16-
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
16+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
1717

1818
/* mysql command tool
1919
* Commands compatible with mSQL by David J. Hughes

client/mysql_plugin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,7 @@ static int find_tool(const char *tool_name, char *tool_path)
10031003

10041004
static int find_plugin(char *tp_path)
10051005
{
1006-
/* Check for existance of plugin */
1006+
/* Check for existence of plugin */
10071007
fn_format(tp_path, plugin_data.so_name, opt_plugin_dir, "", MYF(0));
10081008
if (!file_exists(tp_path))
10091009
{

client/mysql_upgrade.c

Lines changed: 83 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#endif
3838

3939
static int phase = 0;
40-
static int phases_total = 6;
40+
static const int phases_total = 7;
4141
static char mysql_path[FN_REFLEN];
4242
static char mysqlcheck_path[FN_REFLEN];
4343

@@ -69,6 +69,8 @@ static char **defaults_argv;
6969

7070
static my_bool not_used; /* Can't use GET_BOOL without a value pointer */
7171

72+
char upgrade_from_version[sizeof("10.20.456-MariaDB")+1];
73+
7274
static my_bool opt_write_binlog;
7375

7476
#define OPT_SILENT OPT_MAX_CLIENT_OPTION
@@ -545,7 +547,7 @@ static int run_query(const char *query, DYNAMIC_STRING *ds_res,
545547
But mysql_upgrade is tightly bound to a specific server version
546548
anyway - it was mysql_fix_privilege_tables_sql script embedded
547549
into its binary - so even if it won't assume anything about server
548-
wsrep-ness, it won't be any less server-dependend.
550+
wsrep-ness, it won't be any less server-dependent.
549551
*/
550552
const uchar sql_log_bin[]= "SET SQL_LOG_BIN=0, WSREP_ON=OFF;";
551553
#else
@@ -675,23 +677,22 @@ static int upgrade_already_done(void)
675677
{
676678
FILE *in;
677679
char upgrade_info_file[FN_REFLEN]= {0};
678-
char buf[sizeof(MYSQL_SERVER_VERSION)+1];
679680

680681
if (get_upgrade_info_file_name(upgrade_info_file))
681682
return 0; /* Could not get filename => not sure */
682683

683684
if (!(in= my_fopen(upgrade_info_file, O_RDONLY, MYF(0))))
684685
return 0; /* Could not open file => not sure */
685686

686-
bzero(buf, sizeof(buf));
687-
if (!fgets(buf, sizeof(buf), in))
687+
bzero(upgrade_from_version, sizeof(upgrade_from_version));
688+
if (!fgets(upgrade_from_version, sizeof(upgrade_from_version), in))
688689
{
689690
/* Ignore, will be detected by strncmp() below */
690691
}
691692

692693
my_fclose(in, MYF(0));
693694

694-
return (strncmp(buf, MYSQL_SERVER_VERSION,
695+
return (strncmp(upgrade_from_version, MYSQL_SERVER_VERSION,
695696
sizeof(MYSQL_SERVER_VERSION)-1)==0);
696697
}
697698

@@ -756,9 +757,8 @@ static void print_conn_args(const char *tool_name)
756757
verbose("Running '%s with default connection arguments", tool_name);
757758
}
758759

759-
760760
/*
761-
Check and upgrade(if neccessary) all tables
761+
Check and upgrade(if necessary) all tables
762762
in the server using "mysqlcheck --check-upgrade .."
763763
*/
764764

@@ -925,6 +925,80 @@ static void print_line(char* line)
925925
fputc('\n', stderr);
926926
}
927927

928+
static my_bool from_before_10_1()
929+
{
930+
my_bool ret= TRUE;
931+
DYNAMIC_STRING ds_events_struct;
932+
933+
if (upgrade_from_version[0])
934+
{
935+
return upgrade_from_version[1] == '.' ||
936+
strncmp(upgrade_from_version, "10.1.", 5) < 0;
937+
}
938+
939+
if (init_dynamic_string(&ds_events_struct, NULL, 2048, 2048))
940+
die("Out of memory");
941+
942+
if (run_query("show create table mysql.user", &ds_events_struct, FALSE) ||
943+
strstr(ds_events_struct.str, "default_role") != NULL)
944+
ret= FALSE;
945+
else
946+
verbose("Upgrading from a version before MariaDB-10.1");
947+
948+
dynstr_free(&ds_events_struct);
949+
return ret;
950+
}
951+
952+
953+
/*
954+
Check for entries with "Unknown storage engine" in I_S.TABLES,
955+
try to load plugins for these tables if available (MDEV-11942)
956+
*/
957+
static int install_used_engines(void)
958+
{
959+
char buf[512];
960+
DYNAMIC_STRING ds_result;
961+
const char *query = "SELECT DISTINCT LOWER(engine) FROM information_schema.tables"
962+
" WHERE table_comment LIKE 'Unknown storage engine%'";
963+
964+
if (opt_systables_only || !from_before_10_1())
965+
{
966+
verbose("Phase %d/%d: Installing used storage engines... Skipped", ++phase, phases_total);
967+
return 0;
968+
}
969+
verbose("Phase %d/%d: Installing used storage engines", ++phase, phases_total);
970+
971+
if (init_dynamic_string(&ds_result, "", 512, 512))
972+
die("Out of memory");
973+
974+
verbose("Checking for tables with unknown storage engine");
975+
976+
run_query(query, &ds_result, TRUE);
977+
978+
if (ds_result.length)
979+
{
980+
char *line= ds_result.str, *next=get_line(line);
981+
do
982+
{
983+
if (next[-1] == '\n')
984+
next[-1]=0;
985+
986+
verbose("installing plugin for '%s' storage engine", line);
987+
988+
// we simply assume soname=ha_enginename
989+
strxnmov(buf, sizeof(buf)-1, "install soname 'ha_", line, "'", NULL);
990+
991+
992+
if (run_query(buf, NULL, TRUE))
993+
fprintf(stderr, "... can't %s\n", buf);
994+
line=next;
995+
next=get_line(line);
996+
} while (*line);
997+
}
998+
dynstr_free(&ds_result);
999+
return 0;
1000+
}
1001+
9281002

9291003
/*
9301004
Update all system tables in MySQL Server to current
@@ -1132,6 +1206,7 @@ int main(int argc, char **argv)
11321206
Run "mysqlcheck" and "mysql_fix_privilege_tables.sql"
11331207
*/
11341208
if (run_mysqlcheck_upgrade(TRUE) ||
1209+
install_used_engines() ||
11351210
run_mysqlcheck_views() ||
11361211
run_sql_fix_privilege_tables() ||
11371212
run_mysqlcheck_fixnames() ||
@@ -1154,4 +1229,3 @@ int main(int argc, char **argv)
11541229
my_end(my_end_arg);
11551230
exit(0);
11561231
}
1157-

0 commit comments

Comments
 (0)