-
Praveenkumar Hulakund authored
With the advent of new data-dictionary it becomes possible to package metadata changes and writing binary log into a single transaction. WL7743 and WL9536 aim to make DDL statements crash-safe by using this feature. However they don't cover DDL which does not involve storage engine. The goal of this WL is to improve crash-safety of non-table DDLs: * CREATE/ALTER/DROP FUNCTION * CREATE/ALTER/DROP PROCEDURE * CREATE/ALTER/DROP EVENT * CREATE/ALTER/DROP VIEW * CREATE/DROP of UDF DDL operations on triggers are already atomic. ACL DDL's are already made atomic by WL9045. Following changes are introduced to ensure above mentioned statements atomic/crash-safe. 1) There are no intermediate commits on SQL-layer during DDL. 2) Updates to data-dictionary table are done as part of the DDL transaction. 3) Write to binary log happens as part of the DDL transaction. 4) Caches of data-dictionary, routine, events and UDF are in consistent with the DDL status. Behavior changes introduced by this WL: ---------------------------------------- To make DROP VIEW statement atomic, non-existing views or tables used in the view list are checked and error is reported. If there are no errors then all the views in the list are dropped and binlog is written for the drop view statement. With this change, partial execution of the DROP VIEW statement is not possible. Source files: ---------------------------------------- Most of the changes are done in sql/sp*, sql/sql_parse.cc, sql/events.*, sql/sql_view.cc, sql/sql_udf.* Other non-table DDLs: ---------------------------------------- Crash-safety for other non-table DDLs * INSTALL/UNINSTALL PLUGIN * INSTALL/UNINSTALL COMPLETION * CREATE/ALTER/DROP SERVER handled by the WL10794.
Praveenkumar Hulakund authoredWith the advent of new data-dictionary it becomes possible to package metadata changes and writing binary log into a single transaction. WL7743 and WL9536 aim to make DDL statements crash-safe by using this feature. However they don't cover DDL which does not involve storage engine. The goal of this WL is to improve crash-safety of non-table DDLs: * CREATE/ALTER/DROP FUNCTION * CREATE/ALTER/DROP PROCEDURE * CREATE/ALTER/DROP EVENT * CREATE/ALTER/DROP VIEW * CREATE/DROP of UDF DDL operations on triggers are already atomic. ACL DDL's are already made atomic by WL9045. Following changes are introduced to ensure above mentioned statements atomic/crash-safe. 1) There are no intermediate commits on SQL-layer during DDL. 2) Updates to data-dictionary table are done as part of the DDL transaction. 3) Write to binary log happens as part of the DDL transaction. 4) Caches of data-dictionary, routine, events and UDF are in consistent with the DDL status. Behavior changes introduced by this WL: ---------------------------------------- To make DROP VIEW statement atomic, non-existing views or tables used in the view list are checked and error is reported. If there are no errors then all the views in the list are dropped and binlog is written for the drop view statement. With this change, partial execution of the DROP VIEW statement is not possible. Source files: ---------------------------------------- Most of the changes are done in sql/sp*, sql/sql_parse.cc, sql/events.*, sql/sql_view.cc, sql/sql_udf.* Other non-table DDLs: ---------------------------------------- Crash-safety for other non-table DDLs * INSTALL/UNINSTALL PLUGIN * INSTALL/UNINSTALL COMPLETION * CREATE/ALTER/DROP SERVER handled by the WL10794.
Loading