diff options
author | monty@mysql.com <> | 2005-01-18 04:03:26 +0200 |
---|---|---|
committer | monty@mysql.com <> | 2005-01-18 04:03:26 +0200 |
commit | 502ba93b38cfeae6b291e5618595f9b2ee33a28f (patch) | |
tree | bb697cb498858b14ae0d525938dd3fcd68d13eaa /client | |
parent | 88b1fbaf2f49c33d44721d7c51a46c7c121292f3 (diff) | |
parent | edffca827e40635a3738f7e5b4251033e485f024 (diff) | |
download | mariadb-git-502ba93b38cfeae6b291e5618595f9b2ee33a28f.tar.gz |
Merge with global tree
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql.cc | 10 | ||||
-rw-r--r-- | client/mysqldump.c | 6 |
2 files changed, 12 insertions, 4 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index 0f6f3084d1e..e178f79bcf3 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -3234,13 +3234,20 @@ static const char* construct_prompt() break; } case 'p': + { #ifndef EMBEDDED_LIBRARY if (!connected) { processed_prompt.append("not_connected"); break; } - if (strstr(mysql_get_host_info(&mysql),"TCP/IP") || + + const char *host_info = mysql_get_host_info(&mysql); + if (strstr(host_info, "memory")) + { + processed_prompt.append( mysql.host ); + } + else if (strstr(host_info,"TCP/IP") || !mysql.unix_socket) add_int_to_prompt(mysql.port); else @@ -3249,6 +3256,7 @@ static const char* construct_prompt() processed_prompt.append(pos ? pos+1 : mysql.unix_socket); } #endif + } break; case 'U': if (!full_username) diff --git a/client/mysqldump.c b/client/mysqldump.c index 458c8a3ecda..9b707af6107 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -305,6 +305,9 @@ static struct my_option my_long_options[] = {"opt", OPT_OPTIMIZE, "Same as --add-drop-table, --add-locks, --create-options, --quick, --extended-insert, --lock-tables, --set-charset, and --disable-keys. Enabled by default, disable with --skip-opt.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"order-by-primary", OPT_ORDER_BY_PRIMARY, + "Sorts each table's rows by primary key, or first unique key, if such a key exists. Useful when dumping a MyISAM table to be loaded into an InnoDB table, but will make the dump itself take considerably longer.", + (gptr*) &opt_order_by_primary, (gptr*) &opt_order_by_primary, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"password", 'p', "Password to use when connecting to server. If password is not given it's solicited on the tty.", 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, @@ -356,9 +359,6 @@ static struct my_option my_long_options[] = {"socket", 'S', "Socket file to use for connection.", (gptr*) &opt_mysql_unix_port, (gptr*) &opt_mysql_unix_port, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"order-by-primary", OPT_ORDER_BY_PRIMARY, - "Sorts each table's rows by primary key, or first unique key, if such a key exists. Useful when dumping a MyISAM table to be loaded into an InnoDB table, but will make the dump itself take considerably longer.", - (gptr*) &opt_order_by_primary, (gptr*) &opt_order_by_primary, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, #include <sslopt-longopts.h> {"tab",'T', "Creates tab separated textfile for each table to given path. (creates .sql and .txt files). NOTE: This only works if mysqldump is run on the same machine as the mysqld daemon.", |