From 8ce6e98aa335590d18dbb4f9d453ad4c67bd1a2b Mon Sep 17 00:00:00 2001 From: Konstantin Osipov Date: Fri, 13 Aug 2010 13:51:48 +0400 Subject: Extract reload_acl_and_cache() and flush_tables_with_read_lock() into an own implementation file. --- libmysqld/Makefile.am | 1 + 1 file changed, 1 insertion(+) (limited to 'libmysqld/Makefile.am') diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am index 1ffa349bcfe..3375806e412 100644 --- a/libmysqld/Makefile.am +++ b/libmysqld/Makefile.am @@ -64,6 +64,7 @@ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \ opt_sum.cc procedure.cc records.cc sql_acl.cc \ sql_load.cc discover.cc sql_locale.cc \ sql_profile.cc sql_truncate.cc datadict.cc \ + sql_reload.cc \ sql_analyse.cc sql_base.cc sql_cache.cc sql_class.cc \ sql_crypt.cc sql_db.cc sql_delete.cc sql_error.cc sql_insert.cc \ sql_lex.cc sql_list.cc sql_manager.cc \ -- cgit v1.2.1 From 4b20ccafaa3bacfd11c5fcc61e1647dbbefe7bad Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Mon, 16 Aug 2010 14:53:30 +0200 Subject: Bug#49907: ALTER TABLE ... TRUNCATE PARTITION does not wait for locks on the table Fixing the partitioning specifics after TRUNCATE TABLE in bug-42643 was fixed. Reorganize of code to decrease the size of the giant switch in mysql_execute_command, and to prepare for future parser reengineering. Moved code into Sql_statement objects. Updated patch according to davi's review comments. libmysqld/CMakeLists.txt: Added new files. libmysqld/Makefile.am: Added new files. mysql-test/r/not_partition.result: now returning error on partitioning commands if partitioning is not enabled. mysql-test/r/partition_disabled.result: There is no partition handlerton, so it cannot find the specified engine in the .frm file. mysql-test/r/partition_truncate.result: Updated test results. mysql-test/suite/parts/inc/partition_mgm.inc: Added check that TRUNCATE PARTITION does not delete on failure. mysql-test/suite/parts/r/partition_debug_sync_innodb.result: updated results. mysql-test/suite/parts/r/partition_mgm_lc0_archive.result: updated results. mysql-test/suite/parts/r/partition_mgm_lc1_archive.result: updated results. mysql-test/suite/parts/r/partition_mgm_lc2_archive.result: updated results. mysql-test/suite/parts/t/partition_debug_sync_innodb.test: Test case for this bug. mysql-test/t/not_partition.test: Added check for TRUNCATE PARTITION without partitioning. mysql-test/t/partition_truncate.test: Added test of TRUNCATE PARTITION on non partitioned table. sql/CMakeLists.txt: Added new files. sql/Makefile.am: Added new files. sql/datadict.cc: Moved out the storage engine check into an own function, including assert for lock. sql/datadict.h: added dd_frm_storage_engine. sql/sql_alter_table.cc: moved the code for SQLCOM_ALTER_TABLE in mysql_execute_command into its own file, and using the Sql_statement object to prepare for future parser reengineering. sql/sql_alter_table.h: Created Sql_statement object for ALTER TABLE. sql/sql_lex.cc: resetting m_stmt. sql/sql_lex.h: Temporary hack for forward declaration of enum_alter_table_change_level. sql/sql_parse.cc: Moved out ALTER/ANALYZE/CHECK/OPTIMIZE/REPAIR TABLE from the giant switch into their own Sql_statement objects. sql/sql_parse.h: Exporting check_merge_table_access. sql/sql_partition_admin.cc: created Sql_statement for ALTER TABLE t ANALYZE/CHECK/OPTIMIZE/REPAIR/TRUNCATE PARTITION. To be able to reuse the TABLE equivalents. sql/sql_partition_admin.h: Added Sql_statement of partition admin statements. sql/sql_table.cc: Moved table maintenance code into sql_table_maintenance.cc sql/sql_table.h: Moved table maintenance code into sql_table_maintenance.h exporting functions used by sql_table_maintenance. sql/sql_table_maintenance.cc: Moved table maintenance code from sql_table.cc sql/sql_table_maintenance.h: Sql_statement objects for ANALYZE/CHECK/OPTIMIZE/REPAIR TABLE. Also declaring the keycache functions. sql/sql_truncate.cc: Moved code from SQLCOM_TRUNCATE in mysql_execute_command into Truncate_statement::execute. Added check for partitioned table on TRUNCATE PARTITION. Moved locking fix for partitioned table into Alter_table_truncate_partition::execute. sql/sql_truncate.h: Truncate_statement declaration (sub class of Sql_statement). sql/sql_yacc.yy: Using the new Sql_statment objects. --- libmysqld/Makefile.am | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libmysqld/Makefile.am') diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am index 1ffa349bcfe..7fe51698491 100644 --- a/libmysqld/Makefile.am +++ b/libmysqld/Makefile.am @@ -63,7 +63,7 @@ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \ protocol.cc net_serv.cc opt_range.cc \ opt_sum.cc procedure.cc records.cc sql_acl.cc \ sql_load.cc discover.cc sql_locale.cc \ - sql_profile.cc sql_truncate.cc datadict.cc \ + sql_profile.cc sql_table_maintenance.cc sql_truncate.cc datadict.cc \ sql_analyse.cc sql_base.cc sql_cache.cc sql_class.cc \ sql_crypt.cc sql_db.cc sql_delete.cc sql_error.cc sql_insert.cc \ sql_lex.cc sql_list.cc sql_manager.cc \ @@ -78,9 +78,10 @@ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \ parse_file.cc sql_view.cc sql_trigger.cc my_decimal.cc \ rpl_filter.cc sql_partition.cc sql_builtin.cc sql_plugin.cc \ debug_sync.cc sql_tablespace.cc transaction.cc \ - rpl_injector.cc my_user.c partition_info.cc \ + rpl_injector.cc my_user.c partition_info.cc sql_alter_table.cc \ sql_servers.cc event_parse_data.cc sql_signal.cc \ - rpl_handler.cc mdl.cc keycaches.cc sql_audit.cc + rpl_handler.cc mdl.cc keycaches.cc sql_audit.cc \ + sql_partition_admin.cc libmysqld_int_a_SOURCES= $(libmysqld_sources) nodist_libmysqld_int_a_SOURCES= $(libmysqlsources) $(sqlsources) -- cgit v1.2.1 From b67924eb4e6c29dd9f9e4ceddfc30b6f0a93ef0e Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Mon, 16 Aug 2010 16:25:23 +0200 Subject: Rename of sql_alter_table -> sql_alter and sql_table_maintenance -> sql_admin --- libmysqld/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libmysqld/Makefile.am') diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am index 7fe51698491..6af4588126c 100644 --- a/libmysqld/Makefile.am +++ b/libmysqld/Makefile.am @@ -63,7 +63,7 @@ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \ protocol.cc net_serv.cc opt_range.cc \ opt_sum.cc procedure.cc records.cc sql_acl.cc \ sql_load.cc discover.cc sql_locale.cc \ - sql_profile.cc sql_table_maintenance.cc sql_truncate.cc datadict.cc \ + sql_profile.cc sql_admin.cc sql_truncate.cc datadict.cc \ sql_analyse.cc sql_base.cc sql_cache.cc sql_class.cc \ sql_crypt.cc sql_db.cc sql_delete.cc sql_error.cc sql_insert.cc \ sql_lex.cc sql_list.cc sql_manager.cc \ @@ -78,7 +78,7 @@ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \ parse_file.cc sql_view.cc sql_trigger.cc my_decimal.cc \ rpl_filter.cc sql_partition.cc sql_builtin.cc sql_plugin.cc \ debug_sync.cc sql_tablespace.cc transaction.cc \ - rpl_injector.cc my_user.c partition_info.cc sql_alter_table.cc \ + rpl_injector.cc my_user.c partition_info.cc sql_alter.cc \ sql_servers.cc event_parse_data.cc sql_signal.cc \ rpl_handler.cc mdl.cc keycaches.cc sql_audit.cc \ sql_partition_admin.cc -- cgit v1.2.1