List:Commits« Previous MessageNext Message »
From:Bjorn Munch Date:July 21 2011 12:18pm
Subject:bzr push into mysql-trunk branch (bjorn.munch:3284 to 3285)
View as plain text  
 3285 Bjorn Munch	2011-07-21
      Followup to mysqltest/mtr option --opt-trace-protocol
      Fixed some corner cases:
      
        --send followed by stmt on separate line:
            Drop doing optimizer trace in this case
      
        --lowercase_result on a non-trivial statement
            Turn off lower casing (as was done for sorting)
      
      The first is fixed also for --explain-protocol

    modified:
      client/mysqltest.cc
 3284 Marc Alff	2011-07-20 [merge]
      Local merge

    added:
      mysql-test/include/have_optimizer_trace.inc
      mysql-test/suite/opt_trace/
      mysql-test/suite/opt_trace/include/
      mysql-test/suite/opt_trace/include/bugs.inc
      mysql-test/suite/opt_trace/include/general.inc
      mysql-test/suite/opt_trace/include/general2.inc
      mysql-test/suite/opt_trace/include/range.inc
      mysql-test/suite/opt_trace/include/security.inc
      mysql-test/suite/opt_trace/include/subquery.inc
      mysql-test/suite/opt_trace/r/
      mysql-test/suite/opt_trace/r/bugs_no_prot_all.result
      mysql-test/suite/opt_trace/r/bugs_no_prot_none.result
      mysql-test/suite/opt_trace/r/bugs_ps_prot_all.result
      mysql-test/suite/opt_trace/r/bugs_ps_prot_none.result
      mysql-test/suite/opt_trace/r/charset.result
      mysql-test/suite/opt_trace/r/debug.result
      mysql-test/suite/opt_trace/r/general2_no_prot.result
      mysql-test/suite/opt_trace/r/general2_ps_prot.result
      mysql-test/suite/opt_trace/r/general_no_prot_all.result
      mysql-test/suite/opt_trace/r/general_no_prot_none.result
      mysql-test/suite/opt_trace/r/general_ps_prot_all.result
      mysql-test/suite/opt_trace/r/general_ps_prot_none.result
      mysql-test/suite/opt_trace/r/range_no_prot.result
      mysql-test/suite/opt_trace/r/range_ps_prot.result
      mysql-test/suite/opt_trace/r/security_no_prot.result
      mysql-test/suite/opt_trace/r/security_ps_prot.result
      mysql-test/suite/opt_trace/r/subquery_no_prot.result
      mysql-test/suite/opt_trace/r/subquery_ps_prot.result
      mysql-test/suite/opt_trace/t/
      mysql-test/suite/opt_trace/t/bugs_no_prot_all.test
      mysql-test/suite/opt_trace/t/bugs_no_prot_none.test
      mysql-test/suite/opt_trace/t/bugs_ps_prot_all.test
      mysql-test/suite/opt_trace/t/bugs_ps_prot_none.test
      mysql-test/suite/opt_trace/t/charset.test
      mysql-test/suite/opt_trace/t/debug.test
      mysql-test/suite/opt_trace/t/general2_no_prot.test
      mysql-test/suite/opt_trace/t/general2_ps_prot.test
      mysql-test/suite/opt_trace/t/general_no_prot_all.test
      mysql-test/suite/opt_trace/t/general_no_prot_none.test
      mysql-test/suite/opt_trace/t/general_ps_prot_all.test
      mysql-test/suite/opt_trace/t/general_ps_prot_none.test
      mysql-test/suite/opt_trace/t/range_no_prot.test
      mysql-test/suite/opt_trace/t/range_ps_prot.test
      mysql-test/suite/opt_trace/t/security_no_prot.test
      mysql-test/suite/opt_trace/t/security_ps_prot.test
      mysql-test/suite/opt_trace/t/subquery_no_prot.test
      mysql-test/suite/opt_trace/t/subquery_ps_prot.test
      mysql-test/suite/opt_trace/validate_json.py
      mysql-test/suite/sys_vars/r/optimizer_trace_basic.result
      mysql-test/suite/sys_vars/r/optimizer_trace_features_basic.result
      mysql-test/suite/sys_vars/r/optimizer_trace_limit_basic.result
      mysql-test/suite/sys_vars/r/optimizer_trace_max_mem_size_basic.result
      mysql-test/suite/sys_vars/r/optimizer_trace_offset_basic.result
      mysql-test/suite/sys_vars/r/optimizer_trace_offset_max.result
      mysql-test/suite/sys_vars/t/optimizer_trace_basic.test
      mysql-test/suite/sys_vars/t/optimizer_trace_features_basic.test
      mysql-test/suite/sys_vars/t/optimizer_trace_limit_basic.test
      mysql-test/suite/sys_vars/t/optimizer_trace_max_mem_size_basic.test
      mysql-test/suite/sys_vars/t/optimizer_trace_offset_basic.test
      mysql-test/suite/sys_vars/t/optimizer_trace_offset_max-master.opt
      mysql-test/suite/sys_vars/t/optimizer_trace_offset_max.test
      sql/opt_trace.cc
      sql/opt_trace.h
      sql/opt_trace2server.cc
      sql/opt_trace_Doxyfile
      sql/opt_trace_context.h
      unittest/gunit/opt_trace-t.cc
    modified:
      .bzrignore
      CMakeLists.txt
      client/mysqltest.cc
      config.h.cmake
      dbug/dbug.c
      include/my_getopt.h
      include/my_sys.h
      include/mysql/plugin.h
      include/mysql/plugin_audit.h.pp
      include/mysql/plugin_auth.h.pp
      include/mysql/plugin_ftparser.h.pp
      mysql-test/collections/default.experimental
      mysql-test/include/subquery.inc
      mysql-test/mysql-test-run.pl
      mysql-test/r/archive_gis.result
      mysql-test/r/auto_increment.result
      mysql-test/r/bench_count_distinct.result
      mysql-test/r/bigint.result
      mysql-test/r/case.result
      mysql-test/r/cast.result
      mysql-test/r/compare.result
      mysql-test/r/compress.result
      mysql-test/r/ctype_binary.result
      mysql-test/r/ctype_collate.result
      mysql-test/r/ctype_cp1251.result
      mysql-test/r/ctype_latin1.result
      mysql-test/r/ctype_ucs.result
      mysql-test/r/ctype_utf8.result
      mysql-test/r/date_formats.result
      mysql-test/r/explain.result
      mysql-test/r/fulltext.result
      mysql-test/r/func_compress.result
      mysql-test/r/func_crypt.result
      mysql-test/r/func_default.result
      mysql-test/r/func_encrypt.result
      mysql-test/r/func_gconcat.result
      mysql-test/r/func_group.result
      mysql-test/r/func_if.result
      mysql-test/r/func_in_all.result
      mysql-test/r/func_in_icp.result
      mysql-test/r/func_in_icp_mrr.result
      mysql-test/r/func_in_mrr.result
      mysql-test/r/func_in_mrr_cost.result
      mysql-test/r/func_in_none.result
      mysql-test/r/func_like.result
      mysql-test/r/func_math.result
      mysql-test/r/func_op.result
      mysql-test/r/func_regexp.result
      mysql-test/r/func_set.result
      mysql-test/r/func_str.result
      mysql-test/r/func_system.result
      mysql-test/r/func_test.result
      mysql-test/r/func_time.result
      mysql-test/r/gis.result
      mysql-test/r/group_by.result
      mysql-test/r/group_min_max.result
      mysql-test/r/having.result
      mysql-test/r/information_schema.result
      mysql-test/r/information_schema_db.result
      mysql-test/r/innodb_explain_non_select_all.result
      mysql-test/r/innodb_explain_non_select_none.result
      mysql-test/r/innodb_mrr.result
      mysql-test/r/innodb_mrr_all.result
      mysql-test/r/innodb_mrr_cost.result
      mysql-test/r/innodb_mrr_cost_all.result
      mysql-test/r/innodb_mrr_cost_icp.result
      mysql-test/r/innodb_mrr_icp.result
      mysql-test/r/innodb_mrr_none.result
      mysql-test/r/insert_update.result
      mysql-test/r/join.result
      mysql-test/r/join_nested.result
      mysql-test/r/join_nested_jcl6.result
      mysql-test/r/join_outer.result
      mysql-test/r/join_outer_jcl6.result
      mysql-test/r/myisam_explain_non_select_all.result
      mysql-test/r/myisam_explain_non_select_none.result
      mysql-test/r/myisam_mrr.result
      mysql-test/r/myisam_mrr_all.result
      mysql-test/r/myisam_mrr_cost.result
      mysql-test/r/myisam_mrr_cost_all.result
      mysql-test/r/myisam_mrr_cost_icp.result
      mysql-test/r/myisam_mrr_icp.result
      mysql-test/r/myisam_mrr_none.result
      mysql-test/r/mysqld--help-notwin.result
      mysql-test/r/mysqld--help-win.result
      mysql-test/r/mysqlshow.result
      mysql-test/r/named_pipe.result
      mysql-test/r/negation_elimination.result
      mysql-test/r/null.result
      mysql-test/r/olap.result
      mysql-test/r/order_by_all.result
      mysql-test/r/order_by_icp_mrr.result
      mysql-test/r/order_by_none.result
      mysql-test/r/partition.result
      mysql-test/r/partition_pruning.result
      mysql-test/r/ps.result
      mysql-test/r/query_cache.result
      mysql-test/r/row.result
      mysql-test/r/select_all.result
      mysql-test/r/select_all_jcl6.result
      mysql-test/r/select_icp_mrr.result
      mysql-test/r/select_icp_mrr_jcl6.result
      mysql-test/r/select_none.result
      mysql-test/r/select_none_jcl6.result
      mysql-test/r/shm.result
      mysql-test/r/ssl.result
      mysql-test/r/ssl_compress.result
      mysql-test/r/subquery_all.result
      mysql-test/r/subquery_all_jcl6.result
      mysql-test/r/subquery_mat.result
      mysql-test/r/subquery_mat_all.result
      mysql-test/r/subquery_mat_none.result
      mysql-test/r/subquery_nomat_nosj.result
      mysql-test/r/subquery_nomat_nosj_jcl6.result
      mysql-test/r/subquery_none.result
      mysql-test/r/subquery_none_jcl6.result
      mysql-test/r/subquery_sj_all.result
      mysql-test/r/subquery_sj_all_jcl6.result
      mysql-test/r/subquery_sj_all_jcl7.result
      mysql-test/r/subquery_sj_dupsweed.result
      mysql-test/r/subquery_sj_dupsweed_jcl6.result
      mysql-test/r/subquery_sj_dupsweed_jcl7.result
      mysql-test/r/subquery_sj_firstmatch.result
      mysql-test/r/subquery_sj_firstmatch_jcl6.result
      mysql-test/r/subquery_sj_firstmatch_jcl7.result
      mysql-test/r/subquery_sj_loosescan.result
      mysql-test/r/subquery_sj_loosescan_jcl6.result
      mysql-test/r/subquery_sj_loosescan_jcl7.result
      mysql-test/r/subquery_sj_mat.result
      mysql-test/r/subquery_sj_mat_jcl6.result
      mysql-test/r/subquery_sj_mat_jcl7.result
      mysql-test/r/subquery_sj_mat_nosj.result
      mysql-test/r/subquery_sj_none.result
      mysql-test/r/subquery_sj_none_jcl6.result
      mysql-test/r/subquery_sj_none_jcl7.result
      mysql-test/r/subselect_innodb.result
      mysql-test/r/type_blob.result
      mysql-test/r/type_datetime.result
      mysql-test/r/udf.result
      mysql-test/r/union.result
      mysql-test/r/varbinary.result
      mysql-test/r/variables.result
      mysql-test/r/view.result
      mysql-test/suite/binlog/r/binlog_stm_blackhole.result
      mysql-test/suite/funcs_1/r/is_columns_is.result
      mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
      mysql-test/suite/funcs_1/r/is_tables_is.result
      mysql-test/suite/innodb/r/innodb_gis.result
      mysql-test/suite/rpl/r/rpl_get_lock.result
      mysql-test/suite/rpl/r/rpl_master_pos_wait.result
      mysql-test/suite/sys_vars/t/all_vars.test
      mysys/array.c
      mysys/my_alloc.c
      mysys/my_getopt.c
      mysys/my_malloc.c
      sql/CMakeLists.txt
      sql/handler.h
      sql/item.cc
      sql/item_cmpfunc.cc
      sql/item_cmpfunc.h
      sql/item_func.cc
      sql/item_subselect.cc
      sql/item_subselect.h
      sql/mysqld.cc
      sql/mysqld.h
      sql/opt_explain.cc
      sql/opt_range.cc
      sql/opt_range.h
      sql/set_var.cc
      sql/set_var.h
      sql/sp_head.cc
      sql/sp_head.h
      sql/sql_array.h
      sql/sql_base.cc
      sql/sql_class.h
      sql/sql_delete.cc
      sql/sql_derived.cc
      sql/sql_help.cc
      sql/sql_parse.cc
      sql/sql_plugin.h
      sql/sql_prepare.cc
      sql/sql_select.cc
      sql/sql_select.h
      sql/sql_show.cc
      sql/sql_test.cc
      sql/sql_test.h
      sql/sql_update.cc
      sql/sql_view.cc
      sql/sys_vars.cc
      sql/sys_vars.h
      sql/table.cc
      unittest/gunit/CMakeLists.txt
