-
Praveenkumar Hulakund authored
Check for mysqldump test failed because of a difference in the identifier names used in sys schema views before and after executing the test. As part of the mysqldump test, sys schema is dumped to a file then sys schema is dropped and recreated from the dump file. While recreating the sys schema for few views, identifier names used in view definition is stored differently. Hence check of main.mysqldump test failed. While preparing a view definition string, schema name is not prefixed to the identifiers(using table alias name) for operation as the SHOW CREATE VIEW(SQLCOM_SHOW_CREATE) and CREATE VIEW (SQLCOM_CREATE_VIEW). While recreating a view, metadata of a view(s) referencing the view being created/altered is updated. LEX::sql_command in the scope of referencing view(s) metadata update is set to SQLCOM_SHOW_FIELDS. Hence while preparing view definition of referencing view(s) the schema name is prefixed for identifier (using table alias name). So the difference in the view definition is observed. Currently mysql_register_view() is called with ALTER_VIEW mode to update the referencing view's metadata. This method prepares view TABLE_LIST object to create/alter a view. But while updating referencing view's metadata, TABLE_LIST object is prepared from the data-dictionary table. Hence re-preparing TABLE_LIST object for the view in mysql_register_view() is not necessary here. So to fix this issue, dd::update_view() is called directly instead of mysql_register_view() to update referencing view's metadata. DDL operations on TABLE or VIEW or Stored function might change the referencing views "updatable" status. Hence even referencing view's updatable state is checked and updated. Change-Id: I8e03c7e5117a2c637ab14f761814ae8480114d08
Praveenkumar Hulakund authoredCheck for mysqldump test failed because of a difference in the identifier names used in sys schema views before and after executing the test. As part of the mysqldump test, sys schema is dumped to a file then sys schema is dropped and recreated from the dump file. While recreating the sys schema for few views, identifier names used in view definition is stored differently. Hence check of main.mysqldump test failed. While preparing a view definition string, schema name is not prefixed to the identifiers(using table alias name) for operation as the SHOW CREATE VIEW(SQLCOM_SHOW_CREATE) and CREATE VIEW (SQLCOM_CREATE_VIEW). While recreating a view, metadata of a view(s) referencing the view being created/altered is updated. LEX::sql_command in the scope of referencing view(s) metadata update is set to SQLCOM_SHOW_FIELDS. Hence while preparing view definition of referencing view(s) the schema name is prefixed for identifier (using table alias name). So the difference in the view definition is observed. Currently mysql_register_view() is called with ALTER_VIEW mode to update the referencing view's metadata. This method prepares view TABLE_LIST object to create/alter a view. But while updating referencing view's metadata, TABLE_LIST object is prepared from the data-dictionary table. Hence re-preparing TABLE_LIST object for the view in mysql_register_view() is not necessary here. So to fix this issue, dd::update_view() is called directly instead of mysql_register_view() to update referencing view's metadata. DDL operations on TABLE or VIEW or Stored function might change the referencing views "updatable" status. Hence even referencing view's updatable state is checked and updated. Change-Id: I8e03c7e5117a2c637ab14f761814ae8480114d08
Loading