diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-08-13 18:57:00 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-08-13 18:57:00 +0300 |
commit | 624dd71b9419555eca8baadc695e3376de72286f (patch) | |
tree | 31aaab8aeac43f921638407ab82190dd05a72793 /client | |
parent | d4d865fcc8083782b6e4419c69bec372cd0b4142 (diff) | |
parent | e9c1701e11e2441435223cc7c00c467f58aaff19 (diff) | |
download | mariadb-git-624dd71b9419555eca8baadc695e3376de72286f.tar.gz |
Merge 10.4 into 10.5
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql.cc | 2 | ||||
-rw-r--r-- | client/mysql_upgrade.c | 1 | ||||
-rw-r--r-- | client/mysqladmin.cc | 3 | ||||
-rw-r--r-- | client/mysqlbinlog.cc | 4 | ||||
-rw-r--r-- | client/mysqlcheck.c | 3 | ||||
-rw-r--r-- | client/mysqldump.c | 9 | ||||
-rw-r--r-- | client/mysqlimport.c | 3 | ||||
-rw-r--r-- | client/mysqlshow.c | 3 | ||||
-rw-r--r-- | client/mysqlslap.c | 3 | ||||
-rw-r--r-- | client/mysqltest.cc | 13 |
10 files changed, 32 insertions, 12 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index c334e16fa20..d533a66e841 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -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]; diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c index 59ec622ad8c..39fe715bdff 100644 --- a/client/mysql_upgrade.c +++ b/client/mysql_upgrade.c @@ -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 diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc index baffe98abb7..32096fef996 100644 --- a/client/mysqladmin.cc +++ b/client/mysqladmin.cc @@ -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)), diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index f2f57f6e0bb..19973724a82 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -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); @@ -1545,6 +1546,7 @@ end: { my_fwrite(result_file, (const uchar *) tmp_str.str, tmp_str.length, MYF(MY_NABP)); + fflush(result_file); my_free(tmp_str.str); } } diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index 7e9546e0dc2..c1859440446 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -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); diff --git a/client/mysqldump.c b/client/mysqldump.c index c64df9e78a9..0ba241f6ad3 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -562,7 +562,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, ...); @@ -2525,7 +2526,9 @@ static uint dump_routines_for_db(char *db) char db_cl_name[MY_CS_NAME_SIZE]; int db_cl_altered= FALSE; - + // before 10.3 packages are not supported + uint upper_bound= mysql_get_server_version(mysql) >= 100300 ? + array_elements(routine_type) : 2; DBUG_ENTER("dump_routines_for_db"); DBUG_PRINT("enter", ("db: '%s'", db)); @@ -2555,7 +2558,7 @@ static uint dump_routines_for_db(char *db) fputs("\t<routines>\n", sql_file); /* 0, retrieve and dump functions, 1, procedures, etc. */ - for (i= 0; i < array_elements(routine_type); i++) + for (i= 0; i < upper_bound; i++) { my_snprintf(query_buff, sizeof(query_buff), "SHOW %s STATUS WHERE Db = '%s'", diff --git a/client/mysqlimport.c b/client/mysqlimport.c index cfdb183414a..67dc11d7117 100644 --- a/client/mysqlimport.c +++ b/client/mysqlimport.c @@ -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) diff --git a/client/mysqlshow.c b/client/mysqlshow.c index 4e2f9e83340..db5c2bbbbe6 100644 --- a/client/mysqlshow.c +++ b/client/mysqlshow.c @@ -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) diff --git a/client/mysqlslap.c b/client/mysqlslap.c index 3339acce314..473bb12dc11 100644 --- a/client/mysqlslap.c +++ b/client/mysqlslap.c @@ -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; diff --git a/client/mysqltest.cc b/client/mysqltest.cc index c430892900e..5f28bf422e1 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -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 */ @@ -4636,8 +4637,16 @@ void do_perl(struct st_command *command) str_to_file(temp_file_path, ds_script.str, ds_script.length); + /* Use the same perl executable as the one that runs mysql-test-run.pl */ + const char *mtr_perl=getenv("MTR_PERL"); + if (!mtr_perl) + mtr_perl="perl"; + /* Format the "perl <filename>" command */ - my_snprintf(buf, sizeof(buf), "perl %s", temp_file_path); + if (strchr(mtr_perl, ' ')) + my_snprintf(buf, sizeof(buf), "\"%s\" %s", mtr_perl, temp_file_path); + else + my_snprintf(buf, sizeof(buf), "%s %s", mtr_perl, temp_file_path); if (!(res_file= my_popen(buf, "r"))) { |