=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc	2011-07-20 10:29:12 +0000
+++ b/client/mysqltest.cc	2011-07-21 12:14:09 +0000
@@ -7896,6 +7896,7 @@ void display_opt_trace(struct st_connect
 {
   if (!disable_query_log &&
       opt_trace_protocol_enabled &&
+      !cn->pending &&
       !command->expected_errors.count &&
       match_re(&opt_trace_re, command->query))
   {
@@ -7910,11 +7911,11 @@ void display_opt_trace(struct st_connect
     command->query_len= query_str.length;
     command->end= strend(command->query);
 
-    /* sorted trace is not readable at all*/
-    my_bool save_display_result_sorted= display_result_sorted;
+    /* Sorted trace is not readable at all, don't bother to lower case */
+    /* No need to keep old values, will be reset anyway */
     display_result_sorted= FALSE;
+    display_result_lower= FALSE;
     run_query(cn, command, flags);
-    display_result_sorted= save_display_result_sorted;
 
     dynstr_free(&query_str);
     *command= save_command;
@@ -7925,6 +7926,7 @@ void display_opt_trace(struct st_connect
 void run_explain(struct st_connection *cn, struct st_command *command, int flags)
 {
   if (explain_protocol_enabled &&
+      (flags & QUERY_REAP_FLAG) &&
       !command->expected_errors.count &&
       match_re(&explain_re, command->query))
   {

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (bjorn.munch:3284 to 3285) Bjorn Munch21 Jul