summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authormonty@donna.mysql.fi <>2001-03-11 21:20:15 +0200
committermonty@donna.mysql.fi <>2001-03-11 21:20:15 +0200
commit5985de2db5afce4951b4bcf74630e8c746f241b1 (patch)
tree3ffab1dce3f9b12f0d98de2289a2022d1e7f3327 /client
parentc1402e2d5c606bfb5e35542ff92ba8e53cb797ab (diff)
downloadmariadb-git-5985de2db5afce4951b4bcf74630e8c746f241b1.tar.gz
Added new tests to benchmark suite
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc23
-rw-r--r--client/mysqladmin.c11
2 files changed, 29 insertions, 5 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index d140e524094..8935e459f68 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -39,7 +39,7 @@
#include "my_readline.h"
#include <signal.h>
-const char *VER="11.12";
+const char *VER="11.13";
/* Don't try to make a nice table if the data is too big */
#define MAX_COLUMN_LENGTH 1024
@@ -1518,6 +1518,22 @@ com_ego(String *buffer,char *line)
return result;
}
+static void
+print_field_types(MYSQL_RES *result)
+{
+ MYSQL_FIELD *field;
+ while ((field = mysql_fetch_field(result)))
+ {
+ tee_fprintf(PAGER,"%s '%s' %d %d %d %d %d\n",
+ field->name,
+ field->table ? "" : field->table,
+ (int) field->type,
+ field->length, field->max_length,
+ field->flags, field->decimals);
+ }
+ tee_puts("", PAGER);
+}
+
static void
print_table_data(MYSQL_RES *result)
@@ -1528,6 +1544,11 @@ print_table_data(MYSQL_RES *result)
bool *num_flag;
num_flag=(bool*) my_alloca(sizeof(bool)*mysql_num_fields(result));
+ if (info_flag)
+ {
+ print_field_types(result);
+ mysql_field_seek(result,0);
+ }
separator.copy("+",1);
while ((field = mysql_fetch_field(result)))
{
diff --git a/client/mysqladmin.c b/client/mysqladmin.c
index a8bda38d8cc..b09f799c683 100644
--- a/client/mysqladmin.c
+++ b/client/mysqladmin.c
@@ -28,9 +28,9 @@
#include <my_pthread.h> /* because of signal() */
#endif
-#define ADMIN_VERSION "8.17"
+#define ADMIN_VERSION "8.18"
#define MAX_MYSQL_VAR 64
-#define MAX_TIME_TO_WAIT 3600 /* Wait for shutdown */
+#define SHUTDOWN_DEF_TIMEOUT 3600 /* Wait for shutdown */
#define MAX_TRUNC_LENGTH 3
char truncated_var_names[MAX_MYSQL_VAR][MAX_TRUNC_LENGTH];
@@ -40,7 +40,7 @@ static int interval=0;
static my_bool option_force=0,interrupted=0,new_line=0,
opt_compress=0, opt_relative=0, opt_verbose=0, opt_vertical=0;
static uint tcp_port = 0, option_wait = 0, option_silent=0;
-static ulong opt_connect_timeout;
+static ulong opt_connect_timeout, opt_shutdown_timeout;
static my_string unix_port=0;
/* When using extended-status relatively, ex_val_max_len is the estimated
@@ -134,6 +134,8 @@ static struct option long_options[] = {
CHANGEABLE_VAR changeable_vars[] = {
{ "connect_timeout", (long*) &opt_connect_timeout, 0, 0, 3600*12, 0, 1},
+ { "shutdown_timeout", (long*) &opt_shutdown_timeout, SHUTDOWN_DEF_TIMEOUT, 0,
+ 3600*12, 0, 1},
{ 0, 0, 0, 0, 0, 0, 0}
};
@@ -148,6 +150,7 @@ int main(int argc,char *argv[])
MY_INIT(argv[0]);
mysql_init(&mysql);
load_defaults("my",load_default_groups,&argc,&argv);
+ set_all_changeable_vars( changeable_vars );
while ((c=getopt_long(argc,argv,"h:i:p::u:#::P:sS:Ct:fq?vVw::WrEO:",
long_options, &option_index)) != EOF)
@@ -1125,7 +1128,7 @@ static void wait_pidfile(char *pidfile)
uint count=0;
system_filename(buff,pidfile);
- while ((fd = open(buff, O_RDONLY)) >= 0 && count++ < MAX_TIME_TO_WAIT)
+ while ((fd = open(buff, O_RDONLY)) >= 0 && count++ < opt_shutdown_timeout)
{
close(fd);
sleep(1);