Skip to content
Permalink
Browse files

Fixed that mariadb-# binaries reads their corresponding entry from my…

….cnf

- Added mariadb-# to load_default_groups to all mariadb-# scripts and
  mariadb-binaries.
- Added mariadbd and mariadbd-"version" to load_default_groups for the
  mysqld/mariadb server
- Added mariadb-client to load_default_groups for the mysql/mariadb client

Other things
- Ignored mysql-test/lib/My/SafeProcess/wsrep_check_version
- mysql_install_db will now automatically detect if run from srcdir
  • Loading branch information...
montywi committed Jul 18, 2019
1 parent 5a95a33 commit 47334649752e109360c9e22b8f8019a0df51fe93
@@ -83,6 +83,7 @@ make_dist.cmake
mariadb-*.*.*.tar.gz
mariadb-*.*.*/
mysql-test/lib/My/SafeProcess/my_safe_process
mysql-test/lib/My/SafeProcess/wsrep_check_version
mysql-test/mtr
mysql-test/mysql-test-run
mysql-test/var
@@ -1034,7 +1034,7 @@ static COMMANDS commands[] = {
};

static const char *load_default_groups[]=
{ "mysql", "client", "client-server", "client-mariadb", 0 };
{ "mysql", "mariadb-client", "client", "client-server", "client-mariadb", 0 };

static int embedded_server_arg_count= 0;
static char *embedded_server_args[MAX_SERVER_ARGS];
@@ -173,6 +173,7 @@ static const char *load_default_groups[]=
{
"client", /* Read settings how to connect to server */
"mysql_upgrade", /* Read special settings for mysql_upgrade */
"mariadb-upgrade", /* Read special settings for mysql_upgrade */
"client-server", /* Reads settings common between client & server */
"client-mariadb", /* Read mariadb unique client settings */
0
@@ -237,7 +237,8 @@ static struct my_option my_long_options[] =


static const char *load_default_groups[]=
{ "mysqladmin", "client", "client-server", "client-mariadb", 0 };
{ "mysqladmin", "mariadb-admin", "client", "client-server", "client-mariadb",
0 };

my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
@@ -94,7 +94,8 @@ static const char *default_dbug_option = "d:t:o,/tmp/mysqlbinlog.trace";
const char *current_dbug_option= default_dbug_option;
#endif
static const char *load_groups[]=
{ "mysqlbinlog", "client", "client-server", "client-mariadb", 0 };
{ "mysqlbinlog", "mariadb-binlog", "client", "client-server", "client-mariadb",
0 };

static void error(const char *format, ...) ATTRIBUTE_FORMAT(printf, 1, 2);
static void warning(const char *format, ...) ATTRIBUTE_FORMAT(printf, 1, 2);
@@ -222,7 +222,8 @@ static struct my_option my_long_options[] =
};

static const char *load_default_groups[]=
{ "mysqlcheck", "client", "client-server", "client-mariadb", 0 };
{ "mysqlcheck", "mariadb-check", "client", "client-server", "client-mariadb",
0 };


static void print_version(void);
@@ -555,7 +555,8 @@ static struct my_option my_long_options[] =
};

static const char *load_default_groups[]=
{ "mysqldump", "client", "client-server", "client-mariadb", 0 };
{ "mysqldump", "mariadb-dump", "client", "client-server", "client-mariadb",
0 };

static void maybe_exit(int error);
static void die(int error, const char* reason, ...);
@@ -187,7 +187,8 @@ static struct my_option my_long_options[] =


static const char *load_default_groups[]=
{ "mysqlimport","client", "client-server", "client-mariadb", 0 };
{ "mysqlimport", "mariadb-import", "client", "client-server", "client-mariadb",
0 };


static void print_version(void)
@@ -56,7 +56,8 @@ static void print_res_top(MYSQL_RES *result);
static void print_res_row(MYSQL_RES *result,MYSQL_ROW cur);

static const char *load_default_groups[]=
{ "mysqlshow","client", "client-server", "client-mariadb", 0 };
{ "mysqlshow", "mariadb-show", "client", "client-server", "client-mariadb",
0 };
static char * opt_mysql_unix_port=0;

