We're updating the issue view to help you get more done.Learn more

ALTER VIEW Needs Fix to Handle RESTRICT/CASCADE Options

sql_view.cc comments indicate that CASCADE/RESTRICT options are parsed but ignored:

/*
TODO: read dependence list, too, to process cascade/restrict
TODO: special cascade/restrict procedure for alter?
*/

There's at least 4 problems I can see:

  • the options don't work (according to the comment)
  • end-user applications will break when the options are actually implemented since the ambiguous statements will diverge in behavior
  • replication will not be backward-compatible for older slaves (using views)
  • the comments talk about "cascade/restrict", but the manual talks about "local and cascaded"

http://dev.mysql.com/doc/refman/5.5/en/create-view.html:

"In a WITH CHECK OPTION clause for an updatable view, the LOCAL and CASCADED keywords determine the scope of check testing when the view is defined in terms of another view. The LOCAL keyword restricts the CHECK OPTION only to the view being defined. CASCADED causes the checks for underlying views to be evaluated as well. When neither keyword is given, the default is CASCADED. "

Status

Assignee

Unassigned

Reporter

James Briggs