diff options
author | unknown <monty@narttu.mysql.fi> | 2003-05-27 16:40:14 +0300 |
---|---|---|
committer | unknown <monty@narttu.mysql.fi> | 2003-05-27 16:40:14 +0300 |
commit | 4920a3326fc96be2cfa661232b6fe5f731b22eae (patch) | |
tree | 3dbb25b0c8865f6a219078ba4e0aa4d829addb42 /client/mysql.cc | |
parent | 515ca2c4b41c077898660117d3faccc337f059da (diff) | |
download | mariadb-git-4920a3326fc96be2cfa661232b6fe5f731b22eae.tar.gz |
Fixed problem with mysql prompt when server disconnect. (Bug 356)
Fixed problem with localtime -> gmt where some times resulted in
different (but correct) timestamps. Now MySQL should use the smallest
possible timestamp value in this case. (Bug 316)
client/mysql.cc:
Fixed problem with prompt when server disconnect. (Bug 356)
client/mysqltest.c:
More debug information
mysql-test/mysql-test-run.sh:
Added support for --timezone in -master.opt
mysql-test/t/raid.test:
Fixed test if raid is enabled
sql/field.cc:
New my_gmt_sec() parameters
sql/mysql_priv.h:
New my_gmt_sec() parameters
sql/mysqld.cc:
Remove LOCK_timezone.
Code cleanup
sql/time.cc:
Fixed problem with localtime -> gmt where some times resulted in
different (but correct) timestamps. Now MySQL should use the smallest
possible timestamp value in this case. (Bug 316)
Diffstat (limited to 'client/mysql.cc')
-rw-r--r-- | client/mysql.cc | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index a237561d83d..9b0e85aa41a 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -40,7 +40,7 @@ #include <signal.h> #include <violite.h> -const char *VER= "12.20"; +const char *VER= "12.21"; /* Don't try to make a nice table if the data is too big */ #define MAX_COLUMN_LENGTH 1024 @@ -2613,14 +2613,18 @@ static const char* construct_prompt() add_int_to_prompt(++prompt_counter); break; case 'v': - processed_prompt.append(mysql_get_server_info(&mysql)); + if (connected) + processed_prompt.append(mysql_get_server_info(&mysql)); + else + processed_prompt.append("not_connected"); break; case 'd': processed_prompt.append(current_db ? current_db : "(none)"); break; case 'h': { - const char *prompt=mysql_get_host_info(&mysql); + const char *prompt; + prompt= connected ? mysql_get_host_info(&mysql) : "not_connected"; if (strstr(prompt, "Localhost")) processed_prompt.append("localhost"); else @@ -2631,8 +2635,13 @@ static const char* construct_prompt() break; } case 'p': - if (strstr(mysql_get_host_info(&mysql),"TCP/IP") || - ! mysql.unix_socket) + if (!connected) + { + processed_prompt.append("not_connected"); + break; + } + if (strstr(mysql_get_host_info(&mysql),"TCP/IP") || ! + mysql.unix_socket) add_int_to_prompt(mysql.port); else { |