List:Commits« Previous MessageNext Message »
From:Tor Didriksen Date:July 5 2011 5:06am
Subject:bzr push into mysql-trunk branch (tor.didriksen:3398 to 3399) WL#4897
View as plain text  
 3399 Tor Didriksen	2011-07-05
      WL#4897: Add EXPLAIN INSERT/UPDATE/DELETE post-push fix:
      
      Build break on windows:
      sql\structs.h(29) : error C4099: 'TABLE' : type name first seen using 'class' now seen using 'struct'
      sql\opt_explain.h(52) : see declaration of 'TABLE'

    modified:
      sql/opt_explain.h
 3398 Gleb Shchepa	2011-07-03
      WL#4897: Add EXPLAIN INSERT/UPDATE/DELETE
      
      WL#4897 implements EXPLAIN command for INSERT, REPLACE and
      single- and multi-table UPDATE and DELETE queries.
     @ client/mysqltest.cc
        + Guilhem's patch for MTR --explain-protocol has been added.
        * Minor help message update and commentary cleanup.
     @ mysql-test/include/explain_non_select.inc
        New coverage and regression tests and sanity checks for WL#4897 have been added.
     @ mysql-test/include/explain_utils.inc
        New utility file for WL#4897 tests has been added.
     @ mysql-test/r/explain.result
        + Regression test for WL#4897 has been added.
        * Minor changes ("explain" column message reordering) after WL#4897.
     @ mysql-test/r/grant_explain_non_select.result
        + Privilege-specific test file for WL#4897 has been added.
        + Permission tests for underlying queries of EXPLAIN commands have been added.
     @ mysql-test/r/innodb_explain_non_select_all.result
        New test file for WL#4897 has been added (default engine is InnoDB, all
        @optimizer_switches features are enabled)
     @ mysql-test/r/innodb_explain_non_select_none.result
        New test file for WL#4897 has been added (default engine is InnoDB, all
        @optimizer_switches features are disabled)
     @ mysql-test/r/join_outer.result
        Minor changes ("extra" column message reordering) after WL#4897.
     @ mysql-test/r/join_outer_jcl6.result
        Minor changes ("extra" column message reordering) after WL#4897.
     @ mysql-test/r/myisam_explain_non_select_all.result
        New test file for WL#4897 has been added (default engine is MyISAM, all
        @optimizer_switches features are enabled)
     @ mysql-test/r/myisam_explain_non_select_none.result
        New test file for WL#4897 has been added (default engine is MyISAM, all
        @optimizer_switches features are disabled)
     @ mysql-test/r/partition_pruning.result
        Coverage tests for WL#4897 have been added.
     @ mysql-test/t/explain.test
        Regression test for WL#4897 has been added.
     @ mysql-test/t/grant_explain_non_select.test
        + Permission tests for regular tables have been added.
        + Permission tests for underlying queries of EXPLAIN commands have been added.
     @ mysql-test/t/innodb_explain_non_select_all.test
        New test file for WL#4897 has been added (default engine is InnoDB, all
        @optimizer_switches features are enabled)
     @ mysql-test/t/innodb_explain_non_select_none.test
        New test file for WL#4897 has been added (default engine is InnoDB, all
        @optimizer_switches features are disabled)
     @ mysql-test/t/myisam_explain_non_select_all.test
        New test file for WL#4897 has been added (default engine is MyISAM, all
        @optimizer_switches features are enabled)
     @ mysql-test/t/myisam_explain_non_select_none.test
        New test file for WL#4897 has been added (default engine is MyISAM, all
        @optimizer_switches features are disabled)
     @ mysql-test/t/partition_pruning.test
        Coverage tests for WL#4897 have been added.
     @ sql/CMakeLists.txt
        New opt_explain.cc source file has been added.
     @ sql/opt_explain.cc
        The select_describe() functions has been refactored into
        explain_no_table(), explain_single_table_modification(),
        explain_query_specification(), and explain_query_expression()
        global functions and a few local auxiliary classes: Explain, 
        Explain_no_table, Explain_table_base, Explain_table, 
        Explain_join and Explain_union,
        
        Also the functionality of select_describe() has been
        improved to serve top-JOIN-less EXPLAIN queries (EXPLAIN
        single-table UPDATE and DELETE) with the help of the new
        global explain_single_table_modification() function and 
        auxiliary Explain_table class.
        
        explain_send class and explain_multi_table_modification() 
        function have been added to adapt select_insert, multi_update 
        and multi_delete classes to work in EXPLAIN context (to
        implement EXPLAIN INSERT...SELECT and EXPLAIN multi-table
        UPDATE and DELETE commands).
        
        The explain_query_expression() function has been added to
        reuse part of the execute_sqlcom_select function.
        
        The mysql_explain_union function has been made static and
        moved there from the sql_parse.cc file.
     @ sql/opt_explain.h
        New functions have been added:
          explain_no_table(),
          explain_single_table_modification(),
          explain_query_specification(),
          explain_multi_table_modification(),
          explain_query_expression().
     @ sql/opt_range.h
        Minor change: unnecessary friending of the select_describe()
        function has been removed.
     @ sql/sql_class.h
        + The select_result::reset_offset_limit_cnt() function has been added
          to reset protected offset_limit_cnt field.
        + The CF_CAN_BE_EXPLAINED flag has been introduced to mark
          all SQL commands that can be explained by EXPLAIN.
     @ sql/sql_delete.cc
        The mysql_delete() function has been improved to work in the
        EXPLAIN multi-table DELETE context to produce EXPLAIN instead
        table data modification.
     @ sql/sql_insert.cc
        The mysql_insert() function has been improved to work in the
        EXPLAIN INSERT...SELECT context to produce EXPLAIN instead
        table data modification.
        
        The upgrade_lock_type function has been modified to replace
        TL_WRITE_DELAYED lock with TL_WRITE since there is no need to
        delay the EXPLAIN command.
     @ sql/sql_parse.cc
        INSERT...SELECT, REPLACE...SELECT and multi-table UPDATE/DELETE
        handlers have been improved to work with EXPLAIN of these
        queries.
        
        Part of the execute_sqlcom_select function has been replaced
        with the call to the new explain_query_specification function.
     @ sql/sql_parse.h
        The is_explainable_query function has been added.
     @ sql/sql_select.cc
        * select_describe() function has been moved to opt_explain.{h,cc}
          files and refactored.
        * mysql_explain_union() has been moved to opt_explain.cc.
     @ sql/sql_select.h
        mysql_explain_union() has been moved to opt_explain.cc
     @ sql/sql_show.cc
        Minor cleanup.
     @ sql/sql_string.h
        The StringBuffer template helper has been introduced.
     @ sql/sql_update.cc
        The mysql_delete() function has been improved to work in the
        EXPLAIN multi-table UPDATE context to produce EXPLAIN instead
        table data modification.
     @ sql/sql_view.cc
        mysql_make_view(): the check for SELECT or SHOW VIEW
        permission has been extended to all explainable SQL
        commands (including INSERT, REPLACE, UPDATE and DELETE
        commands in addition to SELECT).
     @ sql/sql_yacc.yy
        New EXPLAIN INSERT/REPLACE/UPDATE/DELETE syntax has been added.

    added:
      mysql-test/include/explain_non_select.inc
      mysql-test/include/explain_utils.inc
      mysql-test/r/grant_explain_non_select.result
      mysql-test/r/innodb_explain_non_select_all.result
      mysql-test/r/innodb_explain_non_select_none.result
      mysql-test/r/myisam_explain_non_select_all.result
      mysql-test/r/myisam_explain_non_select_none.result
      mysql-test/t/grant_explain_non_select.test
      mysql-test/t/innodb_explain_non_select_all.test
      mysql-test/t/innodb_explain_non_select_none.test
      mysql-test/t/myisam_explain_non_select_all.test
      mysql-test/t/myisam_explain_non_select_none.test
      sql/opt_explain.cc
      sql/opt_explain.h
    modified:
      client/mysqltest.cc
      mysql-test/r/explain.result
      mysql-test/r/join_outer.result
      mysql-test/r/join_outer_jcl6.result
      mysql-test/r/partition_pruning.result
      mysql-test/t/explain.test
      mysql-test/t/partition_pruning.test
      sql/CMakeLists.txt
      sql/opt_range.h
      sql/sql_class.h
      sql/sql_delete.cc
      sql/sql_insert.cc
      sql/sql_parse.cc
      sql/sql_parse.h
      sql/sql_select.cc
      sql/sql_select.h
      sql/sql_show.cc
      sql/sql_string.h
      sql/sql_update.cc
      sql/sql_view.cc
      sql/sql_yacc.yy
=== modified file 'sql/opt_explain.h'
--- a/sql/opt_explain.h	2011-07-02 21:01:41 +0000
+++ b/sql/opt_explain.h	2011-07-05 05:05:19 +0000
@@ -49,7 +49,7 @@ class JOIN;
 class select_result;
 class select_result_interceptor;
 class SQL_SELECT;
-class TABLE;
+struct TABLE;
 class THD;
 
 #include "my_base.h"

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (tor.didriksen:3398 to 3399) WL#4897Tor Didriksen5 Jul