From: Roy Lyseng Date: August 24 2010 11:10am Subject: bzr push into mysql-next-mr-bugfixing branch (roy.lyseng:3234 to 3235) Bug#49907 List-Archive: http://lists.mysql.com/commits/116613 X-Bug: 49907 Message-Id: <20100824111016.245FD1E6@tyr67.norway.sun.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0551302189476871779==" --===============0551302189476871779== MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline 3235 Roy Lyseng 2010-08-24 Followup to bug#49907: ALTER TABLE ... TRUNCATE PARTITION The original bug fix added new SQL command objects based on the class Sql_statement. However, later the class was renamed to Sql_cmd. This fix aligns the new class names with the new name standard introduced when renaming the class. modified: sql/sql_admin.cc sql/sql_admin.h sql/sql_alter.cc sql/sql_alter.h sql/sql_partition_admin.cc sql/sql_partition_admin.h sql/sql_truncate.cc sql/sql_truncate.h sql/sql_yacc.yy 3234 Alexey Botchkov 2010-08-23 [merge] merging. modified: mysql-test/include/mysqlhotcopy.inc mysql-test/mysql-test-run.pl === modified file 'sql/sql_admin.cc' --- a/sql/sql_admin.cc 2010-08-20 09:15:16 +0000 +++ b/sql/sql_admin.cc 2010-08-24 10:52:32 +0000 @@ -884,12 +884,12 @@ bool mysql_preload_keys(THD* thd, TABLE_ } -bool Analyze_table_statement::execute(THD *thd) +bool Sql_cmd_analyze_table::execute(THD *thd) { TABLE_LIST *first_table= thd->lex->select_lex.table_list.first; bool res= TRUE; thr_lock_type lock_type = TL_READ_NO_INSERT; - DBUG_ENTER("Analyze_table_statement::execute"); + DBUG_ENTER("Sql_cmd_analyze_table::execute"); if (check_table_access(thd, SELECT_ACL | INSERT_ACL, first_table, FALSE, UINT_MAX, FALSE)) @@ -914,12 +914,12 @@ error: } -bool Check_table_statement::execute(THD *thd) +bool Sql_cmd_check_table::execute(THD *thd) { TABLE_LIST *first_table= thd->lex->select_lex.table_list.first; thr_lock_type lock_type = TL_READ_NO_INSERT; bool res= TRUE; - DBUG_ENTER("Check_table_statement::execute"); + DBUG_ENTER("Sql_cmd_check_table::execute"); if (check_table_access(thd, SELECT_ACL, first_table, TRUE, UINT_MAX, FALSE)) @@ -938,11 +938,11 @@ error: } -bool Optimize_table_statement::execute(THD *thd) +bool Sql_cmd_optimize_table::execute(THD *thd) { TABLE_LIST *first_table= thd->lex->select_lex.table_list.first; bool res= TRUE; - DBUG_ENTER("Optimize_table_statement::execute"); + DBUG_ENTER("Sql_cmd_optimize_table::execute"); if (check_table_access(thd, SELECT_ACL | INSERT_ACL, first_table, FALSE, UINT_MAX, FALSE)) @@ -969,11 +969,11 @@ error: } -bool Repair_table_statement::execute(THD *thd) +bool Sql_cmd_repair_table::execute(THD *thd) { TABLE_LIST *first_table= thd->lex->select_lex.table_list.first; bool res= TRUE; - DBUG_ENTER("Repair_table_statement::execute"); + DBUG_ENTER("Sql_cmd_repair_table::execute"); if (check_table_access(thd, SELECT_ACL | INSERT_ACL, first_table, FALSE, UINT_MAX, FALSE)) === modified file 'sql/sql_admin.h' --- a/sql/sql_admin.h 2010-08-16 18:21:24 +0000 +++ b/sql/sql_admin.h 2010-08-24 10:52:32 +0000 @@ -24,25 +24,20 @@ int reassign_keycache_tables(THD* thd, K KEY_CACHE *dst_cache); /** - Analyze_statement represents the ANALYZE TABLE statement. + Sql_cmd_analyze_table represents the ANALYZE TABLE statement. */ -class Analyze_table_statement : public Sql_cmd +class Sql_cmd_analyze_table : public Sql_cmd { public: /** Constructor, used to represent a ANALYZE TABLE statement. */ - Analyze_table_statement() + Sql_cmd_analyze_table() {} - ~Analyze_table_statement() + ~Sql_cmd_analyze_table() {} - /** - Execute a ANALYZE TABLE statement at runtime. - @param thd the current thread. - @return false on success. - */ bool execute(THD *thd); virtual enum_sql_command sql_command_code() const @@ -54,25 +49,20 @@ public: /** - Check_table_statement represents the CHECK TABLE statement. + Sql_cmd_check_table represents the CHECK TABLE statement. */ -class Check_table_statement : public Sql_cmd +class Sql_cmd_check_table : public Sql_cmd { public: /** Constructor, used to represent a CHECK TABLE statement. */ - Check_table_statement() + Sql_cmd_check_table() {} - ~Check_table_statement() + ~Sql_cmd_check_table() {} - /** - Execute a CHECK TABLE statement at runtime. - @param thd the current thread. - @return false on success. - */ bool execute(THD *thd); virtual enum_sql_command sql_command_code() const @@ -83,25 +73,20 @@ public: /** - Optimize_table_statement represents the OPTIMIZE TABLE statement. + Sql_cmd_optimize_table represents the OPTIMIZE TABLE statement. */ -class Optimize_table_statement : public Sql_cmd +class Sql_cmd_optimize_table : public Sql_cmd { public: /** Constructor, used to represent a OPTIMIZE TABLE statement. */ - Optimize_table_statement() + Sql_cmd_optimize_table() {} - ~Optimize_table_statement() + ~Sql_cmd_optimize_table() {} - /** - Execute a OPTIMIZE TABLE statement at runtime. - @param thd the current thread. - @return false on success. - */ bool execute(THD *thd); virtual enum_sql_command sql_command_code() const @@ -113,25 +98,20 @@ public: /** - Repair_table_statement represents the REPAIR TABLE statement. + Sql_cmd_repair_table represents the REPAIR TABLE statement. */ -class Repair_table_statement : public Sql_cmd +class Sql_cmd_repair_table : public Sql_cmd { public: /** Constructor, used to represent a REPAIR TABLE statement. */ - Repair_table_statement() + Sql_cmd_repair_table() {} - ~Repair_table_statement() + ~Sql_cmd_repair_table() {} - /** - Execute a REPAIR TABLE statement at runtime. - @param thd the current thread. - @return false on success. - */ bool execute(THD *thd); virtual enum_sql_command sql_command_code() const === modified file 'sql/sql_alter.cc' --- a/sql/sql_alter.cc 2010-08-16 15:07:53 +0000 +++ b/sql/sql_alter.cc 2010-08-24 10:52:32 +0000 @@ -19,7 +19,7 @@ // mysql_exchange_partition #include "sql_alter.h" -bool Alter_table_statement::execute(THD *thd) +bool Sql_cmd_alter_table::execute(THD *thd) { LEX *lex= thd->lex; /* first SELECT_LEX (have special meaning for many of non-SELECTcommands) */ @@ -39,7 +39,7 @@ bool Alter_table_statement::execute(THD ulong priv_needed= ALTER_ACL; bool result; - DBUG_ENTER("Alter_table_statement::execute"); + DBUG_ENTER("Sql_cmd_alter_table::execute"); if (thd->is_fatal_error) /* out of memory creating a copy of alter_info */ DBUG_RETURN(TRUE); === modified file 'sql/sql_alter.h' --- a/sql/sql_alter.h 2010-08-16 18:21:24 +0000 +++ b/sql/sql_alter.h 2010-08-24 10:52:32 +0000 @@ -17,20 +17,20 @@ #define SQL_ALTER_TABLE_H /** - Alter_table_common represents the common properties of the ALTER TABLE + Sql_cmd_common_alter_table represents the common properties of the ALTER TABLE statements. @todo move Alter_info and other ALTER generic structures from Lex here. */ -class Alter_table_common : public Sql_cmd +class Sql_cmd_common_alter_table : public Sql_cmd { protected: /** Constructor. */ - Alter_table_common() + Sql_cmd_common_alter_table() {} - virtual ~Alter_table_common() + virtual ~Sql_cmd_common_alter_table() {} virtual enum_sql_command sql_command_code() const @@ -40,26 +40,21 @@ protected: }; /** - Alter_table_statement represents the generic ALTER TABLE statement. + Sql_cmd_alter_table represents the generic ALTER TABLE statement. @todo move Alter_info and other ALTER specific structures from Lex here. */ -class Alter_table_statement : public Alter_table_common +class Sql_cmd_alter_table : public Sql_cmd_common_alter_table { public: /** Constructor, used to represent a ALTER TABLE statement. */ - Alter_table_statement() + Sql_cmd_alter_table() {} - ~Alter_table_statement() + ~Sql_cmd_alter_table() {} - /** - Execute a ALTER TABLE statement at runtime. - @param thd the current thread. - @return false on success. - */ bool execute(THD *thd); }; === modified file 'sql/sql_partition_admin.cc' --- a/sql/sql_partition_admin.cc 2010-08-16 18:21:24 +0000 +++ b/sql/sql_partition_admin.cc 2010-08-24 10:52:32 +0000 @@ -18,21 +18,21 @@ // check_one_table_access #include "sql_table.h" // mysql_alter_table, etc. #include "sql_cmd.h" // Sql_cmd -#include "sql_alter.h" // Alter_table_statement +#include "sql_alter.h" // Sql_cmd_alter_table #include "sql_partition.h" // struct partition_info, etc. #include "sql_handler.h" // mysql_ha_rm_tables #include "sql_base.h" // open_and_lock_tables, etc #include "debug_sync.h" // DEBUG_SYNC #include "sql_truncate.h" // mysql_truncate_table, - // Truncate_statement -#include "sql_admin.h" // Analyze/Check/.._table_statement + // Sql_cmd_truncate_table +#include "sql_admin.h" // Sql_cmd_Analyze/Check/.._table #include "sql_partition_admin.h" // Alter_table_*_partition #ifndef WITH_PARTITION_STORAGE_ENGINE -bool Partition_statement_unsupported::execute(THD *) +bool Sql_cmd_partition_unsupported::execute(THD *) { - DBUG_ENTER("Partition_statement_unsupported::execute"); + DBUG_ENTER("Sql_cmd_partition_unsupported::execute"); /* error, partitioning support not compiled in... */ my_error(ER_FEATURE_DISABLED, MYF(0), "partitioning", "--with-plugin-partition"); @@ -41,7 +41,7 @@ bool Partition_statement_unsupported::ex #else -bool Alter_table_exchange_partition_statement::execute(THD *thd) +bool Sql_cmd_alter_table_exchange_partition::execute(THD *thd) { /* Moved from mysql_execute_command */ LEX *lex= thd->lex; @@ -60,7 +60,7 @@ bool Alter_table_exchange_partition_stat Alter_info alter_info(lex->alter_info, thd->mem_root); ulong priv_needed= ALTER_ACL | DROP_ACL | INSERT_ACL | CREATE_ACL; - DBUG_ENTER("Alter_table_exchange_partition_statement::execute"); + DBUG_ENTER("Sql_cmd_alter_table_exchange_partition::execute"); if (thd->is_fatal_error) /* out of memory creating a copy of alter_info */ DBUG_RETURN(TRUE); @@ -455,7 +455,7 @@ err_no_action_written: @note This is a DDL operation so triggers will not be used. */ -bool Alter_table_exchange_partition_statement:: +bool Sql_cmd_alter_table_exchange_partition:: exchange_partition(THD *thd, TABLE_LIST *table_list, Alter_info *alter_info) { TABLE *part_table, *swap_table; @@ -634,10 +634,10 @@ err: } -bool Alter_table_analyze_partition_statement::execute(THD *thd) +bool Sql_cmd_alter_table_analyze_partition::execute(THD *thd) { bool res; - DBUG_ENTER("Alter_table_analyze_partition_statement::execute"); + DBUG_ENTER("Sql_cmd_alter_table_analyze_partition::execute"); /* Flag that it is an ALTER command which administrates partitions, used @@ -645,16 +645,16 @@ bool Alter_table_analyze_partition_state */ thd->lex->alter_info.flags|= ALTER_ADMIN_PARTITION; - res= Analyze_table_statement::execute(thd); + res= Sql_cmd_analyze_table::execute(thd); DBUG_RETURN(res); } -bool Alter_table_check_partition_statement::execute(THD *thd) +bool Sql_cmd_alter_table_check_partition::execute(THD *thd) { bool res; - DBUG_ENTER("Alter_table_check_partition_statement::execute"); + DBUG_ENTER("Sql_cmd_alter_table_check_partition::execute"); /* Flag that it is an ALTER command which administrates partitions, used @@ -662,13 +662,13 @@ bool Alter_table_check_partition_stateme */ thd->lex->alter_info.flags|= ALTER_ADMIN_PARTITION; - res= Check_table_statement::execute(thd); + res= Sql_cmd_check_table::execute(thd); DBUG_RETURN(res); } -bool Alter_table_optimize_partition_statement::execute(THD *thd) +bool Sql_cmd_alter_table_optimize_partition::execute(THD *thd) { bool res; DBUG_ENTER("Alter_table_optimize_partition_statement::execute"); @@ -679,16 +679,16 @@ bool Alter_table_optimize_partition_stat */ thd->lex->alter_info.flags|= ALTER_ADMIN_PARTITION; - res= Optimize_table_statement::execute(thd); + res= Sql_cmd_optimize_table::execute(thd); DBUG_RETURN(res); } -bool Alter_table_repair_partition_statement::execute(THD *thd) +bool Sql_cmd_alter_table_repair_partition::execute(THD *thd) { bool res; - DBUG_ENTER("Alter_table_repair_partition_statement::execute"); + DBUG_ENTER("Sql_cmd_alter_table_repair_partition::execute"); /* Flag that it is an ALTER command which administrates partitions, used @@ -696,18 +696,18 @@ bool Alter_table_repair_partition_statem */ thd->lex->alter_info.flags|= ALTER_ADMIN_PARTITION; - res= Repair_table_statement::execute(thd); + res= Sql_cmd_repair_table::execute(thd); DBUG_RETURN(res); } -bool Alter_table_truncate_partition_statement::execute(THD *thd) +bool Sql_cmd_alter_table_truncate_partition::execute(THD *thd) { TABLE_LIST *first_table= thd->lex->select_lex.table_list.first; bool res; enum_sql_command original_sql_command; - DBUG_ENTER("Alter_table_truncate_partition_statement::execute"); + DBUG_ENTER("Sql_cmd_alter_table_truncate_partition::execute"); /* Execute TRUNCATE PARTITION just like TRUNCATE TABLE. @@ -730,7 +730,7 @@ bool Alter_table_truncate_partition_stat first_table->mdl_request.set_type(MDL_SHARED_NO_READ_WRITE); /* execute as a TRUNCATE TABLE */ - res= Truncate_statement::execute(thd); + res= Sql_cmd_truncate_table::execute(thd); thd->lex->sql_command= original_sql_command; DBUG_RETURN(res); === modified file 'sql/sql_partition_admin.h' --- a/sql/sql_partition_admin.h 2010-08-16 18:21:24 +0000 +++ b/sql/sql_partition_admin.h 2010-08-24 10:52:32 +0000 @@ -22,87 +22,87 @@ Stub class that returns a error if the partition storage engine is not supported. */ -class Partition_statement_unsupported : public Sql_cmd +class Sql_cmd_partition_unsupported : public Sql_cmd { public: - Partition_statement_unsupported() + Sql_cmd_partition_unsupported() {} - ~Partition_statement_unsupported() + ~Sql_cmd_partition_unsupported() {} bool execute(THD *thd); }; -class Alter_table_exchange_partition_statement : - public Partition_statement_unsupported +class Sql_cmd_alter_table_exchange_partition : + public Sql_cmd_partition_unsupported { public: - Alter_table_exchange_partition_statement() + Sql_cmd_alter_table_exchange_partition() {} - ~Alter_table_exchange_partition_statement() + ~Sql_cmd_alter_table_exchange_partition() {} }; -class Alter_table_analyze_partition_statement : - public Partition_statement_unsupported +class Sql_cmd_alter_table_analyze_partition : + public Sql_cmd_partition_unsupported { public: - Alter_table_analyze_partition_statement() + Sql_cmd_alter_table_analyze_partition() {} - ~Alter_table_analyze_partition_statement() + ~Sql_cmd_alter_table_analyze_partition() {} }; -class Alter_table_check_partition_statement : - public Partition_statement_unsupported +class Sql_cmd_alter_table_check_partition : + public Sql_cmd_partition_unsupported { public: - Alter_table_check_partition_statement() + Sql_cmd_alter_table_check_partition() {} - ~Alter_table_check_partition_statement() + ~Sql_cmd_alter_table_check_partition() {} }; -class Alter_table_optimize_partition_statement : - public Partition_statement_unsupported +class Sql_cmd_alter_table_optimize_partition : + public Sql_cmd_partition_unsupported { public: - Alter_table_optimize_partition_statement() + Sql_cmd_alter_table_optimize_partition() {} - ~Alter_table_optimize_partition_statement() + ~Sql_cmd_alter_table_optimize_partition() {} }; -class Alter_table_repair_partition_statement : - public Partition_statement_unsupported +class Sql_cmd_alter_table_repair_partition : + public Sql_cmd_partition_unsupported { public: - Alter_table_repair_partition_statement() + Sql_cmd_alter_table_repair_partition() {} - ~Alter_table_repair_partition_statement() + ~Sql_cmd_alter_table_repair_partition() {} }; -class Alter_table_truncate_partition_statement : - public Partition_statement_unsupported +class Sql_cmd_alter_table_truncate_partition : + public Sql_cmd_partition_unsupported { public: - Alter_table_truncate_partition_statement() + Sql_cmd_alter_table_truncate_partition() {} - ~Alter_table_truncate_partition_statement() + ~Sql_cmd_alter_table_truncate_partition() {} }; @@ -112,24 +112,19 @@ public: Class that represents the ALTER TABLE t1 EXCHANGE PARTITION p WITH TABLE t2 statement. */ -class Alter_table_exchange_partition_statement : public Alter_table_common +class Sql_cmd_alter_table_exchange_partition : public Sql_cmd_common_alter_table { public: /** Constructor, used to represent a ALTER TABLE EXCHANGE PARTITION statement. */ - Alter_table_exchange_partition_statement() - : Alter_table_common() + Sql_cmd_alter_table_exchange_partition() + : Sql_cmd_common_alter_table() {} - ~Alter_table_exchange_partition_statement() + ~Sql_cmd_alter_table_exchange_partition() {} - /** - Execute a ALTER TABLE EXCHANGE PARTITION statement at runtime. - @param thd the current thread. - @return false on success. - */ bool execute(THD *thd); private: @@ -140,24 +135,19 @@ private: /** Class that represents the ALTER TABLE t1 ANALYZE PARTITION p statement. */ -class Alter_table_analyze_partition_statement : public Analyze_table_statement +class Sql_cmd_alter_table_analyze_partition : public Sql_cmd_analyze_table { public: /** Constructor, used to represent a ALTER TABLE ANALYZE PARTITION statement. */ - Alter_table_analyze_partition_statement() - : Analyze_table_statement() + Sql_cmd_alter_table_analyze_partition() + : Sql_cmd_analyze_table() {} - ~Alter_table_analyze_partition_statement() + ~Sql_cmd_alter_table_analyze_partition() {} - /** - Execute a ALTER TABLE ANALYZE PARTITION statement at runtime. - @param thd the current thread. - @return false on success. - */ bool execute(THD *thd); virtual enum_sql_command sql_command_code() const @@ -170,24 +160,19 @@ public: /** Class that represents the ALTER TABLE t1 CHECK PARTITION p statement. */ -class Alter_table_check_partition_statement : public Check_table_statement +class Sql_cmd_alter_table_check_partition : public Sql_cmd_check_table { public: /** Constructor, used to represent a ALTER TABLE CHECK PARTITION statement. */ - Alter_table_check_partition_statement() - : Check_table_statement() + Sql_cmd_alter_table_check_partition() + : Sql_cmd_check_table() {} - ~Alter_table_check_partition_statement() + ~Sql_cmd_alter_table_check_partition() {} - /** - Execute a ALTER TABLE CHECK PARTITION statement at runtime. - @param thd the current thread. - @return false on success. - */ bool execute(THD *thd); virtual enum_sql_command sql_command_code() const @@ -200,24 +185,19 @@ public: /** Class that represents the ALTER TABLE t1 OPTIMIZE PARTITION p statement. */ -class Alter_table_optimize_partition_statement : public Optimize_table_statement +class Sql_cmd_alter_table_optimize_partition : public Sql_cmd_optimize_table { public: /** Constructor, used to represent a ALTER TABLE OPTIMIZE PARTITION statement. */ - Alter_table_optimize_partition_statement() - : Optimize_table_statement() + Sql_cmd_alter_table_optimize_partition() + : Sql_cmd_optimize_table() {} - ~Alter_table_optimize_partition_statement() + ~Sql_cmd_alter_table_optimize_partition() {} - /** - Execute a ALTER TABLE OPTIMIZE PARTITION statement at runtime. - @param thd the current thread. - @return false on success. - */ bool execute(THD *thd); virtual enum_sql_command sql_command_code() const @@ -230,24 +210,19 @@ public: /** Class that represents the ALTER TABLE t1 REPAIR PARTITION p statement. */ -class Alter_table_repair_partition_statement : public Repair_table_statement +class Sql_cmd_alter_table_repair_partition : public Sql_cmd_repair_table { public: /** Constructor, used to represent a ALTER TABLE REPAIR PARTITION statement. */ - Alter_table_repair_partition_statement() - : Repair_table_statement() + Sql_cmd_alter_table_repair_partition() + : Sql_cmd_repair_table() {} - ~Alter_table_repair_partition_statement() + ~Sql_cmd_alter_table_repair_partition() {} - /** - Execute a ALTER TABLE REPAIR PARTITION statement at runtime. - @param thd the current thread. - @return false on success. - */ bool execute(THD *thd); virtual enum_sql_command sql_command_code() const @@ -260,23 +235,18 @@ public: /** Class that represents the ALTER TABLE t1 TRUNCATE PARTITION p statement. */ -class Alter_table_truncate_partition_statement : public Truncate_statement +class Sql_cmd_alter_table_truncate_partition : public Sql_cmd_truncate_table { public: /** Constructor, used to represent a ALTER TABLE TRUNCATE PARTITION statement. */ - Alter_table_truncate_partition_statement() + Sql_cmd_alter_table_truncate_partition() {} - ~Alter_table_truncate_partition_statement() + ~Sql_cmd_alter_table_truncate_partition() {} - /** - Execute a ALTER TABLE TRUNCATE PARTITION statement at runtime. - @param thd the current thread. - @return false on success. - */ bool execute(THD *thd); virtual enum_sql_command sql_command_code() const === modified file 'sql/sql_truncate.cc' --- a/sql/sql_truncate.cc 2010-08-18 11:29:04 +0000 +++ b/sql/sql_truncate.cc 2010-08-24 10:52:32 +0000 @@ -494,11 +494,11 @@ bool mysql_truncate_table(THD *thd, TABL } -bool Truncate_statement::execute(THD *thd) +bool Sql_cmd_truncate_table::execute(THD *thd) { TABLE_LIST *first_table= thd->lex->select_lex.table_list.first; bool res= TRUE; - DBUG_ENTER("Truncate_statement::execute"); + DBUG_ENTER("Sql_cmd_truncate_table::execute"); if (check_one_table_access(thd, DROP_ACL, first_table)) goto error; === modified file 'sql/sql_truncate.h' --- a/sql/sql_truncate.h 2010-08-16 18:21:24 +0000 +++ b/sql/sql_truncate.h 2010-08-24 10:52:32 +0000 @@ -21,25 +21,20 @@ struct TABLE_LIST; bool mysql_truncate_table(THD *thd, TABLE_LIST *table_ref); /** - Truncate_statement represents the TRUNCATE statement. + Sql_cmd_truncate_table represents the TRUNCATE statement. */ -class Truncate_statement : public Sql_cmd +class Sql_cmd_truncate_table : public Sql_cmd { public: /** - Constructor, used to represent a ALTER TABLE statement. + Constructor, used to represent a TRUNCATE statement. */ - Truncate_statement() + Sql_cmd_truncate_table() {} - ~Truncate_statement() + ~Sql_cmd_truncate_table() {} - /** - Execute a TRUNCATE statement at runtime. - @param thd the current thread. - @return false on success. - */ bool execute(THD *thd); virtual enum_sql_command sql_command_code() const === modified file 'sql/sql_yacc.yy' --- a/sql/sql_yacc.yy 2010-08-20 09:15:16 +0000 +++ b/sql/sql_yacc.yy 2010-08-24 10:52:32 +0000 @@ -51,10 +51,10 @@ #include "sp_pcontext.h" #include "sp_rcontext.h" #include "sp.h" -#include "sql_alter.h" // Alter_table*_statement -#include "sql_truncate.h" // Truncate_statement -#include "sql_admin.h" // Analyze/Check..._table_stmt -#include "sql_partition_admin.h" // Alter_table_*_partition_stmt +#include "sql_alter.h" // Sql_cmd_alter_table* +#include "sql_truncate.h" // Sql_cmd_truncate_table +#include "sql_admin.h" // Sql_cmd_analyze/Check..._table +#include "sql_partition_admin.h" // Sql_cmd_alter_table_*_part. #include "sql_signal.h" #include "event_parse_data.h" #include @@ -6284,7 +6284,7 @@ alter: if (!lex->m_sql_cmd) { /* Create a generic ALTER TABLE statment. */ - lex->m_sql_cmd= new (thd->mem_root) Alter_table_statement(); + lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_alter_table(); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } @@ -6512,7 +6512,7 @@ alter_commands: lex->check_opt.init(); DBUG_ASSERT(!lex->m_sql_cmd); lex->m_sql_cmd= new (thd->mem_root) - Alter_table_optimize_partition_statement(); + Sql_cmd_alter_table_optimize_partition(); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } @@ -6526,7 +6526,7 @@ alter_commands: lex->check_opt.init(); DBUG_ASSERT(!lex->m_sql_cmd); lex->m_sql_cmd= new (thd->mem_root) - Alter_table_analyze_partition_statement(); + Sql_cmd_alter_table_analyze_partition(); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } @@ -6537,7 +6537,7 @@ alter_commands: lex->check_opt.init(); DBUG_ASSERT(!lex->m_sql_cmd); lex->m_sql_cmd= new (thd->mem_root) - Alter_table_check_partition_statement(); + Sql_cmd_alter_table_check_partition(); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } @@ -6551,7 +6551,7 @@ alter_commands: lex->check_opt.init(); DBUG_ASSERT(!lex->m_sql_cmd); lex->m_sql_cmd= new (thd->mem_root) - Alter_table_repair_partition_statement(); + Sql_cmd_alter_table_repair_partition(); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } @@ -6570,7 +6570,7 @@ alter_commands: lex->check_opt.init(); DBUG_ASSERT(!lex->m_sql_cmd); lex->m_sql_cmd= new (thd->mem_root) - Alter_table_truncate_partition_statement(); + Sql_cmd_alter_table_truncate_partition(); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } @@ -6596,7 +6596,7 @@ alter_commands: MYSQL_YYABORT; DBUG_ASSERT(!lex->m_sql_cmd); lex->m_sql_cmd= new (thd->mem_root) - Alter_table_exchange_partition_statement(); + Sql_cmd_alter_table_exchange_partition(); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } @@ -7041,7 +7041,7 @@ repair: THD *thd= YYTHD; LEX* lex= thd->lex; DBUG_ASSERT(!lex->m_sql_cmd); - lex->m_sql_cmd= new (thd->mem_root) Repair_table_statement(); + lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_repair_table(); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } @@ -7079,7 +7079,7 @@ analyze: THD *thd= YYTHD; LEX* lex= thd->lex; DBUG_ASSERT(!lex->m_sql_cmd); - lex->m_sql_cmd= new (thd->mem_root) Analyze_table_statement(); + lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_analyze_table(); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } @@ -7114,7 +7114,7 @@ check: THD *thd= YYTHD; LEX* lex= thd->lex; DBUG_ASSERT(!lex->m_sql_cmd); - lex->m_sql_cmd= new (thd->mem_root) Check_table_statement(); + lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_check_table(); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } @@ -7155,7 +7155,7 @@ optimize: THD *thd= YYTHD; LEX* lex= thd->lex; DBUG_ASSERT(!lex->m_sql_cmd); - lex->m_sql_cmd= new (thd->mem_root) Optimize_table_statement(); + lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_optimize_table(); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } @@ -10940,7 +10940,7 @@ truncate: THD *thd= YYTHD; LEX* lex= thd->lex; DBUG_ASSERT(!lex->m_sql_cmd); - lex->m_sql_cmd= new (thd->mem_root) Truncate_statement(); + lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_truncate_table(); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } --===============0551302189476871779== MIME-Version: 1.0 Content-Type: text/bzr-bundle; charset="us-ascii"; name="bzr/roy.lyseng@stripped" Content-Transfer-Encoding: 7bit Content-Disposition: inline # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: roy.lyseng@stripped # target_branch: file:///home/rl136806/mysql/repo/mysql-next-mr-\ # bugfixing/ # testament_sha1: 3cc2988df6c6ab57aed7aab0a74b8535572dc5e7 # timestamp: 2010-08-24 13:10:16 +0200 # base_revision_id: holyfoot@stripped # # Begin bundle IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWWfKgIwACu//gEBYEhhYd/// f+/+ML////tgEH7w60A97r7xXTA+mmjRo0Gg6u9NBudNZHOwVQHBOnW7Ku7hJI1NRPTVNtJ4pHpH oyPU9EgND1PUPSZGgNAPRANAkwkyjeppAADQAAAAAAAAqnp6PVQAAAaAAAaaaaAAAAACTSk0CjUZ TMp5Rqep5GoGIANAGgHqNGQ0BFImmlUf5FP01Kfpk9J6gSGIepgCaNNGgAeoaPUBUkgBAEaIyVP9 T0RlPQU/VPUaB6jQ9RkAA9IuU7QeZIEPDvOXThnPM6tXHf7OHsoTiI+SRbOVKE4xjGmNKGujnGPh 1xnJrrg0QUirFhd4ZznKquYe31nY/yTynY9mOIdugTHXYT2a9iqqlwqxRfhwSk3kA6AFTtL1X146 vcURvs6vsd/ZpXnr16+zgkoQIi7tVUDpQmnXrBG/jSYtTVkpqdAKbydaMOiqPi9qIhjYkjTQj5Ih SXDTbZ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