From 0db0b601abb3be2fdafa612583f4e03360876236 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Feb 2004 10:22:08 +0100 Subject: Added SQL_SELECT::cleanup() to make it easier to reuse SQL_SELECT item's for sub selects. Needed for proper fix for bug #2479. Added 'select_to_file' class to be able to merge identical code for select_export and select_dump client/mysql.cc: Print mysql_insert_id() in 'status' mysys/charset.c: after merge fixup sql/item_func.cc: Code cleanup + new comments sql/opt_range.cc: Added SQL_SELECT::cleanup() to make it easier to reuse SQL_SELECT item's for sub selects. sql/opt_range.h: Added SQL_SELECT::cleanup() to make it easier to reuse SQL_SELECT item's for sub selects. sql/sql_class.cc: Added 'select_to_file' class to be able to merge identical code for select_export and select_dump sql/sql_class.h: Added 'select_to_file' class to be able to merge identical code for select_export and select_dump sql/sql_select.cc: Fixed bug when calling 'delete select' in sub selects. (Bug 2479) (Test case is already commited to global source repository) --- client/mysql.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'client') diff --git a/client/mysql.cc b/client/mysql.cc index 2cdcd23165e..665a8dde82d 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -44,7 +44,7 @@ #include #endif -const char *VER= "14.4"; +const char *VER= "14.5"; /* Don't try to make a nice table if the data is too big */ #define MAX_COLUMN_LENGTH 1024 @@ -2703,6 +2703,9 @@ com_status(String *buffer __attribute__((unused)), char *line __attribute__((unused))) { const char *status; + char buff[22]; + ulonglong id; + tee_puts("--------------", stdout); usage(1); /* Print version */ if (connected) @@ -2748,6 +2751,9 @@ com_status(String *buffer __attribute__((unused)), tee_fprintf(stdout, "Server version:\t\t%s\n", mysql_get_server_info(&mysql)); tee_fprintf(stdout, "Protocol version:\t%d\n", mysql_get_proto_info(&mysql)); tee_fprintf(stdout, "Connection:\t\t%s\n", mysql_get_host_info(&mysql)); + if ((id= mysql_insert_id(&mysql))) + tee_fprintf(stdout, "Insert id:\t\t%s\n", llstr(id, buff)); + tee_fprintf(stdout, "Client characterset:\t%s\n", charset_info->name); tee_fprintf(stdout, "Server characterset:\t%s\n", mysql.charset->name); -- cgit v1.2.1