diff options
author | unknown <monty@hundin.mysql.fi> | 2002-04-02 17:54:57 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2002-04-02 17:54:57 +0300 |
commit | c95270b8c4b320c1080acc03da99e2a33c80440b (patch) | |
tree | 0918e7f417ac64ab19af6ea441c12c97e897c1b9 /client/mysql.cc | |
parent | 546b6a679ff5f42e5ee5433982a2fb4daa256344 (diff) | |
download | mariadb-git-c95270b8c4b320c1080acc03da99e2a33c80440b.tar.gz |
Cleanups
Don't use DBUG library for struct st_my_thread_var to make code less complicated.
Docs/manual.texi:
Cleanup
acinclude.m4:
Search after openssl in /usr/local
client/mysql.cc:
Fix prompt
client/mysqladmin.c:
Cleanup
client/mysqltest.c:
Cleanup
include/my_pthread.h:
Move thread variables to the right location
include/my_sys.h:
Move thread variables to the right location
include/mysql.h:
Clean up client prototypes
libmysql/libmysql.c:
Clean up client prototypes
mysys/my_static.h:
Cleanup
mysys/my_thr_init.c:
Don't use DBUG library for struct st_my_thread_var to make code less complicated
sql/item_cmpfunc.cc:
Small optimization
sql/net_pkg.cc:
Cleanup
sql/sql_parse.cc:
Allow VARCHAR(0)
Diffstat (limited to 'client/mysql.cc')
-rw-r--r-- | client/mysql.cc | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index edb6738463e..be776997059 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -2340,7 +2340,7 @@ static int com_status(String *buffer __attribute__((unused)), char *line __attribute__((unused))) { - char *status; + const char *status; tee_puts("--------------", stdout); usage(1); /* Print version */ if (connected) @@ -2635,18 +2635,21 @@ static const char* construct_prompt() { processed_prompt.append(current_db ? current_db : "(none)"); break; case 'h': - if (strstr(mysql_get_host_info(&mysql),"Localhost")) { + { + const char *prompt=mysql_get_host_info(&mysql); + if (strstr(prompt, "Localhost")) processed_prompt.append("localhost"); - } - else { - processed_prompt.append(strtok(mysql_get_host_info(&mysql)," ")); + else + { + const char *end=strcend(prompt,' '); + processed_prompt.append(prompt, (uint) (end-prompt)); } break; + } case 'p': - if (strstr(mysql_get_host_info(&mysql),"TCP/IP") - || ! mysql.unix_socket) { + if (strstr(mysql_get_host_info(&mysql),"TCP/IP") || + ! mysql.unix_socket) add_int_to_prompt(mysql.port); - } else processed_prompt.append(strrchr(mysql.unix_socket,'/')+1); break; |