summaryrefslogtreecommitdiff
path: root/client/mysql.cc
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.fi>2001-03-11 21:20:15 +0200
committerunknown <monty@donna.mysql.fi>2001-03-11 21:20:15 +0200
commit97acb7b3d17dc60f6b879044aa53b7f422f553c2 (patch)
tree3ffab1dce3f9b12f0d98de2289a2022d1e7f3327 /client/mysql.cc
parent74ea7333032ebc1d396f1939fd5a84c7a6ecc50c (diff)
downloadmariadb-git-97acb7b3d17dc60f6b879044aa53b7f422f553c2.tar.gz
Added new tests to benchmark suite
Docs/manual.texi: Updated some typos in the innobase section client/mysql.cc: Added print of field types (for debugging) client/mysqladmin.c: Added timeout for shutdown mysql-test/mysql-test-run.sh: Use timeout for shutdown sql-bench/test-select.sh: Added test of query cache and new tests for count(distinct) sql/ha_myisam.cc: Don't give warnings for RESTORE TABLE sql/mysqld.cc: Added printing of innobase options sql/sql_lex.cc: Fixed possible bug when OEM sql/sql_table.cc: cleanup
Diffstat (limited to 'client/mysql.cc')
-rw-r--r--client/mysql.cc23
1 files changed, 22 insertions, 1 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)))
{