summaryrefslogtreecommitdiff
path: root/client/mysqltest.cc
diff options
context:
space:
mode:
authorunknown <sanja@askmonty.org>2011-05-18 16:27:19 +0300
committerunknown <sanja@askmonty.org>2011-05-18 16:27:19 +0300
commit1177bea2f1cd0c9f887670b65c9a403a26f07d76 (patch)
tree86c61cd5b446c4e6a3fc89470b3e35e806d99924 /client/mysqltest.cc
parent0da2df248ba5915630d04e7b7335bea409670cd6 (diff)
downloadmariadb-git-1177bea2f1cd0c9f887670b65c9a403a26f07d76.tar.gz
Rewritten patch of percona - switching query cache on and off, removing comments.
client/mysqltest.cc: Column names. mysql-test/r/grant_cache_no_prot.result: fix of text. mysql-test/r/grant_cache_ps_prot.result: Fix of test. mysql-test/r/query_cache.result: Switching on and off query cache. mysql-test/t/query_cache.test: Switching on and off query cache. mysys/charset.c: Fix of parser. sql/handler.cc: thd added to parameters. sql/log_event.cc: thd added to parameters. sql/log_event_old.cc: thd added to parameters. sql/mysql_priv.h: Fixed functions definitions. sql/mysqld.cc: Comments stripping. sql/set_var.cc: Switching on and off query cache. sql/set_var.h: Switching on and off query cache. sql/share/errmsg.txt: New errors. sql/sql_cache.cc: Switching query cache on and off, removing comments. sql/sql_cache.h: thd added to parameters. sql/sql_class.h: Comments stripping. sql/sql_db.cc: thd added to parameters. sql/sql_lex.cc: lex fixed. sql/sql_parse.cc: thd added to parameters.
Diffstat (limited to 'client/mysqltest.cc')
-rw-r--r--client/mysqltest.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index aa87e861ecf..6e7a03bfa4e 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -112,7 +112,7 @@ static my_bool display_result_vertically= FALSE, display_result_lower= FALSE,
display_metadata= FALSE, display_result_sorted= FALSE;
static my_bool disable_query_log= 0, disable_result_log= 0;
static my_bool disable_connect_log= 1;
-static my_bool disable_warnings= 0;
+static my_bool disable_warnings= 0, disable_column_names= 0;
static my_bool prepare_warnings_enabled= 0;
static my_bool disable_info= 1;
static my_bool abort_on_error= 1;
@@ -298,6 +298,7 @@ enum enum_commands {
Q_ENABLE_WARNINGS, Q_DISABLE_WARNINGS,
Q_ENABLE_INFO, Q_DISABLE_INFO,
Q_ENABLE_METADATA, Q_DISABLE_METADATA,
+ Q_ENABLE_COLUMN_NAMES, Q_DISABLE_COLUMN_NAMES,
Q_EXEC, Q_DELIMITER,
Q_DISABLE_ABORT_ON_ERROR, Q_ENABLE_ABORT_ON_ERROR,
Q_DISPLAY_VERTICAL_RESULTS, Q_DISPLAY_HORIZONTAL_RESULTS,
@@ -371,6 +372,8 @@ const char *command_names[]=
"disable_info",
"enable_metadata",
"disable_metadata",
+ "enable_column_names",
+ "disable_column_names",
"exec",
"delimiter",
"disable_abort_on_error",
@@ -6832,6 +6835,8 @@ void append_table_headings(DYNAMIC_STRING *ds,
uint num_fields)
{
uint col_idx;
+ if (disable_column_names)
+ return;
for (col_idx= 0; col_idx < num_fields; col_idx++)
{
if (col_idx)
@@ -8344,6 +8349,14 @@ int main(int argc, char **argv)
display_metadata= 0;
var_set_int("$ENABLED_METADATA", 0);
break;
+ case Q_ENABLE_COLUMN_NAMES:
+ disable_column_names= 0;
+ var_set_int("$ENABLED_COLUMN_NAMES", 0);
+ break;
+ case Q_DISABLE_COLUMN_NAMES:
+ disable_column_names= 1;
+ var_set_int("$ENABLED_COLUMN_NAMES", 1);
+ break;
case Q_SOURCE: do_source(command); break;
case Q_SLEEP: do_sleep(command, 0); break;
case Q_REAL_SLEEP: do_sleep(command, 1); break;