mirror of
https://github.com/MariaDB/server.git
synced 2025-08-05 13:16:09 +03:00
Merge branch '10.2' into 10.3
This commit is contained in:
@@ -34,7 +34,7 @@ static uint opt_no_defaults= 0;
|
|||||||
static uint opt_print_defaults= 0;
|
static uint opt_print_defaults= 0;
|
||||||
static char *opt_datadir=0, *opt_basedir=0,
|
static char *opt_datadir=0, *opt_basedir=0,
|
||||||
*opt_plugin_dir=0, *opt_plugin_ini=0,
|
*opt_plugin_dir=0, *opt_plugin_ini=0,
|
||||||
*opt_mysqld=0, *opt_my_print_defaults=0;
|
*opt_mysqld=0, *opt_my_print_defaults=0, *opt_lc_messages_dir;
|
||||||
static char bootstrap[FN_REFLEN];
|
static char bootstrap[FN_REFLEN];
|
||||||
|
|
||||||
|
|
||||||
@@ -70,6 +70,8 @@ static struct my_option my_long_options[] =
|
|||||||
{"my-print-defaults", 'f', "Path to my_print_defaults executable. "
|
{"my-print-defaults", 'f', "Path to my_print_defaults executable. "
|
||||||
"Example: /source/temp11/extra",
|
"Example: /source/temp11/extra",
|
||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
|
{"lc-messages-dir", 'l', "The error messages dir for the server. ",
|
||||||
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"verbose", 'v',
|
{"verbose", 'v',
|
||||||
"More verbose output; you can use this multiple times to get even more "
|
"More verbose output; you can use this multiple times to get even more "
|
||||||
"verbose output.",
|
"verbose output.",
|
||||||
@@ -305,6 +307,7 @@ static char *add_quotes(const char *path)
|
|||||||
--basedir
|
--basedir
|
||||||
--plugin-dir
|
--plugin-dir
|
||||||
--plugin-ini
|
--plugin-ini
|
||||||
|
--lc-messages-dir
|
||||||
|
|
||||||
These values are used if the user has not specified a value.
|
These values are used if the user has not specified a value.
|
||||||
|
|
||||||
@@ -382,14 +385,20 @@ static int get_default_values()
|
|||||||
{
|
{
|
||||||
opt_basedir= my_strdup(value, MYF(MY_FAE));
|
opt_basedir= my_strdup(value, MYF(MY_FAE));
|
||||||
}
|
}
|
||||||
if ((opt_plugin_dir == 0) && ((value= get_value(line, "--plugin_dir"))))
|
if ((opt_plugin_dir == 0) && ((value= get_value(line, "--plugin_dir")) ||
|
||||||
|
(value= get_value(line, "--plugin-dir"))))
|
||||||
{
|
{
|
||||||
opt_plugin_dir= my_strdup(value, MYF(MY_FAE));
|
opt_plugin_dir= my_strdup(value, MYF(MY_FAE));
|
||||||
}
|
}
|
||||||
if ((opt_plugin_ini == 0) && ((value= get_value(line, "--plugin_ini"))))
|
if ((opt_lc_messages_dir == 0) &&
|
||||||
|
((value= get_value(line, "--lc_messages_dir")) ||
|
||||||
|
(value= get_value(line, "--lc_messages-dir")) ||
|
||||||
|
(value= get_value(line, "--lc-messages_dir")) ||
|
||||||
|
(value= get_value(line, "--lc-messages-dir"))))
|
||||||
{
|
{
|
||||||
opt_plugin_ini= my_strdup(value, MYF(MY_FAE));
|
opt_lc_messages_dir= my_strdup(value, MYF(MY_FAE));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
exit:
|
exit:
|
||||||
@@ -429,6 +438,7 @@ static void usage(void)
|
|||||||
--basedir
|
--basedir
|
||||||
--plugin-dir
|
--plugin-dir
|
||||||
--plugin-ini
|
--plugin-ini
|
||||||
|
--lc-messages-dir
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -461,6 +471,10 @@ static void print_default_values(void)
|
|||||||
{
|
{
|
||||||
printf("--my_print_defaults=%s ", opt_my_print_defaults);
|
printf("--my_print_defaults=%s ", opt_my_print_defaults);
|
||||||
}
|
}
|
||||||
|
if (opt_lc_messages_dir)
|
||||||
|
{
|
||||||
|
printf("--lc_messages_dir=%s ", opt_lc_messages_dir);
|
||||||
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -515,6 +529,10 @@ get_one_option(int optid,
|
|||||||
case 'f':
|
case 'f':
|
||||||
opt_my_print_defaults= my_strdup(argument, MYF(MY_FAE));
|
opt_my_print_defaults= my_strdup(argument, MYF(MY_FAE));
|
||||||
break;
|
break;
|
||||||
|
case 'l':
|
||||||
|
opt_lc_messages_dir= my_strdup(argument, MYF(MY_FAE));
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -900,6 +918,8 @@ static int process_options(int argc, char *argv[], char *operation)
|
|||||||
printf("# plugin_dir = %s\n", opt_plugin_dir);
|
printf("# plugin_dir = %s\n", opt_plugin_dir);
|
||||||
printf("# datadir = %s\n", opt_datadir);
|
printf("# datadir = %s\n", opt_datadir);
|
||||||
printf("# plugin_ini = %s\n", opt_plugin_ini);
|
printf("# plugin_ini = %s\n", opt_plugin_ini);
|
||||||
|
if (opt_lc_messages_dir != 0)
|
||||||
|
printf("# lc_messages_dir = %s\n", opt_lc_messages_dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
@@ -957,6 +977,12 @@ static int check_access()
|
|||||||
opt_my_print_defaults);
|
opt_my_print_defaults);
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (opt_lc_messages_dir && (error= my_access(opt_lc_messages_dir, F_OK)))
|
||||||
|
{
|
||||||
|
fprintf(stderr, "ERROR: Cannot access lc-messages-dir path '%s'.\n",
|
||||||
|
opt_lc_messages_dir);
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
return error;
|
return error;
|
||||||
@@ -1186,18 +1212,33 @@ static int bootstrap_server(char *server_path, char *bootstrap_file)
|
|||||||
verbose_str= "";
|
verbose_str= "";
|
||||||
if (has_spaces(opt_datadir) || has_spaces(opt_basedir) ||
|
if (has_spaces(opt_datadir) || has_spaces(opt_basedir) ||
|
||||||
has_spaces(bootstrap_file))
|
has_spaces(bootstrap_file))
|
||||||
format_str= "\"%s %s --bootstrap --datadir=%s --basedir=%s < %s\"";
|
{
|
||||||
else
|
if (opt_lc_messages_dir != NULL)
|
||||||
format_str= "%s %s --bootstrap --datadir=%s --basedir=%s < %s";
|
format_str= "\"%s %s --bootstrap --datadir=%s --basedir=%s --lc-messages-dir=%s <%s\"";
|
||||||
|
else
|
||||||
|
format_str= "\"%s %s --bootstrap --datadir=%s --basedir=%s <%s\"";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (opt_lc_messages_dir != NULL)
|
||||||
|
format_str= "\"%s %s --bootstrap --datadir=%s --basedir=%s --lc-messages-dir=%s <%s\"";
|
||||||
|
else
|
||||||
|
format_str= "%s %s --bootstrap --datadir=%s --basedir=%s <%s";
|
||||||
|
}
|
||||||
snprintf(bootstrap_cmd, sizeof(bootstrap_cmd), format_str,
|
snprintf(bootstrap_cmd, sizeof(bootstrap_cmd), format_str,
|
||||||
add_quotes(convert_path(server_path)), verbose_str,
|
add_quotes(convert_path(server_path)), verbose_str,
|
||||||
add_quotes(opt_datadir), add_quotes(opt_basedir),
|
add_quotes(opt_datadir), add_quotes(opt_basedir),
|
||||||
add_quotes(bootstrap_file));
|
add_quotes(bootstrap_file));
|
||||||
#else
|
#else
|
||||||
snprintf(bootstrap_cmd, sizeof(bootstrap_cmd),
|
if (opt_lc_messages_dir != NULL)
|
||||||
"%s --no-defaults --bootstrap --datadir=%s --basedir=%s"
|
snprintf(bootstrap_cmd, sizeof(bootstrap_cmd),
|
||||||
" < %s", server_path, opt_datadir, opt_basedir, bootstrap_file);
|
"%s --no-defaults --bootstrap --datadir=%s --basedir=%s --lc-messages-dir=%s"
|
||||||
|
" <%s", server_path, opt_datadir, opt_basedir, opt_lc_messages_dir, bootstrap_file);
|
||||||
|
else
|
||||||
|
snprintf(bootstrap_cmd, sizeof(bootstrap_cmd),
|
||||||
|
"%s --no-defaults --bootstrap --datadir=%s --basedir=%s"
|
||||||
|
" <%s", server_path, opt_datadir, opt_basedir, bootstrap_file);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Execute the command */
|
/* Execute the command */
|
||||||
|
@@ -104,6 +104,16 @@ ELSEIF(RPM)
|
|||||||
SET(CHECKMODULE /usr/bin/checkmodule CACHE FILEPATH "")
|
SET(CHECKMODULE /usr/bin/checkmodule CACHE FILEPATH "")
|
||||||
SET(SEMODULE_PACKAGE /usr/bin/semodule_package CACHE FILEPATH "")
|
SET(SEMODULE_PACKAGE /usr/bin/semodule_package CACHE FILEPATH "")
|
||||||
SET(WITH_JEMALLOC "yes" CACHE STRING "")
|
SET(WITH_JEMALLOC "yes" CACHE STRING "")
|
||||||
|
IF(RPM MATCHES "fedora|centos|rhel")
|
||||||
|
SET(WITH_INNODB_BZIP2 OFF CACHE STRING "")
|
||||||
|
SET(WITH_INNODB_LZO OFF CACHE STRING "")
|
||||||
|
SET(WITH_ROCKSDB_BZip2 OFF CACHE STRING "")
|
||||||
|
ENDIF()
|
||||||
|
IF(RPM MATCHES "opensuse|sles|centos|rhel")
|
||||||
|
SET(WITH_INNODB_LZ4 OFF CACHE STRING "")
|
||||||
|
SET(WITH_ROCKSDB_LZ4 OFF CACHE STRING "")
|
||||||
|
SET(GRN_WITH_LZ4 no CACHE STRING "")
|
||||||
|
ENDIF()
|
||||||
ELSEIF(DEB)
|
ELSEIF(DEB)
|
||||||
SET(WITH_SSL system CACHE STRING "")
|
SET(WITH_SSL system CACHE STRING "")
|
||||||
SET(WITH_ZLIB system CACHE STRING "")
|
SET(WITH_ZLIB system CACHE STRING "")
|
||||||
@@ -119,6 +129,12 @@ ELSE()
|
|||||||
SET(WITH_PCRE bundled CACHE STRING "")
|
SET(WITH_PCRE bundled CACHE STRING "")
|
||||||
SET(WITH_ZLIB bundled CACHE STRING "")
|
SET(WITH_ZLIB bundled CACHE STRING "")
|
||||||
SET(WITH_JEMALLOC static CACHE STRING "")
|
SET(WITH_JEMALLOC static CACHE STRING "")
|
||||||
|
SET(WITH_INNODB_BZIP2 OFF CACHE STRING "")
|
||||||
|
SET(WITH_INNODB_LZ4 OFF CACHE STRING "")
|
||||||
|
SET(WITH_INNODB_LZO OFF CACHE STRING "")
|
||||||
|
SET(WITH_ROCKSDB_BZip2 OFF CACHE STRING "")
|
||||||
|
SET(WITH_ROCKSDB_LZ4 OFF CACHE STRING "")
|
||||||
|
SET(GRN_WITH_LZ4 no CACHE STRING "")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF(NOT COMPILATION_COMMENT)
|
IF(NOT COMPILATION_COMMENT)
|
||||||
|
Reference in New Issue
Block a user