int main(int argc, char **argv)
@@ -177,7 +177,8 @@ static int get_options(int *argc,char ***argv);
static uint opt_mysql_port= 0;

static const char *load_default_groups[]=
{ "mysqlslap", "client", "client-server", "client-mariadb", 0 };
{ "mysqlslap", "mariadb-slap", "client", "client-server", "client-mariadb",
0 };

typedef struct statement statement;

@@ -136,7 +136,8 @@ static my_bool server_initialized= 0;
static my_bool is_windows= 0;
static char **default_argv;
static const char *load_default_groups[]=
{ "mysqltest", "client", "client-server", "client-mariadb", 0 };
{ "mysqltest", "mariadb-test", "client", "client-server", "client-mariadb",
0 };
static char line_buffer[MAX_DELIMITER_LENGTH], *line_buffer_pos= line_buffer;

/* Info on properties that can be set with --enable_X and --disable_X */
@@ -14,6 +14,7 @@
#define MYSQL_SERVER_VERSION "@VERSION@-MariaDB"
#define MYSQL_BASE_VERSION "mysqld-@MYSQL_BASE_VERSION@"
#define MARIADB_BASE_VERSION "mariadb-@MYSQL_BASE_VERSION@"
#define MARIADBD_BASE_VERSION "mariadbd-@MYSQL_BASE_VERSION@"
#define MYSQL_SERVER_SUFFIX_DEF "@MYSQL_SERVER_SUFFIX@"
#define FRM_VER @DOT_FRM_VERSION@
#define MYSQL_VERSION_ID @MYSQL_VERSION_ID@
@@ -1,6 +1,7 @@
const char *load_default_groups[]= {
"mysqld", "server", MYSQL_BASE_VERSION,
"mariadb", MARIADB_BASE_VERSION,
"mariadbd", MARIADBD_BASE_VERSION,
"client-server",
#ifdef WITH_WSREP
"galera",
@@ -288,6 +288,11 @@ then
elif test -n "$dirname0" -a -x "$dirname0/@bindir@/my_print_defaults"
then
print_defaults="$dirname0/@bindir@/my_print_defaults"
elif test -x "./extra/my_print_defaults"
then
srcdir="."
builddir="."
print_defaults="./extra/my_print_defaults"
else
print_defaults="@bindir@/my_print_defaults"
fi
@@ -300,7 +305,8 @@ fi

# Now we can get arguments from the groups [mysqld] and [mysql_install_db]
# in the my.cfg file, then re-run to merge with command line arguments.
parse_arguments `"$print_defaults" $defaults $defaults_group_suffix --mysqld mysql_install_db`
parse_arguments `"$print_defaults" $defaults $defaults_group_suffix --mysqld mysql_install_db mariadb-install-db`

parse_arguments PICK-ARGS-FROM-ARGV "$@"

rel_mysqld="$dirname0/@INSTALL_SBINDIR@/mysqld"
@@ -577,8 +577,8 @@ append_arg_to_args () {

args=

# Get first arguments from the my.cnf file, groups [mysqld] and [mysqld_safe]
# and then merge with the command line arguments
# Get first arguments from the my.cnf file, groups [mysqld] and [server]
# (and related) and then merge with the command line arguments

SET_USER=2
parse_arguments `$print_defaults $defaults --loose-verbose --mysqld`
@@ -590,7 +590,7 @@ fi
# If arguments come from [mysqld_safe] section of my.cnf
# we complain about unrecognized options
unrecognized_handling=complain
parse_arguments `$print_defaults $defaults --loose-verbose mysqld_safe safe_mysqld mariadb_safe`
parse_arguments `$print_defaults $defaults --loose-verbose mysqld_safe safe_mysqld mariadb_safe mariadbd-safe`

# We only need to pass arguments through to the server if we don't
# handle them here. So, we collect unrecognized options (passed on

0 comments on commit 4733464

Please sign in to comment.
You can’t perform that action at this time.